/*! * jQuery JavaScript Library v1.12.4 * http://jquery.com/ * * Includes Sizzle.js * http://sizzlejs.com/ * * Copyright jQuery Foundation and other contributors * Released under the MIT license * http://jquery.org/license * * Date: 2016-05-20T17:17Z */ function openModal(e,t){return $(".modal-popup:not("+e+")").each(function(e,t){closeModal("#"+$(t).attr("id"))}),$(e).trigger({type:"modal:opening",relatedTarget:t}),resizeModal(e),!1}function resizeModal(e){var t=$(e),n=t.find(".popup-overlay-inner"),i=parseInt($(e).data("width"))||600,o=.9*window.innerWidth>i?i:.9*window.innerWidth;n.css("width",o).css("margin-left",-n.outerWidth()/2),t.is(":hidden")&&t.fadeIn(200,function(){if($("body").addClass("modal-open"),t.addClass("open"),t.trigger("modal:open"),"function"==typeof Event)var n=new Event("modal:open");else{var n=document.createEvent("Event");n.initEvent("modal:open",!0,!0)}window.dispatchEvent(n),$(document).on("keyup.modal",function(t){27==t.keyCode&&closeModal(e)})});var r=Math.max(-n.outerHeight()/2,-($(window).height()/2-20));n.css("margin-top",r)}function closeModal(e){var t=$(e);return $(document).off("keyup.modal"),t.trigger("modal:closing"),t.fadeOut(200,function(){$(this).hasClass("modal-remove")&&$(this).remove(),t.trigger("modal:closed")}),$("body").removeClass("modal-open"),t.removeClass("open"),!1}function fetchHelloWorld(){var e,t=document.createElement("a");if(t.href=document.referrer,!(Cookies.get("showedHelloWorld")||document.referrer.length&&t.hostname==window.location.hostname)){var e="default";t.hostname&&t.hostname!=window.location.hostname&&(e=t.hostname);for(var n=window.location.search.replace("?","").split("&"),i=0;io||r+t');t.val(e),$("form.append-csrf-token").append(t)}function sortTable(){$("form.sortable .table-sortable tbody").sortable({axis:"y",handle:".handle",containment:"parent",items:"tr:not(.sortable-disabled)",placeholder:"sortable-placeholder",helper:function(e,t){var n=$(t).clone();return n.addClass("sortable-helper"),n},tolerance:"pointer"}).bind("sortupdate",function(e){resetSortablePositions($(e.target))})}function resetSortablePositions(e){var e=e||$("form.sortable .table-sortable tbody");e.find("tr:not(.removed)").each(function(e){$(this).find(".position-static").text(e+1),$(this).find("input.position").val(e+1).trigger("change")})}function showAlerts(){var e=$(".alert-top"),t=-e.outerWidth()-1;e.css("right",t+"px"),window.setTimeout(function(){e.removeClass("alert-hidden"),e.css("right",""),window.setTimeout(function(){e.css("right",t+"px")},5e3)},100)}/*! * Bootstrap v3.4.1 (https://getbootstrap.com/) * Copyright 2011-2019 Twitter, Inc. * Licensed under the MIT license */ if(function(e,t){"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(e,t){function n(e){var t=!!e&&"length"in e&&e.length,n=fe.type(e);return"function"!==n&&!fe.isWindow(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}function i(e,t,n){if(fe.isFunction(t))return fe.grep(e,function(e,i){return!!t.call(e,i,e)!==n});if(t.nodeType)return fe.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(_e.test(t))return fe.filter(t,e,n);t=fe.filter(t,e)}return fe.grep(e,function(e){return fe.inArray(e,t)>-1!==n})}function o(e,t){do{e=e[t]}while(e&&1!==e.nodeType);return e}function r(e){var t={};return fe.each(e.match($e)||[],function(e,n){t[n]=!0}),t}function s(){ie.addEventListener?(ie.removeEventListener("DOMContentLoaded",a),e.removeEventListener("load",a)):(ie.detachEvent("onreadystatechange",a),e.detachEvent("onload",a))}function a(){(ie.addEventListener||"load"===e.event.type||"complete"===ie.readyState)&&(s(),fe.ready())}function l(e,t,n){if(n===undefined&&1===e.nodeType){var i="data-"+t.replace(Ie,"-$1").toLowerCase();if("string"==typeof(n=e.getAttribute(i))){try{n="true"===n||"false"!==n&&("null"===n?null:+n+""===n?+n:Me.test(n)?fe.parseJSON(n):n)}catch(e){}fe.data(e,t,n)}else n=undefined}return n}function c(e){var t;for(t in e)if(("data"!==t||!fe.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}function u(e,t,n,i){if(Ne(e)){var o,r,s=fe.expando,a=e.nodeType,l=a?fe.cache:e,c=a?e[s]:e[s]&&s;if(c&&l[c]&&(i||l[c].data)||n!==undefined||"string"!=typeof t)return c||(c=a?e[s]=ne.pop()||fe.guid++:s),l[c]||(l[c]=a?{}:{toJSON:fe.noop}),"object"!=typeof t&&"function"!=typeof t||(i?l[c]=fe.extend(l[c],t):l[c].data=fe.extend(l[c].data,t)),r=l[c],i||(r.data||(r.data={}),r=r.data),n!==undefined&&(r[fe.camelCase(t)]=n),"string"==typeof t?null==(o=r[t])&&(o=r[fe.camelCase(t)]):o=r,o}}function d(e,t,n){if(Ne(e)){var i,o,r=e.nodeType,s=r?fe.cache:e,a=r?e[fe.expando]:fe.expando;if(s[a]){if(t&&(i=n?s[a]:s[a].data)){fe.isArray(t)?t=t.concat(fe.map(t,fe.camelCase)):t in i?t=[t]:(t=fe.camelCase(t),t=t in i?[t]:t.split(" ")),o=t.length;for(;o--;)delete i[t[o]];if(n?!c(i):!fe.isEmptyObject(i))return}(n||(delete s[a].data,c(s[a])))&&(r?fe.cleanData([e],!0):de.deleteExpando||s!=s.window?delete s[a]:s[a]=undefined)}}}function h(e,t,n,i){var o,r=1,s=20,a=i?function(){return i.cur()}:function(){return fe.css(e,t,"")},l=a(),c=n&&n[3]||(fe.cssNumber[t]?"":"px"),u=(fe.cssNumber[t]||"px"!==c&&+l)&&Pe.exec(fe.css(e,t));if(u&&u[3]!==c){c=c||u[3],n=n||[],u=+l||1;do{r=r||".5",u/=r,fe.style(e,t,u+c)}while(r!==(r=a()/l)&&1!==r&&--s)}return n&&(u=+u||+l||0,o=n[1]?u+(n[1]+1)*n[2]:+n[2],i&&(i.unit=c,i.start=u,i.end=o)),o}function f(e){var t=ze.split("|"),n=e.createDocumentFragment();if(n.createElement)for(;t.length;)n.createElement(t.pop());return n}function p(e,t){var n,i,o=0,r="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):undefined;if(!r)for(r=[],n=e.childNodes||e;null!=(i=n[o]);o++)!t||fe.nodeName(i,t)?r.push(i):fe.merge(r,p(i,t));return t===undefined||t&&fe.nodeName(e,t)?fe.merge([e],r):r}function m(e,t){for(var n,i=0;null!=(n=e[i]);i++)fe._data(n,"globalEval",!t||fe._data(t[i],"globalEval"))}function g(e){Fe.test(e.type)&&(e.defaultChecked=e.checked)}function v(e,t,n,i,o){for(var r,s,a,l,c,u,d,h=e.length,v=f(t),y=[],b=0;b"!==d[1]||Ye.test(s)?0:l:l.firstChild,r=s&&s.childNodes.length;r--;)fe.nodeName(u=s.childNodes[r],"tbody")&&!u.childNodes.length&&s.removeChild(u);for(fe.merge(y,l.childNodes),l.textContent="";l.firstChild;)l.removeChild(l.firstChild);l=v.lastChild}else y.push(t.createTextNode(s));for(l&&v.removeChild(l),de.appendChecked||fe.grep(p(y,"input"),g),b=0;s=y[b++];)if(i&&fe.inArray(s,i)>-1)o&&o.push(s);else if(a=fe.contains(s.ownerDocument,s),l=p(v.appendChild(s),"script"),a&&m(l),n)for(r=0;s=l[r++];)qe.test(s.type||"")&&n.push(s);return l=null,v}function y(){return!0}function b(){return!1}function w(){try{return ie.activeElement}catch(e){}}function x(e,t,n,i,o,r){var s,a;if("object"==typeof t){"string"!=typeof n&&(i=i||n,n=undefined);for(a in t)x(e,a,n,i,t[a],r);return e}if(null==i&&null==o?(o=n,i=n=undefined):null==o&&("string"==typeof n?(o=i,i=undefined):(o=i,i=n,n=undefined)),!1===o)o=b;else if(!o)return e;return 1===r&&(s=o,o=function(e){return fe().off(e),s.apply(this,arguments)},o.guid=s.guid||(s.guid=fe.guid++)),e.each(function(){fe.event.add(this,t,o,i,n)})}function C(e,t){return fe.nodeName(e,"table")&&fe.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function _(e){return e.type=(null!==fe.find.attr(e,"type"))+"/"+e.type,e}function D(e){var t=it.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function T(e,t){if(1===t.nodeType&&fe.hasData(e)){var n,i,o,r=fe._data(e),s=fe._data(t,r),a=r.events;if(a){delete s.handle,s.events={};for(n in a)for(i=0,o=a[n].length;i1&&"string"==typeof f&&!de.checkClone&&nt.test(f))return e.each(function(o){var r=e.eq(o);m&&(t[0]=f.call(this,o,r.html())),S(r,t,n,i)});if(d&&(c=v(t,e[0].ownerDocument,!1,e,i),o=c.firstChild,1===c.childNodes.length&&(c=o),o||i)){for(a=fe.map(p(c,"script"),_),s=a.length;u")).appendTo(t.documentElement),t=(at[0].contentWindow||at[0].contentDocument).document,t.write(),t.close(),n=k(e,t),at.detach()),lt[e]=n),n}function N(e,t){return{get:function(){return e()?void delete this.get:(this.get=t).apply(this,arguments)}}}function M(e){if(e in _t)return e;for(var t=e.charAt(0).toUpperCase()+e.slice(1),n=Ct.length;n--;)if((e=Ct[n]+t)in _t)return e}function I(e,t){for(var n,i,o,r=[],s=0,a=e.length;s=0&&n=0},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},isPlainObject:function(e){var t;if(!e||"object"!==fe.type(e)||e.nodeType||fe.isWindow(e))return!1;try{if(e.constructor&&!ue.call(e,"constructor")&&!ue.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(e){return!1}if(!de.ownFirst)for(t in e)return ue.call(e,t);for(t in e);return t===undefined||ue.call(e,t)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?le[ce.call(e)]||"object":typeof e},globalEval:function(t){t&&fe.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(me,"ms-").replace(ge,ve)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t){var i,o=0;if(n(e))for(i=e.length;oC.cacheLength&&delete e[t.shift()],e[n+" "]=i}var t=[];return e}function i(e){return e[F]=!0,e}function o(e){var t=M.createElement("div");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function r(e,t){for(var n=e.split("|"),i=n.length;i--;)C.attrHandle[n[i]]=t}function s(e,t){var n=t&&e,i=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||G)-(~e.sourceIndex||G);if(i)return i;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function a(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function l(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function c(e){return i(function(t){return t=+t,i(function(n,i){for(var o,r=e([],n.length,t),s=r.length;s--;)n[o=r[s]]&&(n[o]=!(i[o]=n[o]))})})}function u(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}function d(){}function h(e){for(var t=0,n=e.length,i="";t1?function(t,n,i){for(var o=e.length;o--;)if(!e[o](t,n,i))return!1;return!0}:e[0]}function m(e,n,i){for(var o=0,r=n.length;o-1&&(i[c]=!(s[c]=d))}}else b=g(b===s?b.splice(p,b.length):b),r?r(null,s,b,l):J.apply(s,b)})}function y(e){for(var t,n,i,o=e.length,r=C.relative[e[0].type],s=r||C.relative[" "],a=r?1:0,l=f(function(e){return e===t},s,!0),c=f(function(e){return ee(t,e)>-1},s,!0),u=[function(e,n,i){var o=!r&&(i||n!==$)||((t=n).nodeType?l(e,n,i):c(e,n,i));return t=null,o}];a1&&p(u),a>1&&h(e.slice(0,a-1).concat({value:" "===e[a-2].type?"*":""})).replace(ae,"$1"),n,a0,r=e.length>0,s=function(i,s,a,l,c){var u,d,h,f=0,p="0",m=i&&[],v=[],y=$,b=i||r&&C.find.TAG("*",c),w=q+=null==y?1:Math.random()||.1,x=b.length;for(c&&($=s===M||s||c);p!==x&&null!=(u=b[p]);p++){if(r&&u){for(d=0,s||u.ownerDocument===M||(N(u),a=!O);h=e[d++];)if(h(u,s||M,a)){l.push(u);break}c&&(q=w)}o&&((u=!h&&u)&&f--,i&&m.push(u))}if(f+=p,o&&p!==f){for(d=0;h=n[d++];)h(m,v,s,a);if(i){if(f>0)for(;p--;)m[p]||v[p]||(v[p]=K.call(l));v=g(v)}J.apply(l,v),c&&!i&&v.length>0&&f+n.length>1&&t.uniqueSort(l)}return c&&(q=w,$=y),m};return o?i(s):s}var w,x,C,_,D,T,E,S,$,k,A,N,M,I,O,P,j,L,H,F="sizzle"+1*new Date,R=e.document,q=0,W=0,z=n(),B=n(),U=n(),Y=function(e,t){return e===t&&(A=!0),0},G=1<<31,X={}.hasOwnProperty,V=[],K=V.pop,Q=V.push,J=V.push,Z=V.slice,ee=function(e,t){for(var n=0,i=e.length;n+~]|"+ne+")"+ne+"*"),ue=new RegExp("="+ne+"*([^\\]'\"]*?)"+ne+"*\\]","g"),de=new RegExp(re),he=new RegExp("^"+ie+"$"),fe={ID:new RegExp("^#("+ie+")"),CLASS:new RegExp("^\\.("+ie+")"),TAG:new RegExp("^("+ie+"|[*])"),ATTR:new RegExp("^"+oe),PSEUDO:new RegExp("^"+re),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ne+"*(even|odd|(([+-]|)(\\d*)n|)"+ne+"*(?:([+-]|)"+ne+"*(\\d+)|))"+ne+"*\\)|)","i"),bool:new RegExp("^(?:"+te+")$","i"),needsContext:new RegExp("^"+ne+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ne+"*((?:-\\d)?\\d*)"+ne+"*\\)|)(?=[^-]|$)","i")},pe=/^(?:input|select|textarea|button)$/i,me=/^h\d$/i,ge=/^[^{]+\{\s*\[native \w/,ve=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ye=/[+~]/,be=/'|\\/g,we=new RegExp("\\\\([\\da-f]{1,6}"+ne+"?|("+ne+")|.)","ig"),xe=function(e,t,n){var i="0x"+t-65536;return i!==i||n?t:i<0?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,1023&i|56320)},Ce=function(){N()};try{J.apply(V=Z.call(R.childNodes),R.childNodes),V[R.childNodes.length].nodeType}catch(e){J={apply:V.length?function(e,t){Q.apply(e,Z.call(t))}:function(e,t){for(var n=e.length,i=0;e[n++]=t[i++];);e.length=n-1}}}x=t.support={},D=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},N=t.setDocument=function(e){var t,n,i=e?e.ownerDocument||e:R;return i!==M&&9===i.nodeType&&i.documentElement?(M=i,I=M.documentElement,O=!D(M),(n=M.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",Ce,!1):n.attachEvent&&n.attachEvent("onunload",Ce)),x.attributes=o(function(e){return e.className="i",!e.getAttribute("className")}),x.getElementsByTagName=o(function(e){return e.appendChild(M.createComment("")),!e.getElementsByTagName("*").length}),x.getElementsByClassName=ge.test(M.getElementsByClassName),x.getById=o(function(e){return I.appendChild(e).id=F,!M.getElementsByName||!M.getElementsByName(F).length}),x.getById?(C.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&O){var n=t.getElementById(e);return n?[n]:[]}},C.filter.ID=function(e){var t=e.replace(we,xe);return function(e){return e.getAttribute("id")===t}}):(delete C.find.ID,C.filter.ID=function(e){var t=e.replace(we,xe);return function(e){var n="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}}),C.find.TAG=x.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):x.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,i=[],o=0,r=t.getElementsByTagName(e);if("*"===e){for(;n=r[o++];)1===n.nodeType&&i.push(n);return i}return r},C.find.CLASS=x.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&O)return t.getElementsByClassName(e)},j=[],P=[],(x.qsa=ge.test(M.querySelectorAll))&&(o(function(e){I.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&P.push("[*^$]="+ne+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||P.push("\\["+ne+"*(?:value|"+te+")"),e.querySelectorAll("[id~="+F+"-]").length||P.push("~="),e.querySelectorAll(":checked").length||P.push(":checked"),e.querySelectorAll("a#"+F+"+*").length||P.push(".#.+[+~]")}),o(function(e){var t=M.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&P.push("name"+ne+"*[*^$|!~]?="),e.querySelectorAll(":enabled").length||P.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),P.push(",.*:")})),(x.matchesSelector=ge.test(L=I.matches||I.webkitMatchesSelector||I.mozMatchesSelector||I.oMatchesSelector||I.msMatchesSelector))&&o(function(e){x.disconnectedMatch=L.call(e,"div"),L.call(e,"[s!='']:x"),j.push("!=",re)}),P=P.length&&new RegExp(P.join("|")),j=j.length&&new RegExp(j.join("|")),t=ge.test(I.compareDocumentPosition),H=t||ge.test(I.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,i=t&&t.parentNode;return e===i||!(!i||1!==i.nodeType||!(n.contains?n.contains(i):e.compareDocumentPosition&&16&e.compareDocumentPosition(i)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},Y=t?function(e,t){if(e===t)return A=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&n||!x.sortDetached&&t.compareDocumentPosition(e)===n?e===M||e.ownerDocument===R&&H(R,e)?-1:t===M||t.ownerDocument===R&&H(R,t)?1:k?ee(k,e)-ee(k,t):0:4&n?-1:1)}:function(e,t){if(e===t)return A=!0,0;var n,i=0,o=e.parentNode,r=t.parentNode,a=[e],l=[t];if(!o||!r)return e===M?-1:t===M?1:o?-1:r?1:k?ee(k,e)-ee(k,t):0;if(o===r)return s(e,t);for(n=e;n=n.parentNode;)a.unshift(n);for(n=t;n=n.parentNode;)l.unshift(n);for(;a[i]===l[i];)i++;return i?s(a[i],l[i]):a[i]===R?-1:l[i]===R?1:0},M):M},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if((e.ownerDocument||e)!==M&&N(e),n=n.replace(ue,"='$1']"),x.matchesSelector&&O&&!U[n+" "]&&(!j||!j.test(n))&&(!P||!P.test(n)))try{var i=L.call(e,n);if(i||x.disconnectedMatch||e.document&&11!==e.document.nodeType)return i}catch(e){}return t(n,M,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==M&&N(e),H(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==M&&N(e);var n=C.attrHandle[t.toLowerCase()],i=n&&X.call(C.attrHandle,t.toLowerCase())?n(e,t,!O):undefined;return i!==undefined?i:x.attributes||!O?e.getAttribute(t):(i=e.getAttributeNode(t))&&i.specified?i.value:null},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,n=[],i=0,o=0;if(A=!x.detectDuplicates,k=!x.sortStable&&e.slice(0),e.sort(Y),A){for(;t=e[o++];)t===e[o]&&(i=n.push(o));for(;i--;)e.splice(n[i],1)}return k=null,e},_=t.getText=function(e){var t,n="",i=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=_(e)}else if(3===o||4===o)return e.nodeValue}else for(;t=e[i++];)n+=_(t);return n},C=t.selectors={cacheLength:50,createPseudo:i,match:fe,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(we,xe),e[3]=(e[3]||e[4]||e[5]||"").replace(we,xe),"~="===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]||t.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]&&t.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return fe.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&de.test(n)&&(t=T(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(we,xe).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=z[e+" "];return t||(t=new RegExp("(^|"+ne+")"+e+"("+ne+"|$)"))&&z(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,n,i){return function(o){var r=t.attr(o,e);return null==r?"!="===n:!n||(r+="","="===n?r===i:"!="===n?r!==i:"^="===n?i&&0===r.indexOf(i):"*="===n?i&&r.indexOf(i)>-1:"$="===n?i&&r.slice(-i.length)===i:"~="===n?(" "+r.replace(se," ")+" ").indexOf(i)>-1:"|="===n&&(r===i||r.slice(0,i.length+1)===i+"-"))}},CHILD:function(e,t,n,i,o){var r="nth"!==e.slice(0,3),s="last"!==e.slice(-4),a="of-type"===t;return 1===i&&0===o?function(e){return!!e.parentNode}:function(t,n,l){var c,u,d,h,f,p,m=r!==s?"nextSibling":"previousSibling",g=t.parentNode,v=a&&t.nodeName.toLowerCase(),y=!l&&!a,b=!1;if(g){if(r){for(;m;){for(h=t;h=h[m];)if(a?h.nodeName.toLowerCase()===v:1===h.nodeType)return!1;p=m="only"===e&&!p&&"nextSibling"}return!0}if(p=[s?g.firstChild:g.lastChild],s&&y){for(h=g,d=h[F]||(h[F]={}),u=d[h.uniqueID]||(d[h.uniqueID]={}),c=u[e]||[],f=c[0]===q&&c[1],b=f&&c[2],h=f&&g.childNodes[f];h=++f&&h&&h[m]||(b=f=0)||p.pop();)if(1===h.nodeType&&++b&&h===t){u[e]=[q,f,b];break}}else if(y&&(h=t,d=h[F]||(h[F]={}),u=d[h.uniqueID]||(d[h.uniqueID]={}),c=u[e]||[],f=c[0]===q&&c[1],b=f),!1===b)for(;(h=++f&&h&&h[m]||(b=f=0)||p.pop())&&((a?h.nodeName.toLowerCase()!==v:1!==h.nodeType)||!++b||(y&&(d=h[F]||(h[F]={}),u=d[h.uniqueID]||(d[h.uniqueID]={}),u[e]=[q,b]),h!==t)););return(b-=o)===i||b%i==0&&b/i>=0}}},PSEUDO:function(e,n){var o,r=C.pseudos[e]||C.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return r[F]?r(n):r.length>1?(o=[e,e,"",n],C.setFilters.hasOwnProperty(e.toLowerCase())?i(function(e,t){for(var i,o=r(e,n),s=o.length;s--;)i=ee(e,o[s]),e[i]=!(t[i]=o[s])}):function(e){return r(e,0,o)}):r}},pseudos:{not:i(function(e){var t=[],n=[],o=E(e.replace(ae,"$1"));return o[F]?i(function(e,t,n,i){for(var r,s=o(e,null,i,[]),a=e.length;a--;)(r=s[a])&&(e[a]=!(t[a]=r))}):function(e,i,r){return t[0]=e,o(t,null,r,n),t[0]=null,!n.pop()}}),has:i(function(e){return function(n){return t(e,n).length>0}}),contains:i(function(e){return e=e.replace(we,xe),function(t){return(t.textContent||t.innerText||_(t)).indexOf(e)>-1}}),lang:i(function(e){return he.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(we,xe).toLowerCase(),function(t){var n;do{if(n=O?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===I},focus:function(e){return e===M.activeElement&&(!M.hasFocus||M.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return!1===e.disabled},disabled:function(e){return!0===e.disabled},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!C.pseudos.empty(e)},header:function(e){return me.test(e.nodeName)},input:function(e){return pe.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:c(function(){return[0]}),last:c(function(e,t){return[t-1]}),eq:c(function(e,t,n){return[n<0?n+t:n]}),even:c(function(e,t){for(var n=0;n=0;)e.push(i);return e}),gt:c(function(e,t,n){for(var i=n<0?n+t:n;++i2&&"ID"===(s=r[0]).type&&x.getById&&9===t.nodeType&&O&&C.relative[r[1].type]){if(!(t=(C.find.ID(s.matches[0].replace(we,xe),t)||[])[0]))return n;c&&(t=t.parentNode),e=e.slice(r.shift().value.length)}for(o=fe.needsContext.test(e)?0:r.length;o--&&(s=r[o],!C.relative[a=s.type]);)if((l=C.find[a])&&(i=l(s.matches[0].replace(we,xe),ye.test(r[0].type)&&u(t.parentNode)||t))){if(r.splice(o,1),!(e=i.length&&h(r)))return J.apply(n,i),n;break}}return(c||E(e,d))(i,t,!O,n,!t||ye.test(e)&&u(t.parentNode)||t),n},x.sortStable=F.split("").sort(Y).join("")===F,x.detectDuplicates=!!A,N(),x.sortDetached=o(function(e){return 1&e.compareDocumentPosition(M.createElement("div"))}),o(function(e){return e.innerHTML="","#"===e.firstChild.getAttribute("href")})||r("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),x.attributes&&o(function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||r("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),o(function(e){return null==e.getAttribute("disabled")})||r(te,function(e,t,n){var i;if(!n)return!0===e[t]?t.toLowerCase():(i=e.getAttributeNode(t))&&i.specified?i.value:null}),t}(e);fe.find=ye,fe.expr=ye.selectors,fe.expr[":"]=fe.expr.pseudos,fe.uniqueSort=fe.unique=ye.uniqueSort,fe.text=ye.getText,fe.isXMLDoc=ye.isXML,fe.contains=ye.contains;var be=function(e,t,n){for(var i=[],o=n!==undefined;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(o&&fe(e).is(n))break;i.push(e)}return i},we=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},xe=fe.expr.match.needsContext,Ce=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,_e=/^.[^:#\[\.,]*$/;fe.filter=function(e,t,n){var i=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===i.nodeType?fe.find.matchesSelector(i,e)?[i]:[]:fe.find.matches(e,fe.grep(t,function(e){return 1===e.nodeType}))},fe.fn.extend({find:function(e){var t,n=[],i=this,o=i.length;if("string"!=typeof e)return this.pushStack(fe(e).filter(function(){for(t=0;t1?fe.unique(n):n),n.selector=this.selector?this.selector+" "+e:e,n},filter:function(e){return this.pushStack(i(this,e||[],!1))},not:function(e){return this.pushStack(i(this,e||[],!0))},is:function(e){return!!i(this,"string"==typeof e&&xe.test(e)?fe(e):e||[],!1).length}});var De,Te=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/;(fe.fn.init=function(e,t,n){var i,o;if(!e)return this;if(n=n||De,"string"==typeof e){if(!(i="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:Te.exec(e))||!i[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(i[1]){if(t=t instanceof fe?t[0]:t,fe.merge(this,fe.parseHTML(i[1],t&&t.nodeType?t.ownerDocument||t:ie,!0)),Ce.test(i[1])&&fe.isPlainObject(t))for(i in t)fe.isFunction(this[i])?this[i](t[i]):this.attr(i,t[i]);return this}if((o=ie.getElementById(i[2]))&&o.parentNode){if(o.id!==i[2])return De.find(e);this.length=1,this[0]=o}return this.context=ie,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):fe.isFunction(e)?"undefined"!=typeof n.ready?n.ready(e):e(fe):(e.selector!==undefined&&(this.selector=e.selector,this.context=e.context),fe.makeArray(e,this))}).prototype=fe.fn,De=fe(ie);var Ee=/^(?:parents|prev(?:Until|All))/,Se={children:!0,contents:!0,next:!0,prev:!0};fe.fn.extend({has:function(e){var t,n=fe(e,this),i=n.length;return this.filter(function(){for(t=0;t-1:1===n.nodeType&&fe.find.matchesSelector(n,e))){r.push(n);break}return this.pushStack(r.length>1?fe.uniqueSort(r):r)},index:function(e){return e?"string"==typeof e?fe.inArray(this[0],fe(e)):fe.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(fe.uniqueSort(fe.merge(this.get(),fe(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),fe.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return be(e,"parentNode")},parentsUntil:function(e,t,n){return be(e,"parentNode",n)},next:function(e){return o(e,"nextSibling")},prev:function(e){return o(e,"previousSibling")},nextAll:function(e){return be(e,"nextSibling")},prevAll:function(e){return be(e,"previousSibling")},nextUntil:function(e,t,n){return be(e,"nextSibling",n)},prevUntil:function(e,t,n){return be(e,"previousSibling",n)},siblings:function(e){return we((e.parentNode||{}).firstChild,e)},children:function(e){return we(e.firstChild)},contents:function(e){return fe.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:fe.merge([],e.childNodes)}},function(e,t){fe.fn[e]=function(n,i){var o=fe.map(this,t,n);return"Until"!==e.slice(-5)&&(i=n),i&&"string"==typeof i&&(o=fe.filter(i,o)),this.length>1&&(Se[e]||(o=fe.uniqueSort(o)),Ee.test(e)&&(o=o.reverse())),this.pushStack(o)}});var $e=/\S+/g;fe.Callbacks=function(e){e="string"==typeof e?r(e):fe.extend({},e);var t,n,i,o,s=[],a=[],l=-1,c=function(){for(o=e.once,i=t=!0;a.length;l=-1)for(n=a.shift();++l-1;)s.splice(n,1),n<=l&&l--}),this},has:function(e){return e?fe.inArray(e,s)>-1:s.length>0},empty:function(){return s&&(s=[]),this},disable:function(){return o=a=[],s=n="",this},disabled:function(){return!s},lock:function(){return o=!0,n||u.disable(),this},locked:function(){return!!o},fireWith:function(e,n){return o||(n=n||[],n=[e,n.slice?n.slice():n],a.push(n),t||c()),this},fire:function(){return u.fireWith(this,arguments),this},fired:function(){return!!i}};return u},fe.extend({Deferred:function(e){var t=[["resolve","done",fe.Callbacks("once memory"),"resolved"],["reject","fail",fe.Callbacks("once memory"),"rejected"],["notify","progress",fe.Callbacks("memory")]],n="pending",i={state:function(){return n},always:function(){return o.done(arguments).fail(arguments),this},then:function(){var e=arguments;return fe.Deferred(function(n){fe.each(t,function(t,r){var s=fe.isFunction(e[t])&&e[t];o[r[1]](function(){var e=s&&s.apply(this,arguments);e&&fe.isFunction(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[r[0]+"With"](this===i?n.promise():this,s?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?fe.extend(e,i):i}},o={};return i.pipe=i.then,fe.each(t,function(e,r){var s=r[2],a=r[3];i[r[1]]=s.add,a&&s.add(function(){n=a},t[1^e][2].disable,t[2][2].lock),o[r[0]]=function(){return o[r[0]+"With"](this===o?i:this,arguments),this},o[r[0]+"With"]=s.fireWith}),i.promise(o),e&&e.call(o,o),o},when:function(e){var t,n,i,o=0,r=oe.call(arguments),s=r.length,a=1!==s||e&&fe.isFunction(e.promise)?s:0,l=1===a?e:fe.Deferred(),c=function(e,n,i){return function(o){n[e]=this,i[e]=arguments.length>1?oe.call(arguments):o,i===t?l.notifyWith(n,i):--a||l.resolveWith(n,i)}};if(s>1)for(t=new Array(s),n=new Array(s),i=new Array(s);o0||(ke.resolveWith(ie,[fe]),fe.fn.triggerHandler&&(fe(ie).triggerHandler("ready"),fe(ie).off("ready"))))}}),fe.ready.promise=function(t){if(!ke)if(ke=fe.Deferred(),"complete"===ie.readyState||"loading"!==ie.readyState&&!ie.documentElement.doScroll)e.setTimeout(fe.ready);else if(ie.addEventListener)ie.addEventListener("DOMContentLoaded",a),e.addEventListener("load",a);else{ie.attachEvent("onreadystatechange",a),e.attachEvent("onload",a);var n=!1;try{n=null==e.frameElement&&ie.documentElement}catch(e){}n&&n.doScroll&&function t(){if(!fe.isReady){try{n.doScroll("left")}catch(n){return e.setTimeout(t,50)}s(),fe.ready()}}()}return ke.promise(t)},fe.ready.promise();var Ae;for(Ae in fe(de))break;de.ownFirst="0"===Ae,de.inlineBlockNeedsLayout=!1,fe(function(){var e,t,n,i;(n=ie.getElementsByTagName("body")[0])&&n.style&&(t=ie.createElement("div"),i=ie.createElement("div"),i.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",n.appendChild(i).appendChild(t),"undefined"!=typeof t.style.zoom&&(t.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",de.inlineBlockNeedsLayout=e=3===t.offsetWidth,e&&(n.style.zoom=1)),n.removeChild(i))}),function(){var e=ie.createElement("div");de.deleteExpando=!0;try{delete e.test}catch(e){de.deleteExpando=!1}e=null}();var Ne=function(e){var t=fe.noData[(e.nodeName+" ").toLowerCase()],n=+e.nodeType||1;return(1===n||9===n)&&(!t||!0!==t&&e.getAttribute("classid")===t)},Me=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Ie=/([A-Z])/g;fe.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(e){return!!(e=e.nodeType?fe.cache[e[fe.expando]]:e[fe.expando])&&!c(e)},data:function(e,t,n){return u(e,t,n)},removeData:function(e,t){return d(e,t)},_data:function(e,t,n){return u(e,t,n,!0)},_removeData:function(e,t){return d(e,t,!0)}}),fe.fn.extend({data:function(e,t){var n,i,o,r=this[0],s=r&&r.attributes;if(e===undefined){if(this.length&&(o=fe.data(r),1===r.nodeType&&!fe._data(r,"parsedAttrs"))){for(n=s.length;n--;)s[n]&&(i=s[n].name,0===i.indexOf("data-")&&(i=fe.camelCase(i.slice(5)),l(r,i,o[i])));fe._data(r,"parsedAttrs",!0)}return o}return"object"==typeof e?this.each(function(){fe.data(this,e)}):arguments.length>1?this.each(function(){fe.data(this,e,t)}):r?l(r,e,fe.data(r,e)):undefined},removeData:function(e){return this.each(function(){fe.removeData(this,e)})}}),fe.extend({queue:function(e,t,n){var i;if(e)return t=(t||"fx")+"queue",i=fe._data(e,t),n&&(!i||fe.isArray(n)?i=fe._data(e,t,fe.makeArray(n)):i.push(n)),i||[]},dequeue:function(e,t){t=t||"fx";var n=fe.queue(e,t),i=n.length,o=n.shift(),r=fe._queueHooks(e,t),s=function(){fe.dequeue(e,t)};"inprogress"===o&&(o=n.shift(),i--),o&&("fx"===t&&n.unshift("inprogress"),delete r.stop,o.call(e,s,r)),!i&&r&&r.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return fe._data(e,n)||fe._data(e,n,{empty:fe.Callbacks("once memory").add(function(){fe._removeData(e,t+"queue"),fe._removeData(e,n)})})}}),fe.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length
a",de.leadingWhitespace=3===e.firstChild.nodeType,de.tbody=!e.getElementsByTagName("tbody").length,de.htmlSerialize=!!e.getElementsByTagName("link").length,de.html5Clone="<:nav>"!==ie.createElement("nav").cloneNode(!0).outerHTML,n.type="checkbox",n.checked=!0,t.appendChild(n),de.appendChecked=n.checked,e.innerHTML="",de.noCloneChecked=!!e.cloneNode(!0).lastChild.defaultValue,t.appendChild(e),n=ie.createElement("input"),n.setAttribute("type","radio"),n.setAttribute("checked","checked"),n.setAttribute("name","t"),e.appendChild(n),de.checkClone=e.cloneNode(!0).cloneNode(!0).lastChild.checked,de.noCloneEvent=!!e.addEventListener,e[fe.expando]=1,de.attributes=!e.getAttribute(fe.expando)}();var Be={option:[1,""],legend:[1,"
","
"],area:[1,"",""],param:[1,"",""],thead:[1,"","
"],tr:[2,"","
"],col:[2,"","
"],td:[3,"","
"],_default:de.htmlSerialize?[0,"",""]:[1,"X
","
"]};Be.optgroup=Be.option,Be.tbody=Be.tfoot=Be.colgroup=Be.caption=Be.thead,Be.th=Be.td;var Ue=/<|&#?\w+;/,Ye=/-1&&(p=f.split("."),f=p.shift(),p.sort()),s=f.indexOf(":")<0&&"on"+f,t=t[fe.expando]?t:new fe.Event(f,"object"==typeof t&&t),t.isTrigger=o?2:3,t.namespace=p.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=undefined,t.target||(t.target=i),n=null==n?[t]:fe.makeArray(n,[t]),c=fe.event.special[f]||{},o||!c.trigger||!1!==c.trigger.apply(i,n))){if(!o&&!c.noBubble&&!fe.isWindow(i)){for(l=c.delegateType||f,Ke.test(l+f)||(a=a.parentNode);a;a=a.parentNode)h.push(a),u=a;u===(i.ownerDocument||ie)&&h.push(u.defaultView||u.parentWindow||e)}for(d=0;(a=h[d++])&&!t.isPropagationStopped();)t.type=d>1?l:c.bindType||f,r=(fe._data(a,"events")||{})[t.type]&&fe._data(a,"handle"),r&&r.apply(a,n),(r=s&&a[s])&&r.apply&&Ne(a)&&(t.result=r.apply(a,n),!1===t.result&&t.preventDefault());if(t.type=f,!o&&!t.isDefaultPrevented()&&(!c._default||!1===c._default.apply(h.pop(),n))&&Ne(i)&&s&&i[f]&&!fe.isWindow(i)){u=i[s],u&&(i[s]=null),fe.event.triggered=f;try{i[f]()}catch(e){}fe.event.triggered=undefined,u&&(i[s]=u)}return t.result}},dispatch:function(e){e=fe.event.fix(e);var t,n,i,o,r,s=[],a=oe.call(arguments),l=(fe._data(this,"events")||{})[e.type]||[],c=fe.event.special[e.type]||{};if(a[0]=e,e.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,e)){for(s=fe.event.handlers.call(this,e,l),t=0;(o=s[t++])&&!e.isPropagationStopped();)for(e.currentTarget=o.elem,n=0;(r=o.handlers[n++])&&!e.isImmediatePropagationStopped();)e.rnamespace&&!e.rnamespace.test(r.namespace)||(e.handleObj=r,e.data=r.data,(i=((fe.event.special[r.origType]||{}).handle||r.handler).apply(o.elem,a))!==undefined&&!1===(e.result=i)&&(e.preventDefault(),e.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,t){var n,i,o,r,s=[],a=t.delegateCount,l=e.target;if(a&&l.nodeType&&("click"!==e.type||isNaN(e.button)||e.button<1))for(;l!=this;l=l.parentNode||this)if(1===l.nodeType&&(!0!==l.disabled||"click"!==e.type)){for(i=[],n=0;n-1:fe.find(o,this,null,[l]).length),i[o]&&i.push(r);i.length&&s.push({elem:l,handlers:i})}return a]","i"),et=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,tt=/\s*$/g,rt=f(ie),st=rt.appendChild(ie.createElement("div"));fe.extend({htmlPrefilter:function(e){return e.replace(et,"<$1>")},clone:function(e,t,n){var i,o,r,s,a,l=fe.contains(e.ownerDocument,e);if(de.html5Clone||fe.isXMLDoc(e)||!Ze.test("<"+e.nodeName+">")?r=e.cloneNode(!0):(st.innerHTML=e.outerHTML,st.removeChild(r=st.firstChild)),!(de.noCloneEvent&&de.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||fe.isXMLDoc(e)))for(i=p(r),a=p(e),s=0;null!=(o=a[s]);++s)i[s]&&E(o,i[s]);if(t)if(n)for(a=a||p(e),i=i||p(r),s=0;null!=(o=a[s]);s++)T(o,i[s]);else T(e,r);return i=p(r,"script"),i.length>0&&m(i,!l&&p(e,"script")),i=a=o=null,r},cleanData:function(e,t){for(var n,i,o,r,s=0,a=fe.expando,l=fe.cache,c=de.attributes,u=fe.event.special;null!=(n=e[s]);s++)if((t||Ne(n))&&(o=n[a],r=o&&l[o])){if(r.events)for(i in r.events)u[i]?fe.event.remove(n,i):fe.removeEvent(n,i,r.handle);l[o]&&(delete l[o],c||"undefined"==typeof n.removeAttribute?n[a]=undefined:n.removeAttribute(a),ne.push(o))}}}),fe.fn.extend({domManip:S,detach:function(e){return $(this,e,!0)},remove:function(e){return $(this,e)},text:function(e){return He(this,function(e){return e===undefined?fe.text(this):this.empty().append((this[0]&&this[0].ownerDocument||ie).createTextNode(e))},null,e,arguments.length)},append:function(){return S(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){C(this,e).appendChild(e)}})},prepend:function(){return S(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=C(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return S(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return S(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++){for(1===e.nodeType&&fe.cleanData(p(e,!1));e.firstChild;)e.removeChild(e.firstChild);e.options&&fe.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return fe.clone(this,e,t)})},html:function(e){return He(this,function(e){var t=this[0]||{},n=0,i=this.length;if(e===undefined)return 1===t.nodeType?t.innerHTML.replace(Je,""):undefined;if("string"==typeof e&&!tt.test(e)&&(de.htmlSerialize||!Ze.test(e))&&(de.leadingWhitespace||!We.test(e))&&!Be[(Re.exec(e)||["",""])[1].toLowerCase()]){e=fe.htmlPrefilter(e);try{for(;nt",c.childNodes[0].style.borderCollapse="separate",t=c.getElementsByTagName("td"),t[0].style.cssText="margin:0;border:0;padding:0;display:none",(r=0===t[0].offsetHeight)&&(t[0].style.display="",t[1].style.display="none",r=0===t[0].offsetHeight)),d.removeChild(l)}var n,i,o,r,s,a,l=ie.createElement("div"),c=ie.createElement("div");c.style&&(c.style.cssText="float:left;opacity:.5",de.opacity="0.5"===c.style.opacity,de.cssFloat=!!c.style.cssFloat,c.style.backgroundClip="content-box",c.cloneNode(!0).style.backgroundClip="",de.clearCloneStyle="content-box"===c.style.backgroundClip,l=ie.createElement("div"),l.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",c.innerHTML="",l.appendChild(c),de.boxSizing=""===c.style.boxSizing||""===c.style.MozBoxSizing||""===c.style.WebkitBoxSizing,fe.extend(de,{reliableHiddenOffsets:function(){return null==n&&t(),r},boxSizingReliable:function(){return null==n&&t(),o},pixelMarginRight:function(){return null==n&&t(),i},pixelPosition:function(){return null==n&&t(),n},reliableMarginRight:function(){return null==n&&t(),s},reliableMarginLeft:function(){return null==n&&t(),a}}))}();var ft,pt,mt=/^(top|right|bottom|left)$/;e.getComputedStyle?(ft=function(t){var n=t.ownerDocument.defaultView;return n&&n.opener||(n=e),n.getComputedStyle(t)},pt=function(e,t,n){var i,o,r,s,a=e.style;return n=n||ft(e),s=n?n.getPropertyValue(t)||n[t]:undefined,""!==s&&s!==undefined||fe.contains(e.ownerDocument,e)||(s=fe.style(e,t)),n&&!de.pixelMarginRight()&&ut.test(s)&&ct.test(t)&&(i=a.width,o=a.minWidth,r=a.maxWidth,a.minWidth=a.maxWidth=a.width=s,s=n.width,a.width=i,a.minWidth=o,a.maxWidth=r),s===undefined?s:s+""}):ht.currentStyle&&(ft=function(e){return e.currentStyle},pt=function(e,t,n){var i,o,r,s,a=e.style;return n=n||ft(e),s=n?n[t]:undefined,null==s&&a&&a[t]&&(s=a[t]),ut.test(s)&&!mt.test(t)&&(i=a.left,o=e.runtimeStyle,r=o&&o.left,r&&(o.left=e.currentStyle.left),a.left="fontSize"===t?"1em":s,s=a.pixelLeft+"px",a.left=i,r&&(o.left=r)),s===undefined?s:s+""||"auto"});var gt=/alpha\([^)]*\)/i,vt=/opacity\s*=\s*([^)]*)/i,yt=/^(none|table(?!-c[ea]).+)/,bt=new RegExp("^("+Oe+")(.*)$","i"),wt={position:"absolute",visibility:"hidden",display:"block"},xt={letterSpacing:"0",fontWeight:"400"},Ct=["Webkit","O","Moz","ms"],_t=ie.createElement("div").style;fe.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=pt(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":de.cssFloat?"cssFloat":"styleFloat"},style:function(e,t,n,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,r,s,a=fe.camelCase(t),l=e.style;if(t=fe.cssProps[a]||(fe.cssProps[a]=M(a)||a),s=fe.cssHooks[t]||fe.cssHooks[a],n===undefined)return s&&"get"in s&&(o=s.get(e,!1,i))!==undefined?o:l[t];if(r=typeof n,"string"===r&&(o=Pe.exec(n))&&o[1]&&(n=h(e,t,o),r="number"),null!=n&&n===n&&("number"===r&&(n+=o&&o[3]||(fe.cssNumber[a]?"":"px")),de.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),!(s&&"set"in s&&(n=s.set(e,n,i))===undefined)))try{l[t]=n}catch(e){}}},css:function(e,t,n,i){var o,r,s,a=fe.camelCase(t);return t=fe.cssProps[a]||(fe.cssProps[a]=M(a)||a),s=fe.cssHooks[t]||fe.cssHooks[a],s&&"get"in s&&(r=s.get(e,!0,n)),r===undefined&&(r=pt(e,t,i)),"normal"===r&&t in xt&&(r=xt[t]),""===n||n?(o=parseFloat(r),!0===n||isFinite(o)?o||0:r):r}}),fe.each(["height","width"],function(e,t){fe.cssHooks[t]={get:function(e,n,i){if(n)return yt.test(fe.css(e,"display"))&&0===e.offsetWidth?dt(e,wt,function(){return j(e,t,i)}):j(e,t,i)},set:function(e,n,i){var o=i&&ft(e);return O(e,n,i?P(e,t,i,de.boxSizing&&"border-box"===fe.css(e,"boxSizing",!1,o),o):0)}}}),de.opacity||(fe.cssHooks.opacity={get:function(e,t){return vt.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,i=e.currentStyle,o=fe.isNumeric(t)?"alpha(opacity="+100*t+")":"",r=i&&i.filter||n.filter||"";n.zoom=1,(t>=1||""===t)&&""===fe.trim(r.replace(gt,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===t||i&&!i.filter)||(n.filter=gt.test(r)?r.replace(gt,o):r+" "+o)}}),fe.cssHooks.marginRight=N(de.reliableMarginRight,function(e,t){if(t)return dt(e,{display:"inline-block"},pt,[e,"marginRight"])}),fe.cssHooks.marginLeft=N(de.reliableMarginLeft,function(e,t){if(t)return(parseFloat(pt(e,"marginLeft"))||(fe.contains(e.ownerDocument,e)?e.getBoundingClientRect().left-dt(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}):0))+"px"}),fe.each({margin:"",padding:"",border:"Width"},function(e,t){fe.cssHooks[e+t]={expand:function(n){for(var i=0,o={},r="string"==typeof n?n.split(" "):[n];i<4;i++)o[e+je[i]+t]=r[i]||r[i-2]||r[0];return o}},ct.test(e)||(fe.cssHooks[e+t].set=O)}),fe.fn.extend({css:function(e,t){return He(this,function(e,t,n){var i,o,r={},s=0;if(fe.isArray(t)){for(i=ft(e),o=t.length;s1)},show:function(){return I(this,!0)},hide:function(){return I(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){Le(this)?fe(this).show():fe(this).hide()})}}),fe.Tween=L,L.prototype={constructor:L,init:function(e,t,n,i,o,r){this.elem=e,this.prop=n,this.easing=o||fe.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=i,this.unit=r||(fe.cssNumber[n]?"":"px")},cur:function(){var e=L.propHooks[this.prop];return e&&e.get?e.get(this):L.propHooks._default.get(this)},run:function(e){var t,n=L.propHooks[this.prop];return this.options.duration?this.pos=t=fe.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):L.propHooks._default.set(this),this}},L.prototype.init.prototype=L.prototype,L.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=fe.css(e.elem,e.prop,""),t&&"auto"!==t?t:0)},set:function(e){fe.fx.step[e.prop]?fe.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[fe.cssProps[e.prop]]&&!fe.cssHooks[e.prop]?e.elem[e.prop]=e.now:fe.style(e.elem,e.prop,e.now+e.unit)}}},L.propHooks.scrollTop=L.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},fe.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},fe.fx=L.prototype.init,fe.fx.step={};var Dt,Tt,Et=/^(?:toggle|show|hide)$/,St=/queueHooks$/;fe.Animation=fe.extend(z,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return h(n.elem,e,Pe.exec(t),n),n}]},tweener:function(e,t){fe.isFunction(e)?(t=e,e=["*"]):e=e.match($e);for(var n,i=0,o=e.length;i
a",e=n.getElementsByTagName("a")[0],t.setAttribute("type","checkbox"),n.appendChild(t),e=n.getElementsByTagName("a")[0],e.style.cssText="top:1px",de.getSetAttribute="t"!==n.className,de.style=/top/.test(e.getAttribute("style")),de.hrefNormalized="/a"===e.getAttribute("href"),de.checkOn=!!t.value,de.optSelected=o.selected,de.enctype=!!ie.createElement("form").enctype,i.disabled=!0,de.optDisabled=!o.disabled,t=ie.createElement("input"),t.setAttribute("value",""),de.input=""===t.getAttribute("value"),t.value="t",t.setAttribute("type","radio"),de.radioValue="t"===t.value}();var $t=/\r/g,kt=/[\x20\t\r\n\f]+/g;fe.fn.extend({val:function(e){var t,n,i,o=this[0];{if(arguments.length)return i=fe.isFunction(e),this.each(function(n){var o;1===this.nodeType&&(o=i?e.call(this,n,fe(this).val()):e,null==o?o="":"number"==typeof o?o+="":fe.isArray(o)&&(o=fe.map(o,function(e){return null==e?"":e+""})),(t=fe.valHooks[this.type]||fe.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&t.set(this,o,"value")!==undefined||(this.value=o))});if(o)return(t=fe.valHooks[o.type]||fe.valHooks[o.nodeName.toLowerCase()])&&"get"in t&&(n=t.get(o,"value"))!==undefined?n:(n=o.value,"string"==typeof n?n.replace($t,""):null==n?"":n)}}}),fe.extend({valHooks:{option:{get:function(e){var t=fe.find.attr(e,"value");return null!=t?t:fe.trim(fe.text(e)).replace(kt," ")}},select:{get:function(e){for(var t,n,i=e.options,o=e.selectedIndex,r="select-one"===e.type||o<0,s=r?null:[],a=r?o+1:i.length,l=o<0?a:r?o:0;l-1)try{i.selected=n=!0}catch(e){i.scrollHeight}else i.selected=!1;return n||(e.selectedIndex=-1),o}}}}),fe.each(["radio","checkbox"],function(){fe.valHooks[this]={set:function(e,t){if(fe.isArray(t))return e.checked=fe.inArray(fe(e).val(),t)>-1}},de.checkOn||(fe.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var At,Nt,Mt=fe.expr.attrHandle,It=/^(?:checked|selected)$/i,Ot=de.getSetAttribute,Pt=de.input;fe.fn.extend({attr:function(e,t){return He(this,fe.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){fe.removeAttr(this,e)})}}),fe.extend({attr:function(e,t,n){var i,o,r=e.nodeType;if(3!==r&&8!==r&&2!==r)return"undefined"==typeof e.getAttribute?fe.prop(e,t,n):(1===r&&fe.isXMLDoc(e)||(t=t.toLowerCase(),o=fe.attrHooks[t]||(fe.expr.match.bool.test(t)?Nt:At)),n!==undefined?null===n?void fe.removeAttr(e,t):o&&"set"in o&&(i=o.set(e,n,t))!==undefined?i:(e.setAttribute(t,n+""),n):o&&"get"in o&&null!==(i=o.get(e,t))?i:(i=fe.find.attr(e,t),null==i?undefined:i))},attrHooks:{type:{set:function(e,t){if(!de.radioValue&&"radio"===t&&fe.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,i,o=0,r=t&&t.match($e);if(r&&1===e.nodeType)for(;n=r[o++];)i=fe.propFix[n]||n,fe.expr.match.bool.test(n)?Pt&&Ot||!It.test(n)?e[i]=!1:e[fe.camelCase("default-"+n)]=e[i]=!1:fe.attr(e,n,""),e.removeAttribute(Ot?n:i)}}),Nt={set:function(e,t,n){return!1===t?fe.removeAttr(e,n):Pt&&Ot||!It.test(n)?e.setAttribute(!Ot&&fe.propFix[n]||n,n):e[fe.camelCase("default-"+n)]=e[n]=!0,n}},fe.each(fe.expr.match.bool.source.match(/\w+/g),function(e,t){var n=Mt[t]||fe.find.attr;Pt&&Ot||!It.test(t)?Mt[t]=function(e,t,i){var o,r;return i||(r=Mt[t],Mt[t]=o,o=null!=n(e,t,i)?t.toLowerCase():null,Mt[t]=r),o}:Mt[t]=function(e,t,n){if(!n)return e[fe.camelCase("default-"+t)]?t.toLowerCase():null}}),Pt&&Ot||(fe.attrHooks.value={set:function(e,t,n){if(!fe.nodeName(e,"input"))return At&&At.set(e,t,n);e.defaultValue=t}}),Ot||(At={set:function(e,t,n){var i=e.getAttributeNode(n);if(i||e.setAttributeNode(i=e.ownerDocument.createAttribute(n)),i.value=t+="","value"===n||t===e.getAttribute(n))return t}},Mt.id=Mt.name=Mt.coords=function(e,t,n){var i;if(!n)return(i=e.getAttributeNode(t))&&""!==i.value?i.value:null},fe.valHooks.button={get:function(e,t){var n=e.getAttributeNode(t);if(n&&n.specified)return n.value},set:At.set},fe.attrHooks.contenteditable={set:function(e,t,n){At.set(e,""!==t&&t,n)}},fe.each(["width","height"],function(e,t){fe.attrHooks[t]={set:function(e,n){if(""===n)return e.setAttribute(t,"auto"),n}}})),de.style||(fe.attrHooks.style={get:function(e){return e.style.cssText||undefined},set:function(e,t){return e.style.cssText=t+""}});var jt=/^(?:input|select|textarea|button|object)$/i,Lt=/^(?:a|area)$/i;fe.fn.extend({prop:function(e,t){return He(this,fe.prop,e,t,arguments.length>1)},removeProp:function(e){return e=fe.propFix[e]||e,this.each(function(){try{this[e]=undefined,delete this[e]}catch(e){}})}}),fe.extend({prop:function(e,t,n){var i,o,r=e.nodeType;if(3!==r&&8!==r&&2!==r)return 1===r&&fe.isXMLDoc(e)||(t=fe.propFix[t]||t,o=fe.propHooks[t]),n!==undefined?o&&"set"in o&&(i=o.set(e,n,t))!==undefined?i:e[t]=n:o&&"get"in o&&null!==(i=o.get(e,t))?i:e[t]},propHooks:{tabIndex:{get:function(e){var t=fe.find.attr(e,"tabindex");return t?parseInt(t,10):jt.test(e.nodeName)||Lt.test(e.nodeName)&&e.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),de.hrefNormalized||fe.each(["href","src"],function(e,t){fe.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}}),de.optSelected||(fe.propHooks.selected={get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),fe.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){fe.propFix[this.toLowerCase()]=this}),de.enctype||(fe.propFix.enctype="encoding");var Ht=/[\t\r\n\f]/g;fe.fn.extend({addClass:function(e){var t,n,i,o,r,s,a,l=0;if(fe.isFunction(e))return this.each(function(t){fe(this).addClass(e.call(this,t,B(this)))});if("string"==typeof e&&e)for(t=e.match($e)||[];n=this[l++];)if(o=B(n),i=1===n.nodeType&&(" "+o+" ").replace(Ht," ")){for(s=0;r=t[s++];)i.indexOf(" "+r+" ")<0&&(i+=r+" ");a=fe.trim(i),o!==a&&fe.attr(n,"class",a)}return this},removeClass:function(e){var t,n,i,o,r,s,a,l=0;if(fe.isFunction(e))return this.each(function(t){fe(this).removeClass(e.call(this,t,B(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof e&&e)for(t=e.match($e)||[];n=this[l++];)if(o=B(n),i=1===n.nodeType&&(" "+o+" ").replace(Ht," ")){for(s=0;r=t[s++];)for(;i.indexOf(" "+r+" ")>-1;)i=i.replace(" "+r+" "," ");a=fe.trim(i),o!==a&&fe.attr(n,"class",a)}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):fe.isFunction(e)?this.each(function(n){fe(this).toggleClass(e.call(this,n,B(this),t),t)}):this.each(function(){var t,i,o,r;if("string"===n)for(i=0,o=fe(this),r=e.match($e)||[];t=r[i++];)o.hasClass(t)?o.removeClass(t):o.addClass(t);else e!==undefined&&"boolean"!==n||(t=B(this),t&&fe._data(this,"__className__",t),fe.attr(this,"class",t||!1===e?"":fe._data(this,"__className__")||""))})},hasClass:function(e){var t,n,i=0;for(t=" "+e+" ";n=this[i++];)if(1===n.nodeType&&(" "+B(n)+" ").replace(Ht," ").indexOf(t)>-1)return!0;return!1}}),fe.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){fe.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),fe.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}});var Ft=e.location,Rt=fe.now(),qt=/\?/,Wt=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;fe.parseJSON=function(t){if(e.JSON&&e.JSON.parse)return e.JSON.parse(t+"");var n,i=null,o=fe.trim(t+"");return o&&!fe.trim(o.replace(Wt,function(e,t,o,r){return n&&t&&(i=0),0===i?e:(n=o||t,i+=!r-!o,"")}))?Function("return "+o)():fe.error("Invalid JSON: "+t)},fe.parseXML=function(t){var n,i;if(!t||"string"!=typeof t)return null;try{e.DOMParser?(i=new e.DOMParser,n=i.parseFromString(t,"text/xml")):(n=new e.ActiveXObject("Microsoft.XMLDOM"),n.async="false",n.loadXML(t))}catch(e){n=undefined} return n&&n.documentElement&&!n.getElementsByTagName("parsererror").length||fe.error("Invalid XML: "+t),n};var zt=/#.*$/,Bt=/([?&])_=[^&]*/,Ut=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Yt=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Gt=/^(?:GET|HEAD)$/,Xt=/^\/\//,Vt=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Kt={},Qt={},Jt="*/".concat("*"),Zt=Ft.href,en=Vt.exec(Zt.toLowerCase())||[];fe.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Zt,type:"GET",isLocal:Yt.test(en[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Jt,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":fe.parseJSON,"text xml":fe.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?G(G(e,fe.ajaxSettings),t):G(fe.ajaxSettings,e)},ajaxPrefilter:U(Kt),ajaxTransport:U(Qt),ajax:function(t,n){function i(t,n,i,o){var r,d,y,b,x,_=n;2!==w&&(w=2,l&&e.clearTimeout(l),u=undefined,a=o||"",C.readyState=t>0?4:0,r=t>=200&&t<300||304===t,i&&(b=X(h,C,i)),b=V(h,b,C,r),r?(h.ifModified&&(x=C.getResponseHeader("Last-Modified"),x&&(fe.lastModified[s]=x),(x=C.getResponseHeader("etag"))&&(fe.etag[s]=x)),204===t||"HEAD"===h.type?_="nocontent":304===t?_="notmodified":(_=b.state,d=b.data,y=b.error,r=!y)):(y=_,!t&&_||(_="error",t<0&&(t=0))),C.status=t,C.statusText=(n||_)+"",r?m.resolveWith(f,[d,_,C]):m.rejectWith(f,[C,_,y]),C.statusCode(v),v=undefined,c&&p.trigger(r?"ajaxSuccess":"ajaxError",[C,h,r?d:y]),g.fireWith(f,[C,_]),c&&(p.trigger("ajaxComplete",[C,h]),--fe.active||fe.event.trigger("ajaxStop")))}"object"==typeof t&&(n=t,t=undefined),n=n||{};var o,r,s,a,l,c,u,d,h=fe.ajaxSetup({},n),f=h.context||h,p=h.context&&(f.nodeType||f.jquery)?fe(f):fe.event,m=fe.Deferred(),g=fe.Callbacks("once memory"),v=h.statusCode||{},y={},b={},w=0,x="canceled",C={readyState:0,getResponseHeader:function(e){var t;if(2===w){if(!d)for(d={};t=Ut.exec(a);)d[t[1].toLowerCase()]=t[2];t=d[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===w?a:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return w||(e=b[n]=b[n]||e,y[e]=t),this},overrideMimeType:function(e){return w||(h.mimeType=e),this},statusCode:function(e){var t;if(e)if(w<2)for(t in e)v[t]=[v[t],e[t]];else C.always(e[C.status]);return this},abort:function(e){var t=e||x;return u&&u.abort(t),i(0,t),this}};if(m.promise(C).complete=g.add,C.success=C.done,C.error=C.fail,h.url=((t||h.url||Zt)+"").replace(zt,"").replace(Xt,en[1]+"//"),h.type=n.method||n.type||h.method||h.type,h.dataTypes=fe.trim(h.dataType||"*").toLowerCase().match($e)||[""],null==h.crossDomain&&(o=Vt.exec(h.url.toLowerCase()),h.crossDomain=!(!o||o[1]===en[1]&&o[2]===en[2]&&(o[3]||("http:"===o[1]?"80":"443"))===(en[3]||("http:"===en[1]?"80":"443")))),h.data&&h.processData&&"string"!=typeof h.data&&(h.data=fe.param(h.data,h.traditional)),Y(Kt,h,n,C),2===w)return C;c=fe.event&&h.global,c&&0==fe.active++&&fe.event.trigger("ajaxStart"),h.type=h.type.toUpperCase(),h.hasContent=!Gt.test(h.type),s=h.url,h.hasContent||(h.data&&(s=h.url+=(qt.test(s)?"&":"?")+h.data,delete h.data),!1===h.cache&&(h.url=Bt.test(s)?s.replace(Bt,"$1_="+Rt++):s+(qt.test(s)?"&":"?")+"_="+Rt++)),h.ifModified&&(fe.lastModified[s]&&C.setRequestHeader("If-Modified-Since",fe.lastModified[s]),fe.etag[s]&&C.setRequestHeader("If-None-Match",fe.etag[s])),(h.data&&h.hasContent&&!1!==h.contentType||n.contentType)&&C.setRequestHeader("Content-Type",h.contentType),C.setRequestHeader("Accept",h.dataTypes[0]&&h.accepts[h.dataTypes[0]]?h.accepts[h.dataTypes[0]]+("*"!==h.dataTypes[0]?", "+Jt+"; q=0.01":""):h.accepts["*"]);for(r in h.headers)C.setRequestHeader(r,h.headers[r]);if(h.beforeSend&&(!1===h.beforeSend.call(f,C,h)||2===w))return C.abort();x="abort";for(r in{success:1,error:1,complete:1})C[r](h[r]);if(u=Y(Qt,h,n,C)){if(C.readyState=1,c&&p.trigger("ajaxSend",[C,h]),2===w)return C;h.async&&h.timeout>0&&(l=e.setTimeout(function(){C.abort("timeout")},h.timeout));try{w=1,u.send(y,i)}catch(e){if(!(w<2))throw e;i(-1,e)}}else i(-1,"No Transport");return C},getJSON:function(e,t,n){return fe.get(e,t,n,"json")},getScript:function(e,t){return fe.get(e,undefined,t,"script")}}),fe.each(["get","post"],function(e,t){fe[t]=function(e,n,i,o){return fe.isFunction(n)&&(o=o||i,i=n,n=undefined),fe.ajax(fe.extend({url:e,type:t,dataType:o,data:n,success:i},fe.isPlainObject(e)&&e))}}),fe._evalUrl=function(e){return fe.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,"throws":!0})},fe.fn.extend({wrapAll:function(e){if(fe.isFunction(e))return this.each(function(t){fe(this).wrapAll(e.call(this,t))});if(this[0]){var t=fe(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstChild&&1===e.firstChild.nodeType;)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return fe.isFunction(e)?this.each(function(t){fe(this).wrapInner(e.call(this,t))}):this.each(function(){var t=fe(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=fe.isFunction(e);return this.each(function(n){fe(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){fe.nodeName(this,"body")||fe(this).replaceWith(this.childNodes)}).end()}}),fe.expr.filters.hidden=function(e){return de.reliableHiddenOffsets()?e.offsetWidth<=0&&e.offsetHeight<=0&&!e.getClientRects().length:Q(e)},fe.expr.filters.visible=function(e){return!fe.expr.filters.hidden(e)};var tn=/%20/g,nn=/\[\]$/,on=/\r?\n/g,rn=/^(?:submit|button|image|reset|file)$/i,sn=/^(?:input|select|textarea|keygen)/i;fe.param=function(e,t){var n,i=[],o=function(e,t){t=fe.isFunction(t)?t():null==t?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(t===undefined&&(t=fe.ajaxSettings&&fe.ajaxSettings.traditional),fe.isArray(e)||e.jquery&&!fe.isPlainObject(e))fe.each(e,function(){o(this.name,this.value)});else for(n in e)J(n,e[n],t,o);return i.join("&").replace(tn,"+")},fe.fn.extend({serialize:function(){return fe.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=fe.prop(this,"elements");return e?fe.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!fe(this).is(":disabled")&&sn.test(this.nodeName)&&!rn.test(e)&&(this.checked||!Fe.test(e))}).map(function(e,t){var n=fe(this).val();return null==n?null:fe.isArray(n)?fe.map(n,function(e){return{name:t.name,value:e.replace(on,"\r\n")}}):{name:t.name,value:n.replace(on,"\r\n")}}).get()}}),fe.ajaxSettings.xhr=e.ActiveXObject!==undefined?function(){return this.isLocal?ee():ie.documentMode>8?Z():/^(get|post|head|put|delete|options)$/i.test(this.type)&&Z()||ee()}:Z;var an=0,ln={},cn=fe.ajaxSettings.xhr();e.attachEvent&&e.attachEvent("onunload",function(){for(var e in ln)ln[e](undefined,!0)}),de.cors=!!cn&&"withCredentials"in cn,cn=de.ajax=!!cn,cn&&fe.ajaxTransport(function(t){if(!t.crossDomain||de.cors){var n;return{send:function(i,o){var r,s=t.xhr(),a=++an;if(s.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(r in t.xhrFields)s[r]=t.xhrFields[r];t.mimeType&&s.overrideMimeType&&s.overrideMimeType(t.mimeType),t.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");for(r in i)i[r]!==undefined&&s.setRequestHeader(r,i[r]+"");s.send(t.hasContent&&t.data||null),n=function(e,i){var r,l,c;if(n&&(i||4===s.readyState))if(delete ln[a],n=undefined,s.onreadystatechange=fe.noop,i)4!==s.readyState&&s.abort();else{c={},r=s.status,"string"==typeof s.responseText&&(c.text=s.responseText);try{l=s.statusText}catch(e){l=""}r||!t.isLocal||t.crossDomain?1223===r&&(r=204):r=c.text?200:404}c&&o(r,l,c,s.getAllResponseHeaders())},t.async?4===s.readyState?e.setTimeout(n):s.onreadystatechange=ln[a]=n:n()},abort:function(){n&&n(undefined,!0)}}}}),fe.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 fe.globalEval(e),e}}}),fe.ajaxPrefilter("script",function(e){e.cache===undefined&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),fe.ajaxTransport("script",function(e){if(e.crossDomain){var t,n=ie.head||fe("head")[0]||ie.documentElement;return{send:function(i,o){t=ie.createElement("script"),t.async=!0,e.scriptCharset&&(t.charset=e.scriptCharset),t.src=e.url,t.onload=t.onreadystatechange=function(e,n){(n||!t.readyState||/loaded|complete/.test(t.readyState))&&(t.onload=t.onreadystatechange=null,t.parentNode&&t.parentNode.removeChild(t),t=null,n||o(200,"success"))},n.insertBefore(t,n.firstChild)},abort:function(){t&&t.onload(undefined,!0)}}}});var un=[],dn=/(=)\?(?=&|$)|\?\?/;fe.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=un.pop()||fe.expando+"_"+Rt++;return this[e]=!0,e}}),fe.ajaxPrefilter("json jsonp",function(t,n,i){var o,r,s,a=!1!==t.jsonp&&(dn.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&dn.test(t.data)&&"data");if(a||"jsonp"===t.dataTypes[0])return o=t.jsonpCallback=fe.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,a?t[a]=t[a].replace(dn,"$1"+o):!1!==t.jsonp&&(t.url+=(qt.test(t.url)?"&":"?")+t.jsonp+"="+o),t.converters["script json"]=function(){return s||fe.error(o+" was not called"),s[0]},t.dataTypes[0]="json",r=e[o],e[o]=function(){s=arguments},i.always(function(){r===undefined?fe(e).removeProp(o):e[o]=r,t[o]&&(t.jsonpCallback=n.jsonpCallback,un.push(o)),s&&fe.isFunction(r)&&r(s[0]),s=r=undefined}),"script"}),fe.parseHTML=function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||ie;var i=Ce.exec(e),o=!n&&[];return i?[t.createElement(i[1])]:(i=v([e],t,o),o&&o.length&&fe(o).remove(),fe.merge([],i.childNodes))};var hn=fe.fn.load;fe.fn.load=function(e,t,n){if("string"!=typeof e&&hn)return hn.apply(this,arguments);var i,o,r,s=this,a=e.indexOf(" ");return a>-1&&(i=fe.trim(e.slice(a,e.length)),e=e.slice(0,a)),fe.isFunction(t)?(n=t,t=undefined):t&&"object"==typeof t&&(o="POST"),s.length>0&&fe.ajax({url:e,type:o||"GET",dataType:"html",data:t}).done(function(e){r=arguments,s.html(i?fe("
").append(fe.parseHTML(e)).find(i):e)}).always(n&&function(e,t){s.each(function(){n.apply(this,r||[e.responseText,t,e])})}),this},fe.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){fe.fn[t]=function(e){return this.on(t,e)}}),fe.expr.filters.animated=function(e){return fe.grep(fe.timers,function(t){return e===t.elem}).length},fe.offset={setOffset:function(e,t,n){var i,o,r,s,a,l,c,u=fe.css(e,"position"),d=fe(e),h={};"static"===u&&(e.style.position="relative"),a=d.offset(),r=fe.css(e,"top"),l=fe.css(e,"left"),c=("absolute"===u||"fixed"===u)&&fe.inArray("auto",[r,l])>-1,c?(i=d.position(),s=i.top,o=i.left):(s=parseFloat(r)||0,o=parseFloat(l)||0),fe.isFunction(t)&&(t=t.call(e,n,fe.extend({},a))),null!=t.top&&(h.top=t.top-a.top+s),null!=t.left&&(h.left=t.left-a.left+o),"using"in t?t.using.call(e,h):d.css(h)}},fe.fn.extend({offset:function(e){if(arguments.length)return e===undefined?this:this.each(function(t){fe.offset.setOffset(this,e,t)});var t,n,i={top:0,left:0},o=this[0],r=o&&o.ownerDocument;if(r)return t=r.documentElement,fe.contains(t,o)?("undefined"!=typeof o.getBoundingClientRect&&(i=o.getBoundingClientRect()),n=te(r),{top:i.top+(n.pageYOffset||t.scrollTop)-(t.clientTop||0),left:i.left+(n.pageXOffset||t.scrollLeft)-(t.clientLeft||0)}):i},position:function(){if(this[0]){var e,t,n={top:0,left:0},i=this[0];return"fixed"===fe.css(i,"position")?t=i.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),fe.nodeName(e[0],"html")||(n=e.offset()),n.top+=fe.css(e[0],"borderTopWidth",!0),n.left+=fe.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-fe.css(i,"marginTop",!0),left:t.left-n.left-fe.css(i,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&!fe.nodeName(e,"html")&&"static"===fe.css(e,"position");)e=e.offsetParent;return e||ht})}}),fe.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var n=/Y/.test(t);fe.fn[e]=function(i){return He(this,function(e,i,o){var r=te(e);if(o===undefined)return r?t in r?r[t]:r.document.documentElement[i]:e[i];r?r.scrollTo(n?fe(r).scrollLeft():o,n?o:fe(r).scrollTop()):e[i]=o},e,i,arguments.length,null)}}),fe.each(["top","left"],function(e,t){fe.cssHooks[t]=N(de.pixelPosition,function(e,n){if(n)return n=pt(e,t),ut.test(n)?fe(e).position()[t]+"px":n})}),fe.each({Height:"height",Width:"width"},function(e,t){fe.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,i){fe.fn[i]=function(i,o){var r=arguments.length&&(n||"boolean"!=typeof i),s=n||(!0===i||!0===o?"margin":"border");return He(this,function(t,n,i){var o;return fe.isWindow(t)?t.document.documentElement["client"+e]:9===t.nodeType?(o=t.documentElement,Math.max(t.body["scroll"+e],o["scroll"+e],t.body["offset"+e],o["offset"+e],o["client"+e])):i===undefined?fe.css(t,n,s):fe.style(t,n,i,s)},t,r?i:undefined,r,null)}})}),fe.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,i){return this.on(t,e,n,i)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}}),fe.fn.size=function(){return this.length},fe.fn.andSelf=fe.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return fe});var fn=e.jQuery,pn=e.$;return fe.noConflict=function(t){return e.$===fe&&(e.$=pn),t&&e.jQuery===fe&&(e.jQuery=fn),fe},t||(e.jQuery=e.$=fe),fe}),function(e,t){"use strict";e.rails!==t&&e.error("jquery-ujs has already been loaded!");var n,i=e(document);e.rails=n={linkClickSelector:"a[data-confirm], a[data-method], a[data-remote]:not([disabled]), a[data-disable-with], a[data-disable]",buttonClickSelector:"button[data-remote]:not([form]):not(form button), button[data-confirm]:not([form]):not(form button)",inputChangeSelector:"select[data-remote], input[data-remote], textarea[data-remote]",formSubmitSelector:"form",formInputClickSelector:"form input[type=submit], form input[type=image], form button[type=submit], form button:not([type]), input[type=submit][form], input[type=image][form], button[type=submit][form], button[form]:not([type])",disableSelector:"input[data-disable-with]:enabled, button[data-disable-with]:enabled, textarea[data-disable-with]:enabled, input[data-disable]:enabled, button[data-disable]:enabled, textarea[data-disable]:enabled",enableSelector:"input[data-disable-with]:disabled, button[data-disable-with]:disabled, textarea[data-disable-with]:disabled, input[data-disable]:disabled, button[data-disable]:disabled, textarea[data-disable]:disabled",requiredInputSelector:"input[name][required]:not([disabled]), textarea[name][required]:not([disabled])",fileInputSelector:"input[name][type=file]:not([disabled])",linkDisableSelector:"a[data-disable-with], a[data-disable]",buttonDisableSelector:"button[data-remote][data-disable-with], button[data-remote][data-disable]",csrfToken:function(){return e("meta[name=csrf-token]").attr("content")},csrfParam:function(){return e("meta[name=csrf-param]").attr("content")},CSRFProtection:function(e){var t=n.csrfToken();t&&e.setRequestHeader("X-CSRF-Token",t)},refreshCSRFTokens:function(){e('form input[name="'+n.csrfParam()+'"]').val(n.csrfToken())},fire:function(t,n,i){var o=e.Event(n);return t.trigger(o,i),!1!==o.result},confirm:function(e){return confirm(e)},ajax:function(t){return e.ajax(t)},href:function(e){return e[0].href},isRemote:function(e){return e.data("remote")!==t&&!1!==e.data("remote")},handleRemote:function(i){var o,r,s,a,l,c;if(n.fire(i,"ajax:before")){if(a=i.data("with-credentials")||null,l=i.data("type")||e.ajaxSettings&&e.ajaxSettings.dataType,i.is("form")){o=i.data("ujs:submit-button-formmethod")||i.attr("method"),r=i.data("ujs:submit-button-formaction")||i.attr("action"),s=e(i[0]).serializeArray();var u=i.data("ujs:submit-button");u&&(s.push(u),i.data("ujs:submit-button",null)),i.data("ujs:submit-button-formmethod",null),i.data("ujs:submit-button-formaction",null)}else i.is(n.inputChangeSelector)?(o=i.data("method"),r=i.data("url"),s=i.serialize(),i.data("params")&&(s=s+"&"+i.data("params"))):i.is(n.buttonClickSelector)?(o=i.data("method")||"get",r=i.data("url"),s=i.serialize(),i.data("params")&&(s=s+"&"+i.data("params"))):(o=i.data("method"),r=n.href(i),s=i.data("params")||null);return c={type:o||"GET",data:s,dataType:l,beforeSend:function(e,o){if(o.dataType===t&&e.setRequestHeader("accept","*/*;q=0.5, "+o.accepts.script),!n.fire(i,"ajax:beforeSend",[e,o]))return!1;i.trigger("ajax:send",e)},success:function(e,t,n){i.trigger("ajax:success",[e,t,n])},complete:function(e,t){i.trigger("ajax:complete",[e,t])},error:function(e,t,n){i.trigger("ajax:error",[e,t,n])},crossDomain:n.isCrossDomain(r)},a&&(c.xhrFields={withCredentials:a}),r&&(c.url=r),n.ajax(c)}return!1},isCrossDomain:function(e){var t=document.createElement("a");t.href=location.href;var n=document.createElement("a");try{return n.href=e,n.href=n.href,!((!n.protocol||":"===n.protocol)&&!n.host||t.protocol+"//"+t.host==n.protocol+"//"+n.host)}catch(e){return!0}},handleMethod:function(i){var o=n.href(i),r=i.data("method"),s=i.attr("target"),a=n.csrfToken(),l=n.csrfParam(),c=e('
'),u='';l===t||a===t||n.isCrossDomain(o)||(u+=''),s&&c.attr("target",s),c.hide().append(u).appendTo("body"),c.submit()},formElements:function(t,n){return t.is("form")?e(t[0].elements).filter(n):t.find(n)},disableFormElements:function(t){n.formElements(t,n.disableSelector).each(function(){n.disableFormElement(e(this))})},disableFormElement:function(e){var n,i;n=e.is("button")?"html":"val",i=e.data("disable-with"),i!==t&&(e.data("ujs:enable-with",e[n]()),e[n](i)),e.prop("disabled",!0),e.data("ujs:disabled",!0)},enableFormElements:function(t){n.formElements(t,n.enableSelector).each(function(){n.enableFormElement(e(this))})},enableFormElement:function(e){var n=e.is("button")?"html":"val";e.data("ujs:enable-with")!==t&&(e[n](e.data("ujs:enable-with")),e.removeData("ujs:enable-with")),e.prop("disabled",!1),e.removeData("ujs:disabled")},allowAction:function(e){var t,i=e.data("confirm"),o=!1;if(!i)return!0;if(n.fire(e,"confirm")){try{o=n.confirm(i)}catch(e){(console.error||console.log).call(console,e.stack||e)}t=n.fire(e,"confirm:complete",[o])}return o&&t},blankInputs:function(t,n,i){var o,r,s,a,l=e(),c=n||"input,textarea",u=t.find(c),d={};return u.each(function(){o=e(this),o.is("input[type=radio]")?(a=o.attr("name"),d[a]||(0===t.find('input[type=radio]:checked[name="'+a+'"]').length&&(s=t.find('input[type=radio][name="'+a+'"]'),l=l.add(s)),d[a]=a)):(r=o.is("input[type=checkbox],input[type=radio]")?o.is(":checked"):!!o.val())===i&&(l=l.add(o))}),!!l.length&&l},nonBlankInputs:function(e,t){return n.blankInputs(e,t,!0)},stopEverything:function(t){return e(t.target).trigger("ujs:everythingStopped"),t.stopImmediatePropagation(),!1},disableElement:function(e){var i=e.data("disable-with");i!==t&&(e.data("ujs:enable-with",e.html()),e.html(i)),e.bind("click.railsDisable",function(e){return n.stopEverything(e)}),e.data("ujs:disabled",!0)},enableElement:function(e){e.data("ujs:enable-with")!==t&&(e.html(e.data("ujs:enable-with")),e.removeData("ujs:enable-with")),e.unbind("click.railsDisable"),e.removeData("ujs:disabled")}},n.fire(i,"rails:attachBindings")&&(e.ajaxPrefilter(function(e,t,i){e.crossDomain||n.CSRFProtection(i)}),e(window).on("pageshow.rails",function(){e(e.rails.enableSelector).each(function(){var t=e(this);t.data("ujs:disabled")&&e.rails.enableFormElement(t)}),e(e.rails.linkDisableSelector).each(function(){var t=e(this);t.data("ujs:disabled")&&e.rails.enableElement(t)})}),i.on("ajax:complete",n.linkDisableSelector,function(){n.enableElement(e(this))}),i.on("ajax:complete",n.buttonDisableSelector,function(){n.enableFormElement(e(this))}),i.on("click.rails",n.linkClickSelector,function(t){var i=e(this),o=i.data("method"),r=i.data("params"),s=t.metaKey||t.ctrlKey;if(!n.allowAction(i))return n.stopEverything(t);if(!s&&i.is(n.linkDisableSelector)&&n.disableElement(i),n.isRemote(i)){if(s&&(!o||"GET"===o)&&!r)return!0;var a=n.handleRemote(i);return!1===a?n.enableElement(i):a.fail(function(){n.enableElement(i)}),!1}return o?(n.handleMethod(i),!1):void 0}),i.on("click.rails",n.buttonClickSelector,function(t){var i=e(this);if(!n.allowAction(i)||!n.isRemote(i))return n.stopEverything(t);i.is(n.buttonDisableSelector)&&n.disableFormElement(i);var o=n.handleRemote(i);return!1===o?n.enableFormElement(i):o.fail(function(){n.enableFormElement(i)}),!1}),i.on("change.rails",n.inputChangeSelector,function(t){var i=e(this);return n.allowAction(i)&&n.isRemote(i)?(n.handleRemote(i),!1):n.stopEverything(t)}),i.on("submit.rails",n.formSubmitSelector,function(i){var o,r,s=e(this),a=n.isRemote(s);if(!n.allowAction(s))return n.stopEverything(i);if(s.attr("novalidate")===t)if(s.data("ujs:formnovalidate-button")===t){if((o=n.blankInputs(s,n.requiredInputSelector,!1))&&n.fire(s,"ajax:aborted:required",[o]))return n.stopEverything(i)}else s.data("ujs:formnovalidate-button",t);if(a){if(r=n.nonBlankInputs(s,n.fileInputSelector)){setTimeout(function(){n.disableFormElements(s)},13);var l=n.fire(s,"ajax:aborted:file",[r]);return l||setTimeout(function(){n.enableFormElements(s)},13),l}return n.handleRemote(s),!1}setTimeout(function(){n.disableFormElements(s)},13)}),i.on("click.rails",n.formInputClickSelector,function(t){var i=e(this);if(!n.allowAction(i))return n.stopEverything(t);var o=i.attr("name"),r=o?{name:o,value:i.val()}:null,s=i.closest("form");0===s.length&&(s=e("#"+i.attr("form"))),s.data("ujs:submit-button",r),s.data("ujs:formnovalidate-button",i.attr("formnovalidate")),s.data("ujs:submit-button-formaction",i.attr("formaction")),s.data("ujs:submit-button-formmethod",i.attr("formmethod"))}),i.on("ajax:send.rails",n.formSubmitSelector,function(t){this===t.target&&n.disableFormElements(e(this))}),i.on("ajax:complete.rails",n.formSubmitSelector,function(t){this===t.target&&n.enableFormElements(e(this))}),e(function(){n.refreshCSRFTokens()}))}(jQuery),"undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(e){"use strict";var t=e.fn.jquery.split(" ")[0].split(".");if(t[0]<2&&t[1]<9||1==t[0]&&9==t[1]&&t[2]<1||t[0]>3)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4")}(jQuery),function(e){"use strict";function t(){var e=document.createElement("bootstrap"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var n in t)if(e.style[n]!==undefined)return{end:t[n]};return!1}e.fn.emulateTransitionEnd=function(t){var n=!1,i=this;e(this).one("bsTransitionEnd",function(){n=!0});var o=function(){n||e(i).trigger(e.support.transition.end)};return setTimeout(o,t),this},e(function(){e.support.transition=t(),e.support.transition&&(e.event.special.bsTransitionEnd={bindType:e.support.transition.end,delegateType:e.support.transition.end,handle:function(t){if(e(t.target).is(this))return t.handleObj.handler.apply(this,arguments)}})})}(jQuery),function(e){"use strict";function t(t){return this.each(function(){var n=e(this),o=n.data("bs.alert");o||n.data("bs.alert",o=new i(this)),"string"==typeof t&&o[t].call(n)})}var n='[data-dismiss="alert"]',i=function(t){e(t).on("click",n,this.close)};i.VERSION="3.4.1",i.TRANSITION_DURATION=150,i.prototype.close=function(t){function n(){s.detach().trigger("closed.bs.alert").remove()}var o=e(this),r=o.attr("data-target");r||(r=o.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,"")),r="#"===r?[]:r;var s=e(document).find(r);t&&t.preventDefault(),s.length||(s=o.closest(".alert")),s.trigger(t=e.Event("close.bs.alert")),t.isDefaultPrevented()||(s.removeClass("in"),e.support.transition&&s.hasClass("fade")?s.one("bsTransitionEnd",n).emulateTransitionEnd(i.TRANSITION_DURATION):n())};var o=e.fn.alert;e.fn.alert=t,e.fn.alert.Constructor=i,e.fn.alert.noConflict=function(){return e.fn.alert=o,this},e(document).on("click.bs.alert.data-api",n,i.prototype.close)}(jQuery),function(e){"use strict";function t(t){return this.each(function(){var i=e(this),o=i.data("bs.button"),r="object"==typeof t&&t;o||i.data("bs.button",o=new n(this,r)),"toggle"==t?o.toggle():t&&o.setState(t)})}var n=function(t,i){this.$element=e(t),this.options=e.extend({},n.DEFAULTS,i),this.isLoading=!1};n.VERSION="3.4.1",n.DEFAULTS={loadingText:"loading..."},n.prototype.setState=function(t){var n="disabled",i=this.$element,o=i.is("input")?"val":"html",r=i.data();t+="Text",null==r.resetText&&i.data("resetText",i[o]()),setTimeout(e.proxy(function(){i[o](null==r[t]?this.options[t]:r[t]),"loadingText"==t?(this.isLoading=!0,i.addClass(n).attr(n,n).prop(n,!0)):this.isLoading&&(this.isLoading=!1,i.removeClass(n).removeAttr(n).prop(n,!1))},this),0)},n.prototype.toggle=function(){var e=!0,t=this.$element.closest('[data-toggle="buttons"]');if(t.length){var n=this.$element.find("input");"radio"==n.prop("type")?(n.prop("checked")&&(e=!1),t.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==n.prop("type")&&(n.prop("checked")!==this.$element.hasClass("active")&&(e=!1),this.$element.toggleClass("active")),n.prop("checked",this.$element.hasClass("active")),e&&n.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var i=e.fn.button;e.fn.button=t,e.fn.button.Constructor=n,e.fn.button.noConflict=function(){return e.fn.button=i,this},e(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(n){var i=e(n.target).closest(".btn");t.call(i,"toggle"),e(n.target).is('input[type="radio"], input[type="checkbox"]')||(n.preventDefault(),i.is("input,button")?i.trigger("focus"):i.find("input:visible,button:visible").first().trigger("focus"))}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(t){e(t.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(t.type))})}(jQuery),function(e){"use strict";function t(t){return this.each(function(){var i=e(this),o=i.data("bs.carousel"),r=e.extend({},n.DEFAULTS,i.data(),"object"==typeof t&&t),s="string"==typeof t?t:r.slide;o||i.data("bs.carousel",o=new n(this,r)),"number"==typeof t?o.to(t):s?o[s]():r.interval&&o.pause().cycle()})}var n=function(t,n){this.$element=e(t),this.$indicators=this.$element.find(".carousel-indicators"),this.options=n,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",e.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",e.proxy(this.pause,this)).on("mouseleave.bs.carousel",e.proxy(this.cycle,this))};n.VERSION="3.4.1",n.TRANSITION_DURATION=600,n.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},n.prototype.keydown=function(e){if(!/input|textarea/i.test(e.target.tagName)){switch(e.which){case 37:this.prev();break;case 39:this.next();break;default:return}e.preventDefault()}},n.prototype.cycle=function(t){return t||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(e.proxy(this.next,this),this.options.interval)),this},n.prototype.getItemIndex=function(e){return this.$items=e.parent().children(".item"),this.$items.index(e||this.$active)},n.prototype.getItemForDirection=function(e,t){var n=this.getItemIndex(t);if(("prev"==e&&0===n||"next"==e&&n==this.$items.length-1)&&!this.options.wrap)return t;var i="prev"==e?-1:1,o=(n+i)%this.$items.length;return this.$items.eq(o)},n.prototype.to=function(e){var t=this,n=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(!(e>this.$items.length-1||e<0))return this.sliding?this.$element.one("slid.bs.carousel",function(){t.to(e)}):n==e?this.pause().cycle():this.slide(e>n?"next":"prev",this.$items.eq(e))},n.prototype.pause=function(t){return t||(this.paused=!0),this.$element.find(".next, .prev").length&&e.support.transition&&(this.$element.trigger(e.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},n.prototype.next=function(){if(!this.sliding)return this.slide("next")},n.prototype.prev=function(){if(!this.sliding)return this.slide("prev")},n.prototype.slide=function(t,i){var o=this.$element.find(".item.active"),r=i||this.getItemForDirection(t,o),s=this.interval,a="next"==t?"left":"right",l=this;if(r.hasClass("active"))return this.sliding=!1;var c=r[0],u=e.Event("slide.bs.carousel",{relatedTarget:c,direction:a});if(this.$element.trigger(u),!u.isDefaultPrevented()){if(this.sliding=!0,s&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var d=e(this.$indicators.children()[this.getItemIndex(r)]);d&&d.addClass("active")}var h=e.Event("slid.bs.carousel",{relatedTarget:c,direction:a});return e.support.transition&&this.$element.hasClass("slide")?(r.addClass(t),"object"==typeof r&&r.length&&r[0].offsetWidth,o.addClass(a),r.addClass(a),o.one("bsTransitionEnd",function(){r.removeClass([t,a].join(" ")).addClass("active"),o.removeClass(["active",a].join(" ")),l.sliding=!1,setTimeout(function(){l.$element.trigger(h)},0)}).emulateTransitionEnd(n.TRANSITION_DURATION)):(o.removeClass("active"),r.addClass("active"),this.sliding=!1,this.$element.trigger(h)),s&&this.cycle(),this}};var i=e.fn.carousel;e.fn.carousel=t,e.fn.carousel.Constructor=n,e.fn.carousel.noConflict=function(){return e.fn.carousel=i,this};var o=function(n){var i=e(this),o=i.attr("href");o&&(o=o.replace(/.*(?=#[^\s]+$)/,""));var r=i.attr("data-target")||o,s=e(document).find(r);if(s.hasClass("carousel")){var a=e.extend({},s.data(),i.data()),l=i.attr("data-slide-to");l&&(a.interval=!1),t.call(s,a),l&&s.data("bs.carousel").to(l),n.preventDefault()}};e(document).on("click.bs.carousel.data-api","[data-slide]",o).on("click.bs.carousel.data-api","[data-slide-to]",o),e(window).on("load",function(){e('[data-ride="carousel"]').each(function(){var n=e(this);t.call(n,n.data())})})}(jQuery),function(e){"use strict";function t(t){var n,i=t.attr("data-target")||(n=t.attr("href"))&&n.replace(/.*(?=#[^\s]+$)/,"");return e(document).find(i)}function n(t){return this.each(function(){var n=e(this),o=n.data("bs.collapse"),r=e.extend({},i.DEFAULTS,n.data(),"object"==typeof t&&t);!o&&r.toggle&&/show|hide/.test(t)&&(r.toggle=!1),o||n.data("bs.collapse",o=new i(this,r)),"string"==typeof t&&o[t]()})}var i=function(t,n){this.$element=e(t),this.options=e.extend({},i.DEFAULTS,n),this.$trigger=e('[data-toggle="collapse"][href="#'+t.id+'"],[data-toggle="collapse"][data-target="#'+t.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};i.VERSION="3.4.1",i.TRANSITION_DURATION=350,i.DEFAULTS={toggle:!0},i.prototype.dimension=function(){return this.$element.hasClass("width")?"width":"height"},i.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var t,o=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(o&&o.length&&(t=o.data("bs.collapse"))&&t.transitioning)){var r=e.Event("show.bs.collapse");if(this.$element.trigger(r),!r.isDefaultPrevented()){o&&o.length&&(n.call(o,"hide"),t||o.data("bs.collapse",null));var s=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[s](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var a=function(){this.$element.removeClass("collapsing").addClass("collapse in")[s](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!e.support.transition)return a.call(this);var l=e.camelCase(["scroll",s].join("-"));this.$element.one("bsTransitionEnd",e.proxy(a,this)).emulateTransitionEnd(i.TRANSITION_DURATION)[s](this.$element[0][l])}}}},i.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var t=e.Event("hide.bs.collapse");if(this.$element.trigger(t),!t.isDefaultPrevented()){var n=this.dimension();this.$element[n](this.$element[n]())[0].offsetHeight, this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var o=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};if(!e.support.transition)return o.call(this);this.$element[n](0).one("bsTransitionEnd",e.proxy(o,this)).emulateTransitionEnd(i.TRANSITION_DURATION)}}},i.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},i.prototype.getParent=function(){return e(document).find(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(e.proxy(function(n,i){var o=e(i);this.addAriaAndCollapsedClass(t(o),o)},this)).end()},i.prototype.addAriaAndCollapsedClass=function(e,t){var n=e.hasClass("in");e.attr("aria-expanded",n),t.toggleClass("collapsed",!n).attr("aria-expanded",n)};var o=e.fn.collapse;e.fn.collapse=n,e.fn.collapse.Constructor=i,e.fn.collapse.noConflict=function(){return e.fn.collapse=o,this},e(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(i){var o=e(this);o.attr("data-target")||i.preventDefault();var r=t(o),s=r.data("bs.collapse"),a=s?"toggle":o.data();n.call(r,a)})}(jQuery),function(e){"use strict";function t(t){var n=t.attr("data-target");n||(n=t.attr("href"),n=n&&/#[A-Za-z]/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,""));var i="#"!==n?e(document).find(n):null;return i&&i.length?i:t.parent()}function n(n){n&&3===n.which||(e(o).remove(),e(r).each(function(){var i=e(this),o=t(i),r={relatedTarget:this};o.hasClass("open")&&(n&&"click"==n.type&&/input|textarea/i.test(n.target.tagName)&&e.contains(o[0],n.target)||(o.trigger(n=e.Event("hide.bs.dropdown",r)),n.isDefaultPrevented()||(i.attr("aria-expanded","false"),o.removeClass("open").trigger(e.Event("hidden.bs.dropdown",r)))))}))}function i(t){return this.each(function(){var n=e(this),i=n.data("bs.dropdown");i||n.data("bs.dropdown",i=new s(this)),"string"==typeof t&&i[t].call(n)})}var o=".dropdown-backdrop",r='[data-toggle="dropdown"]',s=function(t){e(t).on("click.bs.dropdown",this.toggle)};s.VERSION="3.4.1",s.prototype.toggle=function(i){var o=e(this);if(!o.is(".disabled, :disabled")){var r=t(o),s=r.hasClass("open");if(n(),!s){"ontouchstart"in document.documentElement&&!r.closest(".navbar-nav").length&&e(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(e(this)).on("click",n);var a={relatedTarget:this};if(r.trigger(i=e.Event("show.bs.dropdown",a)),i.isDefaultPrevented())return;o.trigger("focus").attr("aria-expanded","true"),r.toggleClass("open").trigger(e.Event("shown.bs.dropdown",a))}return!1}},s.prototype.keydown=function(n){if(/(38|40|27|32)/.test(n.which)&&!/input|textarea/i.test(n.target.tagName)){var i=e(this);if(n.preventDefault(),n.stopPropagation(),!i.is(".disabled, :disabled")){var o=t(i),s=o.hasClass("open");if(!s&&27!=n.which||s&&27==n.which)return 27==n.which&&o.find(r).trigger("focus"),i.trigger("click");var a=" li:not(.disabled):visible a",l=o.find(".dropdown-menu"+a);if(l.length){var c=l.index(n.target);38==n.which&&c>0&&c--,40==n.which&&cdocument.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&e?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!e?this.scrollbarWidth:""})},n.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},n.prototype.checkScrollbar=function(){var e=window.innerWidth;if(!e){var t=document.documentElement.getBoundingClientRect();e=t.right-Math.abs(t.left)}this.bodyIsOverflowing=document.body.clientWidth
',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0},sanitize:!0,sanitizeFn:null,whiteList:a},u.prototype.init=function(t,n,i){if(this.enabled=!0,this.type=t,this.$element=e(n),this.options=this.getOptions(i),this.$viewport=this.options.viewport&&e(document).find(e.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var o=this.options.trigger.split(" "),r=o.length;r--;){var s=o[r];if("click"==s)this.$element.on("click."+this.type,this.options.selector,e.proxy(this.toggle,this));else if("manual"!=s){var a="hover"==s?"mouseenter":"focusin",l="hover"==s?"mouseleave":"focusout";this.$element.on(a+"."+this.type,this.options.selector,e.proxy(this.enter,this)),this.$element.on(l+"."+this.type,this.options.selector,e.proxy(this.leave,this))}}this.options.selector?this._options=e.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},u.prototype.getDefaults=function(){return u.DEFAULTS},u.prototype.getOptions=function(t){var i=this.$element.data();for(var r in i)i.hasOwnProperty(r)&&-1!==e.inArray(r,o)&&delete i[r];return t=e.extend({},this.getDefaults(),i,t),t.delay&&"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),t.sanitize&&(t.template=n(t.template,t.whiteList,t.sanitizeFn)),t},u.prototype.getDelegateOptions=function(){var t={},n=this.getDefaults();return this._options&&e.each(this._options,function(e,i){n[e]!=i&&(t[e]=i)}),t},u.prototype.enter=function(t){var n=t instanceof this.constructor?t:e(t.currentTarget).data("bs."+this.type);return n||(n=new this.constructor(t.currentTarget,this.getDelegateOptions()),e(t.currentTarget).data("bs."+this.type,n)),t instanceof e.Event&&(n.inState["focusin"==t.type?"focus":"hover"]=!0),n.tip().hasClass("in")||"in"==n.hoverState?void(n.hoverState="in"):(clearTimeout(n.timeout),n.hoverState="in",n.options.delay&&n.options.delay.show?void(n.timeout=setTimeout(function(){"in"==n.hoverState&&n.show()},n.options.delay.show)):n.show())},u.prototype.isInStateTrue=function(){for(var e in this.inState)if(this.inState[e])return!0;return!1},u.prototype.leave=function(t){var n=t instanceof this.constructor?t:e(t.currentTarget).data("bs."+this.type);if(n||(n=new this.constructor(t.currentTarget,this.getDelegateOptions()),e(t.currentTarget).data("bs."+this.type,n)),t instanceof e.Event&&(n.inState["focusout"==t.type?"focus":"hover"]=!1),!n.isInStateTrue()){if(clearTimeout(n.timeout),n.hoverState="out",!n.options.delay||!n.options.delay.hide)return n.hide();n.timeout=setTimeout(function(){"out"==n.hoverState&&n.hide()},n.options.delay.hide)}},u.prototype.show=function(){var t=e.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(t);var n=e.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(t.isDefaultPrevented()||!n)return;var i=this,o=this.tip(),r=this.getUID(this.type);this.setContent(),o.attr("id",r),this.$element.attr("aria-describedby",r),this.options.animation&&o.addClass("fade");var s="function"==typeof this.options.placement?this.options.placement.call(this,o[0],this.$element[0]):this.options.placement,a=/\s?auto?\s?/i,l=a.test(s);l&&(s=s.replace(a,"")||"top"),o.detach().css({top:0,left:0,display:"block"}).addClass(s).data("bs."+this.type,this),this.options.container?o.appendTo(e(document).find(this.options.container)):o.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var c=this.getPosition(),d=o[0].offsetWidth,h=o[0].offsetHeight;if(l){var f=s,p=this.getPosition(this.$viewport);s="bottom"==s&&c.bottom+h>p.bottom?"top":"top"==s&&c.top-hp.width?"left":"left"==s&&c.left-ds.top+s.height&&(o.top=s.top+s.height-l)}else{var c=t.left-r,u=t.left+r+n;cs.right&&(o.left=s.left+s.width-u)}return o},u.prototype.getTitle=function(){var e=this.$element,t=this.options;return e.attr("data-original-title")||("function"==typeof t.title?t.title.call(e[0]):t.title)},u.prototype.getUID=function(e){do{e+=~~(1e6*Math.random())}while(document.getElementById(e));return e},u.prototype.tip=function(){if(!this.$tip&&(this.$tip=e(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},u.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},u.prototype.enable=function(){this.enabled=!0},u.prototype.disable=function(){this.enabled=!1},u.prototype.toggleEnabled=function(){this.enabled=!this.enabled},u.prototype.toggle=function(t){var n=this;t&&((n=e(t.currentTarget).data("bs."+this.type))||(n=new this.constructor(t.currentTarget,this.getDelegateOptions()),e(t.currentTarget).data("bs."+this.type,n))),t?(n.inState.click=!n.inState.click,n.isInStateTrue()?n.enter(n):n.leave(n)):n.tip().hasClass("in")?n.leave(n):n.enter(n)},u.prototype.destroy=function(){var e=this;clearTimeout(this.timeout),this.hide(function(){e.$element.off("."+e.type).removeData("bs."+e.type),e.$tip&&e.$tip.detach(),e.$tip=null,e.$arrow=null,e.$viewport=null,e.$element=null})},u.prototype.sanitizeHtml=function(e){return n(e,this.options.whiteList,this.options.sanitizeFn)};var d=e.fn.tooltip;e.fn.tooltip=i,e.fn.tooltip.Constructor=u,e.fn.tooltip.noConflict=function(){return e.fn.tooltip=d,this}}(jQuery),function(e){"use strict";function t(t){return this.each(function(){var i=e(this),o=i.data("bs.popover"),r="object"==typeof t&&t;!o&&/destroy|hide/.test(t)||(o||i.data("bs.popover",o=new n(this,r)),"string"==typeof t&&o[t]())})}var n=function(e,t){this.init("popover",e,t)};if(!e.fn.tooltip)throw new Error("Popover requires tooltip.js");n.VERSION="3.4.1",n.DEFAULTS=e.extend({},e.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:''}),n.prototype=e.extend({},e.fn.tooltip.Constructor.prototype),n.prototype.constructor=n,n.prototype.getDefaults=function(){return n.DEFAULTS},n.prototype.setContent=function(){var e=this.tip(),t=this.getTitle(),n=this.getContent();if(this.options.html){var i=typeof n;this.options.sanitize&&(t=this.sanitizeHtml(t),"string"===i&&(n=this.sanitizeHtml(n))),e.find(".popover-title").html(t),e.find(".popover-content").children().detach().end()["string"===i?"html":"append"](n)}else e.find(".popover-title").text(t),e.find(".popover-content").children().detach().end().text(n);e.removeClass("fade top bottom left right in"),e.find(".popover-title").html()||e.find(".popover-title").hide()},n.prototype.hasContent=function(){return this.getTitle()||this.getContent()},n.prototype.getContent=function(){var e=this.$element,t=this.options;return e.attr("data-content")||("function"==typeof t.content?t.content.call(e[0]):t.content)},n.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var i=e.fn.popover;e.fn.popover=t,e.fn.popover.Constructor=n,e.fn.popover.noConflict=function(){return e.fn.popover=i,this}}(jQuery),function(e){"use strict";function t(n,i){this.$body=e(document.body),this.$scrollElement=e(e(n).is(document.body)?window:n),this.options=e.extend({},t.DEFAULTS,i),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",e.proxy(this.process,this)),this.refresh(),this.process()}function n(n){return this.each(function(){var i=e(this),o=i.data("bs.scrollspy"),r="object"==typeof n&&n;o||i.data("bs.scrollspy",o=new t(this,r)),"string"==typeof n&&o[n]()})}t.VERSION="3.4.1",t.DEFAULTS={offset:10},t.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},t.prototype.refresh=function(){var t=this,n="offset",i=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),e.isWindow(this.$scrollElement[0])||(n="position",i=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var t=e(this),o=t.data("target")||t.attr("href"),r=/^#./.test(o)&&e(o);return r&&r.length&&r.is(":visible")&&[[r[n]().top+i,o]]||null}).sort(function(e,t){return e[0]-t[0]}).each(function(){t.offsets.push(this[0]),t.targets.push(this[1])})},t.prototype.process=function(){var e,t=this.$scrollElement.scrollTop()+this.options.offset,n=this.getScrollHeight(),i=this.options.offset+n-this.$scrollElement.height(),o=this.offsets,r=this.targets,s=this.activeTarget;if(this.scrollHeight!=n&&this.refresh(),t>=i)return s!=(e=r[r.length-1])&&this.activate(e);if(s&&t=o[e]&&(o[e+1]===undefined||t .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),t.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),a?(t[0].offsetWidth,t.addClass("in")):t.removeClass("fade"),t.parent(".dropdown-menu").length&&t.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),o&&o()}var s=i.find("> .active"),a=o&&e.support.transition&&(s.length&&s.hasClass("fade")||!!i.find("> .fade").length);s.length&&a?s.one("bsTransitionEnd",r).emulateTransitionEnd(n.TRANSITION_DURATION):r(),s.removeClass("in")};var i=e.fn.tab;e.fn.tab=t,e.fn.tab.Constructor=n,e.fn.tab.noConflict=function(){return e.fn.tab=i,this};var o=function(n){n.preventDefault(),t.call(e(this),"show")};e(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',o).on("click.bs.tab.data-api",'[data-toggle="pill"]',o)}(jQuery),function(e){"use strict";function t(t){return this.each(function(){var i=e(this),o=i.data("bs.affix"),r="object"==typeof t&&t;o||i.data("bs.affix",o=new n(this,r)),"string"==typeof t&&o[t]()})}var n=function(t,i){this.options=e.extend({},n.DEFAULTS,i);var o=this.options.target===n.DEFAULTS.target?e(this.options.target):e(document).find(this.options.target);this.$target=o.on("scroll.bs.affix.data-api",e.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",e.proxy(this.checkPositionWithEventLoop,this)),this.$element=e(t),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};n.VERSION="3.4.1",n.RESET="affix affix-top affix-bottom",n.DEFAULTS={offset:0,target:window},n.prototype.getState=function(e,t,n,i){var o=this.$target.scrollTop(),r=this.$element.offset(),s=this.$target.height();if(null!=n&&"top"==this.affixed)return o=e-i&&"bottom"},n.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(n.RESET).addClass("affix");var e=this.$target.scrollTop(),t=this.$element.offset();return this.pinnedOffset=t.top-e},n.prototype.checkPositionWithEventLoop=function(){setTimeout(e.proxy(this.checkPosition,this),1)},n.prototype.checkPosition=function(){if(this.$element.is(":visible")){var t=this.$element.height(),i=this.options.offset,o=i.top,r=i.bottom,s=Math.max(e(document).height(),e(document.body).height());"object"!=typeof i&&(r=o=i),"function"==typeof o&&(o=i.top(this.$element)),"function"==typeof r&&(r=i.bottom(this.$element));var a=this.getState(s,t,o,r);if(this.affixed!=a){null!=this.unpin&&this.$element.css("top","");var l="affix"+(a?"-"+a:""),c=e.Event(l+".bs.affix");if(this.$element.trigger(c),c.isDefaultPrevented())return;this.affixed=a,this.unpin="bottom"==a?this.getPinnedOffset():null,this.$element.removeClass(n.RESET).addClass(l).trigger(l.replace("affix","affixed")+".bs.affix")}"bottom"==a&&this.$element.offset({top:s-t-r})}};var i=e.fn.affix;e.fn.affix=t,e.fn.affix.Constructor=n,e.fn.affix.noConflict=function(){return e.fn.affix=i,this},e(window).on("load",function(){e('[data-spy="affix"]').each(function(){var n=e(this),i=n.data();i.offset=i.offset||{},null!=i.offsetBottom&&(i.offset.bottom=i.offsetBottom),null!=i.offsetTop&&(i.offset.top=i.offsetTop),t.call(n,i)})})}(jQuery),$(function(){$("a[rel=popover], .ispopover").popover({content:$(this).next(".popover").html()}),$(".tooltip").tooltip(),$("a[rel=tooltip]").tooltip(),$(".istooltip").tooltip(),$("body").tooltip({selector:".istooltip"}),$('[data-toggle="popover"]').popover({sanitize:!1}).click(function(e){e.preventDefault()}),$("body").on("click",function(e){$('[data-toggle="popover"], .popover-js').each(function(){$(this).is(e.target)||0!=$(this).has(e.target).length||0!=$(".popover").has(e.target).length||$(this).attr("aria-describedby")==undefined||$(this).popover("hide")})})}),function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery"],e):e(jQuery)}(function(e){"use strict";return e.ui=e.ui||{},e.ui.version="1.13.0"}),function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","./version"],e):e(jQuery)}(function(e){"use strict";return e.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase())}),/*! * jQuery UI Widget 1.13.0 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors * Released under the MIT license. * http://jquery.org/license */ function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","./version"],e):e(jQuery)}(function(e){"use strict";var t=0,n=Array.prototype.hasOwnProperty,i=Array.prototype.slice;return e.cleanData=function(t){return function(n){var i,o,r;for(r=0;null!=(o=n[r]);r++)(i=e._data(o,"events"))&&i.remove&&e(o).triggerHandler("remove");t(n)}}(e.cleanData),e.widget=function(t,n,i){var o,r,s,a={},l=t.split(".")[0];t=t.split(".")[1];var c=l+"-"+t;return i||(i=n,n=e.Widget),Array.isArray(i)&&(i=e.extend.apply(null,[{}].concat(i))),e.expr.pseudos[c.toLowerCase()]=function(t){return!!e.data(t,c)},e[l]=e[l]||{},o=e[l][t],r=e[l][t]=function(e,t){if(!this._createWidget)return new r(e,t);arguments.length&&this._createWidget(e,t)},e.extend(r,o,{version:i.version,_proto:e.extend({},i),_childConstructors:[]}),s=new n,s.options=e.widget.extend({},s.options),e.each(i,function(e,t){if("function"!=typeof t)return void(a[e]=t);a[e]=function(){function i(){return n.prototype[e].apply(this,arguments)}function o(t){return n.prototype[e].apply(this,t)}return function(){var e,n=this._super,r=this._superApply;return this._super=i,this._superApply=o,e=t.apply(this,arguments),this._super=n,this._superApply=r,e}}()}),r.prototype=e.widget.extend(s,{widgetEventPrefix:o?s.widgetEventPrefix||t:t},a,{constructor:r,namespace:l,widgetName:t,widgetFullName:c}),o?(e.each(o._childConstructors,function(t,n){var i=n.prototype;e.widget(i.namespace+"."+i.widgetName,r,n._proto)}),delete o._childConstructors):n._childConstructors.push(r),e.widget.bridge(t,r),r},e.widget.extend=function(t){for(var o,r,s=i.call(arguments,1),a=0,l=s.length;a",options:{classes:{},disabled:!1,create:null},_createWidget:function(n,i){i=e(i||this.defaultElement||this)[0],this.element=e(i),this.uuid=t++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=e(),this.hoverable=e(),this.focusable=e(),this.classesElementLookup={},i!==this&&(e.data(i,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===i&&this.destroy()}}),this.document=e(i.style?i.ownerDocument:i.document||i),this.window=e(this.document[0].defaultView||this.document[0].parentWindow)),this.options=e.widget.extend({},this.options,this._getCreateOptions(),n),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){var t=this;this._destroy(),e.each(this.classesElementLookup,function(e,n){t._removeClass(n,e)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:e.noop,widget:function(){return this.element},option:function(t,n){var i,o,r,s=t;if(0===arguments.length)return e.widget.extend({},this.options);if("string"==typeof t)if(s={},i=t.split("."),t=i.shift(),i.length){for(o=s[t]=e.widget.extend({},this.options[t]),r=0;r=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})}),/*! * jQuery UI :data 1.13.0 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors * Released under the MIT license. * http://jquery.org/license */ function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","./version"],e):e(jQuery)}(function(e){"use strict";return e.extend(e.expr.pseudos,{data:e.expr.createPseudo?e.expr.createPseudo(function(t){return function(n){return!!e.data(n,t)}}):function(t,n,i){return!!e.data(t,i[3])}})}),/*! * jQuery UI Scroll Parent 1.13.0 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors * Released under the MIT license. * http://jquery.org/license */ function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","./version"],e):e(jQuery)}(function(e){"use strict";return e.fn.scrollParent=function(t){var n=this.css("position"),i="absolute"===n,o=t?/(auto|scroll|hidden)/:/(auto|scroll)/,r=this.parents().filter(function(){var t=e(this);return(!i||"static"!==t.css("position"))&&o.test(t.css("overflow")+t.css("overflow-y")+t.css("overflow-x"))}).eq(0);return"fixed"!==n&&r.length?r:e(this[0].ownerDocument||document)}}),/*! * jQuery UI Sortable 1.13.0 * http://jqueryui.com * * Copyright jQuery Foundation and other contributors * Released under the MIT license. * http://jquery.org/license */ function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","./mouse","../data","../ie","../scroll-parent","../version","../widget"],e):e(jQuery)}(function(e){"use strict";return e.widget("ui.sortable",e.ui.mouse,{version:"1.13.0",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_isOverAxis:function(e,t,n){return e>=t&&e=0;e--)this.items[e].item.removeData(this.widgetName+"-item");return this},_mouseCapture:function(t,n){var i=null,o=!1,r=this;return!this.reverting&&(!this.options.disabled&&"static"!==this.options.type&&(this._refreshItems(t),e(t.target).parents().each(function(){if(e.data(this,r.widgetName+"-item")===r)return i=e(this),!1}),e.data(t.target,r.widgetName+"-item")===r&&(i=e(t.target)),!!i&&(!(this.options.handle&&!n&&(e(this.options.handle,i).find("*").addBack().each(function(){this===t.target&&(o=!0)}),!o))&&(this.currentItem=i,this._removeCurrentsFromItems(),!0))))},_mouseStart:function(t,n,i){var o,r,s=this.options;if(this.currentContainer=this,this.refreshPositions(),this.appendTo=e("parent"!==s.appendTo?s.appendTo:this.currentItem.parent()),this.helper=this._createHelper(t),this._cacheHelperProportions(),this._cacheMargins(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},e.extend(this.offset,{click:{left:t.pageX-this.offset.left,top:t.pageY-this.offset.top},relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),s.cursorAt&&this._adjustOffsetFromHelper(s.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),this.scrollParent=this.placeholder.scrollParent(),e.extend(this.offset,{parent:this._getParentOffset()}),s.containment&&this._setContainment(),s.cursor&&"auto"!==s.cursor&&(r=this.document.find("body"),this.storedCursor=r.css("cursor"),r.css("cursor",s.cursor),this.storedStylesheet=e("").appendTo(r)),s.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",s.zIndex)),s.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",s.opacity)),this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",t,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!i)for(o=this.containers.length-1;o>=0;o--)this.containers[o]._trigger("activate",t,this._uiHash(this));return e.ui.ddmanager&&(e.ui.ddmanager.current=this),e.ui.ddmanager&&!s.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t),this.dragging=!0,this._addClass(this.helper,"ui-sortable-helper"),this.helper.parent().is(this.appendTo)||(this.helper.detach().appendTo(this.appendTo),this.offset.parent=this._getParentOffset()),this.position=this.originalPosition=this._generatePosition(t),this.originalPageX=t.pageX,this.originalPageY=t.pageY,this.lastPositionAbs=this.positionAbs=this._convertPositionTo("absolute"),this._mouseDrag(t),!0},_scroll:function(e){var t=this.options,n=!1;return this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-e.pageY=0;n--)if(i=this.items[n],o=i.item[0],(r=this._intersectsWithPointer(i))&&i.instance===this.currentContainer&&!(o===this.currentItem[0]||this.placeholder[1===r?"next":"prev"]()[0]===o||e.contains(this.placeholder[0],o)||"semi-dynamic"===this.options.type&&e.contains(this.element[0],o))){if(this.direction=1===r?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(i))break;this._rearrange(t,i),this._trigger("change",t,this._uiHash());break}return e.ui.ddmanager&&e.ui.ddmanager.drag(this,t),this._trigger("sort",t,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(t,n){if(t){if(e.ui.ddmanager&&!this.options.dropBehaviour&&e.ui.ddmanager.drop(this,t),this.options.revert){var i=this,o=this.placeholder.offset(),r=this.options.axis,s={};r&&"x"!==r||(s.left=o.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollLeft)),r&&"y"!==r||(s.top=o.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,e(this.helper).animate(s,parseInt(this.options.revert,10)||500,function(){i._clear(t)})}else this._clear(t,n);return!1}},cancel:function(){if(this.dragging){this._mouseUp(new e.Event("mouseup",{target:null})),"original"===this.options.helper?(this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")):this.currentItem.show();for(var t=this.containers.length-1;t>=0;t--)this.containers[t]._trigger("deactivate",null,this._uiHash(this)),this.containers[t].containerCache.over&&(this.containers[t]._trigger("out",null,this._uiHash(this)),this.containers[t].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),e.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?e(this.domPosition.prev).after(this.currentItem):e(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(t){var n=this._getItemsAsjQuery(t&&t.connected),i=[];return t=t||{},e(n).each(function(){var n=(e(t.item||this).attr(t.attribute||"id")||"").match(t.expression||/(.+)[\-=_](.+)/);n&&i.push((t.key||n[1]+"[]")+"="+(t.key&&t.expression?n[1]:n[2]))}),!i.length&&t.key&&i.push(t.key+"="),i.join("&")},toArray:function(t){var n=this._getItemsAsjQuery(t&&t.connected),i=[];return t=t||{},n.each(function(){i.push(e(t.item||this).attr(t.attribute||"id")||"")}),i},_intersectsWith:function(e){var t=this.positionAbs.left,n=t+this.helperProportions.width,i=this.positionAbs.top,o=i+this.helperProportions.height,r=e.left,s=r+e.width,a=e.top,l=a+e.height,c=this.offset.click.top,u=this.offset.click.left,d="x"===this.options.axis||i+c>a&&i+cr&&t+ue[this.floating?"width":"height"]?f:r0?"down":"up")},_getDragHorizontalDirection:function(){var e=this.positionAbs.left-this.lastPositionAbs.left;return 0!==e&&(e>0?"right":"left")},refresh:function(e){return this._refreshItems(e),this._setHandleClassName(),this.refreshPositions(),this},_connectWith:function(){var e=this.options;return e.connectWith.constructor===String?[e.connectWith]:e.connectWith},_getItemsAsjQuery:function(t){function n(){a.push(this)}var i,o,r,s,a=[],l=[],c=this._connectWith();if(c&&t)for(i=c.length-1;i>=0;i--)for(r=e(c[i],this.document[0]),o=r.length-1;o>=0;o--)(s=e.data(r[o],this.widgetFullName))&&s!==this&&!s.options.disabled&&l.push(["function"==typeof s.options.items?s.options.items.call(s.element):e(s.options.items,s.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),s]);for(l.push(["function"==typeof this.options.items?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):e(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),i=l.length-1;i>=0;i--)l[i][0].each(n);return e(a)},_removeCurrentsFromItems:function(){var t=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=e.grep(this.items,function(e){for(var n=0;n=0;n--)for(o=e(h[n],this.document[0]),i=o.length-1;i>=0;i--)(r=e.data(o[i],this.widgetFullName))&&r!==this&&!r.options.disabled&&(d.push(["function"==typeof r.options.items?r.options.items.call(r.element[0],t,{item:this.currentItem}):e(r.options.items,r.element),r]),this.containers.push(r));for(n=d.length-1;n>=0;n--)for(s=d[n][1],a=d[n][0],i=0,c=a.length;i=0;n--)i=this.items[n],this.currentContainer&&i.instance!==this.currentContainer&&i.item[0]!==this.currentItem[0]||(o=this.options.toleranceElement?e(this.options.toleranceElement,i.item):i.item,t||(i.width=o.outerWidth(),i.height=o.outerHeight()),r=o.offset(),i.left=r.left,i.top=r.top)},refreshPositions:function(e){this.floating=!!this.items.length&&("x"===this.options.axis||this._isFloating(this.items[0].item)),null!==this.innermostContainer&&this._refreshItemPositions(e);var t,n;if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(t=this.containers.length-1;t>=0;t--)n=this.containers[t].element.offset(),this.containers[t].containerCache.left=n.left,this.containers[t].containerCache.top=n.top,this.containers[t].containerCache.width=this.containers[t].element.outerWidth(),this.containers[t].containerCache.height=this.containers[t].element.outerHeight();return this},_createPlaceholder:function(t){t=t||this;var n,i,o=t.options;o.placeholder&&o.placeholder.constructor!==String||(n=o.placeholder,i=t.currentItem[0].nodeName.toLowerCase(),o.placeholder={element:function(){var o=e("<"+i+">",t.document[0]);return t._addClass(o,"ui-sortable-placeholder",n||t.currentItem[0].className)._removeClass(o,"ui-sortable-helper"),"tbody"===i?t._createTrPlaceholder(t.currentItem.find("tr").eq(0),e("",t.document[0]).appendTo(o)):"tr"===i?t._createTrPlaceholder(t.currentItem,o):"img"===i&&o.attr("src",t.currentItem.attr("src")),n||o.css("visibility","hidden"),o},update:function(e,r){n&&!o.forcePlaceholderSize||(r.height()&&(!o.forcePlaceholderSize||"tbody"!==i&&"tr"!==i)||r.height(t.currentItem.innerHeight()-parseInt(t.currentItem.css("paddingTop")||0,10)-parseInt(t.currentItem.css("paddingBottom")||0,10)),r.width()||r.width(t.currentItem.innerWidth()-parseInt(t.currentItem.css("paddingLeft")||0,10)-parseInt(t.currentItem.css("paddingRight")||0,10)))}}),t.placeholder=e(o.placeholder.element.call(t.element,t.currentItem)),t.currentItem.after(t.placeholder),o.placeholder.update(t,t.placeholder)},_createTrPlaceholder:function(t,n){var i=this;t.children().each(function(){e(" ",i.document[0]).attr("colspan",e(this).attr("colspan")||1).appendTo(n)})},_contactContainers:function(t){var n,i,o,r,s,a,l,c,u,d,h=null,f=null;for(n=this.containers.length-1;n>=0;n--)if(!e.contains(this.currentItem[0],this.containers[n].element[0]))if(this._intersectsWith(this.containers[n].containerCache)){if(h&&e.contains(this.containers[n].element[0],h.element[0]))continue;h=this.containers[n],f=n}else this.containers[n].containerCache.over&&(this.containers[n]._trigger("out",t,this._uiHash(this)),this.containers[n].containerCache.over=0);if(this.innermostContainer=h,h)if(1===this.containers.length)this.containers[f].containerCache.over||(this.containers[f]._trigger("over",t,this._uiHash(this)),this.containers[f].containerCache.over=1);else{for(o=1e4,r=null,u=h.floating||this._isFloating(this.currentItem),s=u?"left":"top",a=u?"width":"height",d=u?"pageX":"pageY",i=this.items.length-1;i>=0;i--)e.contains(this.containers[f].element[0],this.items[i].item[0])&&this.items[i].item[0]!==this.currentItem[0]&&(l=this.items[i].item.offset()[s],c=!1,t[d]-l>this.items[i][a]/2&&(c=!0),Math.abs(t[d]-l)this.containment[2]&&(r=this.containment[2]+this.offset.click.left),t.pageY-this.offset.click.top>this.containment[3]&&(s=this.containment[3]+this.offset.click.top)),o.grid&&(n=this.originalPageY+Math.round((s-this.originalPageY)/o.grid[1])*o.grid[1],s=this.containment?n-this.offset.click.top>=this.containment[1]&&n-this.offset.click.top<=this.containment[3]?n:n-this.offset.click.top>=this.containment[1]?n-o.grid[1]:n+o.grid[1]:n,i=this.originalPageX+Math.round((r-this.originalPageX)/o.grid[0])*o.grid[0],r=this.containment?i-this.offset.click.left>=this.containment[0]&&i-this.offset.click.left<=this.containment[2]?i:i-this.offset.click.left>=this.containment[0]?i-o.grid[0]:i+o.grid[0]:i)),{top:s-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():l?0:a.scrollTop()),left:r-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():l?0:a.scrollLeft())}},_rearrange:function(e,t,n,i){n?n[0].appendChild(this.placeholder[0]):t.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?t.item[0]:t.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var o=this.counter;this._delay(function(){o===this.counter&&this.refreshPositions(!i)})},_clear:function(e,t){function n(e,t,n){return function(i){n._trigger(e,i,t._uiHash(t))}}this.reverting=!1;var i,o=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(i in this._storedCSS)"auto"!==this._storedCSS[i]&&"static"!==this._storedCSS[i]||(this._storedCSS[i]="");this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")}else this.currentItem.show();for(this.fromOutside&&!t&&o.push(function(e){this._trigger("receive",e,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||t||o.push(function(e){this._trigger("update",e,this._uiHash())}),this!==this.currentContainer&&(t||(o.push(function(e){this._trigger("remove",e,this._uiHash())}),o.push(function(e){return function(t){e._trigger("receive",t,this._uiHash(this))}}.call(this,this.currentContainer)),o.push(function(e){return function(t){e._trigger("update",t,this._uiHash(this))}}.call(this,this.currentContainer)))),i=this.containers.length-1;i>=0;i--)t||o.push(n("deactivate",this,this.containers[i])),this.containers[i].containerCache.over&&(o.push(n("out",this,this.containers[i])),this.containers[i].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,t||this._trigger("beforeStop",e,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.cancelHelperRemoval||(this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null),!t){for(i=0;i div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e)),t.appendChild(n),s=!0}}var r=document.attachEvent,s=!1,a=e.fn.resize;if(e.fn.resize=function(e){return this.each(function(){this==window?a.call(jQuery(this),e):addResizeListener(this,e)})},e.fn.removeResize=function(e){return this.each(function(){removeResizeListener(this,e)})},!r){var l=function(){var e=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(e){return window.setTimeout(e,20)};return function(t){return e(t)}}(),c=function(){var e=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.webkitCancelAnimationFrame||window.clearTimeout;return function(t){return e(t)}}(),u=!1,d="",h="animationstart",f="Webkit Moz O ms".split(" "),p="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),m="",g=document.createElement("fakeelement");if(g.style.animationName!==undefined&&(u=!0),!1===u)for(var v=0;v
',e.appendChild(e.__resizeTriggers__),t(e),e.addEventListener("scroll",i,!0),h&&e.__resizeTriggers__.addEventListener(h,function(n){n.animationName==y&&t(e)})),e.__resizeListeners__.push(n))},window.removeResizeListener=function(e,t){r?e.detachEvent("onresize",t):(e.__resizeListeners__.splice(e.__resizeListeners__.indexOf(t),1),e.__resizeListeners__.length||(e.removeEventListener("scroll",i),e.__resizeTriggers__=!e.removeChild(e.__resizeTriggers__)))}}(jQuery),function(e){window.NestedFormEvents=function(){this.addFields=e.proxy(this.addFields,this),this.removeFields=e.proxy(this.removeFields,this)},NestedFormEvents.prototype={addFields:function(t){var n=t.currentTarget,i=e(n).data("association"),o=e("#"+e(n).data("blueprint-id")),r=o.data("blueprint"),s=(e(n).closest(".fields").closestChild("input, textarea, select").eq(0).attr("name")||"").replace(new RegExp("[[a-z_]+]$"),"");if(s)for(var a=s.match(/[a-z_]+_attributes(?=\]\[(new_)?\d+\])/g)||[],l=s.match(/[0-9]+/g)||[],c=0;c0;)for(var i=n.shift(),o=i.children(),r=0;r1){if(r=e({path:"/"},i.defaults,r),"number"==typeof r.expires){var a=new Date;a.setMilliseconds(a.getMilliseconds()+864e5*r.expires),r.expires=a}try{s=JSON.stringify(o),/^[\{\[]/.test(s)&&(o=s)}catch(e){}return o=encodeURIComponent(String(o)),o=o.replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),t=encodeURIComponent(String(t)),t=t.replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent),t=t.replace(/[\(\)]/g,escape),document.cookie=[t,"=",o,r.expires&&"; expires="+r.expires.toUTCString(),r.path&&"; path="+r.path,r.domain&&"; domain="+r.domain,r.secure?"; secure":""].join("")}t||(s={});for(var l=document.cookie?document.cookie.split("; "):[],c=/(%[0-9A-Z]{2})+/g,u=0;u0&&(e.splice(u-1,2),u-=2)}e=e.join("/")}if((p||g)&&m){for(n=e.split("/"),u=n.length;u>0;u-=1){if(i=n.slice(0,u).join("/"),p)for(d=p.length;d>0;d-=1)if((o=m[p.slice(0,d).join("/")])&&(o=o[i])){r=o,a=u;break}if(r)break;!l&&g&&g[i]&&(l=g[i],c=u)}!r&&l&&(r=l,a=c),r&&(n.splice(0,a,r),e=n.join("/"))}return e}function s(e,n){return function(){var i=C.call(arguments,0);return"string"!=typeof i[0]&&1===i.length&&i.push(null),p.apply(t,i.concat([e,n]))}}function a(e){return function(t){return r(t,e)}}function l(e){return function(t){v[e]=t}}function c(e){if(o(y,e)){var n=y[e];delete y[e],w[e]=!0,f.apply(t,n)}if(!o(v,e)&&!o(w,e))throw new Error("No "+e);return v[e]}function u(e){var t,n=e?e.indexOf("!"):-1;return n>-1&&(t=e.substring(0,n),e=e.substring(n+1,e.length)),[t,e]}function d(e){return e?u(e):[]}function h(e){return function(){return b&&b.config&&b.config[e]||{}}}var f,p,m,g,v={},y={},b={},w={},x=Object.prototype.hasOwnProperty,C=[].slice,_=/\.js$/;m=function(e,t){var n,i=u(e),o=i[0],s=t[1];return e=i[1],o&&(o=r(o,s),n=c(o)),o?e=n&&n.normalize?n.normalize(e,a(s)):r(e,s):(e=r(e,s),i=u(e),o=i[0],e=i[1],o&&(n=c(o))),{f:o?o+"!"+e:e,n:e,pr:o,p:n}},g={require:function(e){return s(e)},exports:function(e){var t=v[e];return void 0!==t?t:v[e]={}},module:function(e){return{id:e,uri:"",exports:v[e],config:h(e)}}},f=function(e,n,i,r){var a,u,h,f,p,b,x,C=[],_=typeof i;if(r=r||e,b=d(r),"undefined"===_||"function"===_){for(n=!n.length&&i.length?["require","exports","module"]:n,p=0;p0&&(t.call(arguments,e.prototype.constructor),o=n.prototype.constructor),o.apply(this,arguments)}function o(){this.constructor=i}var r=t(n),s=t(e);n.displayName=e.displayName,i.prototype=new o;for(var a=0;a":">",'"':""","'":"'","/":"/"};return"string"!=typeof e?e:String(e).replace(/[&<>"'\/\\]/g,function(e){return t[e]})},n.appendMany=function(t,n){if("1.7"===e.fn.jquery.substr(0,3)){var i=e();e.map(n,function(e){i=i.add(e)}),n=i}t.append(n)},n.__cache={};var o=0;return n.GetUniqueElementId=function(e){var t=e.getAttribute("data-select2-id");return null==t&&(e.id?(t=e.id,e.setAttribute("data-select2-id",t)):(e.setAttribute("data-select2-id",++o),t=o.toString())),t},n.StoreData=function(e,t,i){var o=n.GetUniqueElementId(e);n.__cache[o]||(n.__cache[o]={}),n.__cache[o][t]=i},n.GetData=function(t,i){var o=n.GetUniqueElementId(t);return i?n.__cache[o]&&null!=n.__cache[o][i]?n.__cache[o][i]:e(t).data(i):n.__cache[o]},n.RemoveData=function(e){var t=n.GetUniqueElementId(e);null!=n.__cache[t]&&delete n.__cache[t],e.removeAttribute("data-select2-id")},n}),t.define("select2/results",["jquery","./utils"],function(e,t){function n(e,t,i){this.$element=e,this.data=i,this.options=t,n.__super__.constructor.call(this)}return t.Extend(n,t.Observable),n.prototype.render=function(){var t=e('
    ');return this.options.get("multiple")&&t.attr("aria-multiselectable","true"),this.$results=t,t},n.prototype.clear=function(){this.$results.empty()},n.prototype.displayMessage=function(t){var n=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var i=e(''),o=this.options.get("translations").get(t.message);i.append(n(o(t.args))),i[0].className+=" select2-results__message",this.$results.append(i)},n.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},n.prototype.append=function(e){this.hideLoading();var t=[];if(null==e.results||0===e.results.length)return void(0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"}));e.results=this.sort(e.results);for(var n=0;n0?t.first().trigger("mouseenter"):e.first().trigger("mouseenter"),this.ensureHighlightVisible()},n.prototype.setClasses=function(){var n=this;this.data.current(function(i){var o=e.map(i,function(e){return e.id.toString()});n.$results.find(".select2-results__option[aria-selected]").each(function(){var n=e(this),i=t.GetData(this,"data"),r=""+i.id;null!=i.element&&i.element.selected||null==i.element&&e.inArray(r,o)>-1?n.attr("aria-selected","true"):n.attr("aria-selected","false")})})},n.prototype.showLoading=function(e){this.hideLoading();var t=this.options.get("translations").get("searching"),n={disabled:!0,loading:!0,text:t(e)},i=this.option(n);i.className+=" loading-results",this.$results.prepend(i)},n.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},n.prototype.option=function(n){var i=document.createElement("li");i.className="select2-results__option";var o={role:"option","aria-selected":"false"},r=window.Element.prototype.matches||window.Element.prototype.msMatchesSelector||window.Element.prototype.webkitMatchesSelector;(null!=n.element&&r.call(n.element,":disabled")||null==n.element&&n.disabled)&&(delete o["aria-selected"],o["aria-disabled"]="true"),null==n.id&&delete o["aria-selected"],null!=n._resultId&&(i.id=n._resultId),n.title&&(i.title=n.title),n.children&&(o.role="group",o["aria-label"]=n.text,delete o["aria-selected"]);for(var s in o){var a=o[s];i.setAttribute(s,a)}if(n.children){var l=e(i),c=document.createElement("strong");c.className="select2-results__group";e(c);this.template(n,c);for(var u=[],d=0;d",{"class":"select2-results__options select2-results__options--nested"});p.append(u),l.append(c),l.append(p)}else this.template(n,i);return t.StoreData(i,"data",n),i},n.prototype.bind=function(n){var i=this,o=n.id+"-results";this.$results.attr("id",o),n.on("results:all",function(e){i.clear(),i.append(e.data),n.isOpen()&&(i.setClasses(),i.highlightFirstItem())}),n.on("results:append",function(e){i.append(e.data),n.isOpen()&&i.setClasses()}),n.on("query",function(e){i.hideMessages(),i.showLoading(e)}),n.on("select",function(){n.isOpen()&&(i.setClasses(),i.options.get("scrollAfterSelect")&&i.highlightFirstItem())}),n.on("unselect",function(){n.isOpen()&&(i.setClasses(),i.options.get("scrollAfterSelect")&&i.highlightFirstItem())}),n.on("open",function(){i.$results.attr("aria-expanded","true"),i.$results.attr("aria-hidden","false"),i.setClasses(),i.ensureHighlightVisible()}),n.on("close",function(){i.$results.attr("aria-expanded","false"),i.$results.attr("aria-hidden","true"),i.$results.removeAttr("aria-activedescendant")}),n.on("results:toggle",function(){var e=i.getHighlightedResults();0!==e.length&&e.trigger("mouseup")}),n.on("results:select",function(){var e=i.getHighlightedResults();if(0!==e.length){var n=t.GetData(e[0],"data");"true"==e.attr("aria-selected")?i.trigger("close",{}):i.trigger("select",{data:n})}}),n.on("results:previous",function(){var e=i.getHighlightedResults(),t=i.$results.find("[aria-selected]"),n=t.index(e);if(!(n<=0)){var o=n-1;0===e.length&&(o=0);var r=t.eq(o);r.trigger("mouseenter");var s=i.$results.offset().top,a=r.offset().top,l=i.$results.scrollTop()+(a-s);0===o?i.$results.scrollTop(0):a-s<0&&i.$results.scrollTop(l)}}),n.on("results:next",function(){var e=i.getHighlightedResults(),t=i.$results.find("[aria-selected]"),n=t.index(e),o=n+1;if(!(o>=t.length)){var r=t.eq(o);r.trigger("mouseenter");var s=i.$results.offset().top+i.$results.outerHeight(!1),a=r.offset().top+r.outerHeight(!1),l=i.$results.scrollTop()+a-s;0===o?i.$results.scrollTop(0):a>s&&i.$results.scrollTop(l)}}),n.on("results:focus",function(e){e.element.addClass("select2-results__option--highlighted")}),n.on("results:message",function(e){i.displayMessage(e)}),e.fn.mousewheel&&this.$results.on("mousewheel",function(e){var t=i.$results.scrollTop(),n=i.$results.get(0).scrollHeight-t+e.deltaY,o=e.deltaY>0&&t-e.deltaY<=0,r=e.deltaY<0&&n<=i.$results.height();o?(i.$results.scrollTop(0),e.preventDefault(),e.stopPropagation()):r&&(i.$results.scrollTop(i.$results.get(0).scrollHeight-i.$results.height()),e.preventDefault(),e.stopPropagation())}),this.$results.on("mouseup",".select2-results__option[aria-selected]",function(n){var o=e(this),r=t.GetData(this,"data");if("true"===o.attr("aria-selected"))return void(i.options.get("multiple")?i.trigger("unselect",{originalEvent:n,data:r}):i.trigger("close",{}));i.trigger("select",{originalEvent:n,data:r})}),this.$results.on("mouseenter",".select2-results__option[aria-selected]",function(){var n=t.GetData(this,"data");i.getHighlightedResults().removeClass("select2-results__option--highlighted"),i.trigger("results:focus",{data:n,element:e(this)})})},n.prototype.getHighlightedResults=function(){return this.$results.find(".select2-results__option--highlighted")},n.prototype.destroy=function(){this.$results.remove()},n.prototype.ensureHighlightVisible=function(){var e=this.getHighlightedResults();if(0!==e.length){var t=this.$results.find("[aria-selected]"),n=t.index(e),i=this.$results.offset().top,o=e.offset().top,r=this.$results.scrollTop()+(o-i),s=o-i;r-=2*e.outerHeight(!1),n<=2?this.$results.scrollTop(0):(s>this.$results.outerHeight()||s<0)&&this.$results.scrollTop(r)}},n.prototype.template=function(t,n){var i=this.options.get("templateResult"),o=this.options.get("escapeMarkup"),r=i(t,n);null==r?n.style.display="none":"string"==typeof r?n.innerHTML=o(r):e(n).append(r)},n}),t.define("select2/keys",[],function(){return{BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46}}),t.define("select2/selection/base",["jquery","../utils","../keys"],function(e,t,n){function i(e,t){this.$element=e,this.options=t,i.__super__.constructor.call(this)}return t.Extend(i,t.Observable),i.prototype.render=function(){var n=e('');return this._tabindex=0,null!=t.GetData(this.$element[0],"old-tabindex")?this._tabindex=t.GetData(this.$element[0],"old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),n.attr("title",this.$element.attr("title")),n.attr("tabindex",this._tabindex),n.attr("aria-disabled","false"),this.$selection=n,n},i.prototype.bind=function(e){var t=this,i=e.id+"-results";this.container=e,this.$selection.on("focus",function(e){t.trigger("focus",e)}),this.$selection.on("blur",function(e){t._handleBlur(e)}),this.$selection.on("keydown",function(e){t.trigger("keypress",e),e.which===n.SPACE&&e.preventDefault()}),e.on("results:focus",function(e){t.$selection.attr("aria-activedescendant",e.data._resultId)}),e.on("selection:update",function(e){t.update(e.data)}),e.on("open",function(){t.$selection.attr("aria-expanded","true"),t.$selection.attr("aria-owns",i),t._attachCloseHandler(e)}),e.on("close",function(){t.$selection.attr("aria-expanded","false"),t.$selection.removeAttr("aria-activedescendant"),t.$selection.removeAttr("aria-owns"),t.$selection.trigger("focus"),t._detachCloseHandler(e)}),e.on("enable",function(){t.$selection.attr("tabindex",t._tabindex),t.$selection.attr("aria-disabled","false")}),e.on("disable",function(){t.$selection.attr("tabindex","-1"),t.$selection.attr("aria-disabled","true")})},i.prototype._handleBlur=function(t){var n=this;window.setTimeout(function(){document.activeElement==n.$selection[0]||e.contains(n.$selection[0],document.activeElement)||n.trigger("blur",t)},1)},i.prototype._attachCloseHandler=function(n){e(document.body).on("mousedown.select2."+n.id,function(n){var i=e(n.target),o=i.closest(".select2");e(".select2.select2-container--open").each(function(){this!=o[0]&&t.GetData(this,"element").select2("close")})})},i.prototype._detachCloseHandler=function(t){e(document.body).off("mousedown.select2."+t.id)},i.prototype.position=function(e,t){t.find(".selection").append(e)},i.prototype.destroy=function(){this._detachCloseHandler(this.container)},i.prototype.update=function(){throw new Error("The `update` method must be defined in child classes.")},i.prototype.isEnabled=function(){return!this.isDisabled()},i.prototype.isDisabled=function(){return this.options.get("disabled")},i}),t.define("select2/selection/single",["jquery","./base","../utils","../keys"],function(e,t,n){function i(){i.__super__.constructor.apply(this,arguments)}return n.Extend(i,t),i.prototype.render=function(){var e=i.__super__.render.call(this);return e.addClass("select2-selection--single"),e.html(''),e},i.prototype.bind=function(e){var t=this;i.__super__.bind.apply(this,arguments);var n=e.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",n).attr("role","textbox").attr("aria-readonly","true"),this.$selection.attr("aria-labelledby",n),this.$selection.on("mousedown",function(e){1===e.which&&t.trigger("toggle",{originalEvent:e})}),this.$selection.on("focus",function(){}),this.$selection.on("blur",function(){}),e.on("focus",function(){e.isOpen()||t.$selection.trigger("focus")})},i.prototype.clear=function(){var e=this.$selection.find(".select2-selection__rendered");e.empty(),e.removeAttr("title")},i.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},i.prototype.selectionContainer=function(){return e("")},i.prototype.update=function(e){if(0===e.length)return void this.clear();var t=e[0],n=this.$selection.find(".select2-selection__rendered"),i=this.display(t,n);n.empty().append(i);var o=t.title||t.text;o?n.attr("title",o):n.removeAttr("title")},i}),t.define("select2/selection/multiple",["jquery","./base","../utils"],function(e,t,n){function i(){i.__super__.constructor.apply(this,arguments)}return n.Extend(i,t),i.prototype.render=function(){var e=i.__super__.render.call(this);return e.addClass("select2-selection--multiple"),e.html('
      '),e},i.prototype.bind=function(){var t=this;i.__super__.bind.apply(this,arguments),this.$selection.on("click",function(e){t.trigger("toggle",{originalEvent:e})}),this.$selection.on("click",".select2-selection__choice__remove",function(i){if(!t.isDisabled()){var o=e(this),r=o.parent(),s=n.GetData(r[0],"data");t.trigger("unselect",{originalEvent:i,data:s})}})},i.prototype.clear=function(){var e=this.$selection.find(".select2-selection__rendered");e.empty(),e.removeAttr("title")},i.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},i.prototype.selectionContainer=function(){return e('
    • ×
    • ')},i.prototype.update=function(e){if(this.clear(),0!==e.length){for(var t=[],i=0;i1||n)return e.call(this,t);this.clear();var i=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(i)},e}),t.define("select2/selection/allowClear",["jquery","../keys","../utils"],function(e,t,n){function i(){}return i.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),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(e){i._handleClear(e)}),t.on("keypress",function(e){i._handleKeyboardClear(e,t)})},i.prototype._handleClear=function(e,t){if(!this.isDisabled()){var i=this.$selection.find(".select2-selection__clear");if(0!==i.length){t.stopPropagation();var o=n.GetData(i[0],"data"),r=this.$element.val();this.$element.val(this.placeholder.id);var s={data:o};if(this.trigger("clear",s),s.prevented)return void this.$element.val(r);for(var a=0;a0||0===i.length)){var o=this.options.get("translations").get("removeAllItems"),r=e('×');n.StoreData(r[0],"data",i),this.$selection.find(".select2-selection__rendered").prepend(r)}},i}),t.define("select2/selection/search",["jquery","../utils","../keys"],function(e,t,n){function i(e,t,n){e.call(this,t,n)}return i.prototype.render=function(t){var n=e('');this.$searchContainer=n,this.$search=n.find("input");var i=t.call(this);return this._transferTabIndex(),i},i.prototype.bind=function(e,i,o){var r=this,s=i.id+"-results";e.call(this,i,o),i.on("open",function(){r.$search.attr("aria-controls",s),r.$search.trigger("focus")}),i.on("close",function(){r.$search.val(""),r.$search.removeAttr("aria-controls"),r.$search.removeAttr("aria-activedescendant"),r.$search.trigger("focus")}),i.on("enable",function(){r.$search.prop("disabled",!1),r._transferTabIndex()}),i.on("disable",function(){r.$search.prop("disabled",!0)}),i.on("focus",function(){r.$search.trigger("focus")}),i.on("results:focus",function(e){e.data._resultId?r.$search.attr("aria-activedescendant",e.data._resultId):r.$search.removeAttr("aria-activedescendant")}),this.$selection.on("focusin",".select2-search--inline",function(e){r.trigger("focus",e)}),this.$selection.on("focusout",".select2-search--inline",function(e){r._handleBlur(e)}),this.$selection.on("keydown",".select2-search--inline",function(e){if(e.stopPropagation(),r.trigger("keypress",e),r._keyUpPrevented=e.isDefaultPrevented(),e.which===n.BACKSPACE&&""===r.$search.val()){var i=r.$searchContainer.prev(".select2-selection__choice");if(i.length>0){var o=t.GetData(i[0],"data");r.searchRemoveChoice(o),e.preventDefault()}}}),this.$selection.on("click",".select2-search--inline",function(e){r.$search.val()&&e.stopPropagation()});var a=document.documentMode,l=a&&a<=11;this.$selection.on("input.searchcheck",".select2-search--inline",function(){if(l)return void r.$selection.off("input.search input.searchcheck");r.$selection.off("keyup.search")}),this.$selection.on("keyup.search input.search",".select2-search--inline",function(e){if(l&&"input"===e.type)return void r.$selection.off("input.search input.searchcheck");var t=e.which;t!=n.SHIFT&&t!=n.CTRL&&t!=n.ALT&&t!=n.TAB&&r.handleSearch(e)})},i.prototype._transferTabIndex=function(){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},i.prototype.createPlaceholder=function(e,t){this.$search.attr("placeholder",t.text)},i.prototype.update=function(e,t){var n=this.$search[0]==document.activeElement;this.$search.attr("placeholder",""),e.call(this,t),this.$selection.find(".select2-selection__rendered").append(this.$searchContainer),this.resizeSearch(),n&&this.$search.trigger("focus")},i.prototype.handleSearch=function(){if(this.resizeSearch(),!this._keyUpPrevented){var e=this.$search.val();this.trigger("query",{term:e})}this._keyUpPrevented=!1},i.prototype.searchRemoveChoice=function(e,t){this.trigger("unselect",{data:t}),this.$search.val(t.text),this.handleSearch()},i.prototype.resizeSearch=function(){this.$search.css("width","25px");var e="";if(""!==this.$search.attr("placeholder"))e=this.$selection.find(".select2-selection__rendered").width();else{e=.75*(this.$search.val().length+1)+"em"}this.$search.css("width",e)},i}),t.define("select2/selection/eventRelay",["jquery"],function(e){function t(){}return t.prototype.bind=function(t,n,i){var o=this,r=["open","opening","close","closing","select","selecting","unselect","unselecting","clear","clearing"],s=["opening","closing","selecting","unselecting","clearing"];t.call(this,n,i),n.on("*",function(t,n){if(-1!==e.inArray(t,r)){n=n||{};var i=e.Event("select2:"+t,{params:n});o.$element.trigger(i),-1!==e.inArray(t,s)&&(n.prevented=i.isDefaultPrevented())}})},t}),t.define("select2/translation",["jquery","require"],function(e,t){function n(e){this.dict=e||{}}return n.prototype.all=function(){return this.dict},n.prototype.get=function(e){return this.dict[e]},n.prototype.extend=function(t){this.dict=e.extend({},t.all(),this.dict)},n._cache={},n.loadPath=function(e){if(!(e in n._cache)){var i=t(e);n._cache[e]=i}return new n(n._cache[e])},n}),t.define("select2/diacritics",[],function(){return{"\u24b6":"A","\uff21":"A","\xc0":"A","\xc1":"A","\xc2":"A","\u1ea6":"A","\u1ea4":"A","\u1eaa":"A","\u1ea8":"A","\xc3":"A","\u0100":"A","\u0102":"A","\u1eb0":"A","\u1eae":"A","\u1eb4":"A","\u1eb2":"A","\u0226":"A","\u01e0":"A","\xc4":"A","\u01de":"A","\u1ea2":"A","\xc5":"A","\u01fa":"A","\u01cd":"A","\u0200":"A","\u0202":"A","\u1ea0":"A","\u1eac":"A","\u1eb6":"A","\u1e00":"A","\u0104":"A","\u023a":"A","\u2c6f":"A","\ua732":"AA","\xc6":"AE","\u01fc":"AE","\u01e2":"AE","\ua734":"AO","\ua736":"AU","\ua738":"AV","\ua73a":"AV","\ua73c":"AY","\u24b7":"B","\uff22":"B","\u1e02":"B","\u1e04":"B","\u1e06":"B","\u0243":"B","\u0182":"B","\u0181":"B","\u24b8":"C","\uff23":"C","\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C","\xc7":"C","\u1e08":"C","\u0187":"C","\u023b":"C","\ua73e":"C","\u24b9":"D","\uff24":"D","\u1e0a":"D","\u010e":"D","\u1e0c":"D","\u1e10":"D","\u1e12":"D","\u1e0e":"D","\u0110":"D","\u018b":"D","\u018a":"D","\u0189":"D","\ua779":"D","\u01f1":"DZ","\u01c4":"DZ","\u01f2":"Dz","\u01c5":"Dz","\u24ba":"E","\uff25":"E","\xc8":"E","\xc9":"E","\xca":"E","\u1ec0":"E","\u1ebe":"E","\u1ec4":"E","\u1ec2":"E","\u1ebc":"E","\u0112":"E","\u1e14":"E","\u1e16":"E","\u0114":"E","\u0116":"E","\xcb":"E","\u1eba":"E","\u011a":"E","\u0204":"E","\u0206":"E","\u1eb8":"E","\u1ec6":"E","\u0228":"E","\u1e1c":"E","\u0118":"E","\u1e18":"E","\u1e1a":"E","\u0190":"E","\u018e":"E","\u24bb":"F","\uff26":"F","\u1e1e":"F","\u0191":"F","\ua77b":"F","\u24bc":"G","\uff27":"G","\u01f4":"G","\u011c":"G","\u1e20":"G","\u011e":"G","\u0120":"G","\u01e6":"G","\u0122":"G","\u01e4":"G","\u0193":"G","\ua7a0":"G","\ua77d":"G","\ua77e":"G","\u24bd":"H","\uff28":"H","\u0124":"H","\u1e22":"H","\u1e26":"H","\u021e":"H","\u1e24":"H","\u1e28":"H","\u1e2a":"H","\u0126":"H","\u2c67":"H","\u2c75":"H","\ua78d":"H","\u24be":"I","\uff29":"I","\xcc":"I","\xcd":"I","\xce":"I","\u0128":"I","\u012a":"I","\u012c":"I","\u0130":"I","\xcf":"I","\u1e2e":"I","\u1ec8":"I","\u01cf":"I","\u0208":"I","\u020a":"I","\u1eca":"I","\u012e":"I","\u1e2c":"I","\u0197":"I","\u24bf":"J","\uff2a":"J","\u0134":"J","\u0248":"J","\u24c0":"K","\uff2b":"K","\u1e30":"K","\u01e8":"K","\u1e32":"K","\u0136":"K","\u1e34":"K","\u0198":"K","\u2c69":"K","\ua740":"K","\ua742":"K","\ua744":"K","\ua7a2":"K","\u24c1":"L","\uff2c":"L","\u013f":"L","\u0139":"L","\u013d":"L","\u1e36":"L","\u1e38":"L","\u013b":"L","\u1e3c":"L","\u1e3a":"L","\u0141":"L","\u023d":"L","\u2c62":"L","\u2c60":"L","\ua748":"L","\ua746":"L","\ua780":"L","\u01c7":"LJ","\u01c8":"Lj","\u24c2":"M","\uff2d":"M","\u1e3e":"M","\u1e40":"M","\u1e42":"M","\u2c6e":"M","\u019c":"M","\u24c3":"N","\uff2e":"N","\u01f8":"N","\u0143":"N","\xd1":"N","\u1e44":"N","\u0147":"N","\u1e46":"N","\u0145":"N","\u1e4a":"N","\u1e48":"N","\u0220":"N","\u019d":"N","\ua790":"N","\ua7a4":"N","\u01ca":"NJ","\u01cb":"Nj","\u24c4":"O","\uff2f":"O","\xd2":"O","\xd3":"O","\xd4":"O","\u1ed2":"O","\u1ed0":"O","\u1ed6":"O","\u1ed4":"O","\xd5":"O","\u1e4c":"O","\u022c":"O","\u1e4e":"O","\u014c":"O","\u1e50":"O","\u1e52":"O","\u014e":"O","\u022e":"O","\u0230":"O","\xd6":"O","\u022a":"O","\u1ece":"O","\u0150":"O","\u01d1":"O","\u020c":"O","\u020e":"O","\u01a0":"O","\u1edc":"O","\u1eda":"O","\u1ee0":"O","\u1ede":"O","\u1ee2":"O","\u1ecc":"O","\u1ed8":"O","\u01ea":"O","\u01ec":"O","\xd8":"O","\u01fe":"O","\u0186":"O","\u019f":"O","\ua74a":"O","\ua74c":"O","\u0152":"OE","\u01a2":"OI","\ua74e":"OO","\u0222":"OU","\u24c5":"P","\uff30":"P","\u1e54":"P","\u1e56":"P","\u01a4":"P","\u2c63":"P","\ua750":"P","\ua752":"P","\ua754":"P","\u24c6":"Q","\uff31":"Q","\ua756":"Q","\ua758":"Q","\u024a":"Q","\u24c7":"R","\uff32":"R","\u0154":"R","\u1e58":"R","\u0158":"R","\u0210":"R","\u0212":"R","\u1e5a":"R","\u1e5c":"R","\u0156":"R","\u1e5e":"R","\u024c":"R","\u2c64":"R","\ua75a":"R","\ua7a6":"R","\ua782":"R","\u24c8":"S","\uff33":"S","\u1e9e":"S","\u015a":"S","\u1e64":"S","\u015c":"S","\u1e60":"S","\u0160":"S","\u1e66":"S","\u1e62":"S","\u1e68":"S","\u0218":"S","\u015e":"S","\u2c7e":"S","\ua7a8":"S","\ua784":"S","\u24c9":"T","\uff34":"T","\u1e6a":"T","\u0164":"T","\u1e6c":"T","\u021a":"T","\u0162":"T","\u1e70":"T","\u1e6e":"T","\u0166":"T","\u01ac":"T","\u01ae":"T","\u023e":"T","\ua786":"T","\ua728":"TZ","\u24ca":"U","\uff35":"U","\xd9":"U","\xda":"U","\xdb":"U","\u0168":"U","\u1e78":"U","\u016a":"U","\u1e7a":"U","\u016c":"U","\xdc":"U","\u01db":"U","\u01d7":"U","\u01d5":"U","\u01d9":"U","\u1ee6":"U","\u016e":"U","\u0170":"U","\u01d3":"U","\u0214":"U","\u0216":"U","\u01af":"U","\u1eea":"U","\u1ee8":"U","\u1eee":"U","\u1eec":"U","\u1ef0":"U","\u1ee4":"U","\u1e72":"U","\u0172":"U","\u1e76":"U","\u1e74":"U","\u0244":"U","\u24cb":"V","\uff36":"V","\u1e7c":"V","\u1e7e":"V","\u01b2":"V","\ua75e":"V","\u0245":"V","\ua760":"VY","\u24cc":"W","\uff37":"W","\u1e80":"W","\u1e82":"W","\u0174":"W","\u1e86":"W","\u1e84":"W","\u1e88":"W","\u2c72":"W","\u24cd":"X","\uff38":"X","\u1e8a":"X","\u1e8c":"X","\u24ce":"Y","\uff39":"Y","\u1ef2":"Y","\xdd":"Y","\u0176":"Y","\u1ef8":"Y","\u0232":"Y","\u1e8e":"Y","\u0178":"Y","\u1ef6":"Y","\u1ef4":"Y","\u01b3":"Y","\u024e":"Y","\u1efe":"Y","\u24cf":"Z","\uff3a":"Z","\u0179":"Z","\u1e90":"Z","\u017b":"Z","\u017d":"Z","\u1e92":"Z","\u1e94":"Z","\u01b5":"Z","\u0224":"Z","\u2c7f":"Z","\u2c6b":"Z","\ua762":"Z","\u24d0":"a","\uff41":"a","\u1e9a":"a","\xe0":"a","\xe1":"a","\xe2":"a","\u1ea7":"a","\u1ea5":"a","\u1eab":"a","\u1ea9":"a","\xe3":"a","\u0101":"a","\u0103":"a","\u1eb1":"a","\u1eaf":"a","\u1eb5":"a","\u1eb3":"a","\u0227":"a","\u01e1":"a","\xe4":"a","\u01df":"a","\u1ea3":"a","\xe5":"a","\u01fb":"a","\u01ce":"a","\u0201":"a","\u0203":"a","\u1ea1":"a","\u1ead":"a","\u1eb7":"a","\u1e01":"a","\u0105":"a","\u2c65":"a","\u0250":"a","\ua733":"aa","\xe6":"ae","\u01fd":"ae","\u01e3":"ae","\ua735":"ao","\ua737":"au","\ua739":"av","\ua73b":"av","\ua73d":"ay","\u24d1":"b","\uff42":"b","\u1e03":"b","\u1e05":"b","\u1e07":"b","\u0180":"b","\u0183":"b","\u0253":"b","\u24d2":"c","\uff43":"c","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\xe7":"c","\u1e09":"c","\u0188":"c","\u023c":"c","\ua73f":"c","\u2184":"c","\u24d3":"d","\uff44":"d","\u1e0b":"d","\u010f":"d","\u1e0d":"d","\u1e11":"d","\u1e13":"d","\u1e0f":"d","\u0111":"d","\u018c":"d","\u0256":"d","\u0257":"d","\ua77a":"d","\u01f3":"dz","\u01c6":"dz","\u24d4":"e","\uff45":"e","\xe8":"e","\xe9":"e","\xea":"e","\u1ec1":"e","\u1ebf":"e","\u1ec5":"e","\u1ec3":"e","\u1ebd":"e","\u0113":"e","\u1e15":"e","\u1e17":"e","\u0115":"e","\u0117":"e","\xeb":"e","\u1ebb":"e","\u011b":"e","\u0205":"e","\u0207":"e","\u1eb9":"e","\u1ec7":"e","\u0229":"e","\u1e1d":"e","\u0119":"e","\u1e19":"e","\u1e1b":"e","\u0247":"e","\u025b":"e","\u01dd":"e","\u24d5":"f","\uff46":"f","\u1e1f":"f","\u0192":"f","\ua77c":"f","\u24d6":"g","\uff47":"g","\u01f5":"g","\u011d":"g","\u1e21":"g","\u011f":"g","\u0121":"g","\u01e7":"g","\u0123":"g","\u01e5":"g","\u0260":"g","\ua7a1":"g","\u1d79":"g","\ua77f":"g","\u24d7":"h","\uff48":"h","\u0125":"h","\u1e23":"h","\u1e27":"h","\u021f":"h","\u1e25":"h","\u1e29":"h","\u1e2b":"h","\u1e96":"h","\u0127":"h","\u2c68":"h","\u2c76":"h","\u0265":"h","\u0195":"hv","\u24d8":"i","\uff49":"i","\xec":"i","\xed":"i","\xee":"i", "\u0129":"i","\u012b":"i","\u012d":"i","\xef":"i","\u1e2f":"i","\u1ec9":"i","\u01d0":"i","\u0209":"i","\u020b":"i","\u1ecb":"i","\u012f":"i","\u1e2d":"i","\u0268":"i","\u0131":"i","\u24d9":"j","\uff4a":"j","\u0135":"j","\u01f0":"j","\u0249":"j","\u24da":"k","\uff4b":"k","\u1e31":"k","\u01e9":"k","\u1e33":"k","\u0137":"k","\u1e35":"k","\u0199":"k","\u2c6a":"k","\ua741":"k","\ua743":"k","\ua745":"k","\ua7a3":"k","\u24db":"l","\uff4c":"l","\u0140":"l","\u013a":"l","\u013e":"l","\u1e37":"l","\u1e39":"l","\u013c":"l","\u1e3d":"l","\u1e3b":"l","\u017f":"l","\u0142":"l","\u019a":"l","\u026b":"l","\u2c61":"l","\ua749":"l","\ua781":"l","\ua747":"l","\u01c9":"lj","\u24dc":"m","\uff4d":"m","\u1e3f":"m","\u1e41":"m","\u1e43":"m","\u0271":"m","\u026f":"m","\u24dd":"n","\uff4e":"n","\u01f9":"n","\u0144":"n","\xf1":"n","\u1e45":"n","\u0148":"n","\u1e47":"n","\u0146":"n","\u1e4b":"n","\u1e49":"n","\u019e":"n","\u0272":"n","\u0149":"n","\ua791":"n","\ua7a5":"n","\u01cc":"nj","\u24de":"o","\uff4f":"o","\xf2":"o","\xf3":"o","\xf4":"o","\u1ed3":"o","\u1ed1":"o","\u1ed7":"o","\u1ed5":"o","\xf5":"o","\u1e4d":"o","\u022d":"o","\u1e4f":"o","\u014d":"o","\u1e51":"o","\u1e53":"o","\u014f":"o","\u022f":"o","\u0231":"o","\xf6":"o","\u022b":"o","\u1ecf":"o","\u0151":"o","\u01d2":"o","\u020d":"o","\u020f":"o","\u01a1":"o","\u1edd":"o","\u1edb":"o","\u1ee1":"o","\u1edf":"o","\u1ee3":"o","\u1ecd":"o","\u1ed9":"o","\u01eb":"o","\u01ed":"o","\xf8":"o","\u01ff":"o","\u0254":"o","\ua74b":"o","\ua74d":"o","\u0275":"o","\u0153":"oe","\u01a3":"oi","\u0223":"ou","\ua74f":"oo","\u24df":"p","\uff50":"p","\u1e55":"p","\u1e57":"p","\u01a5":"p","\u1d7d":"p","\ua751":"p","\ua753":"p","\ua755":"p","\u24e0":"q","\uff51":"q","\u024b":"q","\ua757":"q","\ua759":"q","\u24e1":"r","\uff52":"r","\u0155":"r","\u1e59":"r","\u0159":"r","\u0211":"r","\u0213":"r","\u1e5b":"r","\u1e5d":"r","\u0157":"r","\u1e5f":"r","\u024d":"r","\u027d":"r","\ua75b":"r","\ua7a7":"r","\ua783":"r","\u24e2":"s","\uff53":"s","\xdf":"s","\u015b":"s","\u1e65":"s","\u015d":"s","\u1e61":"s","\u0161":"s","\u1e67":"s","\u1e63":"s","\u1e69":"s","\u0219":"s","\u015f":"s","\u023f":"s","\ua7a9":"s","\ua785":"s","\u1e9b":"s","\u24e3":"t","\uff54":"t","\u1e6b":"t","\u1e97":"t","\u0165":"t","\u1e6d":"t","\u021b":"t","\u0163":"t","\u1e71":"t","\u1e6f":"t","\u0167":"t","\u01ad":"t","\u0288":"t","\u2c66":"t","\ua787":"t","\ua729":"tz","\u24e4":"u","\uff55":"u","\xf9":"u","\xfa":"u","\xfb":"u","\u0169":"u","\u1e79":"u","\u016b":"u","\u1e7b":"u","\u016d":"u","\xfc":"u","\u01dc":"u","\u01d8":"u","\u01d6":"u","\u01da":"u","\u1ee7":"u","\u016f":"u","\u0171":"u","\u01d4":"u","\u0215":"u","\u0217":"u","\u01b0":"u","\u1eeb":"u","\u1ee9":"u","\u1eef":"u","\u1eed":"u","\u1ef1":"u","\u1ee5":"u","\u1e73":"u","\u0173":"u","\u1e77":"u","\u1e75":"u","\u0289":"u","\u24e5":"v","\uff56":"v","\u1e7d":"v","\u1e7f":"v","\u028b":"v","\ua75f":"v","\u028c":"v","\ua761":"vy","\u24e6":"w","\uff57":"w","\u1e81":"w","\u1e83":"w","\u0175":"w","\u1e87":"w","\u1e85":"w","\u1e98":"w","\u1e89":"w","\u2c73":"w","\u24e7":"x","\uff58":"x","\u1e8b":"x","\u1e8d":"x","\u24e8":"y","\uff59":"y","\u1ef3":"y","\xfd":"y","\u0177":"y","\u1ef9":"y","\u0233":"y","\u1e8f":"y","\xff":"y","\u1ef7":"y","\u1e99":"y","\u1ef5":"y","\u01b4":"y","\u024f":"y","\u1eff":"y","\u24e9":"z","\uff5a":"z","\u017a":"z","\u1e91":"z","\u017c":"z","\u017e":"z","\u1e93":"z","\u1e95":"z","\u01b6":"z","\u0225":"z","\u0240":"z","\u2c6c":"z","\ua763":"z","\u0386":"\u0391","\u0388":"\u0395","\u0389":"\u0397","\u038a":"\u0399","\u03aa":"\u0399","\u038c":"\u039f","\u038e":"\u03a5","\u03ab":"\u03a5","\u038f":"\u03a9","\u03ac":"\u03b1","\u03ad":"\u03b5","\u03ae":"\u03b7","\u03af":"\u03b9","\u03ca":"\u03b9","\u0390":"\u03b9","\u03cc":"\u03bf","\u03cd":"\u03c5","\u03cb":"\u03c5","\u03b0":"\u03c5","\u03ce":"\u03c9","\u03c2":"\u03c3","\u2019":"'"}}),t.define("select2/data/base",["../utils"],function(e){function t(){t.__super__.constructor.call(this)}return e.Extend(t,e.Observable),t.prototype.current=function(){throw new Error("The `current` method must be defined in child classes.")},t.prototype.query=function(){throw new Error("The `query` method must be defined in child classes.")},t.prototype.bind=function(){},t.prototype.destroy=function(){},t.prototype.generateResultId=function(t,n){var i=t.id+"-result-";return i+=e.generateChars(4),null!=n.id?i+="-"+n.id.toString():i+="-"+e.generateChars(4),i},t}),t.define("select2/data/select",["./base","../utils","jquery"],function(e,t,n){function i(e,t){this.$element=e,this.options=t,i.__super__.constructor.call(this)}return t.Extend(i,e),i.prototype.current=function(e){var t=[],i=this;this.$element.find(":selected").each(function(){var e=n(this),o=i.item(e);t.push(o)}),e(t)},i.prototype.select=function(e){var t=this;if(e.selected=!0,n(e.element).is("option"))return e.element.selected=!0,void this.$element.trigger("input").trigger("change");if(this.$element.prop("multiple"))this.current(function(i){var o=[];e=[e],e.push.apply(e,i);for(var r=0;r=0){var u=r.filter(i(c)),d=this.item(u),h=n.extend(!0,{},c,d),f=this.option(h);u.replaceWith(f)}else{var p=this.option(c);if(c.children){var m=this.convertToOptions(c.children);t.appendMany(p,m)}a.push(p)}}return a},i}),t.define("select2/data/ajax",["./array","../utils","jquery"],function(e,t,n){function i(e,t){this.ajaxOptions=this._applyDefaults(t.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),i.__super__.constructor.call(this,e,t)}return t.Extend(i,e),i.prototype._applyDefaults=function(e){var t={data:function(e){return n.extend({},e,{q:e.term})},transport:function(e,t,i){var o=n.ajax(e);return o.then(t),o.fail(i),o}};return n.extend({},t,e,!0)},i.prototype.processResults=function(e){return e},i.prototype.query=function(e,t){function i(){var i=r.transport(r,function(i){var r=o.processResults(i,e);o.options.get("debug")&&window.console&&console.error&&(r&&r.results&&n.isArray(r.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),t(r)},function(){"status"in i&&(0===i.status||"0"===i.status)||o.trigger("results:message",{message:"errorLoading"})});o._request=i}var o=this;null!=this._request&&(n.isFunction(this._request.abort)&&this._request.abort(),this._request=null);var r=n.extend({type:"GET"},this.ajaxOptions);"function"==typeof r.url&&(r.url=r.url.call(this.$element,e)),"function"==typeof r.data&&(r.data=r.data.call(this.$element,e)),this.ajaxOptions.delay&&null!=e.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(i,this.ajaxOptions.delay)):i()},i}),t.define("select2/data/tags",["jquery"],function(e){function t(t,n,i){var o=i.get("tags"),r=i.get("createTag");r!==undefined&&(this.createTag=r);var s=i.get("insertTag");if(s!==undefined&&(this.insertTag=s),t.call(this,n,i),e.isArray(o))for(var a=0;a0&&t.term.length>this.maximumInputLength)return void this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:t.term,params:t}});e.call(this,t,n)},e}),t.define("select2/data/maximumSelectionLength",[],function(){function e(e,t,n){this.maximumSelectionLength=n.get("maximumSelectionLength"),e.call(this,t,n)}return e.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("select",function(){i._checkIfMaximumSelected()})},e.prototype.query=function(e,t,n){var i=this;this._checkIfMaximumSelected(function(){e.call(i,t,n)})},e.prototype._checkIfMaximumSelected=function(e,t){var n=this;this.current(function(e){var i=null!=e?e.length:0;if(n.maximumSelectionLength>0&&i>=n.maximumSelectionLength)return void n.trigger("results:message",{message:"maximumSelected",args:{maximum:n.maximumSelectionLength}});t&&t()})},e}),t.define("select2/dropdown",["jquery","./utils"],function(e,t){function n(e,t){this.$element=e,this.options=t,n.__super__.constructor.call(this)}return t.Extend(n,t.Observable),n.prototype.render=function(){var t=e('');return t.attr("dir",this.options.get("dir")),this.$dropdown=t,t},n.prototype.bind=function(){},n.prototype.position=function(){},n.prototype.destroy=function(){this.$dropdown.remove()},n}),t.define("select2/dropdown/search",["jquery","../utils"],function(e){function t(){}return t.prototype.render=function(t){var n=t.call(this),i=e('');return this.$searchContainer=i,this.$search=i.find("input"),n.prepend(i),n},t.prototype.bind=function(t,n,i){var o=this,r=n.id+"-results";t.call(this,n,i),this.$search.on("keydown",function(e){o.trigger("keypress",e),o._keyUpPrevented=e.isDefaultPrevented()}),this.$search.on("input",function(){e(this).off("keyup")}),this.$search.on("keyup input",function(e){o.handleSearch(e)}),n.on("open",function(){o.$search.attr("tabindex",0),o.$search.attr("aria-controls",r),o.$search.trigger("focus"),window.setTimeout(function(){o.$search.trigger("focus")},0)}),n.on("close",function(){o.$search.attr("tabindex",-1),o.$search.removeAttr("aria-controls"),o.$search.removeAttr("aria-activedescendant"),o.$search.val(""),o.$search.trigger("blur")}),n.on("focus",function(){n.isOpen()||o.$search.trigger("focus")}),n.on("results:all",function(e){if(null==e.query.term||""===e.query.term){o.showSearch(e)?o.$searchContainer.removeClass("select2-search--hide"):o.$searchContainer.addClass("select2-search--hide")}}),n.on("results:focus",function(e){e.data._resultId?o.$search.attr("aria-activedescendant",e.data._resultId):o.$search.removeAttr("aria-activedescendant")})},t.prototype.handleSearch=function(){if(!this._keyUpPrevented){var e=this.$search.val();this.trigger("query",{term:e})}this._keyUpPrevented=!1},t.prototype.showSearch=function(){return!0},t}),t.define("select2/dropdown/hidePlaceholder",[],function(){function e(e,t,n,i){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n,i)}return e.prototype.append=function(e,t){t.results=this.removePlaceholder(t.results),e.call(this,t)},e.prototype.normalizePlaceholder=function(e,t){return"string"==typeof t&&(t={id:"",text:t}),t},e.prototype.removePlaceholder=function(e,t){for(var n=t.slice(0),i=t.length-1;i>=0;i--){var o=t[i];this.placeholder.id===o.id&&n.splice(i,1)}return n},e}),t.define("select2/dropdown/infiniteScroll",["jquery"],function(e){function t(e,t,n,i){this.lastParams={},e.call(this,t,n,i),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return t.prototype.append=function(e,t){this.$loadingMore.remove(),this.loading=!1,e.call(this,t),this.showLoadingMore(t)&&(this.$results.append(this.$loadingMore),this.loadMoreIfNeeded())},t.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("query",function(e){i.lastParams=e,i.loading=!0}),t.on("query:append",function(e){i.lastParams=e,i.loading=!0}),this.$results.on("scroll",this.loadMoreIfNeeded.bind(this))},t.prototype.loadMoreIfNeeded=function(){var t=e.contains(document.documentElement,this.$loadingMore[0]);if(!this.loading&&t){this.$results.offset().top+this.$results.outerHeight(!1)+50>=this.$loadingMore.offset().top+this.$loadingMore.outerHeight(!1)&&this.loadMore()}},t.prototype.loadMore=function(){this.loading=!0;var t=e.extend({},{page:1},this.lastParams);t.page++,this.trigger("query:append",t)},t.prototype.showLoadingMore=function(e,t){return t.pagination&&t.pagination.more},t.prototype.createLoadingMore=function(){var t=e('
    • '),n=this.options.get("translations").get("loadingMore");return t.html(n(this.lastParams)),t},t}),t.define("select2/dropdown/attachBody",["jquery","../utils"],function(e,t){function n(t,n,i){this.$dropdownParent=e(i.get("dropdownParent")||document.body),t.call(this,n,i)}return n.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("open",function(){i._showDropdown(),i._attachPositioningHandler(t),i._bindContainerResultHandlers(t)}),t.on("close",function(){i._hideDropdown(),i._detachPositioningHandler(t)}),this.$dropdownContainer.on("mousedown",function(e){e.stopPropagation()})},n.prototype.destroy=function(e){e.call(this),this.$dropdownContainer.remove()},n.prototype.position=function(e,t,n){t.attr("class",n.attr("class")),t.removeClass("select2"),t.addClass("select2-container--open"),t.css({position:"absolute",top:-999999}),this.$container=n},n.prototype.render=function(t){var n=e(""),i=t.call(this);return n.append(i),this.$dropdownContainer=n,n},n.prototype._hideDropdown=function(){this.$dropdownContainer.detach()},n.prototype._bindContainerResultHandlers=function(e,t){if(!this._containerResultsHandlersBound){var n=this;t.on("results:all",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("results:append",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("results:message",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("select",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("unselect",function(){n._positionDropdown(),n._resizeDropdown()}),this._containerResultsHandlersBound=!0}},n.prototype._attachPositioningHandler=function(n,i){var o=this,r="scroll.select2."+i.id,s="resize.select2."+i.id,a="orientationchange.select2."+i.id,l=this.$container.parents().filter(t.hasScroll);l.each(function(){t.StoreData(this,"select2-scroll-position",{x:e(this).scrollLeft(),y:e(this).scrollTop()})}),l.on(r,function(){var n=t.GetData(this,"select2-scroll-position");e(this).scrollTop(n.y)}),e(window).on(r+" "+s+" "+a,function(){o._positionDropdown(),o._resizeDropdown()})},n.prototype._detachPositioningHandler=function(n,i){var o="scroll.select2."+i.id,r="resize.select2."+i.id,s="orientationchange.select2."+i.id;this.$container.parents().filter(t.hasScroll).off(o),e(window).off(o+" "+r+" "+s)},n.prototype._positionDropdown=function(){var t=e(window),n=this.$dropdown.hasClass("select2-dropdown--above"),i=this.$dropdown.hasClass("select2-dropdown--below"),o=null,r=this.$container.offset();r.bottom=r.top+this.$container.outerHeight(!1);var s={height:this.$container.outerHeight(!1)};s.top=r.top,s.bottom=r.top+s.height;var a={height:this.$dropdown.outerHeight(!1)},l={top:t.scrollTop(),bottom:t.scrollTop()+t.height()},c=l.topr.bottom+a.height,d={left:r.left,top:s.bottom},h=this.$dropdownParent;"static"===h.css("position")&&(h=h.offsetParent());var f={top:0,left:0};(e.contains(document.body,h[0])||h[0].isConnected)&&(f=h.offset()),d.top-=f.top,d.left-=f.left,n||i||(o="below"),u||!c||n?!c&&u&&n&&(o="below"):o="above",("above"==o||n&&"below"!==o)&&(d.top=s.top-f.top-a.height),null!=o&&(this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+o),this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+o)),this.$dropdownContainer.css(d)},n.prototype._resizeDropdown=function(){var e={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(e.minWidth=e.width,e.position="relative",e.width="auto"),this.$dropdown.css(e)},n.prototype._showDropdown=function(){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},n}),t.define("select2/dropdown/minimumResultsForSearch",[],function(){function e(t){for(var n=0,i=0;i0&&(u.dataAdapter=c.Decorate(u.dataAdapter,v)),u.maximumInputLength>0&&(u.dataAdapter=c.Decorate(u.dataAdapter,y)),u.maximumSelectionLength>0&&(u.dataAdapter=c.Decorate(u.dataAdapter,b)),u.tags&&(u.dataAdapter=c.Decorate(u.dataAdapter,m)),null==u.tokenSeparators&&null==u.tokenizer||(u.dataAdapter=c.Decorate(u.dataAdapter,g)),null!=u.query){var d=t(u.amdBase+"compat/query");u.dataAdapter=c.Decorate(u.dataAdapter,d)}if(null!=u.initSelection){var $=t(u.amdBase+"compat/initSelection");u.dataAdapter=c.Decorate(u.dataAdapter,$)}}if(null==u.resultsAdapter&&(u.resultsAdapter=n,null!=u.ajax&&(u.resultsAdapter=c.Decorate(u.resultsAdapter,_)),null!=u.placeholder&&(u.resultsAdapter=c.Decorate(u.resultsAdapter,C)),u.selectOnClose&&(u.resultsAdapter=c.Decorate(u.resultsAdapter,E))),null==u.dropdownAdapter){if(u.multiple)u.dropdownAdapter=w;else{var k=c.Decorate(w,x);u.dropdownAdapter=k}if(0!==u.minimumResultsForSearch&&(u.dropdownAdapter=c.Decorate(u.dropdownAdapter,T)),u.closeOnSelect&&(u.dropdownAdapter=c.Decorate(u.dropdownAdapter,S)),null!=u.dropdownCssClass||null!=u.dropdownCss||null!=u.adaptDropdownCssClass){var A=t(u.amdBase+"compat/dropdownCss");u.dropdownAdapter=c.Decorate(u.dropdownAdapter,A)}u.dropdownAdapter=c.Decorate(u.dropdownAdapter,D)}if(null==u.selectionAdapter){if(u.multiple?u.selectionAdapter=o:u.selectionAdapter=i,null!=u.placeholder&&(u.selectionAdapter=c.Decorate(u.selectionAdapter,r)),u.allowClear&&(u.selectionAdapter=c.Decorate(u.selectionAdapter,s)),u.multiple&&(u.selectionAdapter=c.Decorate(u.selectionAdapter,a)),null!=u.containerCssClass||null!=u.containerCss||null!=u.adaptContainerCssClass){var N=t(u.amdBase+"compat/containerCss");u.selectionAdapter=c.Decorate(u.selectionAdapter,N)}u.selectionAdapter=c.Decorate(u.selectionAdapter,l)}u.language=this._resolveLanguage(u.language),u.language.push("en");for(var M=[],I=0;I0){for(var r=e.extend(!0,{},o),s=o.children.length-1;s>=0;s--){null==n(i,o.children[s])&&r.children.splice(s,1)}return r.children.length>0?r:n(i,r)}var a=t(o.text).toUpperCase(),l=t(i.term).toUpperCase();return a.indexOf(l)>-1?o:null}this.defaults={amdBase:"./",amdLanguageBase:"./i18n/",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:c.escapeMarkup,language:{},matcher:n,minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,scrollAfterSelect:!1,sorter:function(e){return e},templateResult:function(e){return e.text},templateSelection:function(e){return e.text},theme:"default",width:"resolve"}},$.prototype.applyFromElement=function(e,t){var n=e.language,i=this.defaults.language,o=t.prop("lang"),r=t.closest("[lang]").prop("lang"),s=Array.prototype.concat.call(this._resolveLanguage(o),this._resolveLanguage(n),this._resolveLanguage(i),this._resolveLanguage(r));return e.language=s,e},$.prototype._resolveLanguage=function(t){if(!t)return[];if(e.isEmptyObject(t))return[];if(e.isPlainObject(t))return[t];var n;n=e.isArray(t)?t:[t];for(var i=[],o=0;o0){var r=n[o].split("-"),s=r[0];i.push(s)}return i},$.prototype._processTranslations=function(t,n){for(var i=new u,o=0;o-1||(t.isPlainObject(this.options[h])?t.extend(this.options[h],d[h]):this.options[h]=d[h]);return this},o.prototype.get=function(e){return this.options[e]},o.prototype.set=function(e,t){this.options[e]=t},o}),t.define("select2/core",["jquery","./options","./utils","./keys"],function(e,t,n,i){var o=function(e,i){null!=n.GetData(e[0],"select2")&&n.GetData(e[0],"select2").destroy(),this.$element=e,this.id=this._generateId(e),i=i||{},this.options=new t(i,e),o.__super__.constructor.call(this);var r=e.attr("tabindex")||0;n.StoreData(e[0],"old-tabindex",r),e.attr("tabindex","-1");var s=this.options.get("dataAdapter");this.dataAdapter=new s(e,this.options);var a=this.render();this._placeContainer(a);var l=this.options.get("selectionAdapter");this.selection=new l(e,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,a);var c=this.options.get("dropdownAdapter");this.dropdown=new c(e,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,a);var u=this.options.get("resultsAdapter");this.results=new u(e,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var d=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current(function(e){d.trigger("selection:update",{data:e})}),e.addClass("select2-hidden-accessible"),e.attr("aria-hidden","true"),this._syncAttributes(),n.StoreData(e[0],"select2",this),e.data("select2",this)};return n.Extend(o,n.Observable),o.prototype._generateId=function(e){var t="";return t=null!=e.attr("id")?e.attr("id"):null!=e.attr("name")?e.attr("name")+"-"+n.generateChars(2):n.generateChars(4),t=t.replace(/(:|\.|\[|\]|,)/g,""),t="select2-"+t},o.prototype._placeContainer=function(e){e.insertAfter(this.$element);var t=this._resolveWidth(this.$element,this.options.get("width"));null!=t&&e.css("width",t)},o.prototype._resolveWidth=function(e,t){var n=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==t){var i=this._resolveWidth(e,"style");return null!=i?i:this._resolveWidth(e,"element")}if("element"==t){var o=e.outerWidth(!1);return o<=0?"auto":o+"px"}if("style"==t){var r=e.attr("style");if("string"!=typeof r)return null;for(var s=r.split(";"),a=0,l=s.length;a=1)return u[1]}return null}if("computedstyle"==t){return window.getComputedStyle(e[0]).width}return t},o.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)},o.prototype._registerDomEvents=function(){var e=this;this.$element.on("change.select2",function(){e.dataAdapter.current(function(t){e.trigger("selection:update",{data:t})})}),this.$element.on("focus.select2",function(t){e.trigger("focus",t)}),this._syncA=n.bind(this._syncAttributes,this),this._syncS=n.bind(this._syncSubtree,this),this.$element[0].attachEvent&&this.$element[0].attachEvent("onpropertychange",this._syncA);var t=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;null!=t?(this._observer=new t(function(t){e._syncA(),e._syncS(null,t)}),this._observer.observe(this.$element[0],{attributes:!0,childList:!0,subtree:!1})):this.$element[0].addEventListener&&(this.$element[0].addEventListener("DOMAttrModified",e._syncA,!1),this.$element[0].addEventListener("DOMNodeInserted",e._syncS,!1),this.$element[0].addEventListener("DOMNodeRemoved",e._syncS,!1))},o.prototype._registerDataEvents=function(){var e=this;this.dataAdapter.on("*",function(t,n){e.trigger(t,n)})},o.prototype._registerSelectionEvents=function(){var t=this,n=["toggle","focus"];this.selection.on("toggle",function(){t.toggleDropdown()}),this.selection.on("focus",function(e){t.focus(e)}),this.selection.on("*",function(i,o){-1===e.inArray(i,n)&&t.trigger(i,o)})},o.prototype._registerDropdownEvents=function(){var e=this;this.dropdown.on("*",function(t,n){e.trigger(t,n)})},o.prototype._registerResultsEvents=function(){var e=this;this.results.on("*",function(t,n){e.trigger(t,n)})},o.prototype._registerEvents=function(){var e=this;this.on("open",function(){e.$container.addClass("select2-container--open")}),this.on("close",function(){e.$container.removeClass("select2-container--open")}),this.on("enable",function(){e.$container.removeClass("select2-container--disabled")}),this.on("disable",function(){e.$container.addClass("select2-container--disabled")}),this.on("blur",function(){e.$container.removeClass("select2-container--focus")}),this.on("query",function(t){e.isOpen()||e.trigger("open",{}),this.dataAdapter.query(t,function(n){e.trigger("results:all",{data:n,query:t})})}),this.on("query:append",function(t){this.dataAdapter.query(t,function(n){e.trigger("results:append",{data:n,query:t})})}),this.on("keypress",function(t){var n=t.which;e.isOpen()?n===i.ESC||n===i.TAB||n===i.UP&&t.altKey?(e.close(t),t.preventDefault()):n===i.ENTER?(e.trigger("results:select",{}),t.preventDefault()):n===i.SPACE&&t.ctrlKey?(e.trigger("results:toggle",{}),t.preventDefault()):n===i.UP?(e.trigger("results:previous",{}),t.preventDefault()):n===i.DOWN&&(e.trigger("results:next",{}),t.preventDefault()):(n===i.ENTER||n===i.SPACE||n===i.DOWN&&t.altKey)&&(e.open(),t.preventDefault())})},o.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.isDisabled()?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},o.prototype._isChangeMutation=function(t,n){var i=!1,o=this;if(!t||!t.target||"OPTION"===t.target.nodeName||"OPTGROUP"===t.target.nodeName){if(n)if(n.addedNodes&&n.addedNodes.length>0)for(var r=0;r0?i=!0:e.isArray(n)&&e.each(n,function(e,t){if(o._isChangeMutation(e,t))return i=!0,!1});else i=!0;return i}},o.prototype._syncSubtree=function(e,t){var n=this;this._isChangeMutation(e,t)&&this.dataAdapter.current(function(e){n.trigger("selection:update",{data:e})})},o.prototype.trigger=function(e,t){var n=o.__super__.trigger,i={open:"opening",close:"closing",select:"selecting",unselect:"unselecting",clear:"clearing"};if(t===undefined&&(t={}),e in i){var r=i[e],s={prevented:!1,name:e,args:t};if(n.call(this,r,s),s.prevented)return void(t.prevented=!0)}n.call(this,e,t)},o.prototype.toggleDropdown=function(){this.isDisabled()||(this.isOpen()?this.close():this.open())},o.prototype.open=function(){this.isOpen()||this.isDisabled()||this.trigger("query",{})},o.prototype.close=function(e){this.isOpen()&&this.trigger("close",{originalEvent:e})},o.prototype.isEnabled=function(){return!this.isDisabled()},o.prototype.isDisabled=function(){return this.options.get("disabled")},o.prototype.isOpen=function(){return this.$container.hasClass("select2-container--open")},o.prototype.hasFocus=function(){return this.$container.hasClass("select2-container--focus")},o.prototype.focus=function(){this.hasFocus()||(this.$container.addClass("select2-container--focus"),this.trigger("focus",{}))},o.prototype.enable=function(e){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!=e&&0!==e.length||(e=[!0]);var t=!e[0];this.$element.prop("disabled",t)},o.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 e=[];return this.dataAdapter.current(function(t){e=t}),e},o.prototype.val=function(t){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==t||0===t.length)return this.$element.val();var n=t[0];e.isArray(n)&&(n=e.map(n,function(e){return e.toString()})),this.$element.val(n).trigger("input").trigger("change")},o.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",n.GetData(this.$element[0],"old-tabindex")),this.$element.removeClass("select2-hidden-accessible"),this.$element.attr("aria-hidden","false"),n.RemoveData(this.$element[0]),this.$element.removeData("select2"),this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,this.selection=null,this.dropdown=null,this.results=null},o.prototype.render=function(){var t=e('');return t.attr("dir",this.options.get("dir")),this.$container=t,this.$container.addClass("select2-container--"+this.options.get("theme")),n.StoreData(t[0],"element",this.$element),t},o}),t.define("jquery-mousewheel",["jquery"],function(e){return e}),t.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults","./select2/utils"],function(e,t,n,i,o){if(null==e.fn.select2){var r=["open","close","destroy"];e.fn.select2=function(t){if("object"==typeof(t=t||{}))return this.each(function(){var i=e.extend(!0,{},t);new n(e(this),i)}),this;if("string"==typeof t){var i,s=Array.prototype.slice.call(arguments,1);return this.each(function(){var e=o.GetData(this,"select2");null==e&&window.console&&console.error&&console.error("The select2('"+t+"') method was called on an element that is not using Select2."),i=e[t].apply(e,s)}),e.inArray(t,r)>-1?this:i}throw new Error("Invalid arguments for Select2: "+t)}}return null==e.fn.select2.defaults&&(e.fn.select2.defaults=i),n}),{define:t.define,require:t.require}}(),n=t.require("jquery.select2");return e.fn.select2.amd=t,n}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self,e.flatpickr=t())}(this,function(){"use strict";function e(){for(var e=0,t=0,n=arguments.length;t=0?new Date:new Date(Qe.config.minDate.getTime()),n=c(Qe.config);t.setHours(n.hours,n.minutes,n.seconds,t.getMilliseconds()),Qe.selectedDates=[t],Qe.latestSelectedDateObj=t}e!==undefined&&"blur"!==e.type&&Ke(e);var i=Qe._input.value;L(),Xe(),Qe._input.value!==i&&Qe._debouncedChange()}function P(e,t){return e%12+12*v(t===Qe.l10n.amPM[1])}function j(e){switch(e%24){case 0:case 12:return 12;default:return e%12}}function L(){if(Qe.hourElement!==undefined&&Qe.minuteElement!==undefined){var e=(parseInt(Qe.hourElement.value.slice(-2),10)||0)%24,t=(parseInt(Qe.minuteElement.value,10)||0)%60,n=Qe.secondElement!==undefined?(parseInt(Qe.secondElement.value,10)||0)%60:0;Qe.amPM!==undefined&&(e=P(e,Qe.amPM.textContent));var i=Qe.config.minTime!==undefined||Qe.config.minDate&&Qe.minDateHasTime&&Qe.latestSelectedDateObj&&0===l(Qe.latestSelectedDateObj,Qe.config.minDate,!0),o=Qe.config.maxTime!==undefined||Qe.config.maxDate&&Qe.maxDateHasTime&&Qe.latestSelectedDateObj&&0===l(Qe.latestSelectedDateObj,Qe.config.maxDate,!0);if(Qe.config.maxTime!==undefined&&Qe.config.minTime!==undefined&&Qe.config.minTime>Qe.config.maxTime){var r=S(Qe.config.minTime.getHours(),Qe.config.minTime.getMinutes(),Qe.config.minTime.getSeconds()),s=S(Qe.config.maxTime.getHours(),Qe.config.maxTime.getMinutes(),Qe.config.maxTime.getSeconds()),a=S(e,t,n);if(a>s&&a=12)]),Qe.secondElement!==undefined&&(Qe.secondElement.value=g(n)))}function R(e){var t=a(e),n=parseInt(t.value)+(e.delta||0);(n/1e3>1||"Enter"===e.key&&!/[^\d]/.test(n.toString()))&&me(n)}function q(e,t,n,i){return t instanceof Array?t.forEach(function(t){return q(e,t,n,i)}):e instanceof Array?e.forEach(function(e){return q(e,t,n,i)}):(e.addEventListener(t,n,i),void Qe._handlers.push({remove:function(){return e.removeEventListener(t,n,i)}}))}function W(){We("onChange")}function z(){if(Qe.config.wrap&&["open","close","toggle","clear"].forEach(function(e){Array.prototype.forEach.call(Qe.element.querySelectorAll("[data-"+e+"]"),function(t){return q(t,"click",Qe[e])})}),Qe.isMobile)return void Re();var e=t(xe,50);if(Qe._debouncedChange=t(W,A),Qe.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&q(Qe.daysContainer,"mouseover",function(e){"range"===Qe.config.mode&&we(a(e))}),q(Qe._input,"keydown",be),Qe.calendarContainer!==undefined&&q(Qe.calendarContainer,"keydown",be),Qe.config.inline||Qe.config["static"]||q(window,"resize",e),window.ontouchstart!==undefined?q(window.document,"touchstart",pe):q(window.document,"mousedown",pe),q(window.document,"focus",pe,{capture:!0}),!0===Qe.config.clickOpens&&(q(Qe._input,"focus",Qe.open),q(Qe._input,"click",Qe.open)),Qe.daysContainer!==undefined&&(q(Qe.monthNav,"click",Ve),q(Qe.monthNav,["keyup","increment"],R),q(Qe.daysContainer,"click",Me)),Qe.timeContainer!==undefined&&Qe.minuteElement!==undefined&&Qe.hourElement!==undefined){var n=function(e){return a(e).select()};q(Qe.timeContainer,["increment"],O),q(Qe.timeContainer,"blur",O,{capture:!0}),q(Qe.timeContainer,"click",U),q([Qe.hourElement,Qe.minuteElement],["focus","click"],n),Qe.secondElement!==undefined&&q(Qe.secondElement,"focus",function(){return Qe.secondElement&&Qe.secondElement.select()}),Qe.amPM!==undefined&&q(Qe.amPM,"click",function(e){O(e)})}Qe.config.allowInput&&q(Qe._input,"blur",ye)}function B(e,t){var n=e!==undefined?Qe.parseDate(e):Qe.latestSelectedDateObj||(Qe.config.minDate&&Qe.config.minDate>Qe.now?Qe.config.minDate:Qe.config.maxDate&&Qe.config.maxDate1),Qe.calendarContainer.appendChild(e);var s=Qe.config.appendTo!==undefined&&Qe.config.appendTo.nodeType!==undefined;if((Qe.config.inline||Qe.config["static"])&&(Qe.calendarContainer.classList.add(Qe.config.inline?"inline":"static"),Qe.config.inline&&(!s&&Qe.element.parentNode?Qe.element.parentNode.insertBefore(Qe.calendarContainer,Qe._input.nextSibling):Qe.config.appendTo!==undefined&&Qe.config.appendTo.appendChild(Qe.calendarContainer)),Qe.config["static"])){var a=i("div","flatpickr-wrapper");Qe.element.parentNode&&Qe.element.parentNode.insertBefore(a,Qe.element),a.appendChild(Qe.element),Qe.altInput&&a.appendChild(Qe.altInput),a.appendChild(Qe.calendarContainer)}Qe.config["static"]||Qe.config.inline||(Qe.config.appendTo!==undefined?Qe.config.appendTo:window.document.body).appendChild(Qe.calendarContainer)}function X(e,t,o,r){var s=ge(t,!0),a=i("span",e,t.getDate().toString());return a.dateObj=t,a.$i=r,a.setAttribute("aria-label",Qe.formatDate(t,Qe.config.ariaDateFormat)),-1===e.indexOf("hidden")&&0===l(t,Qe.now)&&(Qe.todayDateElem=a,a.classList.add("today"),a.setAttribute("aria-current","date")),s?(a.tabIndex=-1,Be(t)&&(a.classList.add("selected"),Qe.selectedDateElem=a,"range"===Qe.config.mode&&(n(a,"startRange",Qe.selectedDates[0]&&0===l(t,Qe.selectedDates[0],!0)),n(a,"endRange",Qe.selectedDates[1]&&0===l(t,Qe.selectedDates[1],!0)),"nextMonthDay"===e&&a.classList.add("inRange")))):a.classList.add("flatpickr-disabled"),"range"===Qe.config.mode&&Ue(t)&&!Be(t)&&a.classList.add("inRange"),Qe.weekNumbers&&1===Qe.config.showMonths&&"prevMonthDay"!==e&&o%7==1&&Qe.weekNumbers.insertAdjacentHTML("beforeend",""+Qe.config.getWeek(t)+""),We("onDayCreate",a),a}function V(e){e.focus(),"range"===Qe.config.mode&&we(e)}function K(e){for(var t=e>0?0:Qe.config.showMonths-1,n=e>0?Qe.config.showMonths:-1,i=t;i!=n;i+=e)for(var o=Qe.daysContainer.children[i],r=e>0?0:o.children.length-1,s=e>0?o.children.length:-1,a=r;a!=s;a+=e){var l=o.children[a];if(-1===l.className.indexOf("hidden")&&ge(l.dateObj))return l}return undefined}function Q(e,t){for(var n=-1===e.className.indexOf("Month")?e.dateObj.getMonth():Qe.currentMonth,i=t>0?Qe.config.showMonths:-1,o=t>0?1:-1,r=n-Qe.currentMonth;r!=i;r+=o)for(var s=Qe.daysContainer.children[r],a=n-Qe.currentMonth===r?e.$i+t:t<0?s.children.length-1:0,l=s.children.length,c=a;c>=0&&c0?l:-1);c+=o){var u=s.children[c];if(-1===u.className.indexOf("hidden")&&ge(u.dateObj)&&Math.abs(e.$i-c)>=Math.abs(t))return V(u)}return Qe.changeMonth(o),J(K(o),0),undefined}function J(e,t){var n=_(),i=ve(n||document.body),o=e!==undefined?e:i?n:Qe.selectedDateElem!==undefined&&ve(Qe.selectedDateElem)?Qe.selectedDateElem:Qe.todayDateElem!==undefined&&ve(Qe.todayDateElem)?Qe.todayDateElem:K(t>0?1:-1);o===undefined?Qe._input.focus():i?Q(o,t):V(o)}function Z(e,t){for(var n=(new Date(e,t,1).getDay()-Qe.l10n.firstDayOfWeek+7)%7,o=Qe.utils.getDaysInMonth((t-1+12)%12,e),r=Qe.utils.getDaysInMonth(t,e),s=window.document.createDocumentFragment(),a=Qe.config.showMonths>1,l=a?"prevMonthDay hidden":"prevMonthDay",c=a?"nextMonthDay hidden":"nextMonthDay",u=o+1-n,d=0;u<=o;u++,d++)s.appendChild(X("flatpickr-day "+l,new Date(e,t-1,u),u,d));for(u=1;u<=r;u++,d++)s.appendChild(X("flatpickr-day",new Date(e,t,u),u,d));for(var h=r+1;h<=42-n&&(1===Qe.config.showMonths||d%7!=0);h++,d++)s.appendChild(X("flatpickr-day "+c,new Date(e,t+1,h%r),h,d));var f=i("div","dayContainer");return f.appendChild(s),f}function ee(){if(Qe.daysContainer!==undefined){o(Qe.daysContainer),Qe.weekNumbers&&o(Qe.weekNumbers);for(var e=document.createDocumentFragment(),t=0;t1||"dropdown"!==Qe.config.monthSelectorType)){var e=function(e){return!(Qe.config.minDate!==undefined&&Qe.currentYear===Qe.config.minDate.getFullYear()&&eQe.config.maxDate.getMonth())};Qe.monthsDropdownContainer.tabIndex=-1,Qe.monthsDropdownContainer.innerHTML="";for(var t=0;t<12;t++)if(e(t)){var n=i("option","flatpickr-monthDropdown-month");n.value=new Date(Qe.currentYear,t).getMonth().toString(),n.textContent=w(t,Qe.config.shorthandCurrentMonth,Qe.l10n),n.tabIndex=-1,Qe.currentMonth===t&&(n.selected=!0),Qe.monthsDropdownContainer.appendChild(n)}}}function ne(){var e,t=i("div","flatpickr-month"),n=window.document.createDocumentFragment();Qe.config.showMonths>1||"static"===Qe.config.monthSelectorType?e=i("span","cur-month"):(Qe.monthsDropdownContainer=i("select","flatpickr-monthDropdown-months"),Qe.monthsDropdownContainer.setAttribute("aria-label",Qe.l10n.monthAriaLabel),q(Qe.monthsDropdownContainer,"change",function(e){var t=a(e),n=parseInt(t.value,10);Qe.changeMonth(n-Qe.currentMonth),We("onMonthChange")}),te(),e=Qe.monthsDropdownContainer);var o=s("cur-year",{tabindex:"-1"}),r=o.getElementsByTagName("input")[0];r.setAttribute("aria-label",Qe.l10n.yearAriaLabel),Qe.config.minDate&&r.setAttribute("min",Qe.config.minDate.getFullYear().toString()),Qe.config.maxDate&&(r.setAttribute("max",Qe.config.maxDate.getFullYear().toString()),r.disabled=!!Qe.config.minDate&&Qe.config.minDate.getFullYear()===Qe.config.maxDate.getFullYear());var l=i("div","flatpickr-current-month");return l.appendChild(e),l.appendChild(o),n.appendChild(l),t.appendChild(n),{container:t,yearElement:r,monthElement:e}}function ie(){o(Qe.monthNav),Qe.monthNav.appendChild(Qe.prevMonthNav),Qe.config.showMonths&&(Qe.yearElements=[],Qe.monthElements=[]);for(var e=Qe.config.showMonths;e--;){var t=ne();Qe.yearElements.push(t.yearElement),Qe.monthElements.push(t.monthElement),Qe.monthNav.appendChild(t.container)}Qe.monthNav.appendChild(Qe.nextMonthNav)}function oe(){return Qe.monthNav=i("div","flatpickr-months"),Qe.yearElements=[],Qe.monthElements=[],Qe.prevMonthNav=i("span","flatpickr-prev-month"),Qe.prevMonthNav.innerHTML=Qe.config.prevArrow,Qe.nextMonthNav=i("span","flatpickr-next-month"),Qe.nextMonthNav.innerHTML=Qe.config.nextArrow,ie(),Object.defineProperty(Qe,"_hidePrevMonthArrow",{get:function(){return Qe.__hidePrevMonthArrow},set:function(e){Qe.__hidePrevMonthArrow!==e&&(n(Qe.prevMonthNav,"flatpickr-disabled",e),Qe.__hidePrevMonthArrow=e)}}),Object.defineProperty(Qe,"_hideNextMonthArrow",{get:function(){return Qe.__hideNextMonthArrow},set:function(e){Qe.__hideNextMonthArrow!==e&&(n(Qe.nextMonthNav,"flatpickr-disabled",e),Qe.__hideNextMonthArrow=e)}}),Qe.currentYearElement=Qe.yearElements[0],Ye(),Qe.monthNav}function re(){Qe.calendarContainer.classList.add("hasTime"),Qe.config.noCalendar&&Qe.calendarContainer.classList.add("noCalendar");var e=c(Qe.config);Qe.timeContainer=i("div","flatpickr-time"),Qe.timeContainer.tabIndex=-1;var t=i("span","flatpickr-time-separator",":"),n=s("flatpickr-hour",{"aria-label":Qe.l10n.hourAriaLabel});Qe.hourElement=n.getElementsByTagName("input")[0];var o=s("flatpickr-minute",{"aria-label":Qe.l10n.minuteAriaLabel});if(Qe.minuteElement=o.getElementsByTagName("input")[0],Qe.hourElement.tabIndex=Qe.minuteElement.tabIndex=-1,Qe.hourElement.value=g(Qe.latestSelectedDateObj?Qe.latestSelectedDateObj.getHours():Qe.config.time_24hr?e.hours:j(e.hours)),Qe.minuteElement.value=g(Qe.latestSelectedDateObj?Qe.latestSelectedDateObj.getMinutes():e.minutes),Qe.hourElement.setAttribute("step",Qe.config.hourIncrement.toString()),Qe.minuteElement.setAttribute("step",Qe.config.minuteIncrement.toString()),Qe.hourElement.setAttribute("min",Qe.config.time_24hr?"0":"1"),Qe.hourElement.setAttribute("max",Qe.config.time_24hr?"23":"12"),Qe.hourElement.setAttribute("maxlength","2"),Qe.minuteElement.setAttribute("min","0"),Qe.minuteElement.setAttribute("max","59"),Qe.minuteElement.setAttribute("maxlength","2"),Qe.timeContainer.appendChild(n),Qe.timeContainer.appendChild(t),Qe.timeContainer.appendChild(o),Qe.config.time_24hr&&Qe.timeContainer.classList.add("time24hr"),Qe.config.enableSeconds){Qe.timeContainer.classList.add("hasSeconds");var r=s("flatpickr-second");Qe.secondElement=r.getElementsByTagName("input")[0],Qe.secondElement.value=g(Qe.latestSelectedDateObj?Qe.latestSelectedDateObj.getSeconds():e.seconds),Qe.secondElement.setAttribute("step",Qe.minuteElement.getAttribute("step")),Qe.secondElement.setAttribute("min","0"),Qe.secondElement.setAttribute("max","59"),Qe.secondElement.setAttribute("maxlength","2"),Qe.timeContainer.appendChild(i("span","flatpickr-time-separator",":")),Qe.timeContainer.appendChild(r)}return Qe.config.time_24hr||(Qe.amPM=i("span","flatpickr-am-pm",Qe.l10n.amPM[v((Qe.latestSelectedDateObj?Qe.hourElement.value:Qe.config.defaultHour)>11)]),Qe.amPM.title=Qe.l10n.toggleTitle,Qe.amPM.tabIndex=-1,Qe.timeContainer.appendChild(Qe.amPM)),Qe.timeContainer}function se(){Qe.weekdayContainer?o(Qe.weekdayContainer):Qe.weekdayContainer=i("div","flatpickr-weekdays");for(var e=Qe.config.showMonths;e--;){var t=i("div","flatpickr-weekdaycontainer");Qe.weekdayContainer.appendChild(t)}return ae(),Qe.weekdayContainer}function ae(){if(Qe.weekdayContainer){var t=Qe.l10n.firstDayOfWeek,n=e(Qe.l10n.weekdays.shorthand);t>0&&t\n "+n.join("")+"\n \n "}}function le(){Qe.calendarContainer.classList.add("hasWeeks");var e=i("div","flatpickr-weekwrapper");e.appendChild(i("span","flatpickr-weekday",Qe.l10n.weekAbbreviation));var t=i("div","flatpickr-weeks");return e.appendChild(t),{weekWrapper:e,weekNumbers:t}}function ce(e,t){void 0===t&&(t=!0);var n=t?e:e-Qe.currentMonth;n<0&&!0===Qe._hidePrevMonthArrow||n>0&&!0===Qe._hideNextMonthArrow||(Qe.currentMonth+=n,(Qe.currentMonth<0||Qe.currentMonth>11)&&(Qe.currentYear+=Qe.currentMonth>11?1:-1,Qe.currentMonth=(Qe.currentMonth+12)%12,We("onYearChange"),te()),ee(),We("onMonthChange"),Ye())}function ue(e,t){if(void 0===e&&(e=!0),void 0===t&&(t=!0),Qe.input.value="",Qe.altInput!==undefined&&(Qe.altInput.value=""),Qe.mobileInput!==undefined&&(Qe.mobileInput.value=""),Qe.selectedDates=[],Qe.latestSelectedDateObj=undefined,!0===t&&(Qe.currentYear=Qe._initialDate.getFullYear(),Qe.currentMonth=Qe._initialDate.getMonth()),!0===Qe.config.enableTime){var n=c(Qe.config);F(n.hours,n.minutes,n.seconds)}Qe.redraw(),e&&We("onChange")}function de(){Qe.isOpen=!1,Qe.isMobile||(Qe.calendarContainer!==undefined&&Qe.calendarContainer.classList.remove("open"),Qe._input!==undefined&&Qe._input.classList.remove("active")),We("onClose")}function he(){Qe.config!==undefined&&We("onDestroy");for(var e=Qe._handlers.length;e--;)Qe._handlers[e].remove();if(Qe._handlers=[],Qe.mobileInput)Qe.mobileInput.parentNode&&Qe.mobileInput.parentNode.removeChild(Qe.mobileInput),Qe.mobileInput=undefined;else if(Qe.calendarContainer&&Qe.calendarContainer.parentNode)if(Qe.config["static"]&&Qe.calendarContainer.parentNode){var t=Qe.calendarContainer.parentNode;if(t.lastChild&&t.removeChild(t.lastChild),t.parentNode){for(;t.firstChild;)t.parentNode.insertBefore(t.firstChild,t);t.parentNode.removeChild(t)}}else Qe.calendarContainer.parentNode.removeChild(Qe.calendarContainer);Qe.altInput&&(Qe.input.type="text",Qe.altInput.parentNode&&Qe.altInput.parentNode.removeChild(Qe.altInput),delete Qe.altInput),Qe.input&&(Qe.input.type=Qe.input._type,Qe.input.classList.remove("flatpickr-input"),Qe.input.removeAttribute("readonly")),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(e){try{delete Qe[e]}catch(e){}})}function fe(e){return Qe.calendarContainer.contains(e)}function pe(e){if(Qe.isOpen&&!Qe.config.inline){var t=a(e),n=fe(t),i=t===Qe.input||t===Qe.altInput||Qe.element.contains(t)||e.path&&e.path.indexOf&&(~e.path.indexOf(Qe.input)||~e.path.indexOf(Qe.altInput)),o=!i&&!n&&!fe(e.relatedTarget),r=!Qe.config.ignoredFocusElements.some(function(e){return e.contains(t)});o&&r&&(Qe.config.allowInput&&Qe.setDate(Qe._input.value,!1,Qe.config.altInput?Qe.config.altFormat:Qe.config.dateFormat),Qe.timeContainer!==undefined&&Qe.minuteElement!==undefined&&Qe.hourElement!==undefined&&""!==Qe.input.value&&Qe.input.value!==undefined&&O(),Qe.close(),Qe.config&&"range"===Qe.config.mode&&1===Qe.selectedDates.length&&Qe.clear(!1))}}function me(e){if(!(!e||Qe.config.minDate&&eQe.config.maxDate.getFullYear())){var t=e,n=Qe.currentYear!==t;Qe.currentYear=t||Qe.currentYear,Qe.config.maxDate&&Qe.currentYear===Qe.config.maxDate.getFullYear()?Qe.currentMonth=Math.min(Qe.config.maxDate.getMonth(),Qe.currentMonth):Qe.config.minDate&&Qe.currentYear===Qe.config.minDate.getFullYear()&&(Qe.currentMonth=Math.max(Qe.config.minDate.getMonth(),Qe.currentMonth)),n&&(Qe.redraw(),We("onYearChange"),te())}}function ge(e,t){var n;void 0===t&&(t=!0);var i=Qe.parseDate(e,undefined,t);if(Qe.config.minDate&&i&&l(i,Qe.config.minDate,t!==undefined?t:!Qe.minDateHasTime)<0||Qe.config.maxDate&&i&&l(i,Qe.config.maxDate,t!==undefined?t:!Qe.maxDateHasTime)>0)return!1;if(!Qe.config.enable&&0===Qe.config.disable.length)return!0;if(i===undefined)return!1;for(var o=!!Qe.config.enable,r=null!==(n=Qe.config.enable)&&void 0!==n?n:Qe.config.disable,s=0,a=void 0;s=a.from.getTime()&&i.getTime()<=a.to.getTime())return o}return!o}function ve(e){return Qe.daysContainer!==undefined&&(-1===e.className.indexOf("hidden")&&-1===e.className.indexOf("flatpickr-disabled")&&Qe.daysContainer.contains(e))}function ye(e){!(e.target===Qe._input)||!(Qe.selectedDates.length>0||Qe._input.value.length>0)||e.relatedTarget&&fe(e.relatedTarget)||Qe.setDate(Qe._input.value,!0,e.target===Qe.altInput?Qe.config.altFormat:Qe.config.dateFormat)}function be(e){var t=a(e),n=Qe.config.wrap?u.contains(t):t===Qe._input,i=Qe.config.allowInput,o=Qe.isOpen&&(!i||!n),r=Qe.config.inline&&n&&!i;if(13===e.keyCode&&n){if(i)return Qe.setDate(Qe._input.value,!0,t===Qe.altInput?Qe.config.altFormat:Qe.config.dateFormat),Qe.close(),t.blur();Qe.open()}else if(fe(t)||o||r){var s=!!Qe.timeContainer&&Qe.timeContainer.contains(t);switch(e.keyCode){case 13:s?(e.preventDefault(),O(),Ne()):Me(e);break;case 27:e.preventDefault(),Ne();break;case 8:case 46:n&&!Qe.config.allowInput&&(e.preventDefault(),Qe.clear());break;case 37:case 39:if(s||n)Qe.hourElement&&Qe.hourElement.focus();else{e.preventDefault();var l=_();if(Qe.daysContainer!==undefined&&(!1===i||l&&ve(l))){var c=39===e.keyCode?1:-1;e.ctrlKey?(e.stopPropagation(),ce(c),J(K(1),0)):J(undefined,c)}}break;case 38:case 40: e.preventDefault();var d=40===e.keyCode?1:-1;Qe.daysContainer&&t.$i!==undefined||t===Qe.input||t===Qe.altInput?e.ctrlKey?(e.stopPropagation(),me(Qe.currentYear-d),J(K(1),0)):s||J(undefined,7*d):t===Qe.currentYearElement?me(Qe.currentYear-d):Qe.config.enableTime&&(!s&&Qe.hourElement&&Qe.hourElement.focus(),O(e),Qe._debouncedChange());break;case 9:if(s){var h=[Qe.hourElement,Qe.minuteElement,Qe.secondElement,Qe.amPM].concat(Qe.pluginElements).filter(function(e){return e}),f=h.indexOf(t);if(-1!==f){var p=h[f+(e.shiftKey?-1:1)];e.preventDefault(),(p||Qe._input).focus()}}else!Qe.config.noCalendar&&Qe.daysContainer&&Qe.daysContainer.contains(t)&&e.shiftKey&&(e.preventDefault(),Qe._input.focus())}}if(Qe.amPM!==undefined&&t===Qe.amPM)switch(e.key){case Qe.l10n.amPM[0].charAt(0):case Qe.l10n.amPM[0].charAt(0).toLowerCase():Qe.amPM.textContent=Qe.l10n.amPM[0],L(),Xe();break;case Qe.l10n.amPM[1].charAt(0):case Qe.l10n.amPM[1].charAt(0).toLowerCase():Qe.amPM.textContent=Qe.l10n.amPM[1],L(),Xe()}(n||fe(t))&&We("onKeyDown",e)}function we(e,t){if(void 0===t&&(t="flatpickr-day"),1===Qe.selectedDates.length&&(!e||e.classList.contains(t)&&!e.classList.contains("flatpickr-disabled"))){for(var n=e?e.dateObj.getTime():Qe.days.firstElementChild.dateObj.getTime(),i=Qe.parseDate(Qe.selectedDates[0],undefined,!0).getTime(),o=Math.min(n,Qe.selectedDates[0].getTime()),r=Math.max(n,Qe.selectedDates[0].getTime()),s=!1,a=0,l=0,c=o;co&&ca)?a=c:c>i&&(!l||c ."+t)).forEach(function(t){var o=t.dateObj,r=o.getTime(),c=a>0&&r0&&r>l;if(c)return t.classList.add("notAllowed"),void["inRange","startRange","endRange"].forEach(function(e){t.classList.remove(e)});s&&!c||(["startRange","inRange","endRange","notAllowed"].forEach(function(e){t.classList.remove(e)}),e!==undefined&&(e.classList.add(n<=Qe.selectedDates[0].getTime()?"startRange":"endRange"),in&&r===i&&t.classList.add("endRange"),r>=a&&(0===l||r<=l)&&E(r,i,n)&&t.classList.add("inRange")))})}}function xe(){!Qe.isOpen||Qe.config["static"]||Qe.config.inline||Se()}function Ce(e,t){if(void 0===t&&(t=Qe._positionElement),!0===Qe.isMobile){if(e){e.preventDefault();var n=a(e);n&&n.blur()}return Qe.mobileInput!==undefined&&(Qe.mobileInput.focus(),Qe.mobileInput.click()),void We("onOpen")}if(!Qe._input.disabled&&!Qe.config.inline){var i=Qe.isOpen;Qe.isOpen=!0,i||(Qe.calendarContainer.classList.add("open"),Qe._input.classList.add("active"),We("onOpen"),Se(t)),!0===Qe.config.enableTime&&!0===Qe.config.noCalendar&&(!1!==Qe.config.allowInput||e!==undefined&&Qe.timeContainer.contains(e.relatedTarget)||setTimeout(function(){return Qe.hourElement.select()},50))}}function _e(e){return function(t){var n=Qe.config["_"+e+"Date"]=Qe.parseDate(t,Qe.config.dateFormat),i=Qe.config["_"+("min"===e?"max":"min")+"Date"];n!==undefined&&(Qe["min"===e?"minDateHasTime":"maxDateHasTime"]=n.getHours()>0||n.getMinutes()>0||n.getSeconds()>0),Qe.selectedDates&&(Qe.selectedDates=Qe.selectedDates.filter(function(e){return ge(e)}),Qe.selectedDates.length||"min"!==e||H(n),Xe()),Qe.daysContainer&&(Ae(),n!==undefined?Qe.currentYearElement[e]=n.getFullYear().toString():Qe.currentYearElement.removeAttribute(e),Qe.currentYearElement.disabled=!!i&&n!==undefined&&i.getFullYear()===n.getFullYear())}}function De(){var e=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],t=h(h({},JSON.parse(JSON.stringify(u.dataset||{}))),d),n={};Qe.config.parseDate=t.parseDate,Qe.config.formatDate=t.formatDate,Object.defineProperty(Qe.config,"enable",{get:function(){return Qe.config._enable},set:function(e){Qe.config._enable=je(e)}}),Object.defineProperty(Qe.config,"disable",{get:function(){return Qe.config._disable},set:function(e){Qe.config._disable=je(e)}});var i="time"===t.mode;if(!t.dateFormat&&(t.enableTime||i)){var o=N.defaultConfig.dateFormat||p.dateFormat;n.dateFormat=t.noCalendar||i?"H:i"+(t.enableSeconds?":S":""):o+" H:i"+(t.enableSeconds?":S":"")}if(t.altInput&&(t.enableTime||i)&&!t.altFormat){var r=N.defaultConfig.altFormat||p.altFormat;n.altFormat=t.noCalendar||i?"h:i"+(t.enableSeconds?":S K":" K"):r+" h:i"+(t.enableSeconds?":S":"")+" K"}Object.defineProperty(Qe.config,"minDate",{get:function(){return Qe.config._minDate},set:_e("min")}),Object.defineProperty(Qe.config,"maxDate",{get:function(){return Qe.config._maxDate},set:_e("max")});var s=function(e){return function(t){Qe.config["min"===e?"_minTime":"_maxTime"]=Qe.parseDate(t,"H:i:S")}};Object.defineProperty(Qe.config,"minTime",{get:function(){return Qe.config._minTime},set:s("min")}),Object.defineProperty(Qe.config,"maxTime",{get:function(){return Qe.config._maxTime},set:s("max")}),"time"===t.mode&&(Qe.config.noCalendar=!0,Qe.config.enableTime=!0),Object.assign(Qe.config,n,t);for(var a=0;a-1?Qe.config[c]=y(l[c]).map(M).concat(Qe.config[c]):"undefined"==typeof t[c]&&(Qe.config[c]=l[c])}t.altInputClass||(Qe.config.altInputClass=Te().className+" "+Qe.config.altInputClass),We("onParseConfig")}function Te(){return Qe.config.wrap?u.querySelector("[data-input]"):u}function Ee(){"object"!=typeof Qe.config.locale&&"undefined"==typeof N.l10ns[Qe.config.locale]&&Qe.config.errorHandler(new Error("flatpickr: invalid locale "+Qe.config.locale)),Qe.l10n=h(h({},N.l10ns["default"]),"object"==typeof Qe.config.locale?Qe.config.locale:"default"!==Qe.config.locale?N.l10ns[Qe.config.locale]:undefined),C.D="("+Qe.l10n.weekdays.shorthand.join("|")+")",C.l="("+Qe.l10n.weekdays.longhand.join("|")+")",C.M="("+Qe.l10n.months.shorthand.join("|")+")",C.F="("+Qe.l10n.months.longhand.join("|")+")",C.K="("+Qe.l10n.amPM[0]+"|"+Qe.l10n.amPM[1]+"|"+Qe.l10n.amPM[0].toLowerCase()+"|"+Qe.l10n.amPM[1].toLowerCase()+")",h(h({},d),JSON.parse(JSON.stringify(u.dataset||{}))).time_24hr===undefined&&N.defaultConfig.time_24hr===undefined&&(Qe.config.time_24hr=Qe.l10n.time_24hr),Qe.formatDate=D(Qe),Qe.parseDate=T({config:Qe.config,l10n:Qe.l10n})}function Se(e){if("function"==typeof Qe.config.position)return void Qe.config.position(Qe,e);if(Qe.calendarContainer!==undefined){We("onPreCalendarPosition");var t=e||Qe._positionElement,i=Array.prototype.reduce.call(Qe.calendarContainer.children,function(e,t){return e+t.offsetHeight},0),o=Qe.calendarContainer.offsetWidth,r=Qe.config.position.split(" "),s=r[0],a=r.length>1?r[1]:null,l=t.getBoundingClientRect(),c=window.innerHeight-l.bottom,u="above"===s||"below"!==s&&ci,d=window.pageYOffset+l.top+(u?-i-2:t.offsetHeight+2);if(n(Qe.calendarContainer,"arrowTop",!u),n(Qe.calendarContainer,"arrowBottom",u),!Qe.config.inline){var h=window.pageXOffset+l.left,f=!1,p=!1;"center"===a?(h-=(o-l.width)/2,f=!0):"right"===a&&(h-=o-l.width,p=!0),n(Qe.calendarContainer,"arrowLeft",!f&&!p),n(Qe.calendarContainer,"arrowCenter",f),n(Qe.calendarContainer,"arrowRight",p);var m=window.document.body.offsetWidth-(window.pageXOffset+l.right),g=h+o>window.document.body.offsetWidth,v=m+o>window.document.body.offsetWidth;if(n(Qe.calendarContainer,"rightMost",g),!Qe.config["static"])if(Qe.calendarContainer.style.top=d+"px",g)if(v){var y=$e();if(y===undefined)return;var b=window.document.body.offsetWidth,w=Math.max(0,b/2-o/2),x=".flatpickr-calendar.centerMost:before",C=".flatpickr-calendar.centerMost:after",_=y.cssRules.length,D="{left:"+l.left+"px;right:auto;}";n(Qe.calendarContainer,"rightMost",!1),n(Qe.calendarContainer,"centerMost",!0),y.insertRule(x+","+C+D,_),Qe.calendarContainer.style.left=w+"px",Qe.calendarContainer.style.right="auto"}else Qe.calendarContainer.style.left="auto",Qe.calendarContainer.style.right=m+"px";else Qe.calendarContainer.style.left=h+"px",Qe.calendarContainer.style.right="auto"}}}function $e(){for(var e=null,t=0;tQe.currentMonth+Qe.config.showMonths-1)&&"range"!==Qe.config.mode;if(Qe.selectedDateElem=i,"single"===Qe.config.mode)Qe.selectedDates=[o];else if("multiple"===Qe.config.mode){var c=Be(o);c?Qe.selectedDates.splice(parseInt(c),1):Qe.selectedDates.push(o)}else"range"===Qe.config.mode&&(2===Qe.selectedDates.length&&Qe.clear(!1,!1),Qe.latestSelectedDateObj=o,Qe.selectedDates.push(o),0!==l(o,Qe.selectedDates[0],!0)&&Qe.selectedDates.sort(function(e,t){return e.getTime()-t.getTime()}));if(L(),s){var u=Qe.currentYear!==o.getFullYear();Qe.currentYear=o.getFullYear(),Qe.currentMonth=o.getMonth(),u&&(We("onYearChange"),te()),We("onMonthChange")}if(Ye(),ee(),Xe(),s||"range"===Qe.config.mode||1!==Qe.config.showMonths?Qe.selectedDateElem!==undefined&&Qe.hourElement===undefined&&Qe.selectedDateElem&&Qe.selectedDateElem.focus():V(i),Qe.hourElement!==undefined&&Qe.hourElement!==undefined&&Qe.hourElement.focus(),Qe.config.closeOnSelect){var d="single"===Qe.config.mode&&!Qe.config.enableTime,h="range"===Qe.config.mode&&2===Qe.selectedDates.length&&!Qe.config.enableTime;(d||h)&&Ne()}W()}}function Ie(e,t){if(null!==e&&"object"==typeof e){Object.assign(Qe.config,e);for(var n in e)Je[n]!==undefined&&Je[n].forEach(function(e){return e()})}else Qe.config[e]=t,Je[e]!==undefined?Je[e].forEach(function(e){return e()}):f.indexOf(e)>-1&&(Qe.config[e]=y(t));Qe.redraw(),Xe(!0)}function Oe(e,t){var n=[];if(e instanceof Array)n=e.map(function(e){return Qe.parseDate(e,t)});else if(e instanceof Date||"number"==typeof e)n=[Qe.parseDate(e,t)];else if("string"==typeof e)switch(Qe.config.mode){case"single":case"time":n=[Qe.parseDate(e,t)];break;case"multiple":n=e.split(Qe.config.conjunction).map(function(e){return Qe.parseDate(e,t)});break;case"range":n=e.split(Qe.l10n.rangeSeparator).map(function(e){return Qe.parseDate(e,t)})}else Qe.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(e)));Qe.selectedDates=Qe.config.allowInvalidPreload?n:n.filter(function(e){return e instanceof Date&&ge(e,!1)}),"range"===Qe.config.mode&&Qe.selectedDates.sort(function(e,t){return e.getTime()-t.getTime()})}function Pe(e,t,n){if(void 0===t&&(t=!1),void 0===n&&(n=Qe.config.dateFormat),0!==e&&!e||e instanceof Array&&0===e.length)return Qe.clear(t);Oe(e,n),Qe.latestSelectedDateObj=Qe.selectedDates[Qe.selectedDates.length-1],Qe.redraw(),B(undefined,t),H(),0===Qe.selectedDates.length&&Qe.clear(!1),Xe(t),t&&We("onChange")}function je(e){return e.slice().map(function(e){return"string"==typeof e||"number"==typeof e||e instanceof Date?Qe.parseDate(e,undefined,!0):e&&"object"==typeof e&&e.from&&e.to?{from:Qe.parseDate(e.from,undefined),to:Qe.parseDate(e.to,undefined)}:e}).filter(function(e){return e})}function Le(){Qe.selectedDates=[],Qe.now=Qe.parseDate(Qe.config.now)||new Date;var e=Qe.config.defaultDate||("INPUT"!==Qe.input.nodeName&&"TEXTAREA"!==Qe.input.nodeName||!Qe.input.placeholder||Qe.input.value!==Qe.input.placeholder?Qe.input.value:null);e&&Oe(e,Qe.config.dateFormat),Qe._initialDate=Qe.selectedDates.length>0?Qe.selectedDates[0]:Qe.config.minDate&&Qe.config.minDate.getTime()>Qe.now.getTime()?Qe.config.minDate:Qe.config.maxDate&&Qe.config.maxDate.getTime()0&&(Qe.latestSelectedDateObj=Qe.selectedDates[0]),Qe.config.minTime!==undefined&&(Qe.config.minTime=Qe.parseDate(Qe.config.minTime,"H:i")),Qe.config.maxTime!==undefined&&(Qe.config.maxTime=Qe.parseDate(Qe.config.maxTime,"H:i")),Qe.minDateHasTime=!!Qe.config.minDate&&(Qe.config.minDate.getHours()>0||Qe.config.minDate.getMinutes()>0||Qe.config.minDate.getSeconds()>0),Qe.maxDateHasTime=!!Qe.config.maxDate&&(Qe.config.maxDate.getHours()>0||Qe.config.maxDate.getMinutes()>0||Qe.config.maxDate.getSeconds()>0)}function He(){if(Qe.input=Te(),!Qe.input)return void Qe.config.errorHandler(new Error("Invalid input element specified"));Qe.input._type=Qe.input.type,Qe.input.type="text",Qe.input.classList.add("flatpickr-input"),Qe._input=Qe.input,Qe.config.altInput&&(Qe.altInput=i(Qe.input.nodeName,Qe.config.altInputClass),Qe._input=Qe.altInput,Qe.altInput.placeholder=Qe.input.placeholder,Qe.altInput.disabled=Qe.input.disabled,Qe.altInput.required=Qe.input.required,Qe.altInput.tabIndex=Qe.input.tabIndex,Qe.altInput.type="text",Qe.input.setAttribute("type","hidden"),!Qe.config["static"]&&Qe.input.parentNode&&Qe.input.parentNode.insertBefore(Qe.altInput,Qe.input.nextSibling)),Qe.config.allowInput||Qe._input.setAttribute("readonly","readonly"),Fe()}function Fe(){Qe._positionElement=Qe.config.positionElement||Qe._input}function Re(){var e=Qe.config.enableTime?Qe.config.noCalendar?"time":"datetime-local":"date";Qe.mobileInput=i("input",Qe.input.className+" flatpickr-mobile"),Qe.mobileInput.tabIndex=1,Qe.mobileInput.type=e,Qe.mobileInput.disabled=Qe.input.disabled,Qe.mobileInput.required=Qe.input.required,Qe.mobileInput.placeholder=Qe.input.placeholder,Qe.mobileFormatStr="datetime-local"===e?"Y-m-d\\TH:i:S":"date"===e?"Y-m-d":"H:i:S",Qe.selectedDates.length>0&&(Qe.mobileInput.defaultValue=Qe.mobileInput.value=Qe.formatDate(Qe.selectedDates[0],Qe.mobileFormatStr)),Qe.config.minDate&&(Qe.mobileInput.min=Qe.formatDate(Qe.config.minDate,"Y-m-d")),Qe.config.maxDate&&(Qe.mobileInput.max=Qe.formatDate(Qe.config.maxDate,"Y-m-d")),Qe.input.getAttribute("step")&&(Qe.mobileInput.step=String(Qe.input.getAttribute("step"))),Qe.input.type="hidden",Qe.altInput!==undefined&&(Qe.altInput.type="hidden");try{Qe.input.parentNode&&Qe.input.parentNode.insertBefore(Qe.mobileInput,Qe.input.nextSibling)}catch(e){}q(Qe.mobileInput,"change",function(e){Qe.setDate(a(e).value,!1,Qe.mobileFormatStr),We("onChange"),We("onClose")})}function qe(e){if(!0===Qe.isOpen)return Qe.close();Qe.open(e)}function We(e,t){if(Qe.config!==undefined){var n=Qe.config[e];if(n!==undefined&&n.length>0)for(var i=0;n[i]&&i=0&&l(e,Qe.selectedDates[1])<=0)}function Ye(){Qe.config.noCalendar||Qe.isMobile||!Qe.monthNav||(Qe.yearElements.forEach(function(e,t){var n=new Date(Qe.currentYear,Qe.currentMonth,1);n.setMonth(Qe.currentMonth+t),Qe.config.showMonths>1||"static"===Qe.config.monthSelectorType?Qe.monthElements[t].textContent=w(n.getMonth(),Qe.config.shorthandCurrentMonth,Qe.l10n)+" ":Qe.monthsDropdownContainer.value=n.getMonth().toString(),e.value=n.getFullYear().toString()}),Qe._hidePrevMonthArrow=Qe.config.minDate!==undefined&&(Qe.currentYear===Qe.config.minDate.getFullYear()?Qe.currentMonth<=Qe.config.minDate.getMonth():Qe.currentYearQe.config.maxDate.getMonth():Qe.currentYear>Qe.config.maxDate.getFullYear()))}function Ge(e){return Qe.selectedDates.map(function(t){return Qe.formatDate(t,e)}).filter(function(e,t,n){return"range"!==Qe.config.mode||Qe.config.enableTime||n.indexOf(e)===t}).join("range"!==Qe.config.mode?Qe.config.conjunction:Qe.l10n.rangeSeparator)}function Xe(e){void 0===e&&(e=!0),Qe.mobileInput!==undefined&&Qe.mobileFormatStr&&(Qe.mobileInput.value=Qe.latestSelectedDateObj!==undefined?Qe.formatDate(Qe.latestSelectedDateObj,Qe.mobileFormatStr):""),Qe.input.value=Ge(Qe.config.dateFormat),Qe.altInput!==undefined&&(Qe.altInput.value=Ge(Qe.config.altFormat)),!1!==e&&We("onValueUpdate")}function Ve(e){var t=a(e),n=Qe.prevMonthNav.contains(t),i=Qe.nextMonthNav.contains(t);n||i?ce(n?-1:1):Qe.yearElements.indexOf(t)>=0?t.select():t.classList.contains("arrowUp")?Qe.changeYear(Qe.currentYear+1):t.classList.contains("arrowDown")&&Qe.changeYear(Qe.currentYear-1)}function Ke(e){e.preventDefault();var t="keydown"===e.type,n=a(e),i=n;Qe.amPM!==undefined&&n===Qe.amPM&&(Qe.amPM.textContent=Qe.l10n.amPM[v(Qe.amPM.textContent===Qe.l10n.amPM[0])]);var o=parseFloat(i.getAttribute("min")),r=parseFloat(i.getAttribute("max")),s=parseFloat(i.getAttribute("step")),l=parseInt(i.value,10),c=e.delta||(t?38===e.which?1:-1:0),u=l+s*c;if("undefined"!=typeof i.value&&2===i.value.length){var d=i===Qe.hourElement,h=i===Qe.minuteElement;ur&&(u=i===Qe.hourElement?u-r-v(!Qe.amPM):o,h&&Y(undefined,1,Qe.hourElement)),Qe.amPM&&d&&(1===s?u+l===23:Math.abs(u-l)>s)&&(Qe.amPM.textContent=Qe.l10n.amPM[v(Qe.amPM.textContent===Qe.l10n.amPM[0])]),i.value=g(u)}}var Qe={config:h(h({},p),N.defaultConfig),l10n:m};Qe.parseDate=T({config:Qe.config,l10n:Qe.l10n}),Qe._handlers=[],Qe.pluginElements=[],Qe.loadedPlugins=[],Qe._bind=q,Qe._setHoursFromDate=H,Qe._positionCalendar=Se,Qe.changeMonth=ce,Qe.changeYear=me,Qe.clear=ue,Qe.close=de,Qe.onMouseOver=we,Qe._createElement=i,Qe.createDay=X,Qe.destroy=he,Qe.isEnabled=ge,Qe.jumpToDate=B,Qe.updateValue=Xe,Qe.open=Ce,Qe.redraw=Ae,Qe.set=Ie,Qe.setDate=Pe,Qe.toggle=qe;var Je={locale:[Ee,ae],showMonths:[ie,I,se],minDate:[B],maxDate:[B],positionElement:[Fe],clickOpens:[function(){!0===Qe.config.clickOpens?(q(Qe._input,"focus",Qe.open),q(Qe._input,"click",Qe.open)):(Qe._input.removeEventListener("focus",Qe.open),Qe._input.removeEventListener("click",Qe.open))}]};return x(),Qe}function d(e,t){for(var n=Array.prototype.slice.call(e).filter(function(e){return e instanceof HTMLElement}),i=[],o=0;o",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:undefined,prevArrow:"",shorthandCurrentMonth:!1,showMonths:1,"static":!1,time_24hr:!1,weekNumbers:!1,wrap:!1},m={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(e){var t=e%100;if(t>3&&t<21)return"th";switch(t%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year",monthAriaLabel:"Month",hourAriaLabel:"Hour",minuteAriaLabel:"Minute",time_24hr:!1},g=function(e,t){return void 0===t&&(t=2),("000"+e).slice(-1*t)},v=function(e){return!0===e?1:0},y=function(e){return e instanceof Array?e:[e]},b=function(){return undefined},w=function(e,t,n){return n.months[t?"shorthand":"longhand"][e]},x={D:b,F:function(e,t,n){e.setMonth(n.months.longhand.indexOf(t))},G:function(e,t){e.setHours((e.getHours()>=12?12:0)+parseFloat(t))},H:function(e,t){e.setHours(parseFloat(t))},J:function(e,t){e.setDate(parseFloat(t))},K:function(e,t,n){e.setHours(e.getHours()%12+12*v(new RegExp(n.amPM[1],"i").test(t)))},M:function(e,t,n){e.setMonth(n.months.shorthand.indexOf(t))},S:function(e,t){e.setSeconds(parseFloat(t))},U:function(e,t){return new Date(1e3*parseFloat(t))},W:function(e,t,n){var i=parseInt(t),o=new Date(e.getFullYear(),0,2+7*(i-1),0,0,0,0);return o.setDate(o.getDate()-o.getDay()+n.firstDayOfWeek),o},Y:function(e,t){e.setFullYear(parseFloat(t))},Z:function(e,t){return new Date(t)},d:function(e,t){e.setDate(parseFloat(t))},h:function(e,t){e.setHours((e.getHours()>=12?12:0)+parseFloat(t))},i:function(e,t){e.setMinutes(parseFloat(t))},j:function(e,t){e.setDate(parseFloat(t))},l:b,m:function(e,t){e.setMonth(parseFloat(t)-1)},n:function(e,t){e.setMonth(parseFloat(t)-1)},s:function(e,t){e.setSeconds(parseFloat(t))},u:function(e,t){return new Date(parseFloat(t))},w:b,y:function(e,t){e.setFullYear(2e3+parseFloat(t))}},C={D:"",F:"",G:"(\\d\\d|\\d)",H:"(\\d\\d|\\d)",J:"(\\d\\d|\\d)\\w+",K:"",M:"",S:"(\\d\\d|\\d)",U:"(.+)",W:"(\\d\\d|\\d)",Y:"(\\d{4})",Z:"(.+)",d:"(\\d\\d|\\d)",h:"(\\d\\d|\\d)",i:"(\\d\\d|\\d)",j:"(\\d\\d|\\d)",l:"",m:"(\\d\\d|\\d)",n:"(\\d\\d|\\d)",s:"(\\d\\d|\\d)",u:"(.+)",w:"(\\d\\d|\\d)",y:"(\\d{2})"},_={Z:function(e){return e.toISOString()},D:function(e,t,n){return t.weekdays.shorthand[_.w(e,t,n)]},F:function(e,t,n){return w(_.n(e,t,n)-1,!1,t)},G:function(e,t,n){return g(_.h(e,t,n))},H:function(e){return g(e.getHours())},J:function(e,t){return t.ordinal!==undefined?e.getDate()+t.ordinal(e.getDate()):e.getDate()},K:function(e,t){return t.amPM[v(e.getHours()>11)]},M:function(e,t){return w(e.getMonth(),!0,t)},S:function(e){return g(e.getSeconds())},U:function(e){return e.getTime()/1e3},W:function(e,t,n){return n.getWeek(e)},Y:function(e){return g(e.getFullYear(),4)},d:function(e){return g(e.getDate())},h:function(e){return e.getHours()%12?e.getHours()%12:12},i:function(e){return g(e.getMinutes())},j:function(e){return e.getDate()},l:function(e,t){return t.weekdays.longhand[e.getDay()]},m:function(e){return g(e.getMonth()+1)},n:function(e){return e.getMonth()+1},s:function(e){return e.getSeconds()},u:function(e){return e.getTime()},w:function(e){return e.getDay()},y:function(e){return String(e.getFullYear()).substring(2)}},D=function(e){var t=e.config,n=void 0===t?p:t,i=e.l10n,o=void 0===i?m:i,r=e.isMobile,s=void 0!==r&&r;return function(e,t,i){var r=i||o;return n.formatDate===undefined||s?t.split("").map(function(t,i,o){return _[t]&&"\\"!==o[i-1]?_[t](e,r,n):"\\"!==t?t:""}).join(""):n.formatDate(e,t,r)}},T=function(e){var t=e.config,n=void 0===t?p:t,i=e.l10n,o=void 0===i?m:i;return function(e,t,i,r){if(0!==e&&!e)return undefined;var s,a=r||o,l=e;if(e instanceof Date)s=new Date(e.getTime());else if("string"!=typeof e&&e.toFixed!==undefined)s=new Date(e);else if("string"==typeof e){var c=t||(n||p).dateFormat,u=String(e).trim();if("today"===u)s=new Date,i=!0;else if(n&&n.parseDate)s=n.parseDate(e,c);else if(/Z$/.test(u)||/GMT$/.test(u))s=new Date(e);else{for(var d=void 0,h=[],f=0,m=0,g="";fMath.min(t,n)&&e=0&&n.right>=0&&n.top-t<=(window.innerHeight||document.documentElement.clientHeight)&&n.left-t<=(window.innerWidth||document.documentElement.clientWidth)}function i(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)}function o(){!1===m&&(m=!0,g.length&&r(),v.length&&s(),b.length&&a(),g.length||v.length||b.length||(f("resize",o),f("scroll",o,null,!0)),m=!1)}function r(){for(var e=[],t=0;t-1;n--){var i=t.children[n];if(!i)break;if("IFRAME"===i.tagName)i.onload=function(){e.removeChild(e.children[0])},e.appendChild(i);else if("SCRIPT"===i.tagName){var o=document.createElement("script");o.innerHTML=i.innerHTML,o.async=i.async,i.src&&(o.src=i.src),i.type&&(o.type=i.type),e.appendChild(o)}else{var r=e.querySelector(".embed-loader");r.parentNode.removeChild(r),e.appendChild(i)}}e.removeAttribute("data-html"),e.classList.remove("lazy-embed")}function c(e,t){if(e.classList&&!e.classList.contains("loaded")){var n=new Image,i=e.getAttribute(t);n.onload=function(){w[t](e,i),e.classList.add("loaded")},n.onerror=function(){e.classList.remove("img-loader"),e.classList.add("load-error")},e.classList.add("img-loader"),n.src=i,e.removeAttribute(t)}}function u(e){if(e.getAttribute("data-async-poster")&&e.setAttribute("poster",e.getAttribute("data-async-poster")),e.classList&&!e.classList.contains("loaded")){for(var t=0;t');n.val(e),$(".user-form").append(n),t.submit()}}))}),$("form.disable-on-submit").submit(function(){$(this).find('input[name="commit"]').prop("disabled","disabled")}),$(document).on("click",".btn-close",function(e){return target=$(this).data("close"),effect=$(this).data("effect")||"slide","fade"==effect?$(target).fadeOut(100):$(target).slideUp(100),e.stopPropagation(),!1}),$(document).on("click",".disable-link",function(){$(this).addClass("disabled-link"),$(this).html(''),$(this).on("click",function(e){e.preventDefault(),e.stopPropagation()})}),$("#notifications .istooltip").tooltip("show"),window.setTimeout(function(){$("#notifications .istooltip").tooltip("destroy")},5e3),$(".collapsible a.toggle").click(function(e){return e.preventDefault(),$(this).parent().toggleClass("collapsed"),$(this).parent().toggleClass("expanded"),!1}),window.NestedFormEvents.prototype.insertFields=function(e,t,n){if($(n).hasClass("nested-field-table")){var i=$(n).closest("tr");return e=e.replace(/^
      /,''),e=e.replace(/<\/div>$/,""),$(e).insertBefore(i)}return $(e).insertBefore($(n))},$("form.sortable").on("nested:fieldAdded",function(e){var t=e.field;previousPosition=t.prev().find("input.position").val(),isNaN(previousPosition)&&(previousPosition=0);var n=parseInt(previousPosition)+1;t.find("input.position").val(n)}),$("form.sortable").on("nested:fieldRemoved",function(e){e.field.addClass("removed"),resetSortablePositions($(e.field.parent()))}),sortTable(),$(document).on("ajax:beforeSend","form.remote",function(){var e=$(this).find('input[name="commit"]');e.data("origText",e.val()),e.val("Submitting..."),e.prop("disabled",!0)}).on("ajax:success","form.remote",function(e,t){$(this);$(this).find(".form-group").find(".error-message").remove(),$(this).find(".form-group").removeClass("has-error"),t.redirect_to&&window.location.replace(t.redirect_to)}).on("ajax:complete","form.remote",function(){var e=$(this).find('input[name="commit"]');e.val(e.data("origText")),e.prop("disabled",!1)}).on("ajax:error","form.remote",function(e,t){var n,i=$(this);try{n=$.parseJSON(t.responseText)}catch(e){console.error("all.js",e),n={message:"Please reload the page and try again"}}$(this).find(".form-group").find(".error-message").remove(),$(this).find(".form-group").removeClass("has-error"),n.message?$(".pe-error").text(n.message):$(".pe-error").text("Error saving");for(model in n)for(attribute in n[model]){var o=attribute;if(-1!=attribute.indexOf(".")){var r=attribute.split("."),s=r[0];s+="_attributes";for(var a=[s],l=1;l'+n[model][o]+""),c.parent().hasClass("input-group")?errorMsg.insertAfter(c.parent()):errorMsg.appendTo(c.parent())}}),$(".navbar-tabs").length){var e=document.location.hash,t="#";e&&($('.navbar-tabs a[href="'+t+e.replace("#","")+'"]').tab("show"),history.pushState(null,null,window.location.href)),window.addEventListener("popstate",function(){e=document.location.hash;var n=$('[href="'+t+e.replace("#","")+'"]');n.length?n.tab("show"):$(".navbar-tabs a:first").tab("show")}),$(".navbar-tabs a").on("shown.bs.tab",function(e){var n=$(window).scrollTop();window.location.hash=e.target.hash.replace(t,"#"),$(window).scrollTop(n)})}$("a.smooth-scroll").on("click",function(e){target="#"+this.hash.substring(1),offset=$(this).data("offset")||0,$(target).length&&(e.preventDefault(),$(this).blur(),smoothScrollTo(target,offset))}),$("#signup-popup").length&&showSignupPopupOrNot(),$("#signup-popup").on("modal:open",function(){$(this).find("input:visible").first().focus()}),$(".live-chapter-about-more").click(function(e){e.preventDefault(),$(".live-chapter-about-excerpt").hide(),$(".live-chapter-about-full").show()})}),function(){[].slice.call(document.querySelectorAll(".reactPortal")).forEach(function(e){var t=e.getAttribute("action");e.addEventListener("click",function(n){n.preventDefault();var i=e.hasAttribute("data-react")?e.getAttribute("data-react"):"{}",o={state:JSON.parse(i)};e.hasAttribute("data-redirect-to")&&(o.redirect_to=e.getAttribute("data-redirect-to")),e.hasAttribute("data-source")&&(o.source=e.getAttribute("data-source"));var r=new CustomEvent("open:"+t,{detail:o,bubbles:!0,cancelable:!0});window.dispatchEvent(r)})})}(),$(document).ready(function(){var e=$("#outer-wrapper"),t=$("#mobile-nav-overlay"),n=$("#mobile-navigation");$("#nav-mobile-trigger").on("click",function(){e.addClass("mobile-nav-open"),t.show(),setTimeout(function(){t.addClass("showing"),n.addClass("showing")},1)}),$("#nav-search-icon").on("click",function(){window.dispatchEvent(new CustomEvent("focus:ReactSearchInput"))}),t.on("click",function(){t.removeClass("showing"),n.removeClass("showing"),e.removeClass("mobile-nav-open"),setTimeout(function(){t.hide()},500)})}),function(e){function t(t,r){this.container=t.querySelector(".hckScrollBox__container"),this.leftArrow=t.querySelector(".hckScrollBox__arrow--left"),this.rightArrow=t.querySelector(".hckScrollBox__arrow--right"),this.scrollInc=t.hasAttribute(o)?parseInt(t.getAttribute(o)):200;var s=r(this._showOrHideArrows.bind(this),100),a=this._startScroll.bind(this,n),l=this._startScroll.bind(this,i);this.container.addEventListener("scroll",s),this.leftArrow.addEventListener("click",a),this.rightArrow.addEventListener("click",l),e.addEventListener("resize",s),this._showOrHideArrows()}var n=-1,i=1,o="data-scroll-inc";t.prototype._startScroll=function(e){if(this.container){var t=this.container.scrollLeft+this.scrollInc*e;Hster.Utils.smoothScroll(t,350,function(){},this.container,!0)}},t.prototype._showOrHideArrows=function(){if(this.container&&this.leftArrow&&this.rightArrow){var e=this.container.getBoundingClientRect().width;this.container.scrollLeft>0?this.leftArrow.classList.contains("hckScrollBox__arrow--hidden")&&this.leftArrow.classList.remove("hckScrollBox__arrow--hidden"):this.leftArrow.classList.contains("hckScrollBox__arrow--hidden")||this.leftArrow.classList.add("hckScrollBox__arrow--hidden"),Math.ceil(this.container.scrollLeft+e)