text: function mergeRecursive(e,t){"use strict";for(var n in t)try{t[n].constructor===Object?e[n]=mergeRecursive(e[n],t[n]):e[n]=t[n]}catch(i){e[n]=t[n]}return e}function arrayEquals(e,t){"use strict";if(!t||!e)return!1;if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]instanceof Array&&t[n]instanceof Array){if(!arrayEquals(e[n],t[n]))return!1}else if(e[n]!==t[n])return!1;return!0}function Member(e,t,n){this.fName=e,this.lName=t,this.idnum=n,this.fullName=this.fName+" "+this.lName,this.photoURL=function(){return"img/"+this.idnum+".jpg"}}function createNewMember(e,t){memberList[memberList.length]=new Member(e,t,memberList.length)}function searchString(e,t){if(!isNaN(t))var t=t+"";var t=t.toLowerCase(),e=e.toLowerCase();return""!=e?-1!=t.indexOf(e):!1}function returnResults(e){for(var t=[],n=0;n<memberList.length;n++){var i=memberList[n];searchString(e,i.fullName)?t.push(memberList[n]):searchString(e,i.idnum)&&t.push(memberList[n])}return t}function sizeResults(){var e=$(".result"),t=$(".results-wrapper").width(),n=(t-90)/3-3;e.width(n),e.height(n)}function hideKeyboard(){document.activeElement.blur(),$("input").blur()}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,n=oe.type(e);return"function"===n||oe.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e}function i(e,t,n){if(oe.isFunction(t))return oe.grep(e,function(e,i){return!!t.call(e,i,e)!==n});if(t.nodeType)return oe.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(pe.test(t))return oe.filter(t,e,n);t=oe.filter(t,e)}return oe.grep(e,function(e){return oe.inArray(e,t)>=0!==n})}function r(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}function o(e){var t=De[e]={};return oe.each(e.match(we)||[],function(e,n){t[n]=!0}),t}function a(){me.addEventListener?(me.removeEventListener("DOMContentLoaded",s,!1),e.removeEventListener("load",s,!1)):(me.detachEvent("onreadystatechange",s),e.detachEvent("onload",s))}function s(){(me.addEventListener||"load"===event.type||"complete"===me.readyState)&&(a(),oe.ready())}function l(e,t,n){if(void 0===n&&1===e.nodeType){var i="data-"+t.replace(ke,"-$1").toLowerCase();if(n=e.getAttribute(i),"string"==typeof n){try{n="true"===n?!0:"false"===n?!1:"null"===n?null:+n+""===n?+n:Te.test(n)?oe.parseJSON(n):n}catch(r){}oe.data(e,t,n)}else n=void 0}return n}function u(e){var t;for(t in e)if(("data"!==t||!oe.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}function c(e,t,n,i){if(oe.acceptData(e)){var r,o,a=oe.expando,s=e.nodeType,l=s?oe.cache:e,u=s?e[a]:e[a]&&a;if(u&&l[u]&&(i||l[u].data)||void 0!==n||"string"!=typeof t)return u||(u=s?e[a]=G.pop()||oe.guid++:a),l[u]||(l[u]=s?{}:{toJSON:oe.noop}),"object"!=typeof t&&"function"!=typeof t||(i?l[u]=oe.extend(l[u],t):l[u].data=oe.extend(l[u].data,t)),o=l[u],i||(o.data||(o.data={}),o=o.data),void 0!==n&&(o[oe.camelCase(t)]=n),"string"==typeof t?(r=o[t],null==r&&(r=o[oe.camelCase(t)])):r=o,r}}function d(e,t,n){if(oe.acceptData(e)){var i,r,o=e.nodeType,a=o?oe.cache:e,s=o?e[oe.expando]:oe.expando;if(a[s]){if(t&&(i=n?a[s]:a[s].data)){oe.isArray(t)?t=t.concat(oe.map(t,oe.camelCase)):t in i?t=[t]:(t=oe.camelCase(t),t=t in i?[t]:t.split(" ")),r=t.length;for(;r--;)delete i[t[r]];if(n?!u(i):!oe.isEmptyObject(i))return}(n||(delete a[s].data,u(a[s])))&&(o?oe.cleanData([e],!0):ie.deleteExpando||a!=a.window?delete a[s]:a[s]=null)}}}function f(){return!0}function p(){return!1}function h(){try{return me.activeElement}catch(e){}}function m(e){var t=He.split("|"),n=e.createDocumentFragment();if(n.createElement)for(;t.length;)n.createElement(t.pop());return n}function g(e,t){var n,i,r=0,o=typeof e.getElementsByTagName!==Ce?e.getElementsByTagName(t||"*"):typeof e.querySelectorAll!==Ce?e.querySelectorAll(t||"*"):void 0;if(!o)for(o=[],n=e.childNodes||e;null!=(i=n[r]);r++)!t||oe.nodeName(i,t)?o.push(i):oe.merge(o,g(i,t));return void 0===t||t&&oe.nodeName(e,t)?oe.merge([e],o):o}function v(e){Le.test(e.type)&&(e.defaultChecked=e.checked)}function y(e,t){return oe.nodeName(e,"table")&&oe.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function b(e){return e.type=(null!==oe.find.attr(e,"type"))+"/"+e.type,e}function w(e){var t=Ge.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function D(e,t){for(var n,i=0;null!=(n=e[i]);i++)oe._data(n,"globalEval",!t||oe._data(t[i],"globalEval"))}function x(e,t){if(1===t.nodeType&&oe.hasData(e)){var n,i,r,o=oe._data(e),a=oe._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(i=0,r=s[n].length;r>i;i++)oe.event.add(t,n,s[n][i])}a.data&&(a.data=oe.extend({},a.data))}}function _(e,t){var n,i,r;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!ie.noCloneEvent&&t[oe.expando]){r=oe._data(t);for(i in r.events)oe.removeEvent(t,i,r.handle);t.removeAttribute(oe.expando)}"script"===n&&t.text!==e.text?(b(t).text=e.text,w(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),ie.html5Clone&&e.innerHTML&&!oe.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&Le.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:"input"!==n&&"textarea"!==n||(t.defaultValue=e.defaultValue)}}function C(t,n){var i=oe(n.createElement(t)).appendTo(n.body),r=e.getDefaultComputedStyle?e.getDefaultComputedStyle(i[0]).display:oe.css(i[0],"display");return i.detach(),r}function T(e){var t=me,n=et[e];return n||(n=C(e,t),"none"!==n&&n||(Ze=(Ze||oe("<iframe frameborder='0' width='0' height='0'/>")).appendTo(t.documentElement),t=(Ze[0].contentWindow||Ze[0].contentDocument).document,t.write(),t.close(),n=C(e,t),Ze.detach()),et[e]=n),n}function k(e,t){return{get:function(){var n=e();if(null!=n)return n?void delete this.get:(this.get=t).apply(this,arguments)}}}function A(e,t){if(t in e)return t;for(var n=t.charAt(0).toUpperCase()+t.slice(1),i=t,r=pt.length;r--;)if(t=pt[r]+n,t in e)return t;return i}function S(e,t){for(var n,i,r,o=[],a=0,s=e.length;s>a;a++)i=e[a],i.style&&(o[a]=oe._data(i,"olddisplay"),n=i.style.display,t?(o[a]||"none"!==n||(i.style.display=""),""===i.style.display&&Ne(i)&&(o[a]=oe._data(i,"olddisplay",T(i.nodeName)))):o[a]||(r=Ne(i),(n&&"none"!==n||!r)&&oe._data(i,"olddisplay",r?n:oe.css(i,"display"))));for(a=0;s>a;a++)i=e[a],i.style&&(t&&"none"!==i.style.display&&""!==i.style.display||(i.style.display=t?o[a]||"":"none"));return e}function N(e,t,n){var i=ut.exec(t);return i?Math.max(0,i[1]-(n||0))+(i[2]||"px"):t}function E(e,t,n,i,r){for(var o=n===(i?"border":"content")?4:"width"===t?1:0,a=0;4>o;o+=2)"margin"===n&&(a+=oe.css(e,n+Se[o],!0,r)),i?("content"===n&&(a-=oe.css(e,"padding"+Se[o],!0,r)),"margin"!==n&&(a-=oe.css(e,"border"+Se[o]+"Width",!0,r))):(a+=oe.css(e,"padding"+Se[o],!0,r),"padding"!==n&&(a+=oe.css(e,"border"+Se[o]+"Width",!0,r)));return a}function L(e,t,n){var i=!0,r="width"===t?e.offsetWidth:e.offsetHeight,o=tt(e),a=ie.boxSizing()&&"border-box"===oe.css(e,"boxSizing",!1,o);if(0>=r||null==r){if(r=nt(e,t,o),(0>r||null==r)&&(r=e.style[t]),rt.test(r))return r;i=a&&(ie.boxSizingReliable()||r===e.style[t]),r=parseFloat(r)||0}return r+E(e,t,n||(a?"border":"content"),i,o)+"px"}function M(e,t,n,i,r){return new M.prototype.init(e,t,n,i,r)}function F(){return setTimeout(function(){ht=void 0}),ht=oe.now()}function $(e,t){var n,i={height:e},r=0;for(t=t?1:0;4>r;r+=2-t)n=Se[r],i["margin"+n]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function I(e,t,n){for(var i,r=(wt[t]||[]).concat(wt["*"]),o=0,a=r.length;a>o;o++)if(i=r[o].call(n,t,e))return i}function P(e,t,n){var i,r,o,a,s,l,u,c,d=this,f={},p=e.style,h=e.nodeType&&Ne(e),m=oe._data(e,"fxshow");n.queue||(s=oe._queueHooks(e,"fx"),null==s.unqueued&&(s.unqueued=0,l=s.empty.fire,s.empty.fire=function(){s.unqueued||l()}),s.unqueued++,d.always(function(){d.always(function(){s.unqueued--,oe.queue(e,"fx").length||s.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],u=oe.css(e,"display"),c=T(e.nodeName),"none"===u&&(u=c),"inline"===u&&"none"===oe.css(e,"float")&&(ie.inlineBlockNeedsLayout&&"inline"!==c?p.zoom=1:p.display="inline-block")),n.overflow&&(p.overflow="hidden",ie.shrinkWrapBlocks()||d.always(function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}));for(i in t)if(r=t[i],gt.exec(r)){if(delete t[i],o=o||"toggle"===r,r===(h?"hide":"show")){if("show"!==r||!m||void 0===m[i])continue;h=!0}f[i]=m&&m[i]||oe.style(e,i)}if(!oe.isEmptyObject(f)){m?"hidden"in m&&(h=m.hidden):m=oe._data(e,"fxshow",{}),o&&(m.hidden=!h),h?oe(e).show():d.done(function(){oe(e).hide()}),d.done(function(){var t;oe._removeData(e,"fxshow");for(t in f)oe.style(e,t,f[t])});for(i in f)a=I(h?m[i]:0,i,d),i in m||(m[i]=a.start,h&&(a.end=a.start,a.start="width"===i||"height"===i?1:0))}}function H(e,t){var n,i,r,o,a;for(n in e)if(i=oe.camelCase(n),r=t[i],o=e[n],oe.isArray(o)&&(r=o[1],o=e[n]=o[0]),n!==i&&(e[i]=o,delete e[n]),a=oe.cssHooks[i],a&&"expand"in a){o=a.expand(o),delete e[i];for(n in o)n in e||(e[n]=o[n],t[n]=r)}else t[i]=r}function R(e,t,n){var i,r,o=0,a=bt.length,s=oe.Deferred().always(function(){delete l.elem}),l=function(){if(r)return!1;for(var t=ht||F(),n=Math.max(0,u.startTime+u.duration-t),i=n/u.duration||0,o=1-i,a=0,l=u.tweens.length;l>a;a++)u.tweens[a].run(o);return s.notifyWith(e,[u,o,n]),1>o&&l?n:(s.resolveWith(e,[u]),!1)},u=s.promise({elem:e,props:oe.extend({},t),opts:oe.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:ht||F(),duration:n.duration,tweens:[],createTween:function(t,n){var i=oe.Tween(e,u.opts,t,n,u.opts.specialEasing[t]||u.opts.easing);return u.tweens.push(i),i},stop:function(t){var n=0,i=t?u.tweens.length:0;if(r)return this;for(r=!0;i>n;n++)u.tweens[n].run(1);return t?s.resolveWith(e,[u,t]):s.rejectWith(e,[u,t]),this}}),c=u.props;for(H(c,u.opts.specialEasing);a>o;o++)if(i=bt[o].call(u,e,c,u.opts))return i;return oe.map(c,I,u),oe.isFunction(u.opts.start)&&u.opts.start.call(e,u),oe.fx.timer(oe.extend(l,{elem:e,anim:u,queue:u.opts.queue})),u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always)}function j(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var i,r=0,o=t.toLowerCase().match(we)||[];if(oe.isFunction(n))for(;i=o[r++];)"+"===i.charAt(0)?(i=i.slice(1)||"*",(e[i]=e[i]||[]).unshift(n)):(e[i]=e[i]||[]).push(n)}}function O(e,t,n,i){function r(s){var l;return o[s]=!0,oe.each(e[s]||[],function(e,s){var u=s(t,n,i);return"string"!=typeof u||a||o[u]?a?!(l=u):void 0:(t.dataTypes.unshift(u),r(u),!1)}),l}var o={},a=e===zt;return r(t.dataTypes[0])||!o["*"]&&r("*")}function q(e,t){var n,i,r=oe.ajaxSettings.flatOptions||{};for(i in t)void 0!==t[i]&&((r[i]?e:n||(n={}))[i]=t[i]);return n&&oe.extend(!0,e,n),e}function B(e,t,n){for(var i,r,o,a,s=e.contents,l=e.dataTypes;"*"===l[0];)l.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(a in s)if(s[a]&&s[a].test(r)){l.unshift(a);break}if(l[0]in n)o=l[0];else{for(a in n){if(!l[0]||e.converters[a+" "+l[0]]){o=a;break}i||(i=a)}o=o||i}return o?(o!==l[0]&&l.unshift(o),n[o]):void 0}function W(e,t,n,i){var r,o,a,s,l,u={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)u[a.toLowerCase()]=e.converters[a];for(o=c.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!l&&i&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=o,o=c.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(a=u[l+" "+o]||u["* "+o],!a)for(r in u)if(s=r.split(" "),s[1]===o&&(a=u[l+" "+s[0]]||u["* "+s[0]])){a===!0?a=u[r]:u[r]!==!0&&(o=s[0],c.unshift(s[1]));break}if(a!==!0)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(d){return{state:"parsererror",error:a?d:"No conversion from "+l+" to "+o}}}return{state:"success",data:t}}function z(e,t,n,i){var r;if(oe.isArray(t))oe.each(t,function(t,r){n||Gt.test(e)?i(e,r):z(e+"["+("object"==typeof r?t:"")+"]",r,n,i)});else if(n||"object"!==oe.type(t))i(e,t);else for(r in t)z(e+"["+r+"]",t[r],n,i)}function X(){try{return new e.XMLHttpRequest}catch(t){}}function Y(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}function U(e){return oe.isWindow(e)?e:9===e.nodeType?e.defaultView||e.parentWindow:!1}var G=[],V=G.slice,K=G.concat,J=G.push,Q=G.indexOf,Z={},ee=Z.toString,te=Z.hasOwnProperty,ne="".trim,ie={},re="1.11.0",oe=function(e,t){return new oe.fn.init(e,t)},ae=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,se=/^-ms-/,le=/-([\da-z])/gi,ue=function(e,t){return t.toUpperCase()};oe.fn=oe.prototype={jquery:re,constructor:oe,selector:"",length:0,toArray:function(){return V.call(this)},get:function(e){return null!=e?0>e?this[e+this.length]:this[e]:V.call(this)},pushStack:function(e){var t=oe.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return oe.each(this,e,t)},map:function(e){return this.pushStack(oe.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(V.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:J,sort:G.sort,splice:G.splice},oe.extend=oe.fn.extend=function(){var e,t,n,i,r,o,a=arguments[0]||{},s=1,l=arguments.length,u=!1;for("boolean"==typeof a&&(u=a,a=arguments[s]||{},s++),"object"==typeof a||oe.isFunction(a)||(a={}),s===l&&(a=this,s--);l>s;s++)if(null!=(r=arguments[s]))for(i in r)e=a[i],n=r[i],a!==n&&(u&&n&&(oe.isPlainObject(n)||(t=oe.isArray(n)))?(t?(t=!1,o=e&&oe.isArray(e)?e:[]):o=e&&oe.isPlainObject(e)?e:{},a[i]=oe.extend(u,o,n)):void 0!==n&&(a[i]=n));return a},oe.extend({expando:"jQuery"+(re+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isFunction:function(e){return"function"===oe.type(e)},isArray:Array.isArray||function(e){return"array"===oe.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return e-parseFloat(e)>=0},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},isPlainObject:function(e){var t;if(!e||"object"!==oe.type(e)||e.nodeType||oe.isWindow(e))return!1;try{if(e.constructor&&!te.call(e,"constructor")&&!te.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}if(ie.ownLast)for(t in e)return te.call(e,t);for(t in e);return void 0===t||te.call(e,t)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?Z[ee.call(e)]||"object":typeof e},globalEval:function(t){t&&oe.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(se,"ms-").replace(le,ue)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,i){var r,o=0,a=e.length,s=n(e);if(i){if(s)for(;a>o&&(r=t.apply(e[o],i),r!==!1);o++);else for(o in e)if(r=t.apply(e[o],i),r===!1)break}else if(s)for(;a>o&&(r=t.call(e[o],o,e[o]),r!==!1);o++);else for(o in e)if(r=t.call(e[o],o,e[o]),r===!1)break;return e},trim:ne&&!ne.call("\ufeff ")?function(e){return null==e?"":ne.call(e)}:function(e){return null==e?"":(e+"").replace(ae,"")},makeArray:function(e,t){var i=t||[];return null!=e&&(n(Object(e))?oe.merge(i,"string"==typeof e?[e]:e):J.call(i,e)),i},inArray:function(e,t,n){var i;if(t){if(Q)return Q.call(t,e,n);for(i=t.length,n=n?0>n?Math.max(0,i+n):n:0;i>n;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,t){for(var n=+t.length,i=0,r=e.length;n>i;)e[r++]=t[i++];if(n!==n)for(;void 0!==t[i];)e[r++]=t[i++];return e.length=r,e},grep:function(e,t,n){for(var i,r=[],o=0,a=e.length,s=!n;a>o;o++)i=!t(e[o],o),i!==s&&r.push(e[o]);return r},map:function(e,t,i){var r,o=0,a=e.length,s=n(e),l=[];if(s)for(;a>o;o++)r=t(e[o],o,i),null!=r&&l.push(r);else for(o in e)r=t(e[o],o,i),null!=r&&l.push(r);return K.apply([],l)},guid:1,proxy:function(e,t){var n,i,r;return"string"==typeof t&&(r=e[t],t=e,e=r),oe.isFunction(e)?(n=V.call(arguments,2),i=function(){return e.apply(t||this,n.concat(V.call(arguments)))},i.guid=e.guid=e.guid||oe.guid++,i):void 0},now:function(){return+new Date},support:ie}),oe.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){Z["[object "+t+"]"]=t.toLowerCase()});var ce=function(e){function t(e,t,n,i){var r,o,a,s,l,u,d,h,m,g;if((t?t.ownerDocument||t:O)!==M&&L(t),t=t||M,n=n||[],!e||"string"!=typeof e)return n;if(1!==(s=t.nodeType)&&9!==s)return[];if($&&!i){if(r=ye.exec(e))if(a=r[1]){if(9===s){if(o=t.getElementById(a),!o||!o.parentNode)return n;if(o.id===a)return n.push(o),n}else if(t.ownerDocument&&(o=t.ownerDocument.getElementById(a))&&R(t,o)&&o.id===a)return n.push(o),n}else{if(r[2])return Z.apply(n,t.getElementsByTagName(e)),n;if((a=r[3])&&_.getElementsByClassName&&t.getElementsByClassName)return Z.apply(n,t.getElementsByClassName(a)),n}if(_.qsa&&(!I||!I.test(e))){if(h=d=j,m=t,g=9===s&&e,1===s&&"object"!==t.nodeName.toLowerCase()){for(u=f(e),(d=t.getAttribute("id"))?h=d.replace(we,"\\$&"):t.setAttribute("id",h),h="[id='"+h+"'] ",l=u.length;l--;)u[l]=h+p(u[l]);m=be.test(e)&&c(t.parentNode)||t,g=u.join(",")}if(g)try{return Z.apply(n,m.querySelectorAll(g)),n}catch(v){}finally{d||t.removeAttribute("id")}}}return D(e.replace(le,"$1"),t,n,i)}function n(){function e(n,i){return t.push(n+" ")>C.cacheLength&&delete e[t.shift()],e[n+" "]=i}var t=[];return e}function i(e){return e[j]=!0,e}function r(e){var t=M.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function o(e,t){for(var n=e.split("|"),i=e.length;i--;)C.attrHandle[n[i]]=t}function a(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 s(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function l(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function u(e){return i(function(t){return t=+t,i(function(n,i){for(var r,o=e([],n.length,t),a=o.length;a--;)n[r=o[a]]&&(n[r]=!(i[r]=n[r]))})})}function c(e){return e&&typeof e.getElementsByTagName!==U&&e}function d(){}function f(e,n){var i,r,o,a,s,l,u,c=z[e+" "];if(c)return n?0:c.slice(0);for(s=e,l=[],u=C.preFilter;s;){i&&!(r=ue.exec(s))||(r&&(s=s.slice(r[0].length)||s),l.push(o=[])),i=!1,(r=ce.exec(s))&&(i=r.shift(),o.push({value:i,type:r[0].replace(le," ")}),s=s.slice(i.length));for(a in C.filter)!(r=he[a].exec(s))||u[a]&&!(r=u[a](r))||(i=r.shift(),o.push({value:i,type:a,matches:r}),s=s.slice(i.length));if(!i)break}return n?s.length:s?t.error(e):z(e,l).slice(0)}function p(e){for(var t=0,n=e.length,i="";n>t;t++)i+=e[t].value;return i}function h(e,t,n){var i=t.dir,r=n&&"parentNode"===i,o=B++;return t.first?function(t,n,o){for(;t=t[i];)if(1===t.nodeType||r)return e(t,n,o)}:function(t,n,a){var s,l,u=[q,o];if(a){for(;t=t[i];)if((1===t.nodeType||r)&&e(t,n,a))return!0}else for(;t=t[i];)if(1===t.nodeType||r){if(l=t[j]||(t[j]={}),(s=l[i])&&s[0]===q&&s[1]===o)return u[2]=s[2];if(l[i]=u,u[2]=e(t,n,a))return!0}}}function m(e){return e.length>1?function(t,n,i){for(var r=e.length;r--;)if(!e[r](t,n,i))return!1;return!0}:e[0]}function g(e,t,n,i,r){for(var o,a=[],s=0,l=e.length,u=null!=t;l>s;s++)(o=e[s])&&(n&&!n(o,i,r)||(a.push(o),u&&t.push(s)));return a}function v(e,t,n,r,o,a){return r&&!r[j]&&(r=v(r)),o&&!o[j]&&(o=v(o,a)),i(function(i,a,s,l){var u,c,d,f=[],p=[],h=a.length,m=i||w(t||"*",s.nodeType?[s]:s,[]),v=!e||!i&&t?m:g(m,f,e,s,l),y=n?o||(i?e:h||r)?[]:a:v;if(n&&n(v,y,s,l),r)for(u=g(y,p),r(u,[],s,l),c=u.length;c--;)(d=u[c])&&(y[p[c]]=!(v[p[c]]=d));if(i){if(o||e){if(o){for(u=[],c=y.length;c--;)(d=y[c])&&u.push(v[c]=d);o(null,y=[],u,l)}for(c=y.length;c--;)(d=y[c])&&(u=o?te.call(i,d):f[c])>-1&&(i[u]=!(a[u]=d))}}else y=g(y===a?y.splice(h,y.length):y),o?o(null,a,y,l):Z.apply(a,y)})}function y(e){for(var t,n,i,r=e.length,o=C.relative[e[0].type],a=o||C.relative[" "],s=o?1:0,l=h(function(e){return e===t},a,!0),u=h(function(e){return te.call(t,e)>-1},a,!0),c=[function(e,n,i){return!o&&(i||n!==S)||((t=n).nodeType?l(e,n,i):u(e,n,i))}];r>s;s++)if(n=C.relative[e[s].type])c=[h(m(c),n)];else{if(n=C.filter[e[s].type].apply(null,e[s].matches),n[j]){for(i=++s;r>i&&!C.relative[e[i].type];i++);return v(s>1&&m(c),s>1&&p(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(le,"$1"),n,i>s&&y(e.slice(s,i)),r>i&&y(e=e.slice(i)),r>i&&p(e))}c.push(n)}return m(c)}function b(e,n){var r=n.length>0,o=e.length>0,a=function(i,a,s,l,u){var c,d,f,p=0,h="0",m=i&&[],v=[],y=S,b=i||o&&C.find.TAG("*",u),w=q+=null==y?1:Math.random()||.1,D=b.length;for(u&&(S=a!==M&&a);h!==D&&null!=(c=b[h]);h++){if(o&&c){for(d=0;f=e[d++];)if(f(c,a,s)){l.push(c);break}u&&(q=w)}r&&((c=!f&&c)&&p--,i&&m.push(c))}if(p+=h,r&&h!==p){for(d=0;f=n[d++];)f(m,v,a,s);if(i){if(p>0)for(;h--;)m[h]||v[h]||(v[h]=J.call(l));v=g(v)}Z.apply(l,v),u&&!i&&v.length>0&&p+n.length>1&&t.uniqueSort(l)}return u&&(q=w,S=y),m};return r?i(a):a}function w(e,n,i){for(var r=0,o=n.length;o>r;r++)t(e,n[r],i);return i}function D(e,t,n,i){var r,o,a,s,l,u=f(e);if(!i&&1===u.length){if(o=u[0]=u[0].slice(0),o.length>2&&"ID"===(a=o[0]).type&&_.getById&&9===t.nodeType&&$&&C.relative[o[1].type]){if(t=(C.find.ID(a.matches[0].replace(De,xe),t)||[])[0],!t)return n;e=e.slice(o.shift().value.length)}for(r=he.needsContext.test(e)?0:o.length;r--&&(a=o[r],!C.relative[s=a.type]);)if((l=C.find[s])&&(i=l(a.matches[0].replace(De,xe),be.test(o[0].type)&&c(t.parentNode)||t))){if(o.splice(r,1),e=i.length&&p(o),!e)return Z.apply(n,i),n;break}}return A(e,u)(i,t,!$,n,be.test(e)&&c(t.parentNode)||t),n}var x,_,C,T,k,A,S,N,E,L,M,F,$,I,P,H,R,j="sizzle"+-new Date,O=e.document,q=0,B=0,W=n(),z=n(),X=n(),Y=function(e,t){return e===t&&(E=!0),0},U="undefined",G=1<<31,V={}.hasOwnProperty,K=[],J=K.pop,Q=K.push,Z=K.push,ee=K.slice,te=K.indexOf||function(e){for(var t=0,n=this.length;n>t;t++)if(this[t]===e)return t;return-1},ne="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",ie="[\\x20\\t\\r\\n\\f]",re="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",oe=re.replace("w","w#"),ae="\\["+ie+"*("+re+")"+ie+"*(?:([*^$|!~]?=)"+ie+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+oe+")|)|)"+ie+"*\\]",se=":("+re+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+ae.replace(3,8)+")*)|.*)\\)|)",le=new RegExp("^"+ie+"+|((?:^|[^\\\\])(?:\\\\.)*)"+ie+"+$","g"),ue=new RegExp("^"+ie+"*,"+ie+"*"),ce=new RegExp("^"+ie+"*([>+~]|"+ie+")"+ie+"*"),de=new RegExp("="+ie+"*([^\\]'\"]*?)"+ie+"*\\]","g"),fe=new RegExp(se),pe=new RegExp("^"+oe+"$"),he={ID:new RegExp("^#("+re+")"),CLASS:new RegExp("^\\.("+re+")"),TAG:new RegExp("^("+re.replace("w","w*")+")"),ATTR:new RegExp("^"+ae),PSEUDO:new RegExp("^"+se),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ie+"*(even|odd|(([+-]|)(\\d*)n|)"+ie+"*(?:([+-]|)"+ie+"*(\\d+)|))"+ie+"*\\)|)","i"),bool:new RegExp("^(?:"+ne+")$","i"),needsContext:new RegExp("^"+ie+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ie+"*((?:-\\d)?\\d*)"+ie+"*\\)|)(?=[^-]|$)","i")},me=/^(?:input|select|textarea|button)$/i,ge=/^h\d$/i,ve=/^[^{]+\{\s*\[native \w/,ye=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,be=/[+~]/,we=/'|\\/g,De=new RegExp("\\\\([\\da-f]{1,6}"+ie+"?|("+ie+")|.)","ig"),xe=function(e,t,n){var i="0x"+t-65536;return i!==i||n?t:0>i?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,1023&i|56320)};try{Z.apply(K=ee.call(O.childNodes),O.childNodes),K[O.childNodes.length].nodeType}catch(_e){Z={apply:K.length?function(e,t){Q.apply(e,ee.call(t))}:function(e,t){for(var n=e.length,i=0;e[n++]=t[i++];);e.length=n-1}}}_=t.support={},k=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},L=t.setDocument=function(e){var t,n=e?e.ownerDocument||e:O,i=n.defaultView;return n!==M&&9===n.nodeType&&n.documentElement?(M=n,F=n.documentElement,$=!k(n),i&&i!==i.top&&(i.addEventListener?i.addEventListener("unload",function(){L()},!1):i.attachEvent&&i.attachEvent("onunload",function(){L()})),_.attributes=r(function(e){return e.className="i",!e.getAttribute("className")}),_.getElementsByTagName=r(function(e){return e.appendChild(n.createComment("")),!e.getElementsByTagName("*").length}),_.getElementsByClassName=ve.test(n.getElementsByClassName)&&r(function(e){return e.innerHTML="<div class='a'></div><div class='a i'></div>",e.firstChild.className="i",2===e.getElementsByClassName("i").length}),_.getById=r(function(e){return F.appendChild(e).id=j,!n.getElementsByName||!n.getElementsByName(j).length}),_.getById?(C.find.ID=function(e,t){if(typeof t.getElementById!==U&&$){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},C.filter.ID=function(e){var t=e.replace(De,xe);return function(e){return e.getAttribute("id")===t}}):(delete C.find.ID,C.filter.ID=function(e){var t=e.replace(De,xe);return function(e){var n=typeof e.getAttributeNode!==U&&e.getAttributeNode("id");return n&&n.value===t}}),C.find.TAG=_.getElementsByTagName?function(e,t){return typeof t.getElementsByTagName!==U?t.getElementsByTagName(e):void 0}:function(e,t){var n,i=[],r=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[r++];)1===n.nodeType&&i.push(n);return i}return o},C.find.CLASS=_.getElementsByClassName&&function(e,t){return typeof t.getElementsByClassName!==U&&$?t.getElementsByClassName(e):void 0},P=[],I=[],(_.qsa=ve.test(n.querySelectorAll))&&(r(function(e){e.innerHTML="<select t=''><option selected=''></option></select>",e.querySelectorAll("[t^='']").length&&I.push("[*^$]="+ie+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||I.push("\\["+ie+"*(?:value|"+ne+")"),e.querySelectorAll(":checked").length||I.push(":checked")}),r(function(e){var t=n.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&I.push("name"+ie+"*[*^$|!~]?="),e.querySelectorAll(":enabled").length||I.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),I.push(",.*:")})),(_.matchesSelector=ve.test(H=F.webkitMatchesSelector||F.mozMatchesSelector||F.oMatchesSelector||F.msMatchesSelector))&&r(function(e){_.disconnectedMatch=H.call(e,"div"),H.call(e,"[s!='']:x"),P.push("!=",se)}),I=I.length&&new RegExp(I.join("|")),P=P.length&&new RegExp(P.join("|")),t=ve.test(F.compareDocumentPosition),R=t||ve.test(F.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 E=!0,0;var i=!e.compareDocumentPosition-!t.compareDocumentPosition;return i?i:(i=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&i||!_.sortDetached&&t.compareDocumentPosition(e)===i?e===n||e.ownerDocument===O&&R(O,e)?-1:t===n||t.ownerDocument===O&&R(O,t)?1:N?te.call(N,e)-te.call(N,t):0:4&i?-1:1)}:function(e,t){if(e===t)return E=!0,0;var i,r=0,o=e.parentNode,s=t.parentNode,l=[e],u=[t];if(!o||!s)return e===n?-1:t===n?1:o?-1:s?1:N?te.call(N,e)-te.call(N,t):0;if(o===s)return a(e,t);for(i=e;i=i.parentNode;)l.unshift(i);for(i=t;i=i.parentNode;)u.unshift(i);for(;l[r]===u[r];)r++;return r?a(l[r],u[r]):l[r]===O?-1:u[r]===O?1:0},n):M},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if((e.ownerDocument||e)!==M&&L(e),n=n.replace(de,"='$1']"),_.matchesSelector&&$&&(!P||!P.test(n))&&(!I||!I.test(n)))try{var i=H.call(e,n);if(i||_.disconnectedMatch||e.document&&11!==e.document.nodeType)return i}catch(r){}return t(n,M,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==M&&L(e),R(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==M&&L(e);var n=C.attrHandle[t.toLowerCase()],i=n&&V.call(C.attrHandle,t.toLowerCase())?n(e,t,!$):void 0;return void 0!==i?i:_.attributes||!$?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,r=0;if(E=!_.detectDuplicates,N=!_.sortStable&&e.slice(0),e.sort(Y),E){for(;t=e[r++];)t===e[r]&&(i=n.push(r));for(;i--;)e.splice(n[i],1)}return N=null,e},T=t.getText=function(e){var t,n="",i=0,r=e.nodeType;if(r){if(1===r||9===r||11===r){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=T(e)}else if(3===r||4===r)return e.nodeValue}else for(;t=e[i++];)n+=T(t);return n},C=t.selectors={cacheLength:50,createPseudo:i,match:he,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(De,xe),e[3]=(e[4]||e[5]||"").replace(De,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[5]&&e[2];return he.CHILD.test(e[0])?null:(e[3]&&void 0!==e[4]?e[2]=e[4]:n&&fe.test(n)&&(t=f(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(De,xe).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=W[e+" "];return t||(t=new RegExp("(^|"+ie+")"+e+"("+ie+"|$)"))&&W(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!==U&&e.getAttribute("class")||"")})},ATTR:function(e,n,i){return function(r){var o=t.attr(r,e);return null==o?"!="===n:n?(o+="","="===n?o===i:"!="===n?o!==i:"^="===n?i&&0===o.indexOf(i):"*="===n?i&&o.indexOf(i)>-1:"$="===n?i&&o.slice(-i.length)===i:"~="===n?(" "+o+" ").indexOf(i)>-1:"|="===n?o===i||o.slice(0,i.length+1)===i+"-":!1):!0}},CHILD:function(e,t,n,i,r){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===i&&0===r?function(e){return!!e.parentNode}:function(t,n,l){var u,c,d,f,p,h,m=o!==a?"nextSibling":"previousSibling",g=t.parentNode,v=s&&t.nodeName.toLowerCase(),y=!l&&!s;if(g){if(o){for(;m;){for(d=t;d=d[m];)if(s?d.nodeName.toLowerCase()===v:1===d.nodeType)return!1;h=m="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?g.firstChild:g.lastChild],a&&y){for(c=g[j]||(g[j]={}),u=c[e]||[],p=u[0]===q&&u[1],f=u[0]===q&&u[2],d=p&&g.childNodes[p];d=++p&&d&&d[m]||(f=p=0)||h.pop();)if(1===d.nodeType&&++f&&d===t){c[e]=[q,p,f];break}}else if(y&&(u=(t[j]||(t[j]={}))[e])&&u[0]===q)f=u[1];else for(;(d=++p&&d&&d[m]||(f=p=0)||h.pop())&&((s?d.nodeName.toLowerCase()!==v:1!==d.nodeType)||!++f||(y&&((d[j]||(d[j]={}))[e]=[q,f]),d!==t)););return f-=r,f===i||f%i===0&&f/i>=0}}},PSEUDO:function(e,n){var r,o=C.pseudos[e]||C.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return o[j]?o(n):o.length>1?(r=[e,e,"",n],C.setFilters.hasOwnProperty(e.toLowerCase())?i(function(e,t){for(var i,r=o(e,n),a=r.length;a--;)i=te.call(e,r[a]),e[i]=!(t[i]=r[a])}):function(e){return o(e,0,r)}):o}},pseudos:{not:i(function(e){var t=[],n=[],r=A(e.replace(le,"$1"));return r[j]?i(function(e,t,n,i){for(var o,a=r(e,null,i,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),!n.pop()}}),has:i(function(e){return function(n){return t(e,n).length>0}}),contains:i(function(e){return function(t){return(t.textContent||t.innerText||T(t)).indexOf(e)>-1}}),lang:i(function(e){return pe.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(De,xe).toLowerCase(),function(t){var n;do if(n=$?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),
  n===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===F},focus:function(e){return e===M.activeElement&&(!M.hasFocus||M.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},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 ge.test(e.nodeName)},input:function(e){return me.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:u(function(){return[0]}),last:u(function(e,t){return[t-1]}),eq:u(function(e,t,n){return[0>n?n+t:n]}),even:u(function(e,t){for(var n=0;t>n;n+=2)e.push(n);return e}),odd:u(function(e,t){for(var n=1;t>n;n+=2)e.push(n);return e}),lt:u(function(e,t,n){for(var i=0>n?n+t:n;--i>=0;)e.push(i);return e}),gt:u(function(e,t,n){for(var i=0>n?n+t:n;++i<t;)e.push(i);return e})}},C.pseudos.nth=C.pseudos.eq;for(x in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})C.pseudos[x]=s(x);for(x in{submit:!0,reset:!0})C.pseudos[x]=l(x);return d.prototype=C.filters=C.pseudos,C.setFilters=new d,A=t.compile=function(e,t){var n,i=[],r=[],o=X[e+" "];if(!o){for(t||(t=f(e)),n=t.length;n--;)o=y(t[n]),o[j]?i.push(o):r.push(o);o=X(e,b(r,i))}return o},_.sortStable=j.split("").sort(Y).join("")===j,_.detectDuplicates=!!E,L(),_.sortDetached=r(function(e){return 1&e.compareDocumentPosition(M.createElement("div"))}),r(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||o("type|href|height|width",function(e,t,n){return n?void 0:e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),_.attributes&&r(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||o("value",function(e,t,n){return n||"input"!==e.nodeName.toLowerCase()?void 0:e.defaultValue}),r(function(e){return null==e.getAttribute("disabled")})||o(ne,function(e,t,n){var i;return n?void 0:e[t]===!0?t.toLowerCase():(i=e.getAttributeNode(t))&&i.specified?i.value:null}),t}(e);oe.find=ce,oe.expr=ce.selectors,oe.expr[":"]=oe.expr.pseudos,oe.unique=ce.uniqueSort,oe.text=ce.getText,oe.isXMLDoc=ce.isXML,oe.contains=ce.contains;var de=oe.expr.match.needsContext,fe=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,pe=/^.[^:#\[\.,]*$/;oe.filter=function(e,t,n){var i=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===i.nodeType?oe.find.matchesSelector(i,e)?[i]:[]:oe.find.matches(e,oe.grep(t,function(e){return 1===e.nodeType}))},oe.fn.extend({find:function(e){var t,n=[],i=this,r=i.length;if("string"!=typeof e)return this.pushStack(oe(e).filter(function(){for(t=0;r>t;t++)if(oe.contains(i[t],this))return!0}));for(t=0;r>t;t++)oe.find(e,i[t],n);return n=this.pushStack(r>1?oe.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&&de.test(e)?oe(e):e||[],!1).length}});var he,me=e.document,ge=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,ve=oe.fn.init=function(e,t){var n,i;if(!e)return this;if("string"==typeof e){if(n="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:ge.exec(e),!n||!n[1]&&t)return!t||t.jquery?(t||he).find(e):this.constructor(t).find(e);if(n[1]){if(t=t instanceof oe?t[0]:t,oe.merge(this,oe.parseHTML(n[1],t&&t.nodeType?t.ownerDocument||t:me,!0)),fe.test(n[1])&&oe.isPlainObject(t))for(n in t)oe.isFunction(this[n])?this[n](t[n]):this.attr(n,t[n]);return this}if(i=me.getElementById(n[2]),i&&i.parentNode){if(i.id!==n[2])return he.find(e);this.length=1,this[0]=i}return this.context=me,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):oe.isFunction(e)?"undefined"!=typeof he.ready?he.ready(e):e(oe):(void 0!==e.selector&&(this.selector=e.selector,this.context=e.context),oe.makeArray(e,this))};ve.prototype=oe.fn,he=oe(me);var ye=/^(?:parents|prev(?:Until|All))/,be={children:!0,contents:!0,next:!0,prev:!0};oe.extend({dir:function(e,t,n){for(var i=[],r=e[t];r&&9!==r.nodeType&&(void 0===n||1!==r.nodeType||!oe(r).is(n));)1===r.nodeType&&i.push(r),r=r[t];return i},sibling:function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}}),oe.fn.extend({has:function(e){var t,n=oe(e,this),i=n.length;return this.filter(function(){for(t=0;i>t;t++)if(oe.contains(this,n[t]))return!0})},closest:function(e,t){for(var n,i=0,r=this.length,o=[],a=de.test(e)||"string"!=typeof e?oe(e,t||this.context):0;r>i;i++)for(n=this[i];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?a.index(n)>-1:1===n.nodeType&&oe.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?oe.unique(o):o)},index:function(e){return e?"string"==typeof e?oe.inArray(this[0],oe(e)):oe.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(oe.unique(oe.merge(this.get(),oe(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),oe.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return oe.dir(e,"parentNode")},parentsUntil:function(e,t,n){return oe.dir(e,"parentNode",n)},next:function(e){return r(e,"nextSibling")},prev:function(e){return r(e,"previousSibling")},nextAll:function(e){return oe.dir(e,"nextSibling")},prevAll:function(e){return oe.dir(e,"previousSibling")},nextUntil:function(e,t,n){return oe.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return oe.dir(e,"previousSibling",n)},siblings:function(e){return oe.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return oe.sibling(e.firstChild)},contents:function(e){return oe.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:oe.merge([],e.childNodes)}},function(e,t){oe.fn[e]=function(n,i){var r=oe.map(this,t,n);return"Until"!==e.slice(-5)&&(i=n),i&&"string"==typeof i&&(r=oe.filter(i,r)),this.length>1&&(be[e]||(r=oe.unique(r)),ye.test(e)&&(r=r.reverse())),this.pushStack(r)}});var we=/\S+/g,De={};oe.Callbacks=function(e){e="string"==typeof e?De[e]||o(e):oe.extend({},e);var t,n,i,r,a,s,l=[],u=!e.once&&[],c=function(o){for(n=e.memory&&o,i=!0,a=s||0,s=0,r=l.length,t=!0;l&&r>a;a++)if(l[a].apply(o[0],o[1])===!1&&e.stopOnFalse){n=!1;break}t=!1,l&&(u?u.length&&c(u.shift()):n?l=[]:d.disable())},d={add:function(){if(l){var i=l.length;!function o(t){oe.each(t,function(t,n){var i=oe.type(n);"function"===i?e.unique&&d.has(n)||l.push(n):n&&n.length&&"string"!==i&&o(n)})}(arguments),t?r=l.length:n&&(s=i,c(n))}return this},remove:function(){return l&&oe.each(arguments,function(e,n){for(var i;(i=oe.inArray(n,l,i))>-1;)l.splice(i,1),t&&(r>=i&&r--,a>=i&&a--)}),this},has:function(e){return e?oe.inArray(e,l)>-1:!(!l||!l.length)},empty:function(){return l=[],r=0,this},disable:function(){return l=u=n=void 0,this},disabled:function(){return!l},lock:function(){return u=void 0,n||d.disable(),this},locked:function(){return!u},fireWith:function(e,n){return!l||i&&!u||(n=n||[],n=[e,n.slice?n.slice():n],t?u.push(n):c(n)),this},fire:function(){return d.fireWith(this,arguments),this},fired:function(){return!!i}};return d},oe.extend({Deferred:function(e){var t=[["resolve","done",oe.Callbacks("once memory"),"resolved"],["reject","fail",oe.Callbacks("once memory"),"rejected"],["notify","progress",oe.Callbacks("memory")]],n="pending",i={state:function(){return n},always:function(){return r.done(arguments).fail(arguments),this},then:function(){var e=arguments;return oe.Deferred(function(n){oe.each(t,function(t,o){var a=oe.isFunction(e[t])&&e[t];r[o[1]](function(){var e=a&&a.apply(this,arguments);e&&oe.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[o[0]+"With"](this===i?n.promise():this,a?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?oe.extend(e,i):i}},r={};return i.pipe=i.then,oe.each(t,function(e,o){var a=o[2],s=o[3];i[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),r[o[0]]=function(){return r[o[0]+"With"](this===r?i:this,arguments),this},r[o[0]+"With"]=a.fireWith}),i.promise(r),e&&e.call(r,r),r},when:function(e){var t,n,i,r=0,o=V.call(arguments),a=o.length,s=1!==a||e&&oe.isFunction(e.promise)?a:0,l=1===s?e:oe.Deferred(),u=function(e,n,i){return function(r){n[e]=this,i[e]=arguments.length>1?V.call(arguments):r,i===t?l.notifyWith(n,i):--s||l.resolveWith(n,i)}};if(a>1)for(t=new Array(a),n=new Array(a),i=new Array(a);a>r;r++)o[r]&&oe.isFunction(o[r].promise)?o[r].promise().done(u(r,i,o)).fail(l.reject).progress(u(r,n,t)):--s;return s||l.resolveWith(i,o),l.promise()}});var xe;oe.fn.ready=function(e){return oe.ready.promise().done(e),this},oe.extend({isReady:!1,readyWait:1,holdReady:function(e){e?oe.readyWait++:oe.ready(!0)},ready:function(e){if(e===!0?!--oe.readyWait:!oe.isReady){if(!me.body)return setTimeout(oe.ready);oe.isReady=!0,e!==!0&&--oe.readyWait>0||(xe.resolveWith(me,[oe]),oe.fn.trigger&&oe(me).trigger("ready").off("ready"))}}}),oe.ready.promise=function(t){if(!xe)if(xe=oe.Deferred(),"complete"===me.readyState)setTimeout(oe.ready);else if(me.addEventListener)me.addEventListener("DOMContentLoaded",s,!1),e.addEventListener("load",s,!1);else{me.attachEvent("onreadystatechange",s),e.attachEvent("onload",s);var n=!1;try{n=null==e.frameElement&&me.documentElement}catch(i){}n&&n.doScroll&&!function r(){if(!oe.isReady){try{n.doScroll("left")}catch(e){return setTimeout(r,50)}a(),oe.ready()}}()}return xe.promise(t)};var _e,Ce="undefined";for(_e in oe(ie))break;ie.ownLast="0"!==_e,ie.inlineBlockNeedsLayout=!1,oe(function(){var e,t,n=me.getElementsByTagName("body")[0];n&&(e=me.createElement("div"),e.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",t=me.createElement("div"),n.appendChild(e).appendChild(t),typeof t.style.zoom!==Ce&&(t.style.cssText="border:0;margin:0;width:1px;padding:1px;display:inline;zoom:1",(ie.inlineBlockNeedsLayout=3===t.offsetWidth)&&(n.style.zoom=1)),n.removeChild(e),e=t=null)}),function(){var e=me.createElement("div");if(null==ie.deleteExpando){ie.deleteExpando=!0;try{delete e.test}catch(t){ie.deleteExpando=!1}}e=null}(),oe.acceptData=function(e){var t=oe.noData[(e.nodeName+" ").toLowerCase()],n=+e.nodeType||1;return 1!==n&&9!==n?!1:!t||t!==!0&&e.getAttribute("classid")===t};var Te=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,ke=/([A-Z])/g;oe.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(e){return e=e.nodeType?oe.cache[e[oe.expando]]:e[oe.expando],!!e&&!u(e)},data:function(e,t,n){return c(e,t,n)},removeData:function(e,t){return d(e,t)},_data:function(e,t,n){return c(e,t,n,!0)},_removeData:function(e,t){return d(e,t,!0)}}),oe.fn.extend({data:function(e,t){var n,i,r,o=this[0],a=o&&o.attributes;if(void 0===e){if(this.length&&(r=oe.data(o),1===o.nodeType&&!oe._data(o,"parsedAttrs"))){for(n=a.length;n--;)i=a[n].name,0===i.indexOf("data-")&&(i=oe.camelCase(i.slice(5)),l(o,i,r[i]));oe._data(o,"parsedAttrs",!0)}return r}return"object"==typeof e?this.each(function(){oe.data(this,e)}):arguments.length>1?this.each(function(){oe.data(this,e,t)}):o?l(o,e,oe.data(o,e)):void 0},removeData:function(e){return this.each(function(){oe.removeData(this,e)})}}),oe.extend({queue:function(e,t,n){var i;return e?(t=(t||"fx")+"queue",i=oe._data(e,t),n&&(!i||oe.isArray(n)?i=oe._data(e,t,oe.makeArray(n)):i.push(n)),i||[]):void 0},dequeue:function(e,t){t=t||"fx";var n=oe.queue(e,t),i=n.length,r=n.shift(),o=oe._queueHooks(e,t),a=function(){oe.dequeue(e,t)};"inprogress"===r&&(r=n.shift(),i--),r&&("fx"===t&&n.unshift("inprogress"),delete o.stop,r.call(e,a,o)),!i&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return oe._data(e,n)||oe._data(e,n,{empty:oe.Callbacks("once memory").add(function(){oe._removeData(e,t+"queue"),oe._removeData(e,n)})})}}),oe.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?oe.queue(this[0],e):void 0===t?this:this.each(function(){var n=oe.queue(this,e,t);oe._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&oe.dequeue(this,e)})},dequeue:function(e){return this.each(function(){oe.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,i=1,r=oe.Deferred(),o=this,a=this.length,s=function(){--i||r.resolveWith(o,[o])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";a--;)n=oe._data(o[a],e+"queueHooks"),n&&n.empty&&(i++,n.empty.add(s));return s(),r.promise(t)}});var Ae=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,Se=["Top","Right","Bottom","Left"],Ne=function(e,t){return e=t||e,"none"===oe.css(e,"display")||!oe.contains(e.ownerDocument,e)},Ee=oe.access=function(e,t,n,i,r,o,a){var s=0,l=e.length,u=null==n;if("object"===oe.type(n)){r=!0;for(s in n)oe.access(e,t,s,n[s],!0,o,a)}else if(void 0!==i&&(r=!0,oe.isFunction(i)||(a=!0),u&&(a?(t.call(e,i),t=null):(u=t,t=function(e,t,n){return u.call(oe(e),n)})),t))for(;l>s;s++)t(e[s],n,a?i:i.call(e[s],s,t(e[s],n)));return r?e:u?t.call(e):l?t(e[0],n):o},Le=/^(?:checkbox|radio)$/i;!function(){var e=me.createDocumentFragment(),t=me.createElement("div"),n=me.createElement("input");if(t.setAttribute("className","t"),t.innerHTML="  <link/><table></table><a href='/a'>a</a>",ie.leadingWhitespace=3===t.firstChild.nodeType,ie.tbody=!t.getElementsByTagName("tbody").length,ie.htmlSerialize=!!t.getElementsByTagName("link").length,ie.html5Clone="<:nav></:nav>"!==me.createElement("nav").cloneNode(!0).outerHTML,n.type="checkbox",n.checked=!0,e.appendChild(n),ie.appendChecked=n.checked,t.innerHTML="<textarea>x</textarea>",ie.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue,e.appendChild(t),t.innerHTML="<input type='radio' checked='checked' name='t'/>",ie.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,ie.noCloneEvent=!0,t.attachEvent&&(t.attachEvent("onclick",function(){ie.noCloneEvent=!1}),t.cloneNode(!0).click()),null==ie.deleteExpando){ie.deleteExpando=!0;try{delete t.test}catch(i){ie.deleteExpando=!1}}e=t=n=null}(),function(){var t,n,i=me.createElement("div");for(t in{submit:!0,change:!0,focusin:!0})n="on"+t,(ie[t+"Bubbles"]=n in e)||(i.setAttribute(n,"t"),ie[t+"Bubbles"]=i.attributes[n].expando===!1);i=null}();var Me=/^(?:input|select|textarea)$/i,Fe=/^key/,$e=/^(?:mouse|contextmenu)|click/,Ie=/^(?:focusinfocus|focusoutblur)$/,Pe=/^([^.]*)(?:\.(.+)|)$/;oe.event={global:{},add:function(e,t,n,i,r){var o,a,s,l,u,c,d,f,p,h,m,g=oe._data(e);if(g){for(n.handler&&(l=n,n=l.handler,r=l.selector),n.guid||(n.guid=oe.guid++),(a=g.events)||(a=g.events={}),(c=g.handle)||(c=g.handle=function(e){return typeof oe===Ce||e&&oe.event.triggered===e.type?void 0:oe.event.dispatch.apply(c.elem,arguments)},c.elem=e),t=(t||"").match(we)||[""],s=t.length;s--;)o=Pe.exec(t[s])||[],p=m=o[1],h=(o[2]||"").split(".").sort(),p&&(u=oe.event.special[p]||{},p=(r?u.delegateType:u.bindType)||p,u=oe.event.special[p]||{},d=oe.extend({type:p,origType:m,data:i,handler:n,guid:n.guid,selector:r,needsContext:r&&oe.expr.match.needsContext.test(r),namespace:h.join(".")},l),(f=a[p])||(f=a[p]=[],f.delegateCount=0,u.setup&&u.setup.call(e,i,h,c)!==!1||(e.addEventListener?e.addEventListener(p,c,!1):e.attachEvent&&e.attachEvent("on"+p,c))),u.add&&(u.add.call(e,d),d.handler.guid||(d.handler.guid=n.guid)),r?f.splice(f.delegateCount++,0,d):f.push(d),oe.event.global[p]=!0);e=null}},remove:function(e,t,n,i,r){var o,a,s,l,u,c,d,f,p,h,m,g=oe.hasData(e)&&oe._data(e);if(g&&(c=g.events)){for(t=(t||"").match(we)||[""],u=t.length;u--;)if(s=Pe.exec(t[u])||[],p=m=s[1],h=(s[2]||"").split(".").sort(),p){for(d=oe.event.special[p]||{},p=(i?d.delegateType:d.bindType)||p,f=c[p]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),l=o=f.length;o--;)a=f[o],!r&&m!==a.origType||n&&n.guid!==a.guid||s&&!s.test(a.namespace)||i&&i!==a.selector&&("**"!==i||!a.selector)||(f.splice(o,1),a.selector&&f.delegateCount--,d.remove&&d.remove.call(e,a));l&&!f.length&&(d.teardown&&d.teardown.call(e,h,g.handle)!==!1||oe.removeEvent(e,p,g.handle),delete c[p])}else for(p in c)oe.event.remove(e,p+t[u],n,i,!0);oe.isEmptyObject(c)&&(delete g.handle,oe._removeData(e,"events"))}},trigger:function(t,n,i,r){var o,a,s,l,u,c,d,f=[i||me],p=te.call(t,"type")?t.type:t,h=te.call(t,"namespace")?t.namespace.split("."):[];if(s=c=i=i||me,3!==i.nodeType&&8!==i.nodeType&&!Ie.test(p+oe.event.triggered)&&(p.indexOf(".")>=0&&(h=p.split("."),p=h.shift(),h.sort()),a=p.indexOf(":")<0&&"on"+p,t=t[oe.expando]?t:new oe.Event(p,"object"==typeof t&&t),t.isTrigger=r?2:3,t.namespace=h.join("."),t.namespace_re=t.namespace?new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=i),n=null==n?[t]:oe.makeArray(n,[t]),u=oe.event.special[p]||{},r||!u.trigger||u.trigger.apply(i,n)!==!1)){if(!r&&!u.noBubble&&!oe.isWindow(i)){for(l=u.delegateType||p,Ie.test(l+p)||(s=s.parentNode);s;s=s.parentNode)f.push(s),c=s;c===(i.ownerDocument||me)&&f.push(c.defaultView||c.parentWindow||e)}for(d=0;(s=f[d++])&&!t.isPropagationStopped();)t.type=d>1?l:u.bindType||p,o=(oe._data(s,"events")||{})[t.type]&&oe._data(s,"handle"),o&&o.apply(s,n),o=a&&s[a],o&&o.apply&&oe.acceptData(s)&&(t.result=o.apply(s,n),t.result===!1&&t.preventDefault());if(t.type=p,!r&&!t.isDefaultPrevented()&&(!u._default||u._default.apply(f.pop(),n)===!1)&&oe.acceptData(i)&&a&&i[p]&&!oe.isWindow(i)){c=i[a],c&&(i[a]=null),oe.event.triggered=p;try{i[p]()}catch(m){}oe.event.triggered=void 0,c&&(i[a]=c)}return t.result}},dispatch:function(e){e=oe.event.fix(e);var t,n,i,r,o,a=[],s=V.call(arguments),l=(oe._data(this,"events")||{})[e.type]||[],u=oe.event.special[e.type]||{};if(s[0]=e,e.delegateTarget=this,!u.preDispatch||u.preDispatch.call(this,e)!==!1){for(a=oe.event.handlers.call(this,e,l),t=0;(r=a[t++])&&!e.isPropagationStopped();)for(e.currentTarget=r.elem,o=0;(i=r.handlers[o++])&&!e.isImmediatePropagationStopped();)e.namespace_re&&!e.namespace_re.test(i.namespace)||(e.handleObj=i,e.data=i.data,n=((oe.event.special[i.origType]||{}).handle||i.handler).apply(r.elem,s),void 0!==n&&(e.result=n)===!1&&(e.preventDefault(),e.stopPropagation()));return u.postDispatch&&u.postDispatch.call(this,e),e.result}},handlers:function(e,t){var n,i,r,o,a=[],s=t.delegateCount,l=e.target;if(s&&l.nodeType&&(!e.button||"click"!==e.type))for(;l!=this;l=l.parentNode||this)if(1===l.nodeType&&(l.disabled!==!0||"click"!==e.type)){for(r=[],o=0;s>o;o++)i=t[o],n=i.selector+" ",void 0===r[n]&&(r[n]=i.needsContext?oe(n,this).index(l)>=0:oe.find(n,this,null,[l]).length),r[n]&&r.push(i);r.length&&a.push({elem:l,handlers:r})}return s<t.length&&a.push({elem:this,handlers:t.slice(s)}),a},fix:function(e){if(e[oe.expando])return e;var t,n,i,r=e.type,o=e,a=this.fixHooks[r];for(a||(this.fixHooks[r]=a=$e.test(r)?this.mouseHooks:Fe.test(r)?this.keyHooks:{}),i=a.props?this.props.concat(a.props):this.props,e=new oe.Event(o),t=i.length;t--;)n=i[t],e[n]=o[n];return e.target||(e.target=o.srcElement||me),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,a.filter?a.filter(e,o):e},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,t){var n,i,r,o=t.button,a=t.fromElement;return null==e.pageX&&null!=t.clientX&&(i=e.target.ownerDocument||me,r=i.documentElement,n=i.body,e.pageX=t.clientX+(r&&r.scrollLeft||n&&n.scrollLeft||0)-(r&&r.clientLeft||n&&n.clientLeft||0),e.pageY=t.clientY+(r&&r.scrollTop||n&&n.scrollTop||0)-(r&&r.clientTop||n&&n.clientTop||0)),!e.relatedTarget&&a&&(e.relatedTarget=a===e.target?t.toElement:a),e.which||void 0===o||(e.which=1&o?1:2&o?3:4&o?2:0),e}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==h()&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){return this===h()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return oe.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):void 0},_default:function(e){return oe.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,i){var r=oe.extend(new oe.Event,n,{type:e,isSimulated:!0,originalEvent:{}});i?oe.event.trigger(r,null,t):oe.event.dispatch.call(t,r),r.isDefaultPrevented()&&n.preventDefault()}},oe.removeEvent=me.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var i="on"+t;e.detachEvent&&(typeof e[i]===Ce&&(e[i]=null),e.detachEvent(i,n))},oe.Event=function(e,t){return this instanceof oe.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&(e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault())?f:p):this.type=e,t&&oe.extend(this,t),this.timeStamp=e&&e.timeStamp||oe.now(),void(this[oe.expando]=!0)):new oe.Event(e,t)},oe.Event.prototype={isDefaultPrevented:p,isPropagationStopped:p,isImmediatePropagationStopped:p,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=f,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=f,e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=f,this.stopPropagation()}},oe.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){oe.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,i=this,r=e.relatedTarget,o=e.handleObj;return r&&(r===i||oe.contains(i,r))||(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),ie.submitBubbles||(oe.event.special.submit={setup:function(){return oe.nodeName(this,"form")?!1:void oe.event.add(this,"click._submit keypress._submit",function(e){var t=e.target,n=oe.nodeName(t,"input")||oe.nodeName(t,"button")?t.form:void 0;n&&!oe._data(n,"submitBubbles")&&(oe.event.add(n,"submit._submit",function(e){e._submit_bubble=!0}),oe._data(n,"submitBubbles",!0))})},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&oe.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){return oe.nodeName(this,"form")?!1:void oe.event.remove(this,"._submit")}}),ie.changeBubbles||(oe.event.special.change={setup:function(){return Me.test(this.nodeName)?("checkbox"!==this.type&&"radio"!==this.type||(oe.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._just_changed=!0)}),oe.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),oe.event.simulate("change",this,e,!0)})),!1):void oe.event.add(this,"beforeactivate._change",function(e){var t=e.target;Me.test(t.nodeName)&&!oe._data(t,"changeBubbles")&&(oe.event.add(t,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||oe.event.simulate("change",this.parentNode,e,!0)}),oe._data(t,"changeBubbles",!0))})},handle:function(e){var t=e.target;return this!==t||e.isSimulated||e.isTrigger||"radio"!==t.type&&"checkbox"!==t.type?e.handleObj.handler.apply(this,arguments):void 0},teardown:function(){return oe.event.remove(this,"._change"),!Me.test(this.nodeName)}}),ie.focusinBubbles||oe.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){oe.event.simulate(t,e.target,oe.event.fix(e),!0)};oe.event.special[t]={setup:function(){var i=this.ownerDocument||this,r=oe._data(i,t);r||i.addEventListener(e,n,!0),oe._data(i,t,(r||0)+1)},teardown:function(){var i=this.ownerDocument||this,r=oe._data(i,t)-1;r?oe._data(i,t,r):(i.removeEventListener(e,n,!0),oe._removeData(i,t))}}}),oe.fn.extend({on:function(e,t,n,i,r){var o,a;if("object"==typeof e){"string"!=typeof t&&(n=n||t,t=void 0);for(o in e)this.on(o,t,n,e[o],r);return this}if(null==n&&null==i?(i=t,n=t=void 0):null==i&&("string"==typeof t?(i=n,n=void 0):(i=n,n=t,t=void 0)),i===!1)i=p;else if(!i)return this;return 1===r&&(a=i,i=function(e){return oe().off(e),a.apply(this,arguments)},i.guid=a.guid||(a.guid=oe.guid++)),this.each(function(){oe.event.add(this,e,i,n,t)})},one:function(e,t,n,i){return this.on(e,t,n,i,1)},off:function(e,t,n){var i,r;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,oe(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(r in e)this.off(r,t,e[r]);return this}return t!==!1&&"function"!=typeof t||(n=t,t=void 0),n===!1&&(n=p),this.each(function(){oe.event.remove(this,e,n,t)})},trigger:function(e,t){return this.each(function(){oe.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];return n?oe.event.trigger(e,t,n,!0):void 0}});var He="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",Re=/ jQuery\d+="(?:null|\d+)"/g,je=new RegExp("<(?:"+He+")[\\s/>]","i"),Oe=/^\s+/,qe=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,Be=/<([\w:]+)/,We=/<tbody/i,ze=/<|&#?\w+;/,Xe=/<(?:script|style|link)/i,Ye=/checked\s*(?:[^=]|=\s*.checked.)/i,Ue=/^$|\/(?:java|ecma)script/i,Ge=/^true\/(.*)/,Ve=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,Ke={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:ie.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},Je=m(me),Qe=Je.appendChild(me.createElement("div"));Ke.optgroup=Ke.option,Ke.tbody=Ke.tfoot=Ke.colgroup=Ke.caption=Ke.thead,Ke.th=Ke.td,oe.extend({clone:function(e,t,n){var i,r,o,a,s,l=oe.contains(e.ownerDocument,e);if(ie.html5Clone||oe.isXMLDoc(e)||!je.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(Qe.innerHTML=e.outerHTML,Qe.removeChild(o=Qe.firstChild)),!(ie.noCloneEvent&&ie.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||oe.isXMLDoc(e)))for(i=g(o),s=g(e),a=0;null!=(r=s[a]);++a)i[a]&&_(r,i[a]);if(t)if(n)for(s=s||g(e),i=i||g(o),a=0;null!=(r=s[a]);a++)x(r,i[a]);else x(e,o);return i=g(o,"script"),i.length>0&&D(i,!l&&g(e,"script")),i=s=r=null,o},buildFragment:function(e,t,n,i){for(var r,o,a,s,l,u,c,d=e.length,f=m(t),p=[],h=0;d>h;h++)if(o=e[h],o||0===o)if("object"===oe.type(o))oe.merge(p,o.nodeType?[o]:o);else if(ze.test(o)){for(s=s||f.appendChild(t.createElement("div")),l=(Be.exec(o)||["",""])[1].toLowerCase(),c=Ke[l]||Ke._default,s.innerHTML=c[1]+o.replace(qe,"<$1></$2>")+c[2],r=c[0];r--;)s=s.lastChild;if(!ie.leadingWhitespace&&Oe.test(o)&&p.push(t.createTextNode(Oe.exec(o)[0])),!ie.tbody)for(o="table"!==l||We.test(o)?"<table>"!==c[1]||We.test(o)?0:s:s.firstChild,r=o&&o.childNodes.length;r--;)oe.nodeName(u=o.childNodes[r],"tbody")&&!u.childNodes.length&&o.removeChild(u);for(oe.merge(p,s.childNodes),s.textContent="";s.firstChild;)s.removeChild(s.firstChild);s=f.lastChild}else p.push(t.createTextNode(o));for(s&&f.removeChild(s),ie.appendChecked||oe.grep(g(p,"input"),v),h=0;o=p[h++];)if((!i||-1===oe.inArray(o,i))&&(a=oe.contains(o.ownerDocument,o),s=g(f.appendChild(o),"script"),a&&D(s),n))for(r=0;o=s[r++];)Ue.test(o.type||"")&&n.push(o);return s=null,f},cleanData:function(e,t){for(var n,i,r,o,a=0,s=oe.expando,l=oe.cache,u=ie.deleteExpando,c=oe.event.special;null!=(n=e[a]);a++)if((t||oe.acceptData(n))&&(r=n[s],o=r&&l[r])){if(o.events)for(i in o.events)c[i]?oe.event.remove(n,i):oe.removeEvent(n,i,o.handle);l[r]&&(delete l[r],u?delete n[s]:typeof n.removeAttribute!==Ce?n.removeAttribute(s):n[s]=null,G.push(r))}}}),oe.fn.extend({text:function(e){return Ee(this,function(e){return void 0===e?oe.text(this):this.empty().append((this[0]&&this[0].ownerDocument||me).createTextNode(e))},null,e,arguments.length)},append:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=y(this,e);t.appendChild(e)}})},prepend:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=y(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){for(var n,i=e?oe.filter(e,this):this,r=0;null!=(n=i[r]);r++)t||1!==n.nodeType||oe.cleanData(g(n)),n.parentNode&&(t&&oe.contains(n.ownerDocument,n)&&D(g(n,"script")),n.parentNode.removeChild(n));return this},empty:function(){for(var e,t=0;null!=(e=this[t]);t++){for(1===e.nodeType&&oe.cleanData(g(e,!1));e.firstChild;)e.removeChild(e.firstChild);e.options&&oe.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return oe.clone(this,e,t)})},html:function(e){return Ee(this,function(e){var t=this[0]||{},n=0,i=this.length;if(void 0===e)return 1===t.nodeType?t.innerHTML.replace(Re,""):void 0;if("string"==typeof e&&!Xe.test(e)&&(ie.htmlSerialize||!je.test(e))&&(ie.leadingWhitespace||!Oe.test(e))&&!Ke[(Be.exec(e)||["",""])[1].toLowerCase()]){e=e.replace(qe,"<$1></$2>");try{for(;i>n;n++)t=this[n]||{},1===t.nodeType&&(oe.cleanData(g(t,!1)),t.innerHTML=e);t=0}catch(r){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=arguments[0];return this.domManip(arguments,function(t){e=this.parentNode,oe.cleanData(g(this)),e&&e.replaceChild(t,this)}),e&&(e.length||e.nodeType)?this:this.remove()},detach:function(e){return this.remove(e,!0)},domManip:function(e,t){e=K.apply([],e);var n,i,r,o,a,s,l=0,u=this.length,c=this,d=u-1,f=e[0],p=oe.isFunction(f);if(p||u>1&&"string"==typeof f&&!ie.checkClone&&Ye.test(f))return this.each(function(n){var i=c.eq(n);p&&(e[0]=f.call(this,n,i.html())),i.domManip(e,t)});if(u&&(s=oe.buildFragment(e,this[0].ownerDocument,!1,this),n=s.firstChild,1===s.childNodes.length&&(s=n),n)){for(o=oe.map(g(s,"script"),b),r=o.length;u>l;l++)i=s,l!==d&&(i=oe.clone(i,!0,!0),r&&oe.merge(o,g(i,"script"))),t.call(this[l],i,l);if(r)for(a=o[o.length-1].ownerDocument,oe.map(o,w),l=0;r>l;l++)i=o[l],Ue.test(i.type||"")&&!oe._data(i,"globalEval")&&oe.contains(a,i)&&(i.src?oe._evalUrl&&oe._evalUrl(i.src):oe.globalEval((i.text||i.textContent||i.innerHTML||"").replace(Ve,"")));s=n=null}return this}}),oe.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){oe.fn[e]=function(e){for(var n,i=0,r=[],o=oe(e),a=o.length-1;a>=i;i++)n=i===a?this:this.clone(!0),oe(o[i])[t](n),J.apply(r,n.get());return this.pushStack(r)}});var Ze,et={};!function(){var e,t,n=me.createElement("div"),i="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;padding:0;margin:0;border:0";n.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",e=n.getElementsByTagName("a")[0],e.style.cssText="float:left;opacity:.5",
  ie.opacity=/^0.5/.test(e.style.opacity),ie.cssFloat=!!e.style.cssFloat,n.style.backgroundClip="content-box",n.cloneNode(!0).style.backgroundClip="",ie.clearCloneStyle="content-box"===n.style.backgroundClip,e=n=null,ie.shrinkWrapBlocks=function(){var e,n,r,o;if(null==t){if(e=me.getElementsByTagName("body")[0],!e)return;o="border:0;width:0;height:0;position:absolute;top:0;left:-9999px",n=me.createElement("div"),r=me.createElement("div"),e.appendChild(n).appendChild(r),t=!1,typeof r.style.zoom!==Ce&&(r.style.cssText=i+";width:1px;padding:1px;zoom:1",r.innerHTML="<div></div>",r.firstChild.style.width="5px",t=3!==r.offsetWidth),e.removeChild(n),e=n=r=null}return t}}();var tt,nt,it=/^margin/,rt=new RegExp("^("+Ae+")(?!px)[a-z%]+$","i"),ot=/^(top|right|bottom|left)$/;e.getComputedStyle?(tt=function(e){return e.ownerDocument.defaultView.getComputedStyle(e,null)},nt=function(e,t,n){var i,r,o,a,s=e.style;return n=n||tt(e),a=n?n.getPropertyValue(t)||n[t]:void 0,n&&(""!==a||oe.contains(e.ownerDocument,e)||(a=oe.style(e,t)),rt.test(a)&&it.test(t)&&(i=s.width,r=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=i,s.minWidth=r,s.maxWidth=o)),void 0===a?a:a+""}):me.documentElement.currentStyle&&(tt=function(e){return e.currentStyle},nt=function(e,t,n){var i,r,o,a,s=e.style;return n=n||tt(e),a=n?n[t]:void 0,null==a&&s&&s[t]&&(a=s[t]),rt.test(a)&&!ot.test(t)&&(i=s.left,r=e.runtimeStyle,o=r&&r.left,o&&(r.left=e.currentStyle.left),s.left="fontSize"===t?"1em":a,a=s.pixelLeft+"px",s.left=i,o&&(r.left=o)),void 0===a?a:a+""||"auto"}),function(){function t(){var t,n,i=me.getElementsByTagName("body")[0];i&&(t=me.createElement("div"),n=me.createElement("div"),t.style.cssText=u,i.appendChild(t).appendChild(n),n.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:absolute;display:block;padding:1px;border:1px;width:4px;margin-top:1%;top:1%",oe.swap(i,null!=i.style.zoom?{zoom:1}:{},function(){r=4===n.offsetWidth}),o=!0,a=!1,s=!0,e.getComputedStyle&&(a="1%"!==(e.getComputedStyle(n,null)||{}).top,o="4px"===(e.getComputedStyle(n,null)||{width:"4px"}).width),i.removeChild(t),n=i=null)}var n,i,r,o,a,s,l=me.createElement("div"),u="border:0;width:0;height:0;position:absolute;top:0;left:-9999px",c="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;padding:0;margin:0;border:0";l.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",n=l.getElementsByTagName("a")[0],n.style.cssText="float:left;opacity:.5",ie.opacity=/^0.5/.test(n.style.opacity),ie.cssFloat=!!n.style.cssFloat,l.style.backgroundClip="content-box",l.cloneNode(!0).style.backgroundClip="",ie.clearCloneStyle="content-box"===l.style.backgroundClip,n=l=null,oe.extend(ie,{reliableHiddenOffsets:function(){if(null!=i)return i;var e,t,n,r=me.createElement("div"),o=me.getElementsByTagName("body")[0];if(o)return r.setAttribute("className","t"),r.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",e=me.createElement("div"),e.style.cssText=u,o.appendChild(e).appendChild(r),r.innerHTML="<table><tr><td></td><td>t</td></tr></table>",t=r.getElementsByTagName("td"),t[0].style.cssText="padding:0;margin:0;border:0;display:none",n=0===t[0].offsetHeight,t[0].style.display="",t[1].style.display="none",i=n&&0===t[0].offsetHeight,o.removeChild(e),r=o=null,i},boxSizing:function(){return null==r&&t(),r},boxSizingReliable:function(){return null==o&&t(),o},pixelPosition:function(){return null==a&&t(),a},reliableMarginRight:function(){var t,n,i,r;if(null==s&&e.getComputedStyle){if(t=me.getElementsByTagName("body")[0],!t)return;n=me.createElement("div"),i=me.createElement("div"),n.style.cssText=u,t.appendChild(n).appendChild(i),r=i.appendChild(me.createElement("div")),r.style.cssText=i.style.cssText=c,r.style.marginRight=r.style.width="0",i.style.width="1px",s=!parseFloat((e.getComputedStyle(r,null)||{}).marginRight),t.removeChild(n)}return s}})}(),oe.swap=function(e,t,n,i){var r,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];r=n.apply(e,i||[]);for(o in t)e.style[o]=a[o];return r};var at=/alpha\([^)]*\)/i,st=/opacity\s*=\s*([^)]*)/,lt=/^(none|table(?!-c[ea]).+)/,ut=new RegExp("^("+Ae+")(.*)$","i"),ct=new RegExp("^([+-])=("+Ae+")","i"),dt={position:"absolute",visibility:"hidden",display:"block"},ft={letterSpacing:0,fontWeight:400},pt=["Webkit","O","Moz","ms"];oe.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=nt(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":ie.cssFloat?"cssFloat":"styleFloat"},style:function(e,t,n,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var r,o,a,s=oe.camelCase(t),l=e.style;if(t=oe.cssProps[s]||(oe.cssProps[s]=A(l,s)),a=oe.cssHooks[t]||oe.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(r=a.get(e,!1,i))?r:l[t];if(o=typeof n,"string"===o&&(r=ct.exec(n))&&(n=(r[1]+1)*r[2]+parseFloat(oe.css(e,t)),o="number"),null!=n&&n===n&&("number"!==o||oe.cssNumber[s]||(n+="px"),ie.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),!(a&&"set"in a&&void 0===(n=a.set(e,n,i)))))try{l[t]="",l[t]=n}catch(u){}}},css:function(e,t,n,i){var r,o,a,s=oe.camelCase(t);return t=oe.cssProps[s]||(oe.cssProps[s]=A(e.style,s)),a=oe.cssHooks[t]||oe.cssHooks[s],a&&"get"in a&&(o=a.get(e,!0,n)),void 0===o&&(o=nt(e,t,i)),"normal"===o&&t in ft&&(o=ft[t]),""===n||n?(r=parseFloat(o),n===!0||oe.isNumeric(r)?r||0:o):o}}),oe.each(["height","width"],function(e,t){oe.cssHooks[t]={get:function(e,n,i){return n?0===e.offsetWidth&&lt.test(oe.css(e,"display"))?oe.swap(e,dt,function(){return L(e,t,i)}):L(e,t,i):void 0},set:function(e,n,i){var r=i&&tt(e);return N(e,n,i?E(e,t,i,ie.boxSizing()&&"border-box"===oe.css(e,"boxSizing",!1,r),r):0)}}}),ie.opacity||(oe.cssHooks.opacity={get:function(e,t){return st.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,r=oe.isNumeric(t)?"alpha(opacity="+100*t+")":"",o=i&&i.filter||n.filter||"";n.zoom=1,(t>=1||""===t)&&""===oe.trim(o.replace(at,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===t||i&&!i.filter)||(n.filter=at.test(o)?o.replace(at,r):o+" "+r)}}),oe.cssHooks.marginRight=k(ie.reliableMarginRight,function(e,t){return t?oe.swap(e,{display:"inline-block"},nt,[e,"marginRight"]):void 0}),oe.each({margin:"",padding:"",border:"Width"},function(e,t){oe.cssHooks[e+t]={expand:function(n){for(var i=0,r={},o="string"==typeof n?n.split(" "):[n];4>i;i++)r[e+Se[i]+t]=o[i]||o[i-2]||o[0];return r}},it.test(e)||(oe.cssHooks[e+t].set=N)}),oe.fn.extend({css:function(e,t){return Ee(this,function(e,t,n){var i,r,o={},a=0;if(oe.isArray(t)){for(i=tt(e),r=t.length;r>a;a++)o[t[a]]=oe.css(e,t[a],!1,i);return o}return void 0!==n?oe.style(e,t,n):oe.css(e,t)},e,t,arguments.length>1)},show:function(){return S(this,!0)},hide:function(){return S(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){Ne(this)?oe(this).show():oe(this).hide()})}}),oe.Tween=M,M.prototype={constructor:M,init:function(e,t,n,i,r,o){this.elem=e,this.prop=n,this.easing=r||"swing",this.options=t,this.start=this.now=this.cur(),this.end=i,this.unit=o||(oe.cssNumber[n]?"":"px")},cur:function(){var e=M.propHooks[this.prop];return e&&e.get?e.get(this):M.propHooks._default.get(this)},run:function(e){var t,n=M.propHooks[this.prop];return this.options.duration?this.pos=t=oe.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):M.propHooks._default.set(this),this}},M.prototype.init.prototype=M.prototype,M.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=oe.css(e.elem,e.prop,""),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){oe.fx.step[e.prop]?oe.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[oe.cssProps[e.prop]]||oe.cssHooks[e.prop])?oe.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},M.propHooks.scrollTop=M.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},oe.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},oe.fx=M.prototype.init,oe.fx.step={};var ht,mt,gt=/^(?:toggle|show|hide)$/,vt=new RegExp("^(?:([+-])=|)("+Ae+")([a-z%]*)$","i"),yt=/queueHooks$/,bt=[P],wt={"*":[function(e,t){var n=this.createTween(e,t),i=n.cur(),r=vt.exec(t),o=r&&r[3]||(oe.cssNumber[e]?"":"px"),a=(oe.cssNumber[e]||"px"!==o&&+i)&&vt.exec(oe.css(n.elem,e)),s=1,l=20;if(a&&a[3]!==o){o=o||a[3],r=r||[],a=+i||1;do s=s||".5",a/=s,oe.style(n.elem,e,a+o);while(s!==(s=n.cur()/i)&&1!==s&&--l)}return r&&(a=n.start=+a||+i||0,n.unit=o,n.end=r[1]?a+(r[1]+1)*r[2]:+r[2]),n}]};oe.Animation=oe.extend(R,{tweener:function(e,t){oe.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");for(var n,i=0,r=e.length;r>i;i++)n=e[i],wt[n]=wt[n]||[],wt[n].unshift(t)},prefilter:function(e,t){t?bt.unshift(e):bt.push(e)}}),oe.speed=function(e,t,n){var i=e&&"object"==typeof e?oe.extend({},e):{complete:n||!n&&t||oe.isFunction(e)&&e,duration:e,easing:n&&t||t&&!oe.isFunction(t)&&t};return i.duration=oe.fx.off?0:"number"==typeof i.duration?i.duration:i.duration in oe.fx.speeds?oe.fx.speeds[i.duration]:oe.fx.speeds._default,null!=i.queue&&i.queue!==!0||(i.queue="fx"),i.old=i.complete,i.complete=function(){oe.isFunction(i.old)&&i.old.call(this),i.queue&&oe.dequeue(this,i.queue)},i},oe.fn.extend({fadeTo:function(e,t,n,i){return this.filter(Ne).css("opacity",0).show().end().animate({opacity:t},e,n,i)},animate:function(e,t,n,i){var r=oe.isEmptyObject(e),o=oe.speed(t,n,i),a=function(){var t=R(this,oe.extend({},e),o);(r||oe._data(this,"finish"))&&t.stop(!0)};return a.finish=a,r||o.queue===!1?this.each(a):this.queue(o.queue,a)},stop:function(e,t,n){var i=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,r=null!=e&&e+"queueHooks",o=oe.timers,a=oe._data(this);if(r)a[r]&&a[r].stop&&i(a[r]);else for(r in a)a[r]&&a[r].stop&&yt.test(r)&&i(a[r]);for(r=o.length;r--;)o[r].elem!==this||null!=e&&o[r].queue!==e||(o[r].anim.stop(n),t=!1,o.splice(r,1));!t&&n||oe.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=oe._data(this),i=n[e+"queue"],r=n[e+"queueHooks"],o=oe.timers,a=i?i.length:0;for(n.finish=!0,oe.queue(this,e,[]),r&&r.stop&&r.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;a>t;t++)i[t]&&i[t].finish&&i[t].finish.call(this);delete n.finish})}}),oe.each(["toggle","show","hide"],function(e,t){var n=oe.fn[t];oe.fn[t]=function(e,i,r){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate($(t,!0),e,i,r)}}),oe.each({slideDown:$("show"),slideUp:$("hide"),slideToggle:$("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){oe.fn[e]=function(e,n,i){return this.animate(t,e,n,i)}}),oe.timers=[],oe.fx.tick=function(){var e,t=oe.timers,n=0;for(ht=oe.now();n<t.length;n++)e=t[n],e()||t[n]!==e||t.splice(n--,1);t.length||oe.fx.stop(),ht=void 0},oe.fx.timer=function(e){oe.timers.push(e),e()?oe.fx.start():oe.timers.pop()},oe.fx.interval=13,oe.fx.start=function(){mt||(mt=setInterval(oe.fx.tick,oe.fx.interval))},oe.fx.stop=function(){clearInterval(mt),mt=null},oe.fx.speeds={slow:600,fast:200,_default:400},oe.fn.delay=function(e,t){return e=oe.fx?oe.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var i=setTimeout(t,e);n.stop=function(){clearTimeout(i)}})},function(){var e,t,n,i,r=me.createElement("div");r.setAttribute("className","t"),r.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",e=r.getElementsByTagName("a")[0],n=me.createElement("select"),i=n.appendChild(me.createElement("option")),t=r.getElementsByTagName("input")[0],e.style.cssText="top:1px",ie.getSetAttribute="t"!==r.className,ie.style=/top/.test(e.getAttribute("style")),ie.hrefNormalized="/a"===e.getAttribute("href"),ie.checkOn=!!t.value,ie.optSelected=i.selected,ie.enctype=!!me.createElement("form").enctype,n.disabled=!0,ie.optDisabled=!i.disabled,t=me.createElement("input"),t.setAttribute("value",""),ie.input=""===t.getAttribute("value"),t.value="t",t.setAttribute("type","radio"),ie.radioValue="t"===t.value,e=t=n=i=r=null}();var Dt=/\r/g;oe.fn.extend({val:function(e){var t,n,i,r=this[0];{if(arguments.length)return i=oe.isFunction(e),this.each(function(n){var r;1===this.nodeType&&(r=i?e.call(this,n,oe(this).val()):e,null==r?r="":"number"==typeof r?r+="":oe.isArray(r)&&(r=oe.map(r,function(e){return null==e?"":e+""})),t=oe.valHooks[this.type]||oe.valHooks[this.nodeName.toLowerCase()],t&&"set"in t&&void 0!==t.set(this,r,"value")||(this.value=r))});if(r)return t=oe.valHooks[r.type]||oe.valHooks[r.nodeName.toLowerCase()],t&&"get"in t&&void 0!==(n=t.get(r,"value"))?n:(n=r.value,"string"==typeof n?n.replace(Dt,""):null==n?"":n)}}}),oe.extend({valHooks:{option:{get:function(e){var t=oe.find.attr(e,"value");return null!=t?t:oe.text(e)}},select:{get:function(e){for(var t,n,i=e.options,r=e.selectedIndex,o="select-one"===e.type||0>r,a=o?null:[],s=o?r+1:i.length,l=0>r?s:o?r:0;s>l;l++)if(n=i[l],(n.selected||l===r)&&(ie.optDisabled?!n.disabled:null===n.getAttribute("disabled"))&&(!n.parentNode.disabled||!oe.nodeName(n.parentNode,"optgroup"))){if(t=oe(n).val(),o)return t;a.push(t)}return a},set:function(e,t){for(var n,i,r=e.options,o=oe.makeArray(t),a=r.length;a--;)if(i=r[a],oe.inArray(oe.valHooks.option.get(i),o)>=0)try{i.selected=n=!0}catch(s){i.scrollHeight}else i.selected=!1;return n||(e.selectedIndex=-1),r}}}}),oe.each(["radio","checkbox"],function(){oe.valHooks[this]={set:function(e,t){return oe.isArray(t)?e.checked=oe.inArray(oe(e).val(),t)>=0:void 0}},ie.checkOn||(oe.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var xt,_t,Ct=oe.expr.attrHandle,Tt=/^(?:checked|selected)$/i,kt=ie.getSetAttribute,At=ie.input;oe.fn.extend({attr:function(e,t){return Ee(this,oe.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){oe.removeAttr(this,e)})}}),oe.extend({attr:function(e,t,n){var i,r,o=e.nodeType;if(e&&3!==o&&8!==o&&2!==o)return typeof e.getAttribute===Ce?oe.prop(e,t,n):(1===o&&oe.isXMLDoc(e)||(t=t.toLowerCase(),i=oe.attrHooks[t]||(oe.expr.match.bool.test(t)?_t:xt)),void 0===n?i&&"get"in i&&null!==(r=i.get(e,t))?r:(r=oe.find.attr(e,t),null==r?void 0:r):null!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):void oe.removeAttr(e,t))},removeAttr:function(e,t){var n,i,r=0,o=t&&t.match(we);if(o&&1===e.nodeType)for(;n=o[r++];)i=oe.propFix[n]||n,oe.expr.match.bool.test(n)?At&&kt||!Tt.test(n)?e[i]=!1:e[oe.camelCase("default-"+n)]=e[i]=!1:oe.attr(e,n,""),e.removeAttribute(kt?n:i)},attrHooks:{type:{set:function(e,t){if(!ie.radioValue&&"radio"===t&&oe.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}}}),_t={set:function(e,t,n){return t===!1?oe.removeAttr(e,n):At&&kt||!Tt.test(n)?e.setAttribute(!kt&&oe.propFix[n]||n,n):e[oe.camelCase("default-"+n)]=e[n]=!0,n}},oe.each(oe.expr.match.bool.source.match(/\w+/g),function(e,t){var n=Ct[t]||oe.find.attr;Ct[t]=At&&kt||!Tt.test(t)?function(e,t,i){var r,o;return i||(o=Ct[t],Ct[t]=r,r=null!=n(e,t,i)?t.toLowerCase():null,Ct[t]=o),r}:function(e,t,n){return n?void 0:e[oe.camelCase("default-"+t)]?t.toLowerCase():null}}),At&&kt||(oe.attrHooks.value={set:function(e,t,n){return oe.nodeName(e,"input")?void(e.defaultValue=t):xt&&xt.set(e,t,n)}}),kt||(xt={set:function(e,t,n){var i=e.getAttributeNode(n);return i||e.setAttributeNode(i=e.ownerDocument.createAttribute(n)),i.value=t+="","value"===n||t===e.getAttribute(n)?t:void 0}},Ct.id=Ct.name=Ct.coords=function(e,t,n){var i;return n?void 0:(i=e.getAttributeNode(t))&&""!==i.value?i.value:null},oe.valHooks.button={get:function(e,t){var n=e.getAttributeNode(t);return n&&n.specified?n.value:void 0},set:xt.set},oe.attrHooks.contenteditable={set:function(e,t,n){xt.set(e,""===t?!1:t,n)}},oe.each(["width","height"],function(e,t){oe.attrHooks[t]={set:function(e,n){return""===n?(e.setAttribute(t,"auto"),n):void 0}}})),ie.style||(oe.attrHooks.style={get:function(e){return e.style.cssText||void 0},set:function(e,t){return e.style.cssText=t+""}});var St=/^(?:input|select|textarea|button|object)$/i,Nt=/^(?:a|area)$/i;oe.fn.extend({prop:function(e,t){return Ee(this,oe.prop,e,t,arguments.length>1)},removeProp:function(e){return e=oe.propFix[e]||e,this.each(function(){try{this[e]=void 0,delete this[e]}catch(t){}})}}),oe.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(e,t,n){var i,r,o,a=e.nodeType;if(e&&3!==a&&8!==a&&2!==a)return o=1!==a||!oe.isXMLDoc(e),o&&(t=oe.propFix[t]||t,r=oe.propHooks[t]),void 0!==n?r&&"set"in r&&void 0!==(i=r.set(e,n,t))?i:e[t]=n:r&&"get"in r&&null!==(i=r.get(e,t))?i:e[t]},propHooks:{tabIndex:{get:function(e){var t=oe.find.attr(e,"tabindex");return t?parseInt(t,10):St.test(e.nodeName)||Nt.test(e.nodeName)&&e.href?0:-1}}}}),ie.hrefNormalized||oe.each(["href","src"],function(e,t){oe.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}}),ie.optSelected||(oe.propHooks.selected={get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}}),oe.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){oe.propFix[this.toLowerCase()]=this}),ie.enctype||(oe.propFix.enctype="encoding");var Et=/[\t\r\n\f]/g;oe.fn.extend({addClass:function(e){var t,n,i,r,o,a,s=0,l=this.length,u="string"==typeof e&&e;if(oe.isFunction(e))return this.each(function(t){oe(this).addClass(e.call(this,t,this.className))});if(u)for(t=(e||"").match(we)||[];l>s;s++)if(n=this[s],i=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(Et," "):" ")){for(o=0;r=t[o++];)i.indexOf(" "+r+" ")<0&&(i+=r+" ");a=oe.trim(i),n.className!==a&&(n.className=a)}return this},removeClass:function(e){var t,n,i,r,o,a,s=0,l=this.length,u=0===arguments.length||"string"==typeof e&&e;if(oe.isFunction(e))return this.each(function(t){oe(this).removeClass(e.call(this,t,this.className))});if(u)for(t=(e||"").match(we)||[];l>s;s++)if(n=this[s],i=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(Et," "):"")){for(o=0;r=t[o++];)for(;i.indexOf(" "+r+" ")>=0;)i=i.replace(" "+r+" "," ");a=e?oe.trim(i):"",n.className!==a&&(n.className=a)}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):oe.isFunction(e)?this.each(function(n){oe(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n)for(var t,i=0,r=oe(this),o=e.match(we)||[];t=o[i++];)r.hasClass(t)?r.removeClass(t):r.addClass(t);else n!==Ce&&"boolean"!==n||(this.className&&oe._data(this,"__className__",this.className),this.className=this.className||e===!1?"":oe._data(this,"__className__")||"")})},hasClass:function(e){for(var t=" "+e+" ",n=0,i=this.length;i>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(Et," ").indexOf(t)>=0)return!0;return!1}}),oe.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){oe.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),oe.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)},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)}});var Lt=oe.now(),Mt=/\?/,Ft=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;oe.parseJSON=function(t){if(e.JSON&&e.JSON.parse)return e.JSON.parse(t+"");var n,i=null,r=oe.trim(t+"");return r&&!oe.trim(r.replace(Ft,function(e,t,r,o){return n&&t&&(i=0),0===i?e:(n=r||t,i+=!o-!r,"")}))?Function("return "+r)():oe.error("Invalid JSON: "+t)},oe.parseXML=function(t){var n,i;if(!t||"string"!=typeof t)return null;try{e.DOMParser?(i=new DOMParser,n=i.parseFromString(t,"text/xml")):(n=new ActiveXObject("Microsoft.XMLDOM"),n.async="false",n.loadXML(t))}catch(r){n=void 0}return n&&n.documentElement&&!n.getElementsByTagName("parsererror").length||oe.error("Invalid XML: "+t),n};var $t,It,Pt=/#.*$/,Ht=/([?&])_=[^&]*/,Rt=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,jt=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Ot=/^(?:GET|HEAD)$/,qt=/^\/\//,Bt=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Wt={},zt={},Xt="*/".concat("*");try{It=location.href}catch(Yt){It=me.createElement("a"),It.href="",It=It.href}$t=Bt.exec(It.toLowerCase())||[],oe.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:It,type:"GET",isLocal:jt.test($t[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Xt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":oe.parseJSON,"text xml":oe.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?q(q(e,oe.ajaxSettings),t):q(oe.ajaxSettings,e)},ajaxPrefilter:j(Wt),ajaxTransport:j(zt),ajax:function(e,t){function n(e,t,n,i){var r,c,v,y,w,x=t;2!==b&&(b=2,s&&clearTimeout(s),u=void 0,a=i||"",D.readyState=e>0?4:0,r=e>=200&&300>e||304===e,n&&(y=B(d,D,n)),y=W(d,y,D,r),r?(d.ifModified&&(w=D.getResponseHeader("Last-Modified"),w&&(oe.lastModified[o]=w),w=D.getResponseHeader("etag"),w&&(oe.etag[o]=w)),204===e||"HEAD"===d.type?x="nocontent":304===e?x="notmodified":(x=y.state,c=y.data,v=y.error,r=!v)):(v=x,!e&&x||(x="error",0>e&&(e=0))),D.status=e,D.statusText=(t||x)+"",r?h.resolveWith(f,[c,x,D]):h.rejectWith(f,[D,x,v]),D.statusCode(g),g=void 0,l&&p.trigger(r?"ajaxSuccess":"ajaxError",[D,d,r?c:v]),m.fireWith(f,[D,x]),l&&(p.trigger("ajaxComplete",[D,d]),--oe.active||oe.event.trigger("ajaxStop")))}"object"==typeof e&&(t=e,e=void 0),t=t||{};var i,r,o,a,s,l,u,c,d=oe.ajaxSetup({},t),f=d.context||d,p=d.context&&(f.nodeType||f.jquery)?oe(f):oe.event,h=oe.Deferred(),m=oe.Callbacks("once memory"),g=d.statusCode||{},v={},y={},b=0,w="canceled",D={readyState:0,getResponseHeader:function(e){var t;if(2===b){if(!c)for(c={};t=Rt.exec(a);)c[t[1].toLowerCase()]=t[2];t=c[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===b?a:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return b||(e=y[n]=y[n]||e,v[e]=t),this},overrideMimeType:function(e){return b||(d.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>b)for(t in e)g[t]=[g[t],e[t]];else D.always(e[D.status]);return this},abort:function(e){var t=e||w;return u&&u.abort(t),n(0,t),this}};if(h.promise(D).complete=m.add,D.success=D.done,D.error=D.fail,d.url=((e||d.url||It)+"").replace(Pt,"").replace(qt,$t[1]+"//"),d.type=t.method||t.type||d.method||d.type,d.dataTypes=oe.trim(d.dataType||"*").toLowerCase().match(we)||[""],null==d.crossDomain&&(i=Bt.exec(d.url.toLowerCase()),d.crossDomain=!(!i||i[1]===$t[1]&&i[2]===$t[2]&&(i[3]||("http:"===i[1]?"80":"443"))===($t[3]||("http:"===$t[1]?"80":"443")))),d.data&&d.processData&&"string"!=typeof d.data&&(d.data=oe.param(d.data,d.traditional)),O(Wt,d,t,D),2===b)return D;l=d.global,l&&0===oe.active++&&oe.event.trigger("ajaxStart"),d.type=d.type.toUpperCase(),d.hasContent=!Ot.test(d.type),o=d.url,d.hasContent||(d.data&&(o=d.url+=(Mt.test(o)?"&":"?")+d.data,delete d.data),d.cache===!1&&(d.url=Ht.test(o)?o.replace(Ht,"$1_="+Lt++):o+(Mt.test(o)?"&":"?")+"_="+Lt++)),d.ifModified&&(oe.lastModified[o]&&D.setRequestHeader("If-Modified-Since",oe.lastModified[o]),oe.etag[o]&&D.setRequestHeader("If-None-Match",oe.etag[o])),(d.data&&d.hasContent&&d.contentType!==!1||t.contentType)&&D.setRequestHeader("Content-Type",d.contentType),D.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+("*"!==d.dataTypes[0]?", "+Xt+"; q=0.01":""):d.accepts["*"]);for(r in d.headers)D.setRequestHeader(r,d.headers[r]);if(d.beforeSend&&(d.beforeSend.call(f,D,d)===!1||2===b))return D.abort();w="abort";for(r in{success:1,error:1,complete:1})D[r](d[r]);if(u=O(zt,d,t,D)){D.readyState=1,l&&p.trigger("ajaxSend",[D,d]),d.async&&d.timeout>0&&(s=setTimeout(function(){D.abort("timeout")},d.timeout));try{b=1,u.send(v,n)}catch(x){if(!(2>b))throw x;n(-1,x)}}else n(-1,"No Transport");return D},getJSON:function(e,t,n){return oe.get(e,t,n,"json")},getScript:function(e,t){return oe.get(e,void 0,t,"script")}}),oe.each(["get","post"],function(e,t){oe[t]=function(e,n,i,r){return oe.isFunction(n)&&(r=r||i,i=n,n=void 0),oe.ajax({url:e,type:t,dataType:r,data:n,success:i})}}),oe.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){oe.fn[t]=function(e){return this.on(t,e)}}),oe._evalUrl=function(e){return oe.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},oe.fn.extend({wrapAll:function(e){if(oe.isFunction(e))return this.each(function(t){oe(this).wrapAll(e.call(this,t))});if(this[0]){var t=oe(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 oe.isFunction(e)?this.each(function(t){oe(this).wrapInner(e.call(this,t))}):this.each(function(){var t=oe(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=oe.isFunction(e);return this.each(function(n){oe(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){oe.nodeName(this,"body")||oe(this).replaceWith(this.childNodes)}).end()}}),oe.expr.filters.hidden=function(e){return e.offsetWidth<=0&&e.offsetHeight<=0||!ie.reliableHiddenOffsets()&&"none"===(e.style&&e.style.display||oe.css(e,"display"))},oe.expr.filters.visible=function(e){return!oe.expr.filters.hidden(e)};var Ut=/%20/g,Gt=/\[\]$/,Vt=/\r?\n/g,Kt=/^(?:submit|button|image|reset|file)$/i,Jt=/^(?:input|select|textarea|keygen)/i;oe.param=function(e,t){var n,i=[],r=function(e,t){t=oe.isFunction(t)?t():null==t?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(void 0===t&&(t=oe.ajaxSettings&&oe.ajaxSettings.traditional),oe.isArray(e)||e.jquery&&!oe.isPlainObject(e))oe.each(e,function(){r(this.name,this.value)});else for(n in e)z(n,e[n],t,r);return i.join("&").replace(Ut,"+")},oe.fn.extend({serialize:function(){return oe.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=oe.prop(this,"elements");return e?oe.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!oe(this).is(":disabled")&&Jt.test(this.nodeName)&&!Kt.test(e)&&(this.checked||!Le.test(e))}).map(function(e,t){var n=oe(this).val();return null==n?null:oe.isArray(n)?oe.map(n,function(e){return{name:t.name,value:e.replace(Vt,"\r\n")}}):{name:t.name,value:n.replace(Vt,"\r\n")}}).get()}}),oe.ajaxSettings.xhr=void 0!==e.ActiveXObject?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&X()||Y()}:X;var Qt=0,Zt={},en=oe.ajaxSettings.xhr();e.ActiveXObject&&oe(e).on("unload",function(){for(var e in Zt)Zt[e](void 0,!0)}),ie.cors=!!en&&"withCredentials"in en,en=ie.ajax=!!en,en&&oe.ajaxTransport(function(e){if(!e.crossDomain||ie.cors){var t;return{send:function(n,i){var r,o=e.xhr(),a=++Qt;if(o.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(r in e.xhrFields)o[r]=e.xhrFields[r];e.mimeType&&o.overrideMimeType&&o.overrideMimeType(e.mimeType),e.crossDomain||n["X-Requested-With"]||(n["X-Requested-With"]="XMLHttpRequest");for(r in n)void 0!==n[r]&&o.setRequestHeader(r,n[r]+"");o.send(e.hasContent&&e.data||null),t=function(n,r){var s,l,u;if(t&&(r||4===o.readyState))if(delete Zt[a],t=void 0,o.onreadystatechange=oe.noop,r)4!==o.readyState&&o.abort();else{u={},s=o.status,"string"==typeof o.responseText&&(u.text=o.responseText);try{l=o.statusText}catch(c){l=""}s||!e.isLocal||e.crossDomain?1223===s&&(s=204):s=u.text?200:404}u&&i(s,l,u,o.getAllResponseHeaders())},e.async?4===o.readyState?setTimeout(t):o.onreadystatechange=Zt[a]=t:t()},abort:function(){t&&t(void 0,!0)}}}}),oe.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return oe.globalEval(e),e}}}),oe.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),oe.ajaxTransport("script",function(e){if(e.crossDomain){var t,n=me.head||oe("head")[0]||me.documentElement;return{send:function(i,r){t=me.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||r(200,"success"))},n.insertBefore(t,n.firstChild)},abort:function(){t&&t.onload(void 0,!0)}}}});var tn=[],nn=/(=)\?(?=&|$)|\?\?/;oe.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=tn.pop()||oe.expando+"_"+Lt++;return this[e]=!0,e}}),oe.ajaxPrefilter("json jsonp",function(t,n,i){var r,o,a,s=t.jsonp!==!1&&(nn.test(t.url)?"url":"string"==typeof t.data&&!(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&nn.test(t.data)&&"data");return s||"jsonp"===t.dataTypes[0]?(r=t.jsonpCallback=oe.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,s?t[s]=t[s].replace(nn,"$1"+r):t.jsonp!==!1&&(t.url+=(Mt.test(t.url)?"&":"?")+t.jsonp+"="+r),t.converters["script json"]=function(){return a||oe.error(r+" was not called"),a[0]},t.dataTypes[0]="json",o=e[r],e[r]=function(){a=arguments},i.always(function(){e[r]=o,t[r]&&(t.jsonpCallback=n.jsonpCallback,tn.push(r)),a&&oe.isFunction(o)&&o(a[0]),a=o=void 0}),"script"):void 0}),oe.parseHTML=function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||me;var i=fe.exec(e),r=!n&&[];return i?[t.createElement(i[1])]:(i=oe.buildFragment([e],t,r),r&&r.length&&oe(r).remove(),oe.merge([],i.childNodes))};var rn=oe.fn.load;oe.fn.load=function(e,t,n){if("string"!=typeof e&&rn)return rn.apply(this,arguments);var i,r,o,a=this,s=e.indexOf(" ");return s>=0&&(i=e.slice(s,e.length),e=e.slice(0,s)),oe.isFunction(t)?(n=t,t=void 0):t&&"object"==typeof t&&(o="POST"),a.length>0&&oe.ajax({url:e,type:o,dataType:"html",data:t}).done(function(e){r=arguments,a.html(i?oe("<div>").append(oe.parseHTML(e)).find(i):e)}).complete(n&&function(e,t){a.each(n,r||[e.responseText,t,e])}),this},oe.expr.filters.animated=function(e){return oe.grep(oe.timers,function(t){return e===t.elem}).length};var on=e.document.documentElement;oe.offset={setOffset:function(e,t,n){var i,r,o,a,s,l,u,c=oe.css(e,"position"),d=oe(e),f={};"static"===c&&(e.style.position="relative"),s=d.offset(),o=oe.css(e,"top"),l=oe.css(e,"left"),u=("absolute"===c||"fixed"===c)&&oe.inArray("auto",[o,l])>-1,u?(i=d.position(),a=i.top,r=i.left):(a=parseFloat(o)||0,r=parseFloat(l)||0),oe.isFunction(t)&&(t=t.call(e,n,s)),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+r),"using"in t?t.using.call(e,f):d.css(f)}},oe.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){oe.offset.setOffset(this,e,t)});var t,n,i={
  top:0,left:0},r=this[0],o=r&&r.ownerDocument;if(o)return t=o.documentElement,oe.contains(t,r)?(typeof r.getBoundingClientRect!==Ce&&(i=r.getBoundingClientRect()),n=U(o),{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"===oe.css(i,"position")?t=i.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),oe.nodeName(e[0],"html")||(n=e.offset()),n.top+=oe.css(e[0],"borderTopWidth",!0),n.left+=oe.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-oe.css(i,"marginTop",!0),left:t.left-n.left-oe.css(i,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent||on;e&&!oe.nodeName(e,"html")&&"static"===oe.css(e,"position");)e=e.offsetParent;return e||on})}}),oe.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var n=/Y/.test(t);oe.fn[e]=function(i){return Ee(this,function(e,i,r){var o=U(e);return void 0===r?o?t in o?o[t]:o.document.documentElement[i]:e[i]:void(o?o.scrollTo(n?oe(o).scrollLeft():r,n?r:oe(o).scrollTop()):e[i]=r)},e,i,arguments.length,null)}}),oe.each(["top","left"],function(e,t){oe.cssHooks[t]=k(ie.pixelPosition,function(e,n){return n?(n=nt(e,t),rt.test(n)?oe(e).position()[t]+"px":n):void 0})}),oe.each({Height:"height",Width:"width"},function(e,t){oe.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,i){oe.fn[i]=function(i,r){var o=arguments.length&&(n||"boolean"!=typeof i),a=n||(i===!0||r===!0?"margin":"border");return Ee(this,function(t,n,i){var r;return oe.isWindow(t)?t.document.documentElement["client"+e]:9===t.nodeType?(r=t.documentElement,Math.max(t.body["scroll"+e],r["scroll"+e],t.body["offset"+e],r["offset"+e],r["client"+e])):void 0===i?oe.css(t,n,a):oe.style(t,n,i,a)},t,o?i:void 0,o,null)}})}),oe.fn.size=function(){return this.length},oe.fn.andSelf=oe.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return oe});var an=e.jQuery,sn=e.$;return oe.noConflict=function(t){return e.$===oe&&(e.$=sn),t&&e.jQuery===oe&&(e.jQuery=an),oe},typeof t===Ce&&(e.jQuery=e.$=oe),oe}),"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]>2)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 3")}(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(void 0!==e.style[n])return{end:t[n]};return!1}e.fn.emulateTransitionEnd=function(t){var n=!1,i=this;e(this).one("bsTransitionEnd",function(){n=!0});var r=function(){n||e(i).trigger(e.support.transition.end)};return setTimeout(r,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){return e(t.target).is(this)?t.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),window.XMLHttpRequest&&window.FormData&&(XMLHttpRequest=function(e){return function(){var t=new e;return t.setRequestHeader=function(e){return function(n,i){if("__setXHR_"===n){var r=i(t);r instanceof Function&&r(t)}else e.apply(t,arguments)}}(t.setRequestHeader),t}}(XMLHttpRequest),window.XMLHttpRequest.__isShim=!0),!function(){var e=angular.module("angularFileUpload",[]);e.service("$upload",["$http","$q","$timeout",function(e,t,n){function i(i){i.method=i.method||"POST",i.headers=i.headers||{},i.transformRequest=i.transformRequest||function(t,n){return window.ArrayBuffer&&t instanceof window.ArrayBuffer?t:e.defaults.transformRequest[0](t,n)};var r=t.defer();window.XMLHttpRequest.__isShim&&(i.headers.__setXHR_=function(){return function(e){e&&(i.__XHR=e,i.xhrFn&&i.xhrFn(e),e.upload.addEventListener("progress",function(e){r.notify(e)},!1),e.upload.addEventListener("load",function(e){e.lengthComputable&&r.notify(e)},!1))}}),e(i).then(function(e){r.resolve(e)},function(e){r.reject(e)},function(e){r.notify(e)});var o=r.promise;return o.success=function(e){return o.then(function(t){e(t.data,t.status,t.headers,i)}),o},o.error=function(e){return o.then(null,function(t){e(t.data,t.status,t.headers,i)}),o},o.progress=function(e){return o.then(null,null,function(t){e(t)}),o},o.abort=function(){return i.__XHR&&n(function(){i.__XHR.abort()}),o},o.xhr=function(e){return i.xhrFn=function(t){return function(){t&&t.apply(o,arguments),e.apply(o,arguments)}}(i.xhrFn),o},o}this.upload=function(t){t.headers=t.headers||{},t.headers["Content-Type"]=void 0,t.transformRequest=t.transformRequest||e.defaults.transformRequest;var n=new FormData,r=t.transformRequest,o=t.data;return t.transformRequest=function(e,n){if(o)if(t.formDataAppender)for(var i in o){var a=o[i];t.formDataAppender(e,i,a)}else for(var i in o){var a=o[i];if("function"==typeof r)a=r(a,n);else for(var s=0;s<r.length;s++){var l=r[s];"function"==typeof l&&(a=l(a,n))}e.append(i,a)}if(null!=t.file){var u=t.fileFormDataName||"file";if("[object Array]"===Object.prototype.toString.call(t.file))for(var c="[object String]"===Object.prototype.toString.call(u),s=0;s<t.file.length;s++)e.append(c?u:u[s],t.file[s],t.fileName&&t.fileName[s]||t.file[s].name);else e.append(u,t.file,t.fileName||t.file.name)}return e},t.data=n,i(t)},this.http=function(e){return i(e)}}]),e.directive("ngFileSelect",["$parse","$timeout",function(e,t){return function(n,i,r){var o=e(r.ngFileSelect);if("input"!==i[0].tagName.toLowerCase()||"file"!==(i.attr("type")&&i.attr("type").toLowerCase())){for(var a=angular.element('<input type="file">'),s=i[0].attributes,l=0;l<s.length;l++)"type"!==s[l].name.toLowerCase()&&a.attr(s[l].name,s[l].value);r.multiple&&a.attr("multiple","true"),a.css("width","1px").css("height","1px").css("opacity",0).css("position","absolute").css("filter","alpha(opacity=0)").css("padding",0).css("margin",0).css("overflow","hidden"),a.attr("__wrapper_for_parent_",!0),i.append(a),i[0].__file_click_fn_delegate_=function(){a[0].click()},i.bind("click",i[0].__file_click_fn_delegate_),i.css("overflow","hidden"),i=a}i.bind("change",function(e){var i,r,a=[];if(i=e.__files_||e.target.files,null!=i)for(r=0;r<i.length;r++)a.push(i.item(r));t(function(){o(n,{$files:a,$event:e})})})}}]),e.directive("ngFileDropAvailable",["$parse","$timeout",function(e,t){return function(n,i,r){if("draggable"in document.createElement("span")){var o=e(r.ngFileDropAvailable);t(function(){o(n)})}}}]),e.directive("ngFileDrop",["$parse","$timeout","$location",function(e,t,n){return function(i,r,o){function a(e){return/^[\000-\177]*$/.test(e)}function s(e,i){var r=[],o=e.dataTransfer.items;if(o&&o.length>0&&o[0].webkitGetAsEntry&&"file"!=n.protocol()&&o[0].webkitGetAsEntry().isDirectory)for(var s=0;s<o.length;s++){var u=o[s].webkitGetAsEntry();null!=u&&(a(u.name)?l(r,u):o[s].webkitGetAsEntry().isDirectory||r.push(o[s].getAsFile()))}else{var c=e.dataTransfer.files;if(null!=c)for(var s=0;s<c.length;s++)r.push(c.item(s))}!function f(e){t(function(){d?f(10):i(r)},e||0)}()}function l(e,t,n){if(null!=t)if(t.isDirectory){var i=t.createReader();d++,i.readEntries(function(i){for(var r=0;r<i.length;r++)l(e,i[r],(n?n:"")+t.name+"/");d--})}else d++,t.file(function(t){d--,t._relativePath=(n?n:"")+t.name,e.push(t)})}if("draggable"in document.createElement("span")){var u=null;r[0].addEventListener("dragover",function(n){if(n.preventDefault(),t.cancel(u),!r[0].__drag_over_class_)if(o.ngFileDragOverClass&&o.ngFileDragOverClass.search(/\) *$/)>-1){var a=e(o.ngFileDragOverClass)(i,{$event:n});r[0].__drag_over_class_=a}else r[0].__drag_over_class_=o.ngFileDragOverClass||"dragover";r.addClass(r[0].__drag_over_class_)},!1),r[0].addEventListener("dragenter",function(e){e.preventDefault()},!1),r[0].addEventListener("dragleave",function(){u=t(function(){r.removeClass(r[0].__drag_over_class_),r[0].__drag_over_class_=null},o.ngFileDragOverDelay||1)},!1);var c=e(o.ngFileDrop);r[0].addEventListener("drop",function(e){e.preventDefault(),r.removeClass(r[0].__drag_over_class_),r[0].__drag_over_class_=null,s(e,function(t){c(i,{$files:t,$event:e})})},!1);var d=0}}}])}(),function(e,t,n){"use strict";function i(e,n,i){r.directive(e,["$parse","$swipe",function(r,o){var a=75,s=.3,l=30;return function(u,c,d){function f(e){if(!p)return!1;var t=Math.abs(e.y-p.y),i=(e.x-p.x)*n;return h&&a>t&&i>0&&i>l&&s>t/i}var p,h,m=r(d[e]),g=["touch"];t.isDefined(d.ngSwipeDisableMouse)||g.push("mouse"),o.bind(c,{start:function(e,t){p=e,h=!0},cancel:function(e){h=!1},end:function(e,t){f(e)&&u.$apply(function(){c.triggerHandler(i),m(u,{$event:t})})}},g)}}])}var r=t.module("ngTouch",[]);r.factory("$swipe",[function(){function e(e){var t=e.touches&&e.touches.length?e.touches:[e],n=e.changedTouches&&e.changedTouches[0]||e.originalEvent&&e.originalEvent.changedTouches&&e.originalEvent.changedTouches[0]||t[0].originalEvent||t[0];return{x:n.clientX,y:n.clientY}}function n(e,n){var i=[];return t.forEach(e,function(e){var t=r[e][n];t&&i.push(t)}),i.join(" ")}var i=10,r={mouse:{start:"mousedown",move:"mousemove",end:"mouseup"},touch:{start:"touchstart",move:"touchmove",end:"touchend",cancel:"touchcancel"}};return{bind:function(t,r,o){var a,s,l,u,c=!1;o=o||["mouse","touch"],t.on(n(o,"start"),function(t){l=e(t),c=!0,a=0,s=0,u=l,r.start&&r.start(l,t)});var d=n(o,"cancel");d&&t.on(d,function(e){c=!1,r.cancel&&r.cancel(e)}),t.on(n(o,"move"),function(t){if(c&&l){var n=e(t);if(a+=Math.abs(n.x-u.x),s+=Math.abs(n.y-u.y),u=n,!(i>a&&i>s))return s>a?(c=!1,void(r.cancel&&r.cancel(t))):(t.preventDefault(),void(r.move&&r.move(n,t)))}}),t.on(n(o,"end"),function(t){c&&(c=!1,r.end&&r.end(e(t),t))})}}}]),r.config(["$provide",function(e){e.decorator("ngClickDirective",["$delegate",function(e){return e.shift(),e}])}]),r.directive("ngClick",["$parse","$timeout","$rootElement",function(e,n,i){function r(e,t,n,i){return Math.abs(e-n)<m&&Math.abs(t-i)<m}function o(e,t,n){for(var i=0;i<e.length;i+=2)if(r(e[i],e[i+1],t,n))return e.splice(i,i+2),!0;return!1}function a(e){if(!(Date.now()-u>h)){var t=e.touches&&e.touches.length?e.touches:[e],n=t[0].clientX,i=t[0].clientY;1>n&&1>i||d&&d[0]===n&&d[1]===i||(d&&(d=null),"label"===e.target.tagName.toLowerCase()&&(d=[n,i]),o(c,n,i)||(e.stopPropagation(),e.preventDefault(),e.target&&e.target.blur()))}}function s(e){var t=e.touches&&e.touches.length?e.touches:[e],i=t[0].clientX,r=t[0].clientY;c.push(i,r),n(function(){for(var e=0;e<c.length;e+=2)if(c[e]==i&&c[e+1]==r)return void c.splice(e,e+2)},h,!1)}function l(e,t){c||(i[0].addEventListener("click",a,!0),i[0].addEventListener("touchstart",s,!0),c=[]),u=Date.now(),o(c,e,t)}var u,c,d,f=750,p=12,h=2500,m=25,g="ng-click-active";return function(n,i,r){function o(){h=!1,i.removeClass(g)}var a,s,u,c,d=e(r.ngClick),h=!1;i.on("touchstart",function(e){h=!0,a=e.target?e.target:e.srcElement,3==a.nodeType&&(a=a.parentNode),i.addClass(g),s=Date.now();var t=e.touches&&e.touches.length?e.touches:[e],n=t[0].originalEvent||t[0];u=n.clientX,c=n.clientY}),i.on("touchmove",function(e){o()}),i.on("touchcancel",function(e){o()}),i.on("touchend",function(e){var n=Date.now()-s,d=e.changedTouches&&e.changedTouches.length?e.changedTouches:e.touches&&e.touches.length?e.touches:[e],m=d[0].originalEvent||d[0],g=m.clientX,v=m.clientY,y=Math.sqrt(Math.pow(g-u,2)+Math.pow(v-c,2));h&&f>n&&p>y&&(l(g,v),a&&a.blur(),t.isDefined(r.disabled)&&r.disabled!==!1||i.triggerHandler("click",[e])),o()}),i.onclick=function(e){},i.on("click",function(e,t){n.$apply(function(){d(n,{$event:t||e})})}),i.on("mousedown",function(e){i.addClass(g)}),i.on("mousemove mouseup",function(e){i.removeClass(g)})}}]),i("ngSwipeLeft",-1,"swipeleft"),i("ngSwipeRight",1,"swiperight")}(window,window.angular),angular.module("offClick",[]).directive("offClick",["$rootScope","$parse",function(e,t){function n(e,t){if(!e||!t)return!1;for(var n=t.length,i=0;n>i;++i){var r=t[i],o=!1;try{o=r.contains(e)}catch(a){"undefined"!=typeof r.compareDocumentPosition&&(o=r===e||Boolean(16&r.compareDocumentPosition(e)))}if(o)return!0}return!1}function i(t){if("touchmove"===t.type)return a=!0,!1;if(a)return a=!1,!1;var i=t.target||t.srcElement;angular.forEach(o,function(r,o){var a=r.offClickFilter();r.elm.contains(i)||n(i,a)||e.$evalAsync(function(){r.cb(r.scope,{$event:t})})})}var r=0,o={},a=!1;return document.addEventListener("touchmove",i,!0),document.addEventListener("touchend",i,!0),document.addEventListener("click",i,!0),{restrict:"A",compile:function(n,i){var a=t(i.offClick);return function(n,s){function l(){o[d]={elm:s[0],cb:a,scope:n,offClickFilter:function(){return document.querySelectorAll(n.$eval(i.offClickFilter))}}}function u(){o[d]=null,delete o[d]}var c,d=r++;i.offClickIf?c=e.$watch(function(){return t(i.offClickIf)(n)},function(e){e?l():e||u()}):l(),n.$on("$destroy",function(){u(),c&&c(),s=null})}}}}]),function(){function e(e,t){window.XMLHttpRequest.prototype[e]=t(window.XMLHttpRequest.prototype[e])}function t(e,t,n){try{Object.defineProperty(e,t,{get:n})}catch(i){}}function n(e){return"input"===e[0].tagName.toLowerCase()&&e.attr("type")&&"file"===e.attr("type").toLowerCase()}var i=function(){try{var e=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");if(e)return!0}catch(t){if(void 0!=navigator.mimeTypes["application/x-shockwave-flash"])return!0}return!1};if(window.XMLHttpRequest&&!window.FormData||window.FileAPI&&FileAPI.forceLoad){var r=function(e){if(!e.__listeners){e.upload||(e.upload={}),e.__listeners=[];var t=e.upload.addEventListener;e.upload.addEventListener=function(n,i,r){e.__listeners[n]=i,t&&t.apply(this,arguments)}}};e("open",function(e){return function(t,n,i){r(this),this.__url=n;try{e.apply(this,[t,n,i])}catch(o){o.message.indexOf("Access is denied")>-1&&(this.__origError=o,e.apply(this,[t,"_fix_for_ie_crossdomain__",i]))}}}),e("getResponseHeader",function(e){return function(t){return this.__fileApiXHR&&this.__fileApiXHR.getResponseHeader?this.__fileApiXHR.getResponseHeader(t):null==e?null:e.apply(this,[t])}}),e("getAllResponseHeaders",function(e){return function(){return this.__fileApiXHR&&this.__fileApiXHR.getAllResponseHeaders?this.__fileApiXHR.getAllResponseHeaders():null==e?null:e.apply(this)}}),e("abort",function(e){return function(){return this.__fileApiXHR&&this.__fileApiXHR.abort?this.__fileApiXHR.abort():null==e?null:e.apply(this)}}),e("setRequestHeader",function(e){return function(t,n){if("__setXHR_"===t){r(this);var i=n(this);i instanceof Function&&i(this)}else this.__requestHeaders=this.__requestHeaders||{},this.__requestHeaders[t]=n,e.apply(this,arguments)}}),e("send",function(e){return function(){var n=this;if(arguments[0]&&arguments[0].__isFileAPIShim){var r=arguments[0],o={url:n.__url,jsonp:!1,cache:!0,complete:function(e,i){n.__completed=!0,!e&&n.__listeners.load&&n.__listeners.load({type:"load",loaded:n.__loaded,total:n.__total,target:n,lengthComputable:!0}),!e&&n.__listeners.loadend&&n.__listeners.loadend({type:"loadend",loaded:n.__loaded,total:n.__total,target:n,lengthComputable:!0}),"abort"===e&&n.__listeners.abort&&n.__listeners.abort({type:"abort",loaded:n.__loaded,total:n.__total,target:n,lengthComputable:!0}),void 0!==i.status&&t(n,"status",function(){return 0==i.status&&e&&"abort"!==e?500:i.status}),void 0!==i.statusText&&t(n,"statusText",function(){return i.statusText}),t(n,"readyState",function(){return 4}),void 0!==i.response&&t(n,"response",function(){return i.response});var r=i.responseText||(e&&0==i.status&&"abort"!==e?e:void 0);t(n,"responseText",function(){return r}),t(n,"response",function(){return r}),e&&t(n,"err",function(){return e}),n.__fileApiXHR=i,n.onreadystatechange&&n.onreadystatechange(),n.onload&&n.onload()},fileprogress:function(e){if(e.target=n,n.__listeners.progress&&n.__listeners.progress(e),n.__total=e.total,n.__loaded=e.loaded,e.total===e.loaded){var t=this;setTimeout(function(){n.__completed||(n.getAllResponseHeaders=function(){},t.complete(null,{status:204,statusText:"No Content"}))},FileAPI.noContentTimeout||1e4)}},headers:n.__requestHeaders};o.data={},o.files={};for(var a=0;a<r.data.length;a++){var s=r.data[a];null!=s.val&&null!=s.val.name&&null!=s.val.size&&null!=s.val.type?o.files[s.key]=s.val:o.data[s.key]=s.val}setTimeout(function(){if(!i())throw'Adode Flash Player need to be installed. To check ahead use "FileAPI.hasFlash"';n.__fileApiXHR=FileAPI.upload(o)},1)}else{if(this.__origError)throw this.__origError;e.apply(n,arguments)}}}),window.XMLHttpRequest.__isFileAPIShim=!0,FileAPI.ngfFixIE=function(e,t,r,o,a){if(!i())throw'Adode Flash Player need to be installed. To check ahead use "FileAPI.hasFlash"';var s=function(i){function a(e){var t,n;if(t=n=0,e.offsetParent)do t+=e.offsetLeft,n+=e.offsetTop;while(e=e.offsetParent);return{left:t,top:n}}if(e.attr("disabled"))e.__ngf_elem__.removeClass("js-fileapi-wrapper");else{var u=e.__ngf_elem__;u?r(e.__ngf_elem__):(u=e.__ngf_elem__=t(),u.addClass("js-fileapi-wrapper"),!n(e),setTimeout(function(){u.bind("mouseenter",s)},10),u.bind("change",function(e){l.apply(this,[e]),o.apply(this,[e])})),n(e)||u.css("position","absolute").css("top",a(e[0]).top+"px").css("left",a(e[0]).left+"px").css("width",e[0].offsetWidth+"px").css("height",e[0].offsetHeight+"px").css("filter","alpha(opacity=0)").css("display",e.css("display")).css("overflow","hidden").css("z-index","1")}};e.bind("mouseenter",s);var l=function(e){for(var t=FileAPI.getFiles(e),n=0;n<t.length;n++)void 0===t[n].size&&(t[n].size=0),void 0===t[n].name&&(t[n].name="file"),void 0===t[n].type&&(t[n].type="undefined");e.target||(e.target={}),e.target.files=t,e.target.files!=t&&(e.__files_=t),(e.__files_||e.target.files).item=function(t){return(e.__files_||e.target.files)[t]||null}}},window.FormData=FormData=function(){return{append:function(e,t,n){t.__isFileAPIBlobShim&&(t=t.data[0]),this.data.push({key:e,val:t,name:n})},data:[],__isFileAPIShim:!0}},window.Blob=Blob=function(e){return{data:e,__isFileAPIBlobShim:!0}},function(){if(window.FileAPI||(window.FileAPI={}),FileAPI.forceLoad&&(FileAPI.html5=!1),!FileAPI.upload){var e,t,n,r,o,a=document.createElement("script"),s=document.getElementsByTagName("script");if(window.FileAPI.jsUrl)e=window.FileAPI.jsUrl;else if(window.FileAPI.jsPath)t=window.FileAPI.jsPath;else for(n=0;n<s.length;n++)if(o=s[n].src,r=o.search(/\/angular\-file\-upload[\-a-zA-z0-9\.]*\.js/),r>-1){t=o.substring(0,r+1);break}null==FileAPI.staticPath&&(FileAPI.staticPath=t),a.setAttribute("src",e||t+"FileAPI.min.js"),document.getElementsByTagName("head")[0].appendChild(a),FileAPI.hasFlash=i()}}(),FileAPI.disableFileInput=function(e,t){t?e.removeClass("js-fileapi-wrapper"):e.addClass("js-fileapi-wrapper")}}window.FileReader||(window.FileReader=function(){var e=this,t=!1;this.listeners={},this.addEventListener=function(t,n){e.listeners[t]=e.listeners[t]||[],e.listeners[t].push(n)},this.removeEventListener=function(t,n){e.listeners[t]&&e.listeners[t].splice(e.listeners[t].indexOf(n),1)},this.dispatchEvent=function(t){var n=e.listeners[t.type];if(n)for(var i=0;i<n.length;i++)n[i].call(e,t)},this.onabort=this.onerror=this.onload=this.onloadstart=this.onloadend=this.onprogress=null;var n=function(t,n){var i={type:t,target:e,loaded:n.loaded,total:n.total,error:n.error};return null!=n.result&&(i.target.result=n.result),i},i=function(i){if(t||(t=!0,e.onloadstart&&e.onloadstart(n("loadstart",i))),"load"===i.type){e.onloadend&&e.onloadend(n("loadend",i));var r=n("load",i);e.onload&&e.onload(r),e.dispatchEvent(r)}else if("progress"===i.type){var r=n("progress",i);e.onprogress&&e.onprogress(r),e.dispatchEvent(r)}else{var r=n("error",i);e.onerror&&e.onerror(r),e.dispatchEvent(r)}};this.readAsArrayBuffer=function(e){FileAPI.readAsBinaryString(e,i)},this.readAsBinaryString=function(e){FileAPI.readAsBinaryString(e,i)},this.readAsDataURL=function(e){FileAPI.readAsDataURL(e,i)},this.readAsText=function(e){FileAPI.readAsText(e,i)}})}(),function(){function e(e,t){window.XMLHttpRequest.prototype[e]=t(window.XMLHttpRequest.prototype[e])}function t(e,t,n,i,a,s,u){function c(){return"input"===t[0].tagName.toLowerCase()&&t.attr("type")&&"file"===t.attr("type").toLowerCase()}function d(t){if(!g){g=!0;try{var u=t.__files_||t.target&&t.target.files,c=[],d=[],f=a(n.ngAccept);for(l=0;l<u.length;l++){var p=u.item(l);o(e,f,p,t)?c.push(p):d.push(p)}r(a,s,e,i,n,n.ngFileChange||n.ngFileDrop&&n.ngFileDrop.indexOf("(")>0,c,d,t),0==c.length&&(t.target.value=c)}finally{g=!1}}}function f(i){n.ngMultiple&&i.attr("multiple",a(n.ngMultiple)(e)),a(n.ngMultiple)(e)||i.attr("multiple",void 0),n.accept&&i.attr("accept",n.accept),n.ngCapture&&i.attr("capture",a(n.ngCapture)(e)),n.ngDisabled&&i.attr("disabled",a(n.ngDisabled)(e));for(var r=0;r<t[0].attributes.length;r++){var o=t[0].attributes[r];"type"!==o.name&&"class"!==o.name&&"id"!==o.name&&"style"!==o.name&&i.attr(o.name,o.value)}}function p(e){if(!t.attr("disabled")){var n=angular.element('<input type="file">');return f(n),c()?(t.replaceWith(n),t=n):(n.css("display","none").attr("tabindex","-1").attr("__ngf_gen__",!0),t.__ngf_ref_elem__&&t.__ngf_ref_elem__.remove(),t.__ngf_ref_elem__=n,document.body.appendChild(n[0])),n}}function h(t){r(a,s,e,i,n,n.ngFileChange||n.ngFileSelect,[],[],t,!0)}function m(e){function n(){i[0].click(),c()&&(t.bind(v,m),e.preventDefault())}var i=p(e);i&&(i.bind("change",d),h(e),navigator.userAgent.toLowerCase().match(/android/)?setTimeout(function(){n()},0):n())}var g=!1,v="ontouchend"in document?"touchend":"click";window.FileAPI&&window.FileAPI.ngfFixIE?window.FileAPI.ngfFixIE(t,p,f,d,h):t.bind(v,m)}function n(e,t,n,a,s,u,c){function d(e,t,n){var i=!0,r=n.dataTransfer.items;if(null!=r)for(l=0;l<r.length&&i;l++)i=i&&("file"==r[l].kind||""==r[l].kind)&&o(e,y,r[l],n);var a=s(t.dragOverClass)(e,{$event:n});return a&&(a.delay&&(v=a.delay),a.accept&&(a=i?a.accept:a.reject)),a||t.dragOverClass||"dragover"}function f(t,n,i,r){function a(n){o(e,y,n,t)?l.push(n):d.push(n)}function s(e,t,n){if(null!=t)if(t.isDirectory){var i=(n||"")+t.name;a({name:t.name,type:"directory",path:i});var r=t.createReader(),o=[];p++;var l=function(){r.readEntries(function(i){try{if(i.length)o=o.concat(Array.prototype.slice.call(i||[],0)),l();else{for(h=0;h<o.length;h++)s(e,o[h],(n?n:"")+t.name+"/");p--}}catch(r){p--,console.error(r)}},function(){p--})};l()}else p++,t.file(function(e){try{p--,e.path=(n?n:"")+e.name,a(e)}catch(t){p--,console.error(t)}},function(){p--})}var l=[],d=[],f=t.dataTransfer.items,p=0;if(f&&f.length>0&&"file"!=c.protocol())for(var h=0;h<f.length;h++){if(f[h].webkitGetAsEntry&&f[h].webkitGetAsEntry()&&f[h].webkitGetAsEntry().isDirectory){var m=f[h].webkitGetAsEntry();if(m.isDirectory&&!i)continue;null!=m&&s(l,m)}else{var g=f[h].getAsFile();null!=g&&a(g)}if(!r&&l.length>0)break}else{var v=t.dataTransfer.files;if(null!=v)for(var h=0;h<v.length&&(a(v.item(h)),r||!(l.length>0));h++);}var b=0;!function w(e){u(function(){if(p)10*b++<2e4&&w(10);else{if(!r&&l.length>1){for(h=0;"directory"==l[h].type;)h++;l=[l[h]]}n(l,d)}},e||0)}()}var p=i();if(n.dropAvailable&&u(function(){e[n.dropAvailable]?e[n.dropAvailable].value=p:e[n.dropAvailable]=p}),!p)return void(1==s(n.hideOnDropNotAvailable)(e)&&t.css("display","none"));var h,m=null,g=s(n.stopPropagation),v=1,y=s(n.ngAccept),b=s(n.ngDisabled);t[0].addEventListener("dragover",function(i){if(!b(e)){if(i.preventDefault(),g(e)&&i.stopPropagation(),navigator.userAgent.indexOf("Chrome")>-1){var r=i.dataTransfer.effectAllowed;i.dataTransfer.dropEffect="move"===r||"linkMove"===r?"move":"copy"}u.cancel(m),e.actualDragOverClass||(h=d(e,n,i)),t.addClass(h)}},!1),t[0].addEventListener("dragenter",function(t){b(e)||(t.preventDefault(),g(e)&&t.stopPropagation())},!1),t[0].addEventListener("dragleave",function(){b(e)||(m=u(function(){t.removeClass(h),h=null},v||1))},!1),t[0].addEventListener("drop",function(i){b(e)||(i.preventDefault(),g(e)&&i.stopPropagation(),t.removeClass(h),h=null,f(i,function(t,o){r(s,u,e,a,n,n.ngFileChange||n.ngFileDrop&&n.ngFileDrop.indexOf("(")>0,t,o,i)},0!=s(n.allowDir)(e),n.multiple||s(n.ngMultiple)(e)))},!1)}function i(){var e=document.createElement("div");return"draggable"in e&&"ondrop"in e}function r(e,t,n,i,r,o,a,s,l,u){function c(){i&&(e(r.ngModel).assign(n,a),t(function(){i&&i.$setViewValue(null!=a&&0==a.length?null:a)})),r.ngModelRejected&&e(r.ngModelRejected).assign(n,s),o&&e(o)(n,{$files:a,$rejectedFiles:s,$event:l})}u?c():t(function(){c()})}function o(e,t,n,i){var r=t(e,{$file:n,$event:i});if(null==r)return!0;if(angular.isString(r)){var o=new RegExp(a(r),"gi");r=null!=n.type&&n.type.match(o)||null!=n.name&&n.name.match(o)}return r}function a(e){if(e.length>2&&"/"===e[0]&&"/"===e[e.length-1])return e.substring(1,e.length-1);var t=e.split(","),n="";if(t.length>1)for(l=0;l<t.length;l++)n+="("+a(t[l])+")",l<t.length-1&&(n+="|");else 0==e.indexOf(".")&&(e="*"+e),n="^"+e.replace(new RegExp("[.\\\\+*?\\[\\^\\]$(){}=!<>|:\\-]","g"),"\\$&")+"$",n=n.replace(/\\\*/g,".*").replace(/\\\?/g,".");return n}var s,l;window.XMLHttpRequest&&!window.XMLHttpRequest.__isFileAPIShim&&e("setRequestHeader",function(e){return function(t,n){if("__setXHR_"===t){var i=n(this);i instanceof Function&&i(this)}else e.apply(this,arguments)}});var u=angular.module("angularFileUpload",[]);u.version="3.3.2",u.service("$upload",["$http","$q","$timeout",function(e,t,n){function i(i){i.method=i.method||"POST",i.headers=i.headers||{},i.transformRequest=i.transformRequest||function(t,n){return window.ArrayBuffer&&t instanceof window.ArrayBuffer?t:e.defaults.transformRequest[0](t,n)};var r=t.defer(),o=r.promise;return i.headers.__setXHR_=function(){return function(e){e&&(i.__XHR=e,i.xhrFn&&i.xhrFn(e),e.upload.addEventListener("progress",function(e){e.config=i,r.notify?r.notify(e):o.progress_fn&&n(function(){o.progress_fn(e)})},!1),e.upload.addEventListener("load",function(e){e.lengthComputable&&(e.config=i,r.notify?r.notify(e):o.progress_fn&&n(function(){o.progress_fn(e)}))},!1))}},e(i).then(function(e){r.resolve(e)},function(e){r.reject(e)},function(e){r.notify(e)}),o.success=function(e){return o.then(function(t){e(t.data,t.status,t.headers,i)}),o},o.error=function(e){return o.then(null,function(t){e(t.data,t.status,t.headers,i)}),o},o.progress=function(e){return o.progress_fn=e,o.then(null,null,function(t){e(t)}),o},o.abort=function(){return i.__XHR&&n(function(){i.__XHR.abort()}),o},o.xhr=function(e){return i.xhrFn=function(t){return function(){t&&t.apply(o,arguments),e.apply(o,arguments)}}(i.xhrFn),o},o}this.upload=function(e){return e.headers=e.headers||{},e.headers["Content-Type"]=void 0,e.transformRequest=e.transformRequest?angular.isArray(e.transformRequest)?e.transformRequest:[e.transformRequest]:[],e.transformRequest.push(function(t){var n=new FormData,i={};for(s in e.fields)e.fields.hasOwnProperty(s)&&(i[s]=e.fields[s]);if(t&&(i.data=t),e.formDataAppender)for(s in i)i.hasOwnProperty(s)&&e.formDataAppender(n,s,i[s]);else for(s in i)if(i.hasOwnProperty(s)){var r=i[s];void 0!==r&&(angular.isDate(r)&&(r=r.toISOString()),angular.isString(r)?n.append(s,r):e.sendObjectsAsJsonBlob&&angular.isObject(r)?n.append(s,new Blob([r],{type:"application/json"})):n.append(s,JSON.stringify(r)))}if(null!=e.file){var o=e.fileFormDataName||"file";if(angular.isArray(e.file)){var a=angular.isString(o);for(l=0;l<e.file.length;l++)n.append(a?o:o[l],e.file[l],e.fileName&&e.fileName[l]||e.file[l].name)}else n.append(o,e.file,e.fileName||e.file.name)}return n}),i(e)},this.http=function(e){return i(e)}}]),u.directive("ngFileSelect",["$parse","$timeout","$compile",function(e,n,i){return{restrict:"AEC",require:"?ngModel",link:function(r,o,a,s){t(r,o,a,s,e,n,i)}}}]),u.directive("ngFileDrop",["$parse","$timeout","$location",function(e,t,i){return{restrict:"AEC",require:"?ngModel",link:function(r,o,a,s){n(r,o,a,s,e,t,i)}}}]),u.directive("ngNoFileDrop",function(){return function(e,t){i()&&t.css("display","none")}}),u.directive("ngFileDropAvailable",["$parse","$timeout",function(e,t){return function(n,r,o){if(i()){var a=e(o.ngFileDropAvailable);t(function(){a(n)})}}}]);var c=angular.module("ngFileUpload",[]);for(s in u)u.hasOwnProperty(s)&&(c[s]=u[s])}(),function(){function e(e,t){window.XMLHttpRequest.prototype[e]=t(window.XMLHttpRequest.prototype[e])}function t(e,t,n){try{Object.defineProperty(e,t,{get:n})}catch(i){}}function n(e){return"input"===e[0].tagName.toLowerCase()&&e.attr("type")&&"file"===e.attr("type").toLowerCase()}var i=function(){try{var e=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");if(e)return!0}catch(t){if(void 0!=navigator.mimeTypes["application/x-shockwave-flash"])return!0}return!1};if(window.XMLHttpRequest&&!window.FormData||window.FileAPI&&FileAPI.forceLoad){var r=function(e){if(!e.__listeners){e.upload||(e.upload={}),e.__listeners=[];var t=e.upload.addEventListener;e.upload.addEventListener=function(n,i,r){e.__listeners[n]=i,t&&t.apply(this,arguments)}}};e("open",function(e){return function(t,n,i){r(this),this.__url=n;try{e.apply(this,[t,n,i])}catch(o){o.message.indexOf("Access is denied")>-1&&(this.__origError=o,e.apply(this,[t,"_fix_for_ie_crossdomain__",i]))}}}),e("getResponseHeader",function(e){return function(t){return this.__fileApiXHR&&this.__fileApiXHR.getResponseHeader?this.__fileApiXHR.getResponseHeader(t):null==e?null:e.apply(this,[t])}}),e("getAllResponseHeaders",function(e){return function(){return this.__fileApiXHR&&this.__fileApiXHR.getAllResponseHeaders?this.__fileApiXHR.getAllResponseHeaders():null==e?null:e.apply(this)}}),e("abort",function(e){return function(){return this.__fileApiXHR&&this.__fileApiXHR.abort?this.__fileApiXHR.abort():null==e?null:e.apply(this)}}),e("setRequestHeader",function(e){return function(t,n){if("__setXHR_"===t){r(this);var i=n(this);i instanceof Function&&i(this)}else this.__requestHeaders=this.__requestHeaders||{},this.__requestHeaders[t]=n,e.apply(this,arguments)}}),e("send",function(e){return function(){var n=this;if(arguments[0]&&arguments[0].__isFileAPIShim){var r=arguments[0],o={url:n.__url,jsonp:!1,cache:!0,complete:function(e,i){n.__completed=!0,!e&&n.__listeners.load&&n.__listeners.load({type:"load",loaded:n.__loaded,total:n.__total,target:n,lengthComputable:!0}),!e&&n.__listeners.loadend&&n.__listeners.loadend({type:"loadend",loaded:n.__loaded,total:n.__total,target:n,lengthComputable:!0}),"abort"===e&&n.__listeners.abort&&n.__listeners.abort({type:"abort",loaded:n.__loaded,total:n.__total,target:n,lengthComputable:!0}),void 0!==i.status&&t(n,"status",function(){return 0==i.status&&e&&"abort"!==e?500:i.status}),void 0!==i.statusText&&t(n,"statusText",function(){return i.statusText}),t(n,"readyState",function(){return 4}),void 0!==i.response&&t(n,"response",function(){return i.response});var r=i.responseText||(e&&0==i.status&&"abort"!==e?e:void 0);t(n,"responseText",function(){return r}),t(n,"response",function(){return r}),e&&t(n,"err",function(){return e}),n.__fileApiXHR=i,n.onreadystatechange&&n.onreadystatechange(),n.onload&&n.onload()},fileprogress:function(e){if(e.target=n,n.__listeners.progress&&n.__listeners.progress(e),n.__total=e.total,n.__loaded=e.loaded,e.total===e.loaded){var t=this;setTimeout(function(){n.__completed||(n.getAllResponseHeaders=function(){},t.complete(null,{status:204,statusText:"No Content"}))},FileAPI.noContentTimeout||1e4)}},headers:n.__requestHeaders};o.data={},o.files={};for(var a=0;a<r.data.length;a++){var s=r.data[a];null!=s.val&&null!=s.val.name&&null!=s.val.size&&null!=s.val.type?o.files[s.key]=s.val:o.data[s.key]=s.val}setTimeout(function(){if(!i())throw'Adode Flash Player need to be installed. To check ahead use "FileAPI.hasFlash"';n.__fileApiXHR=FileAPI.upload(o)},1)}else{if(this.__origError)throw this.__origError;e.apply(n,arguments)}}}),window.XMLHttpRequest.__isFileAPIShim=!0,FileAPI.ngfFixIE=function(e,t,r,o,a){if(!i())throw'Adode Flash Player need to be installed. To check ahead use "FileAPI.hasFlash"';
  var s=function(i){function a(e){var t,n;if(t=n=0,e.offsetParent)do t+=e.offsetLeft,n+=e.offsetTop;while(e=e.offsetParent);return{left:t,top:n}}if(e.attr("disabled"))e.__ngf_elem__.removeClass("js-fileapi-wrapper");else{var u=e.__ngf_elem__;u?r(e.__ngf_elem__):(u=e.__ngf_elem__=t(),u.addClass("js-fileapi-wrapper"),!n(e),setTimeout(function(){u.bind("mouseenter",s)},10),u.bind("change",function(e){l.apply(this,[e]),o.apply(this,[e])})),n(e)||u.css("position","absolute").css("top",a(e[0]).top+"px").css("left",a(e[0]).left+"px").css("width",e[0].offsetWidth+"px").css("height",e[0].offsetHeight+"px").css("filter","alpha(opacity=0)").css("display",e.css("display")).css("overflow","hidden").css("z-index","1")}};e.bind("mouseenter",s);var l=function(e){for(var t=FileAPI.getFiles(e),n=0;n<t.length;n++)void 0===t[n].size&&(t[n].size=0),void 0===t[n].name&&(t[n].name="file"),void 0===t[n].type&&(t[n].type="undefined");e.target||(e.target={}),e.target.files=t,e.target.files!=t&&(e.__files_=t),(e.__files_||e.target.files).item=function(t){return(e.__files_||e.target.files)[t]||null}}},window.FormData=FormData=function(){return{append:function(e,t,n){t.__isFileAPIBlobShim&&(t=t.data[0]),this.data.push({key:e,val:t,name:n})},data:[],__isFileAPIShim:!0}},window.Blob=Blob=function(e){return{data:e,__isFileAPIBlobShim:!0}},function(){if(window.FileAPI||(window.FileAPI={}),FileAPI.forceLoad&&(FileAPI.html5=!1),!FileAPI.upload){var e,t,n,r,o,a=document.createElement("script"),s=document.getElementsByTagName("script");if(window.FileAPI.jsUrl)e=window.FileAPI.jsUrl;else if(window.FileAPI.jsPath)t=window.FileAPI.jsPath;else for(n=0;n<s.length;n++)if(o=s[n].src,r=o.search(/\/angular\-file\-upload[\-a-zA-z0-9\.]*\.js/),r>-1){t=o.substring(0,r+1);break}null==FileAPI.staticPath&&(FileAPI.staticPath=t),a.setAttribute("src",e||t+"FileAPI.min.js"),document.getElementsByTagName("head")[0].appendChild(a),FileAPI.hasFlash=i()}}(),FileAPI.disableFileInput=function(e,t){t?e.removeClass("js-fileapi-wrapper"):e.addClass("js-fileapi-wrapper")}}window.FileReader||(window.FileReader=function(){var e=this,t=!1;this.listeners={},this.addEventListener=function(t,n){e.listeners[t]=e.listeners[t]||[],e.listeners[t].push(n)},this.removeEventListener=function(t,n){e.listeners[t]&&e.listeners[t].splice(e.listeners[t].indexOf(n),1)},this.dispatchEvent=function(t){var n=e.listeners[t.type];if(n)for(var i=0;i<n.length;i++)n[i].call(e,t)},this.onabort=this.onerror=this.onload=this.onloadstart=this.onloadend=this.onprogress=null;var n=function(t,n){var i={type:t,target:e,loaded:n.loaded,total:n.total,error:n.error};return null!=n.result&&(i.target.result=n.result),i},i=function(i){if(t||(t=!0,e.onloadstart&&e.onloadstart(n("loadstart",i))),"load"===i.type){e.onloadend&&e.onloadend(n("loadend",i));var r=n("load",i);e.onload&&e.onload(r),e.dispatchEvent(r)}else if("progress"===i.type){var r=n("progress",i);e.onprogress&&e.onprogress(r),e.dispatchEvent(r)}else{var r=n("error",i);e.onerror&&e.onerror(r),e.dispatchEvent(r)}};this.readAsArrayBuffer=function(e){FileAPI.readAsBinaryString(e,i)},this.readAsBinaryString=function(e){FileAPI.readAsBinaryString(e,i)},this.readAsDataURL=function(e){FileAPI.readAsDataURL(e,i)},this.readAsText=function(e){FileAPI.readAsText(e,i)}})}(),function(e,t,n){"use strict";function i(e,t,n){if(!e)throw ngMinErr("areq","Argument '{0}' is {1}",t||"?",n||"required");return e}function r(e,t){return e||t?e?t?(R(e)&&(e=e.join(" ")),R(t)&&(t=t.join(" ")),e+" "+t):e:t:""}function o(e){var t={};return e&&(e.to||e.from)&&(t.to=e.to,t.from=e.from),t}function a(e,t,n){var i="";return e=R(e)?e:e&&j(e)&&e.length?e.split(/\s+/):[],H(e,function(e,r){e&&e.length>0&&(i+=r>0?" ":"",i+=n?t+e:e+t)}),i}function s(e,t){var n=e.indexOf(t);t>=0&&e.splice(n,1)}function l(e){if(e instanceof P)switch(e.length){case 0:return[];case 1:if(e[0].nodeType===X)return e;break;default:return P(u(e))}return e.nodeType===X?P(e):void 0}function u(e){if(!e[0])return e;for(var t=0;t<e.length;t++){var n=e[t];if(n.nodeType==X)return n}}function c(e,t,n){H(t,function(t){e.addClass(t,n)})}function d(e,t,n){H(t,function(t){e.removeClass(t,n)})}function f(e){return function(t,n){n.addClass&&(c(e,t,n.addClass),n.addClass=null),n.removeClass&&(d(e,t,n.removeClass),n.removeClass=null)}}function p(e){if(e=e||{},!e.$$prepared){var t=e.domOperation||$;e.domOperation=function(){e.$$domOperationFired=!0,t(),t=$},e.$$prepared=!0}return e}function h(e,t){m(e,t),g(e,t)}function m(e,t){t.from&&(e.css(t.from),t.from=null)}function g(e,t){t.to&&(e.css(t.to),t.to=null)}function v(e,t,n){var i=(t.addClass||"")+" "+(n.addClass||""),r=(t.removeClass||"")+" "+(n.removeClass||""),o=y(e.attr("class"),i,r);return I(t,n),o.addClass?t.addClass=o.addClass:t.addClass=null,o.removeClass?t.removeClass=o.removeClass:t.removeClass=null,t}function y(e,t,n){function i(e){j(e)&&(e=e.split(" "));var t={};return H(e,function(e){e.length&&(t[e]=!0)}),t}var r=1,o=-1,a={};e=i(e),t=i(t),H(t,function(e,t){a[t]=r}),n=i(n),H(n,function(e,t){a[t]=a[t]===r?null:o});var s={addClass:"",removeClass:""};return H(a,function(t,n){var i,a;t===r?(i="addClass",a=!e[n]):t===o&&(i="removeClass",a=e[n]),a&&(s[i].length&&(s[i]+=" "),s[i]+=n)}),s}function b(e){return e instanceof t.element?e[0]:e}function w(e,t,n){var i=Object.create(null),r=e.getComputedStyle(t)||{};return H(n,function(e,t){var n=r[e];if(n){var o=n.charAt(0);("-"===o||"+"===o||o>=0)&&(n=D(n)),0===n&&(n=null),i[t]=n}}),i}function D(e){var t=0,n=e.split(/\s*,\s*/);return H(n,function(e){"s"==e.charAt(e.length-1)&&(e=e.substring(0,e.length-1)),e=parseFloat(e)||0,t=t?Math.max(e,t):e}),t}function x(e){return 0===e||null!=e}function _(e,t){var n=E,i=e+"s";return t?n+=J:i+=" linear all",[n,i]}function C(e){return[le,e+"s"]}function T(e,t){var n=t?se:ue;return[n,e+"s"]}function k(e,t){var n=t?"-"+t+"s":"";return S(e,[ue,n]),[ue,n]}function A(e,t){var n=t?"paused":"",i=M+ne;return S(e,[i,n]),[i,n]}function S(e,t){var n=t[0],i=t[1];e.style[n]=i}function N(){var e=Object.create(null);return{flush:function(){e=Object.create(null)},count:function(t){var n=e[t];return n?n.total:0},get:function(t){var n=e[t];return n&&n.value},put:function(t,n){e[t]?e[t].total++:e[t]={total:1,value:n}}}}var E,L,M,F,$=t.noop,I=t.extend,P=t.element,H=t.forEach,R=t.isArray,j=t.isString,O=t.isObject,q=t.isUndefined,B=t.isDefined,W=t.isFunction,z=t.isElement,X=1,Y="ng-animate",U="$$ngAnimateChildren",G=["$$rAF",function(e){function t(e){o.push([].concat(e)),n()}function n(){if(o.length){for(var t=[],a=0;a<o.length;a++){var s=o[a];i(s),s.length&&t.push(s)}o=t,r||e(function(){r||n()})}}function i(e){var t=e.shift();t()}var r,o=[];return t.waitUntilQuiet=function(t){r&&r(),r=e(function(){r=null,t(),n()})},t}],V=[function(){return function(e,n,i){var r=i.ngAnimateChildren;t.isString(r)&&0===r.length?n.data(U,!0):i.$observe("ngAnimateChildren",function(e){e="on"===e||"true"===e,n.data(U,e)})}}],K="";e.ontransitionend===n&&e.onwebkittransitionend!==n?(K="-webkit-",E="WebkitTransition",L="webkitTransitionEnd transitionend"):(E="transition",L="transitionend"),e.onanimationend===n&&e.onwebkitanimationend!==n?(K="-webkit-",M="WebkitAnimation",F="webkitAnimationEnd animationend"):(M="animation",F="animationend");var J="Duration",Q="Property",Z="Delay",ee="TimingFunction",te="IterationCount",ne="PlayState",ie=3,re=1.5,oe=1e3,ae=9999,se=M+Z,le=M+J,ue=E+Z,ce=E+J,de={transitionDuration:ce,transitionDelay:ue,transitionProperty:E+Q,animationDuration:le,animationDelay:se,animationIterationCount:M+te},fe={transitionDuration:ce,transitionDelay:ue,animationDuration:le,animationDelay:se},pe=["$animateProvider",function(e){var t=N(),n=N();this.$get=["$window","$$jqLite","$$AnimateRunner","$timeout","$document","$sniffer","$$rAFScheduler",function(e,i,r,l,u,c,d){function v(e,t){var n="$$ngAnimateParentKey",i=e.parentNode,r=i[n]||(i[n]=++j);return r+"-"+e.getAttribute("class")+"-"+t}function y(n,i,r,o){var a=t.get(r);return a||(a=w(e,n,o),"infinite"===a.animationIterationCount&&(a.animationIterationCount=1)),t.put(r,a),a}function D(r,o,s,l){var u;if(t.count(s)>0&&(u=n.get(s),!u)){var c=a(o,"-stagger");i.addClass(r,c),u=w(e,r,l),u.animationDuration=Math.max(u.animationDuration,0),u.transitionDuration=Math.max(u.transitionDuration,0),i.removeClass(r,c),n.put(s,u)}return u||{}}function N(e){q.push(e),d.waitUntilQuiet(function(){t.flush(),n.flush();for(var e=O.offsetWidth+1,i=0;i<q.length;i++)q[i](e);q.length=0})}function $(e,t,n){var i=y(e,t,n,de),r=i.animationDelay,o=i.transitionDelay;return i.maxDelay=r&&o?Math.max(r,o):r||o,i.maxDuration=Math.max(i.animationDuration*i.animationIterationCount,i.transitionDuration),i}function I(e,n){function u(){f()}function d(){f(!0)}function f(t){O||B&&q||(O=!0,q=!1,i.removeClass(e,le),i.removeClass(e,ce),A(j,!1),k(j,!1),H(V,function(e){j.style[e[0]]=""}),P(e,n),h(e,n),n.onDone&&n.onDone(),W&&W.complete(!t))}function y(e){Ce.blockTransition&&k(j,e),Ce.blockKeyframeAnimation&&A(j,!!e)}function w(){return W=new r({end:u,cancel:d}),f(),{$$willAnimate:!1,start:function(){return W},end:u}}function I(){function t(){if(!O){if(y(!1),H(V,function(e){var t=e[0],n=e[1];j.style[t]=n}),P(e,n),i.addClass(e,ce),Ce.recalculateTimingStyles){if(ue=j.className+" "+le,pe=v(j,ue),xe=$(j,ue,pe),_e=xe.maxDelay,X=Math.max(_e,0),U=xe.maxDuration,0===U)return void f();Ce.hasTransitions=xe.transitionDuration>0,Ce.hasAnimations=xe.animationDuration>0}if(Ce.applyTransitionDelay||Ce.applyAnimationDelay){_e="boolean"!=typeof n.delay&&x(n.delay)?parseFloat(n.delay):_e,X=Math.max(_e,0);var t;Ce.applyTransitionDelay&&(xe.transitionDelay=_e,t=T(_e),V.push(t),j.style[t[0]]=t[1]),Ce.applyAnimationDelay&&(xe.animationDelay=_e,t=T(_e,!0),V.push(t),j.style[t[0]]=t[1])}if(Y=X*oe,G=U*oe,n.easing){var s,c=n.easing;Ce.hasTransitions&&(s=E+ee,V.push([s,c]),j.style[s]=c),Ce.hasAnimations&&(s=M+ee,V.push([s,c]),j.style[s]=c)}xe.transitionDuration&&u.push(L),xe.animationDuration&&u.push(F),a=Date.now(),e.on(u.join(" "),o),l(r,Y+re*G),g(e,n)}}function r(){f()}function o(e){e.stopPropagation();var t=e.originalEvent||e,n=t.$manualTimeStamp||t.timeStamp||Date.now(),i=parseFloat(t.elapsedTime.toFixed(ie));Math.max(n-a,0)>=Y&&i>=U&&(B=!0,f())}if(!O){var a,u=[],c=function(e){if(B)q&&e&&(q=!1,f());else if(q=!e,xe.animationDuration){var t=A(j,q);q?V.push(t):s(V,t)}},d=we>0&&(xe.transitionDuration&&0===he.transitionDuration||xe.animationDuration&&0===he.animationDuration)&&Math.max(he.animationDelay,he.transitionDelay);d?l(t,Math.floor(d*we*oe),!1):t(),z.resume=function(){c(!0)},z.pause=function(){c(!1)}}}var j=b(e);n=p(n);var O,q,B,W,z,X,Y,U,G,V=[],K=e.attr("class"),J=o(n);if(0===n.duration||!c.animations&&!c.transitions)return w();var Z=n.event&&R(n.event)?n.event.join(" "):n.event,te=Z&&n.structural,ne="",se="";te?ne=a(Z,"ng-",!0):Z&&(ne=Z),n.addClass&&(se+=a(n.addClass,"-add")),n.removeClass&&(se.length&&(se+=" "),se+=a(n.removeClass,"-remove")),n.applyClassesEarly&&se.length&&(P(e,n),se="");var le=[ne,se].join(" ").trim(),ue=K+" "+le,ce=a(le,"-active"),de=J.to&&Object.keys(J.to).length>0;if(!de&&!le)return w();var pe,he;if(n.stagger>0){var me=parseFloat(n.stagger);he={transitionDelay:me,animationDelay:me,transitionDuration:0,animationDuration:0}}else pe=v(j,ue),he=D(j,le,pe,fe);i.addClass(e,le);var ge;if(n.transitionStyle){var ve=[E,n.transitionStyle];S(j,ve),V.push(ve)}if(n.duration>=0){ge=j.style[E].length>0;var ye=_(n.duration,ge);S(j,ye),V.push(ye)}if(n.keyframeStyle){var be=[M,n.keyframeStyle];S(j,be),V.push(be)}var we=he?n.staggerIndex>=0?n.staggerIndex:t.count(pe):0,De=0===we;De&&k(j,ae);var xe=$(j,ue,pe),_e=xe.maxDelay;X=Math.max(_e,0),U=xe.maxDuration;var Ce={};return Ce.hasTransitions=xe.transitionDuration>0,Ce.hasAnimations=xe.animationDuration>0,Ce.hasTransitionAll=Ce.hasTransitions&&"all"==xe.transitionProperty,Ce.applyTransitionDuration=de&&(Ce.hasTransitions&&!Ce.hasTransitionAll||Ce.hasAnimations&&!Ce.hasTransitions),Ce.applyAnimationDuration=n.duration&&Ce.hasAnimations,Ce.applyTransitionDelay=x(n.delay)&&(Ce.applyTransitionDuration||Ce.hasTransitions),Ce.applyAnimationDelay=x(n.delay)&&Ce.hasAnimations,Ce.recalculateTimingStyles=se.length>0,(Ce.applyTransitionDuration||Ce.applyAnimationDuration)&&(U=n.duration?parseFloat(n.duration):U,Ce.applyTransitionDuration&&(Ce.hasTransitions=!0,xe.transitionDuration=U,ge=j.style[E+Q].length>0,V.push(_(U,ge))),Ce.applyAnimationDuration&&(Ce.hasAnimations=!0,xe.animationDuration=U,V.push(C(U)))),0!==U||Ce.recalculateTimingStyles?(null==n.duration&&xe.transitionDuration>0&&(Ce.recalculateTimingStyles=Ce.recalculateTimingStyles||De),Y=X*oe,G=U*oe,n.skipBlocking||(Ce.blockTransition=xe.transitionDuration>0,Ce.blockKeyframeAnimation=xe.animationDuration>0&&he.animationDelay>0&&0===he.animationDuration),m(e,n),Ce.blockTransition||k(j,!1),y(U),{$$willAnimate:!0,end:u,start:function(){return O?void 0:(z={end:u,cancel:d,resume:null,pause:null},W=new r(z),N(I),W)}}):w()}var P=f(i),j=0,O=b(u).body,q=[];return I}]}],he=["$$animationProvider",function(e){e.drivers.push("$$animateCssDriver");var t="ng-animate-shim",n="ng-anchor",i="ng-anchor-out",r="ng-anchor-in";this.$get=["$animateCss","$rootScope","$$AnimateRunner","$rootElement","$document","$sniffer",function(e,o,a,s,l,u){function c(e){return e.replace(/\bng-\S+\b/g,"")}function d(e,t){return j(e)&&(e=e.split(" ")),j(t)&&(t=t.split(" ")),e.filter(function(e){return-1===t.indexOf(e)}).join(" ")}function f(o,s,l){function u(e){var t={},n=b(e).getBoundingClientRect();return H(["width","height","top","left"],function(e){var i=n[e];switch(e){case"top":i+=m.scrollTop;break;case"left":i+=m.scrollLeft}t[e]=Math.floor(i)+"px"}),t}function f(){var t=e(y,{addClass:i,delay:!0,from:u(s)});return t.$$willAnimate?t:null}function p(e){return e.attr("class")||""}function h(){var t=c(p(l)),n=d(t,w),o=d(w,t),a=e(y,{to:u(l),addClass:r+" "+n,removeClass:i+" "+o,delay:!0});return a.$$willAnimate?a:null}function g(){y.remove(),s.removeClass(t),l.removeClass(t)}var y=P(b(s).cloneNode(!0)),w=c(p(y));s.addClass(t),l.addClass(t),y.addClass(n),v.append(y);var D,x=f();if(!x&&(D=h(),!D))return g();var _=x||D;return{start:function(){function e(){n&&n.end()}var t,n=_.start();return n.done(function(){return n=null,!D&&(D=h())?(n=D.start(),n.done(function(){n=null,g(),t.complete()}),n):(g(),void t.complete())}),t=new a({end:e,cancel:e})}}}function p(e,t,n,i){var r=h(e),o=h(t),s=[];return H(i,function(e){var t=e.out,i=e["in"],r=f(n,t,i);r&&s.push(r)}),r||o||0!==s.length?{start:function(){function e(){H(t,function(e){e.end()})}var t=[];r&&t.push(r.start()),o&&t.push(o.start()),H(s,function(e){t.push(e.start())});var n=new a({end:e,cancel:e});return a.all(t,function(e){n.complete(e)}),n}}:void 0}function h(t){var n=t.element,i=t.options||{};t.structural?(i.structural=i.applyClassesEarly=!0,i.event=t.event,"leave"===i.event&&(i.onDone=i.domOperation)):i.event=null;var r=e(n,i);return r.$$willAnimate?r:null}if(!u.animations&&!u.transitions)return $;var m=b(l).body,g=b(s),v=P(m.parentNode===g?m:g);return function(e){return e.from&&e.to?p(e.from,e.to,e.classes,e.anchors):h(e)}}]}],me=["$animateProvider",function(e){this.$get=["$injector","$$AnimateRunner","$$rAFMutex","$$jqLite",function(t,n,i,r){function o(n){n=R(n)?n:n.split(" ");for(var i=[],r={},o=0;o<n.length;o++){var a=n[o],s=e.$$registeredAnimations[a];s&&!r[a]&&(i.push(t.get(s)),r[a]=!0)}return i}var a=f(r);return function(e,t,i,r){function s(){r.domOperation(),a(e,r)}function l(e,t,i,r,o){var a;switch(i){case"animate":a=[t,r.from,r.to,o];break;case"setClass":a=[t,m,g,o];break;case"addClass":a=[t,m,o];break;case"removeClass":a=[t,g,o];break;default:a=[t,o]}a.push(r);var s=e.apply(e,a);if(s)if(W(s.start)&&(s=s.start()),s instanceof n)s.done(o);else if(W(s))return s;return $}function u(e,t,i,r,o){var a=[];return H(r,function(r){var s=r[o];s&&a.push(function(){var r,o,a=!1,u=function(e){a||(a=!0,(o||$)(e),r.complete(!e))};return r=new n({end:function(){u()},cancel:function(){u(!0)}}),o=l(s,e,t,i,function(e){var t=e===!1;u(t)}),r})}),a}function c(e,t,i,r,o){var a=u(e,t,i,r,o);if(0===a.length){var s,l;"beforeSetClass"===o?(s=u(e,"removeClass",i,r,"beforeRemoveClass"),l=u(e,"addClass",i,r,"beforeAddClass")):"setClass"===o&&(s=u(e,"removeClass",i,r,"removeClass"),l=u(e,"addClass",i,r,"addClass")),s&&(a=a.concat(s)),l&&(a=a.concat(l))}if(0!==a.length)return function(e){var t=[];return a.length&&H(a,function(e){t.push(e())}),t.length?n.all(t,e):e(),function(e){H(t,function(t){e?t.cancel():t.end()})}}}3===arguments.length&&O(i)&&(r=i,i=null),r=p(r),i||(i=e.attr("class")||"",r.addClass&&(i+=" "+r.addClass),r.removeClass&&(i+=" "+r.removeClass));var d,f,m=r.addClass,g=r.removeClass,v=o(i);if(v.length){var y,b;"leave"==t?(b="leave",y="afterLeave"):(b="before"+t.charAt(0).toUpperCase()+t.substr(1),y=t),"enter"!==t&&"move"!==t&&(d=c(e,t,r,v,b)),f=c(e,t,r,v,y)}return d||f?{start:function(){function t(t){l=!0,s(),h(e,r),u.complete(t)}function i(e){l||((o||$)(e),t(e))}var o,a=[];d&&a.push(function(e){o=d(e)}),a.length?a.push(function(e){s(),e(!0)}):s(),f&&a.push(function(e){o=f(e)});var l=!1,u=new n({end:function(){i()},cancel:function(){i(!0)}});return n.chain(a,t),u}}:void 0}}]}],ge=["$$animationProvider",function(e){e.drivers.push("$$animateJsDriver"),this.$get=["$$animateJs","$$AnimateRunner",function(e,t){function n(t){var n=t.element,i=t.event,r=t.options,o=t.classes;return e(n,i,o,r)}return function(e){if(e.from&&e.to){var i=n(e.from),r=n(e.to);if(!i&&!r)return;return{start:function(){function e(){return function(){H(o,function(e){e.end()})}}function n(e){a.complete(e)}var o=[];i&&o.push(i.start()),r&&o.push(r.start()),t.all(o,n);var a=new t({end:e(),cancel:e()});return a}}}return n(e)}}]}],ve="data-ng-animate",ye="$ngAnimatePin",be=["$animateProvider",function(e){function t(e,t,n,i){return a[e].some(function(e){return e(t,n,i)})}function n(e,t){e=e||{};var n=(e.addClass||"").length>0,i=(e.removeClass||"").length>0;return t?n&&i:n||i}var r=1,o=2,a=this.rules={skip:[],cancel:[],join:[]};a.join.push(function(e,t,i){return!t.structural&&n(t.options)}),a.skip.push(function(e,t,i){return!t.structural&&!n(t.options)}),a.skip.push(function(e,t,n){return"leave"==n.event&&t.structural}),a.skip.push(function(e,t,n){return n.structural&&!t.structural}),a.cancel.push(function(e,t,n){return n.structural&&t.structural}),a.cancel.push(function(e,t,n){return n.state===o&&t.structural}),a.cancel.push(function(e,t,n){var i=t.options,r=n.options;return i.addClass&&i.addClass===r.removeClass||i.removeClass&&i.removeClass===r.addClass}),this.$get=["$$rAF","$rootScope","$rootElement","$document","$$HashMap","$$animation","$$AnimateRunner","$templateRequest","$$jqLite",function(a,s,c,d,m,g,y,w,D){function x(e,t){return v(e,t,{})}function _(e,t){var n=b(e),i=[],r=Y[t];return r&&H(r,function(e){e.node.contains(n)&&i.push(e.callback)}),i}function C(e,t,n,i){a(function(){H(_(t,e),function(e){e(t,n,i)})})}function T(e,i,a){function u(t,n,i,r){C(n,e,i,r),t.progress(n,i,r)}function c(t){K(e,a),h(e,a),a.domOperation(),m.complete(!t)}var d,f;e=l(e),e&&(d=b(e),f=e.parent()),a=p(a);var m=new y;if(!d)return c(),m;R(a.addClass)&&(a.addClass=a.addClass.join(" ")),R(a.removeClass)&&(a.removeClass=a.removeClass.join(" ")),a.from&&!O(a.from)&&(a.from=null),a.to&&!O(a.to)&&(a.to=null);var w=[d.className,a.addClass,a.removeClass].join(" ");if(!V(w))return c(),m;var D=["enter","move","leave"].indexOf(i)>=0,_=!$||F.get(d),T=!_&&M.get(d)||{},S=!!T.state;if(_||S&&T.state==r||(_=!E(e,f,i)),_)return c(),m;D&&k(e);var I={structural:D,element:e,event:i,close:c,options:a,runner:m};if(S){var P=t("skip",e,I,T);if(P)return T.state===o?(c(),m):(v(e,T.options,a),T.runner);var H=t("cancel",e,I,T);if(H)T.state===o?T.runner.end():T.structural?T.close():v(e,I.options,T.options);else{var j=t("join",e,I,T);if(j){if(T.state!==o)return i=I.event=T.event,a=v(e,T.options,I.options),m;x(e,a)}}}else x(e,a);var q=I.structural;if(q||(q="animate"===I.event&&Object.keys(I.options.to||{}).length>0||n(I.options)),!q)return c(),A(e),m;D&&N(f);var B=(T.counter||0)+1;return I.counter=B,L(e,r,I),s.$$postDigest(function(){var t=M.get(d),r=!t;t=t||{};var s=e.parent()||[],l=s.length>0&&("animate"===t.event||t.structural||n(t.options));if(r||t.counter!==B||!l)return r&&(K(e,a),h(e,a)),(r||D&&t.event!==i)&&(a.domOperation(),m.end()),void(l||A(e));i=!t.structural&&n(t.options,!0)?"setClass":t.event,t.structural&&N(s),L(e,o);var f=g(e,i,t.options);f.done(function(t){c(!t);var n=M.get(d);n&&n.counter===B&&A(b(e)),u(m,i,"close",{})}),m.setHost(f),u(m,i,"start",{})}),m}function k(e){var t=b(e),n=t.querySelectorAll("["+ve+"]");H(n,function(e){var t=parseInt(e.getAttribute(ve)),n=M.get(e);switch(t){case o:n.runner.end();case r:n&&M.remove(e)}})}function A(e){var t=b(e);t.removeAttribute(ve),M.remove(t)}function S(e,t){return b(e)===b(t)}function N(e){function t(e,t){!t.structural&&n(t.options)&&(t.state===o&&t.runner.end(),A(e))}for(var i=b(e);;){if(!i||i.nodeType!==X)break;var r=M.get(i);r&&t(i,r),i=i.parentNode}}function E(e,t,n){var i,r=!1,o=!1,a=!1,s=e.data(ye);for(s&&(t=s);t&&t.length;){o||(o=S(t,c));var l=t[0];if(l.nodeType!==X)break;var u=M.get(l)||{};if(a||(a=u.structural||F.get(l)),q(i)||i===!0){var d=t.data(U);B(d)&&(i=d)}if(a&&i===!1)break;o||(o=S(t,c),o||(s=t.data(ye),s&&(t=s))),r||(r=S(t,W)),t=t.parent()}var f=!a||i;return f&&o&&r}function L(e,t,n){n=n||{},n.state=t;var i=b(e);i.setAttribute(ve,t);var r=M.get(i),o=r?I(r,n):n;M.put(i,o)}var M=new m,F=new m,$=null,j=s.$watch(function(){return 0===w.totalPendingRequests},function(e){e&&(j(),s.$$postDigest(function(){s.$$postDigest(function(){null===$&&($=!0)})}))}),W=P(d[0].body),Y={},G=e.classNameFilter(),V=G?function(e){return G.test(e)}:function(){return!0},K=f(D);return{on:function(e,t,n){var i=u(t);Y[e]=Y[e]||[],Y[e].push({node:i,callback:n})},off:function(e,t,n){function i(e,t,n){var i=u(t);return e.filter(function(e){var t=e.node===i&&(!n||e.callback===n);return!t})}var r=Y[e];r&&(Y[e]=1===arguments.length?null:i(r,t,n))},pin:function(e,t){i(z(e),"element","not an element"),i(z(t),"parentElement","not an element"),e.data(ye,t)},push:function(e,t,n,i){return n=n||{},n.domOperation=i,T(e,t,n)},enabled:function(e,t){var n=arguments.length;if(0===n)t=!!$;else{var i=z(e);if(i){var r=b(e),o=F.get(r);1===n?t=!o:(t=!!t,t?o&&F.remove(r):F.put(r,!0))}else t=$=!!e}return t}}}]}],we=["$$rAF",function(e){return function(){var t=!1;return e(function(){t=!0}),function(n){t?n():e(n)}}}],De=["$q","$$rAFMutex",function(e,t){function n(e){this.setHost(e),this._doneCallbacks=[],this._runInAnimationFrame=t(),this._state=0}var i=0,r=1,o=2;return n.chain=function(e,t){function n(){return i===e.length?void t(!0):void e[i](function(e){return e===!1?void t(!1):(i++,void n())})}var i=0;n()},n.all=function(e,t){function n(n){r=r&&n,++i===e.length&&t(r)}var i=0,r=!0;H(e,function(e){e.done(n)})},n.prototype={setHost:function(e){this.host=e||{}},done:function(e){this._state===o?e():this._doneCallbacks.push(e)},progress:$,getPromise:function(){if(!this.promise){var t=this;this.promise=e(function(e,n){t.done(function(t){t===!1?n():e()})})}return this.promise},then:function(e,t){return this.getPromise().then(e,t)},"catch":function(e){return this.getPromise()["catch"](e)},"finally":function(e){return this.getPromise()["finally"](e)},pause:function(){this.host.pause&&this.host.pause()},resume:function(){this.host.resume&&this.host.resume()},end:function(){this.host.end&&this.host.end(),this._resolve(!0)},cancel:function(){this.host.cancel&&this.host.cancel(),this._resolve(!1)},complete:function(e){var t=this;t._state===i&&(t._state=r,t._runInAnimationFrame(function(){t._resolve(e)}))},_resolve:function(e){this._state!==o&&(H(this._doneCallbacks,function(t){t(e)}),this._doneCallbacks.length=0,this._state=o)}},n}],xe=["$animateProvider",function(e){function t(e,t){e.data(s,t)}function n(e){e.removeData(s)}function i(e){return e.data(s)}var o="ng-animate-ref",a=this.drivers=[],s="$$animationRunner";this.$get=["$$jqLite","$rootScope","$injector","$$AnimateRunner","$$rAFScheduler",function(e,s,l,u,c){var d=[],m=f(e),g=0,v=0,y=[];return function(f,w,D){function x(e){var t="["+o+"]",n=e.hasAttribute(o)?[e]:e.querySelectorAll(t),i=[];return H(n,function(e){var t=e.getAttribute(o);t&&t.length&&i.push(e)}),i}function _(e){var t=[],n={};H(e,function(e,i){var r=e.element,a=b(r),s=e.event,l=["enter","move"].indexOf(s)>=0,u=e.structural?x(a):[];if(u.length){var c=l?"to":"from";H(u,function(e){var t=e.getAttribute(o);n[t]=n[t]||{},n[t][c]={animationID:i,element:P(e)}})}else t.push(e)});var i={},r={};return H(n,function(n,o){var a=n.from,s=n.to;if(!a||!s){var l=a?a.animationID:s.animationID,u=l.toString();return void(i[u]||(i[u]=!0,t.push(e[l])))}var c=e[a.animationID],d=e[s.animationID],f=a.animationID.toString();if(!r[f]){var p=r[f]={structural:!0,beforeStart:function(){c.beforeStart(),d.beforeStart()},close:function(){c.close(),d.close()},classes:C(c.classes,d.classes),from:c,to:d,anchors:[]};p.classes.length?t.push(p):(t.push(c),t.push(d))}r[f].anchors.push({out:a.element,"in":s.element})}),t}function C(e,t){e=e.split(" "),t=t.split(" ");for(var n=[],i=0;i<e.length;i++){var r=e[i];if("ng-"!==r.substring(0,3))for(var o=0;o<t.length;o++)if(r===t[o]){n.push(r);break}}return n.join(" ")}function T(e){for(var t=a.length-1;t>=0;t--){var n=a[t];if(l.has(n)){var i=l.get(n),r=i(e);if(r)return r}}}function k(){f.addClass(Y),F&&e.addClass(f,F)}function A(e,t){function n(e){i(e).setHost(t)}e.from&&e.to?(n(e.from.element),n(e.to.element)):n(e.element)}function S(){var e=i(f);!e||"leave"===w&&D.$$domOperationFired||e.end()}function N(t){f.off("$destroy",S),n(f),m(f,D),h(f,D),D.domOperation(),F&&e.removeClass(f,F),f.removeClass(Y),L.complete(!t)}D=p(D);var E=["enter","move","leave"].indexOf(w)>=0,L=new u({end:function(){N()},cancel:function(){N(!0)}});if(!a.length)return N(),L;t(f,L);var M=r(f.attr("class"),r(D.addClass,D.removeClass)),F=D.tempClasses;F&&(M+=" "+F,D.tempClasses=null);var $;return E||($=g,g+=1),d.push({element:f,classes:M,event:w,classBasedIndex:$,structural:E,options:D,beforeStart:k,close:N}),f.on("$destroy",S),d.length>1?L:(s.$$postDigest(function(){v=g,g=0,y.length=0;var e=[];H(d,function(t){i(t.element)&&e.push(t)}),d.length=0,H(_(e),function(e){function t(){e.beforeStart();var t,n=e.close,r=e.anchors?e.from.element||e.to.element:e.element;if(i(r)){var o=T(e);o&&(t=o.start)}if(t){var a=t();a.done(function(e){n(!e)}),A(e,a)}else n()}e.structural?t():(y.push({node:b(e.element),fn:t}),e.classBasedIndex===v-1&&(y=y.sort(function(e,t){return t.node.contains(e.node)}).map(function(e){return e.fn}),c(y)))})}),L)}}]}];t.module("ngAnimate",[]).directive("ngAnimateChildren",V).factory("$$rAFMutex",we).factory("$$rAFScheduler",G).factory("$$AnimateRunner",De).provider("$$animateQueue",be).provider("$$animation",xe).provider("$animateCss",pe).provider("$$animateCssDriver",he).provider("$$animateJs",me).provider("$$animateJsDriver",ge)}(window,window.angular);var d3="function"==typeof require?require("d3"):window.d3,CalHeatMap=function(){"use strict";function e(){i.verticalDomainLabel="top"===i.options.label.position||"bottom"===i.options.label.position,i.domainVerticalLabelHeight=null===i.options.label.height?Math.max(25,2*i.options.cellSize):i.options.label.height,i.domainHorizontalLabelWidth=0,""===i.options.domainLabelFormat&&null===i.options.label.height&&(i.domainVerticalLabelHeight=0),i.verticalDomainLabel||(i.domainVerticalLabelHeight=0,i.domainHorizontalLabelWidth=i.options.label.width),i.paint(),i.options.nextSelector!==!1&&d3.select(i.options.nextSelector).on("click."+i.options.itemNamespace,function(){return d3.event.preventDefault(),i.loadNextDomain(1)}),i.options.previousSelector!==!1&&d3.select(i.options.previousSelector).on("click."+i.options.itemNamespace,function(){return d3.event.preventDefault(),i.loadPreviousDomain(1)}),i.Legend.redraw(i.graphDim.width-i.options.domainGutter-i.options.cellPadding),i.afterLoad();var e=i.getDomainKeys();i.options.loadOnInit?i.getDatas(i.options.data,new Date(e[0]),i.getSubDomain(e[e.length-1]).pop(),function(){i.fill(),i.onComplete()}):i.onComplete(),i.checkIfMinDomainIsReached(e[0]),i.checkIfMaxDomainIsReached(i.getNextDomain().getTime())}function t(e,t){var n=i.options.cellSize*i._domainType[i.options.subDomain].column(e)+i.options.cellPadding*i._domainType[i.options.subDomain].column(e);return 2===arguments.length&&t===!0?n+=i.domainHorizontalLabelWidth+i.options.domainGutter+i.options.domainMargin[1]+i.options.domainMargin[3]:n}function n(e,t){var n=i.options.cellSize*i._domainType[i.options.subDomain].row(e)+i.options.cellPadding*i._domainType[i.options.subDomain].row(e);return 2===arguments.length&&t===!0&&(n+=i.options.domainGutter+i.domainVerticalLabelHeight+i.options.domainMargin[0]+i.options.domainMargin[2]),n}var i=this;this.allowedDataType=["json","csv","tsv","txt"],this.options={itemSelector:"#cal-heatmap",paintOnLoad:!0,range:12,cellSize:10,cellPadding:2,cellRadius:0,domainGutter:2,domainMargin:[0,0,0,0],domain:"hour",subDomain:"min",colLimit:null,rowLimit:null,weekStartOnMonday:!0,start:new Date,minDate:null,maxDate:null,data:"",dataType:this.allowedDataType[0],dataPostPayload:null,considerMissingDataAsZero:!1,loadOnInit:!0,verticalOrientation:!1,domainDynamicDimension:!0,label:{position:"bottom",align:"center",offset:{x:0,y:0},rotate:null,width:100,height:null},legend:[10,20,30,40],displayLegend:!0,legendCellSize:10,legendCellPadding:2,legendMargin:[0,0,0,0],legendVerticalPosition:"bottom",legendHorizontalPosition:"left",legendOrientation:"horizontal",legendColors:null,highlight:[],itemName:["item","items"],domainLabelFormat:null,subDomainTitleFormat:{empty:"{date}",filled:"{count} {name} {connector} {date}"},subDomainDateFormat:null,subDomainTextFormat:null,legendTitleFormat:{lower:"less than {min} {name}",inner:"between {down} and {up} {name}",upper:"more than {max} {name}"},animationDuration:500,nextSelector:!1,previousSelector:!1,itemNamespace:"cal-heatmap",tooltip:!1,onClick:null,afterLoad:null,afterLoadNextDomain:null,afterLoadPreviousDomain:null,onComplete:null,afterLoadData:function(e){return e},onMaxDomainReached:null,onMinDomainReached:null},this._domainType={min:{name:"minute",level:10,maxItemNumber:60,defaultRowNumber:10,defaultColumnNumber:6,row:function(e){return i.getSubDomainRowNumber(e)},column:function(e){return i.getSubDomainColumnNumber(e)},position:{x:function(e){return Math.floor(e.getMinutes()/i._domainType.min.row(e))},y:function(e){return e.getMinutes()%i._domainType.min.row(e)}},format:{date:"%H:%M, %A %B %-e, %Y",legend:"",connector:"at"},extractUnit:function(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes()).getTime()}},hour:{name:"hour",level:20,maxItemNumber:function(e){switch(i.options.domain){case"day":return 24;case"week":return 168;case"month":return 24*(i.options.domainDynamicDimension?i.getDayCountInMonth(e):31)}},defaultRowNumber:6,defaultColumnNumber:function(e){switch(i.options.domain){case"day":return 4;case"week":return 28;case"month":return i.options.domainDynamicDimension?i.getDayCountInMonth(e):31}},row:function(e){return i.getSubDomainRowNumber(e)},column:function(e){return i.getSubDomainColumnNumber(e)},position:{x:function(e){return"month"===i.options.domain?i.options.colLimit>0||i.options.rowLimit>0?Math.floor((e.getHours()+24*(e.getDate()-1))/i._domainType.hour.row(e)):Math.floor(e.getHours()/i._domainType.hour.row(e))+4*(e.getDate()-1):"week"===i.options.domain?i.options.colLimit>0||i.options.rowLimit>0?Math.floor((e.getHours()+24*i.getWeekDay(e))/i._domainType.hour.row(e)):Math.floor(e.getHours()/i._domainType.hour.row(e))+4*i.getWeekDay(e):Math.floor(e.getHours()/i._domainType.hour.row(e))},y:function(e){var t=e.getHours();if(i.options.colLimit>0||i.options.rowLimit>0)switch(i.options.domain){case"month":t+=24*(e.getDate()-1);break;case"week":t+=24*i.getWeekDay(e)}return Math.floor(t%i._domainType.hour.row(e))}},format:{date:"%Hh, %A %B %-e, %Y",
  legend:"%H:00",connector:"at"},extractUnit:function(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours()).getTime()}},day:{name:"day",level:30,maxItemNumber:function(e){switch(i.options.domain){case"week":return 7;case"month":return i.options.domainDynamicDimension?i.getDayCountInMonth(e):31;case"year":return i.options.domainDynamicDimension?i.getDayCountInYear(e):366}},defaultColumnNumber:function(e){switch(e=new Date(e),i.options.domain){case"week":return 1;case"month":return i.options.domainDynamicDimension&&!i.options.verticalOrientation?i.getWeekNumber(new Date(e.getFullYear(),e.getMonth()+1,0))-i.getWeekNumber(e)+1:6;case"year":return i.options.domainDynamicDimension?i.getWeekNumber(new Date(e.getFullYear(),11,31))-i.getWeekNumber(new Date(e.getFullYear(),0))+1:54}},defaultRowNumber:7,row:function(e){return i.getSubDomainRowNumber(e)},column:function(e){return i.getSubDomainColumnNumber(e)},position:{x:function(e){switch(i.options.domain){case"week":return Math.floor(i.getWeekDay(e)/i._domainType.day.row(e));case"month":return i.options.colLimit>0||i.options.rowLimit>0?Math.floor((e.getDate()-1)/i._domainType.day.row(e)):i.getWeekNumber(e)-i.getWeekNumber(new Date(e.getFullYear(),e.getMonth()));case"year":return i.options.colLimit>0||i.options.rowLimit>0?Math.floor((i.getDayOfYear(e)-1)/i._domainType.day.row(e)):i.getWeekNumber(e)}},y:function(e){var t=i.getWeekDay(e);if(i.options.colLimit>0||i.options.rowLimit>0)switch(i.options.domain){case"year":t=i.getDayOfYear(e)-1;break;case"week":t=i.getWeekDay(e);break;case"month":t=e.getDate()-1}return Math.floor(t%i._domainType.day.row(e))}},format:{date:"%A %B %-e, %Y",legend:"%e %b",connector:"on"},extractUnit:function(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()}},week:{name:"week",level:40,maxItemNumber:54,defaultColumnNumber:function(e){switch(e=new Date(e),i.options.domain){case"year":return i._domainType.week.maxItemNumber;case"month":return i.options.domainDynamicDimension?i.getWeekNumber(new Date(e.getFullYear(),e.getMonth()+1,0))-i.getWeekNumber(e):5}},defaultRowNumber:1,row:function(e){return i.getSubDomainRowNumber(e)},column:function(e){return i.getSubDomainColumnNumber(e)},position:{x:function(e){switch(i.options.domain){case"year":return Math.floor(i.getWeekNumber(e)/i._domainType.week.row(e));case"month":return Math.floor(i.getMonthWeekNumber(e)/i._domainType.week.row(e))}},y:function(e){return i.getWeekNumber(e)%i._domainType.week.row(e)}},format:{date:"%B Week #%W",legend:"%B Week #%W",connector:"in"},extractUnit:function(e){var t=new Date(e.getFullYear(),e.getMonth(),e.getDate()),n=t.getDay()-1;return 0>n&&(n=6),t.setDate(t.getDate()-n),t.getTime()}},month:{name:"month",level:50,maxItemNumber:12,defaultColumnNumber:12,defaultRowNumber:1,row:function(){return i.getSubDomainRowNumber()},column:function(){return i.getSubDomainColumnNumber()},position:{x:function(e){return Math.floor(e.getMonth()/i._domainType.month.row(e))},y:function(e){return e.getMonth()%i._domainType.month.row(e)}},format:{date:"%B %Y",legend:"%B",connector:"in"},extractUnit:function(e){return new Date(e.getFullYear(),e.getMonth()).getTime()}},year:{name:"year",level:60,row:function(){return i.options.rowLimit||1},column:function(){return i.options.colLimit||1},position:{x:function(){return 1},y:function(){return 1}},format:{date:"%Y",legend:"%Y",connector:"in"},extractUnit:function(e){return new Date(e.getFullYear()).getTime()}}};for(var r in this._domainType)if(this._domainType.hasOwnProperty(r)){var o=this._domainType[r];this._domainType["x_"+r]={name:"x_"+r,level:o.type,maxItemNumber:o.maxItemNumber,defaultRowNumber:o.defaultRowNumber,defaultColumnNumber:o.defaultColumnNumber,row:o.column,column:o.row,position:{x:o.position.y,y:o.position.x},format:o.format,extractUnit:o.extractUnit}}this.lastInsertedSvg=null,this._completed=!1,this._domains=d3.map(),this.graphDim={width:0,height:0},this.legendDim={width:0,height:0},this.NAVIGATE_LEFT=1,this.NAVIGATE_RIGHT=2,this.RESET_ALL_ON_UPDATE=0,this.RESET_SINGLE_ON_UPDATE=1,this.APPEND_ON_UPDATE=2,this.DEFAULT_LEGEND_MARGIN=10,this.root=null,this.tooltip=null,this._maxDomainReached=!1,this._minDomainReached=!1,this.domainPosition=new DomainPosition,this.Legend=null,this.legendScale=null,this.DSTDomain=[],this._init=function(){return i.getDomain(i.options.start).map(function(e){return e.getTime()}).map(function(e){i._domains.set(e,i.getSubDomain(e).map(function(e){return{t:i._domainType[i.options.subDomain].extractUnit(e),v:null}}))}),i.root=d3.select(i.options.itemSelector).append("svg").attr("class","cal-heatmap-container"),i.tooltip=d3.select(i.options.itemSelector).attr("style",function(){var e=d3.select(i.options.itemSelector).attr("style");return(null!==e?e:"")+"position:relative;"}).append("div").attr("class","ch-tooltip"),i.root.attr("x",0).attr("y",0).append("svg").attr("class","graph"),i.Legend=new Legend(i),i.options.paintOnLoad&&e(),!0},this.paint=function(e){function r(t,n,r,o){var a=0;switch(e){case!1:return a=n[r],n[r]+=o,i.domainPosition.setPosition(t,a),a;case i.NAVIGATE_RIGHT:return i.domainPosition.setPosition(t,n[r]),l=o,u=i.domainPosition.getPositionFromIndex(1),i.domainPosition.shiftRightBy(u),n[r];case i.NAVIGATE_LEFT:return a=-o,l=-a,u=n[r]-i.domainPosition.getLast(),i.domainPosition.setPosition(t,a),i.domainPosition.shiftLeftBy(l),a}}function o(e){switch(a.label.rotate){case"right":e.attr("transform",function(e){var n="rotate(90), ";switch(a.label.position){case"right":n+="translate(-"+t(e)+" , -"+t(e)+")";break;case"left":n+="translate(0, -"+i.domainHorizontalLabelWidth+")"}return n});break;case"left":e.attr("transform",function(e){var n="rotate(270), ";switch(a.label.position){case"right":n+="translate(-"+(t(e)+i.domainHorizontalLabelWidth)+" , "+t(e)+")";break;case"left":n+="translate(-"+i.domainHorizontalLabelWidth+" , "+i.domainHorizontalLabelWidth+")"}return n})}}var a=i.options;0===arguments.length&&(e=!1);var s=i.root.select(".graph").selectAll(".graph-domain").data(function(){var t=i.getDomainKeys();return e===i.NAVIGATE_LEFT?t.reverse():t},function(e){return e}),l=0,u=0,c=s.enter().append("svg").attr("width",function(e){return t(e,!0)}).attr("height",function(e){return n(e,!0)}).attr("x",function(e){return a.verticalOrientation?(i.graphDim.width=Math.max(i.graphDim.width,t(e,!0)),0):r(e,i.graphDim,"width",t(e,!0))}).attr("y",function(e){return a.verticalOrientation?r(e,i.graphDim,"height",n(e,!0)):(i.graphDim.height=Math.max(i.graphDim.height,n(e,!0)),0)}).attr("class",function(e){var t="graph-domain",n=new Date(e);switch(a.domain){case"hour":t+=" h_"+n.getHours();case"day":t+=" d_"+n.getDate()+" dy_"+n.getDay();case"week":t+=" w_"+i.getWeekNumber(n);case"month":t+=" m_"+(n.getMonth()+1);case"year":t+=" y_"+n.getFullYear()}return t});i.lastInsertedSvg=c,c.append("rect").attr("width",function(e){return t(e,!0)-a.domainGutter-a.cellPadding}).attr("height",function(e){return n(e,!0)-a.domainGutter-a.cellPadding}).attr("class","domain-background");var d=c.append("svg").attr("x",function(){return"left"===a.label.position?i.domainHorizontalLabelWidth+a.domainMargin[3]:a.domainMargin[3]}).attr("y",function(){return"top"===a.label.position?i.domainVerticalLabelHeight+a.domainMargin[0]:a.domainMargin[0]}).attr("class","graph-subdomain-group"),f=d.selectAll("g").data(function(e){return i._domains.get(e)}).enter().append("g");f.append("rect").attr("class",function(e){return"graph-rect"+i.getHighlightClassName(e.t)+(null!==a.onClick?" hover_cursor":"")}).attr("width",a.cellSize).attr("height",a.cellSize).attr("x",function(e){return i.positionSubDomainX(e.t)}).attr("y",function(e){return i.positionSubDomainY(e.t)}).on("click",function(e){return null!==a.onClick?i.onClick(new Date(e.t),e.v):void 0}).call(function(e){a.cellRadius>0&&e.attr("rx",a.cellRadius).attr("ry",a.cellRadius),null!==i.legendScale&&null!==a.legendColors&&a.legendColors.hasOwnProperty("base")&&e.attr("fill",a.legendColors.base),a.tooltip&&(e.on("mouseover",function(e){var t=this.parentNode.parentNode;i.tooltip.html(i.getSubDomainTitle(e)).attr("style","display: block;");var n=i.positionSubDomainX(e.t)-i.tooltip[0][0].offsetWidth/2+a.cellSize/2,r=i.positionSubDomainY(e.t)-i.tooltip[0][0].offsetHeight-a.cellSize/2;n+=parseInt(t.getAttribute("x"),10),r+=parseInt(t.getAttribute("y"),10),n+=parseInt(i.root.select(".graph").attr("x"),10),r+=parseInt(i.root.select(".graph").attr("y"),10),n+=parseInt(t.parentNode.getAttribute("x"),10),r+=parseInt(t.parentNode.getAttribute("y"),10),i.tooltip.attr("style","display: block; left: "+n+"px; top: "+r+"px;")}),e.on("mouseout",function(){i.tooltip.attr("style","display:none").html("")}))}),a.tooltip||f.append("title").text(function(e){return i.formatDate(new Date(e.t),a.subDomainDateFormat)}),""!==a.domainLabelFormat&&c.append("text").attr("class","graph-label").attr("y",function(e){var t=a.domainMargin[0];switch(a.label.position){case"top":t+=i.domainVerticalLabelHeight/2;break;case"bottom":t+=n(e)+i.domainVerticalLabelHeight/2}return t+a.label.offset.y*("right"===a.label.rotate&&"right"===a.label.position||"left"===a.label.rotate&&"left"===a.label.position?-1:1)}).attr("x",function(e){var n=a.domainMargin[3];switch(a.label.position){case"right":n+=t(e);break;case"bottom":case"top":n+=t(e)/2}return"right"===a.label.align?n+i.domainHorizontalLabelWidth-a.label.offset.x*("right"===a.label.rotate?-1:1):n+a.label.offset.x}).attr("text-anchor",function(){switch(a.label.align){case"start":case"left":return"start";case"end":case"right":return"end";default:return"middle"}}).attr("dominant-baseline",function(){return i.verticalDomainLabel?"middle":"top"}).text(function(e){return i.formatDate(new Date(e),a.domainLabelFormat)}).call(o),null!==a.subDomainTextFormat&&f.append("text").attr("class",function(e){return"subdomain-text"+i.getHighlightClassName(e.t)}).attr("x",function(e){return i.positionSubDomainX(e.t)+a.cellSize/2}).attr("y",function(e){return i.positionSubDomainY(e.t)+a.cellSize/2}).attr("text-anchor","middle").attr("dominant-baseline","central").text(function(e){return i.formatDate(new Date(e.t),a.subDomainTextFormat)}),e!==!1&&s.transition().duration(a.animationDuration).attr("x",function(e){return a.verticalOrientation?0:i.domainPosition.getPosition(e)}).attr("y",function(e){return a.verticalOrientation?i.domainPosition.getPosition(e):0});var p=i.graphDim.width,h=i.graphDim.height;a.verticalOrientation?i.graphDim.height+=l-u:i.graphDim.width+=l-u,s.exit().transition().duration(a.animationDuration).attr("x",function(n){if(a.verticalOrientation)return 0;switch(e){case i.NAVIGATE_LEFT:return Math.min(i.graphDim.width,p);case i.NAVIGATE_RIGHT:return-t(n,!0)}}).attr("y",function(t){if(!a.verticalOrientation)return 0;switch(e){case i.NAVIGATE_LEFT:return Math.min(i.graphDim.height,h);case i.NAVIGATE_RIGHT:return-n(t,!0)}}).remove(),i.resize()}};CalHeatMap.prototype={init:function(e){"use strict";function t(e,t,n){if((t&&e===!1||e instanceof Element||"string"==typeof e)&&""!==e)return!0;throw new Error("The "+n+" is not valid")}function n(e){switch(e){case"year":return"month";case"month":return"day";case"week":return"day";case"day":return"hour";default:return"min"}}function i(){if(!c._domainType.hasOwnProperty(d.domain)||"min"===d.domain||"x_"===d.domain.substring(0,2))throw new Error("The domain '"+d.domain+"' is not valid");if(!c._domainType.hasOwnProperty(d.subDomain)||"year"===d.subDomain)throw new Error("The subDomain '"+d.subDomain+"' is not valid");if(c._domainType[d.domain].level<=c._domainType[d.subDomain].level)throw new Error("'"+d.subDomain+"' is not a valid subDomain to '"+d.domain+"'");return!0}function r(){if(!e.hasOwnProperty("label")||e.hasOwnProperty("label")&&!e.label.hasOwnProperty("align")){switch(d.label.position){case"left":d.label.align="right";break;case"right":d.label.align="left";break;default:d.label.align="center"}"left"===d.label.rotate?d.label.align="right":"right"===d.label.rotate&&(d.label.align="left")}(!e.hasOwnProperty("label")||e.hasOwnProperty("label")&&!e.label.hasOwnProperty("offset"))&&("left"!==d.label.position&&"right"!==d.label.position||(d.label.offset={x:10,y:15}))}function o(){switch(d.legendVerticalPosition){case"top":d.legendMargin[2]=c.DEFAULT_LEGEND_MARGIN;break;case"bottom":d.legendMargin[0]=c.DEFAULT_LEGEND_MARGIN;break;case"middle":case"center":d.legendMargin["right"===d.legendHorizontalPosition?3:1]=c.DEFAULT_LEGEND_MARGIN}}function a(e){switch("number"==typeof e&&(e=[e]),Array.isArray(e)||(console.log("Margin only takes an integer or an array of integers"),e=[0]),e.length){case 1:return[e[0],e[0],e[0],e[0]];case 2:return[e[0],e[1],e[0],e[1]];case 3:return[e[0],e[1],e[2],e[1]];case 4:return e;default:return e.slice(0,4)}}function s(e){return"string"==typeof e?[e,e+(""!==e?"s":"")]:Array.isArray(e)?1===e.length?[e[0],e[0]+"s"]:e.length>2?e.slice(0,2):e:["item","items"]}function l(e){return e>0?e:null}function u(e){return e>0&&d.colLimit>0?(console.log("colLimit and rowLimit are mutually exclusive, rowLimit will be ignored"),null):e>0?e:null}var c=this,d=c.options=mergeRecursive(c.options,e);if(i(),t(d.itemSelector,!1,"itemSelector"),-1===c.allowedDataType.indexOf(d.dataType))throw new Error("The data type '"+d.dataType+"' is not valid data type");if(null===d3.select(d.itemSelector)[0][0])throw new Error("The node '"+d.itemSelector+"' specified in itemSelector does not exists");try{t(d.nextSelector,!0,"nextSelector"),t(d.previousSelector,!0,"previousSelector")}catch(f){return console.log(f.message),!1}e.hasOwnProperty("subDomain")||(this.options.subDomain=n(e.domain)),"string"==typeof d.itemNamespace&&""!==d.itemNamespace||(console.log("itemNamespace can not be empty, falling back to cal-heatmap"),d.itemNamespace="cal-heatmap");var p=["data","onComplete","onClick","afterLoad","afterLoadData","afterLoadPreviousDomain","afterLoadNextDomain"];for(var h in p)e.hasOwnProperty(p[h])&&(d[p[h]]=e[p[h]]);return d.subDomainDateFormat="string"==typeof d.subDomainDateFormat||"function"==typeof d.subDomainDateFormat?d.subDomainDateFormat:this._domainType[d.subDomain].format.date,d.domainLabelFormat="string"==typeof d.domainLabelFormat||"function"==typeof d.domainLabelFormat?d.domainLabelFormat:this._domainType[d.domain].format.legend,d.subDomainTextFormat="string"==typeof d.subDomainTextFormat&&""!==d.subDomainTextFormat||"function"==typeof d.subDomainTextFormat?d.subDomainTextFormat:null,d.domainMargin=a(d.domainMargin),d.legendMargin=a(d.legendMargin),d.highlight=c.expandDateSetting(d.highlight),d.itemName=s(d.itemName),d.colLimit=l(d.colLimit),d.rowLimit=u(d.rowLimit),e.hasOwnProperty("legendMargin")||o(),r(),this._init()},expandDateSetting:function(e){"use strict";return Array.isArray(e)||(e=[e]),e.map(function(e){return"now"===e?new Date:e instanceof Date?e:!1}).filter(function(e){return e!==!1})},fill:function(e){"use strict";function t(e){return null===i.legendScale?!1:void e.attr("fill",function(e){return null===e.v&&r.hasOwnProperty("considerMissingDataAsZero")&&!r.considerMissingDataAsZero&&r.legendColors.hasOwnProperty("base")?r.legendColors.base:null!==r.legendColors&&r.legendColors.hasOwnProperty("empty")&&(0===e.v||null===e.v&&r.hasOwnProperty("considerMissingDataAsZero")&&r.considerMissingDataAsZero)?r.legendColors.empty:e.v<0&&r.legend[0]>0&&null!==r.legendColors&&r.legendColors.hasOwnProperty("overflow")?r.legendColors.overflow:i.legendScale(Math.min(e.v,r.legend[r.legend.length-1]))})}function n(e){"function"==typeof r.subDomainTextFormat&&e.text(function(e){return r.subDomainTextFormat(e.t,e.v)})}var i=this,r=i.options;0===arguments.length&&(e=i.root.selectAll(".graph-domain"));var o=e.selectAll("svg").selectAll("g").data(function(e){return i._domains.get(e)});o.transition().duration(r.animationDuration).select("rect").attr("class",function(e){var t=i.getHighlightClassName(e.t).trim().split(" "),n=i.dateIsLessThan(e.t,new Date);return(null===i.legendScale||null===e.v&&r.hasOwnProperty("considerMissingDataAsZero")&&!r.considerMissingDataAsZero&&!r.legendColors.hasOwnProperty("base"))&&t.push("graph-rect"),n||-1!==t.indexOf("now")||t.push("future"),null!==e.v?t.push(i.Legend.getClass(e.v,null===i.legendScale)):r.considerMissingDataAsZero&&n&&t.push(i.Legend.getClass(0,null===i.legendScale)),null!==r.onClick&&t.push("hover_cursor"),t.join(" ")}).call(t),o.transition().duration(r.animationDuration).select("title").text(function(e){return i.getSubDomainTitle(e)}),o.transition().duration(r.animationDuration).select("text").attr("class",function(e){return"subdomain-text"+i.getHighlightClassName(e.t)}).call(n)},triggerEvent:function(e,t,n){"use strict";return 3===arguments.length&&n||null===this.options[e]?!0:"function"==typeof this.options[e]?("function"==typeof t&&(t=t()),this.options[e].apply(this,t)):(console.log("Provided callback for "+e+" is not a function."),!1)},onClick:function(e,t){"use strict";return this.triggerEvent("onClick",[e,t])},afterLoad:function(){"use strict";return this.triggerEvent("afterLoad")},onComplete:function(){"use strict";var e=this.triggerEvent("onComplete",[],this._completed);return this._completed=!0,e},afterLoadPreviousDomain:function(e){"use strict";var t=this;return this.triggerEvent("afterLoadPreviousDomain",function(){var n=t.getSubDomain(e);return[n.shift(),n.pop()]})},afterLoadNextDomain:function(e){"use strict";var t=this;return this.triggerEvent("afterLoadNextDomain",function(){var n=t.getSubDomain(e);return[n.shift(),n.pop()]})},onMinDomainReached:function(e){"use strict";return this._minDomainReached=e,this.triggerEvent("onMinDomainReached",[e])},onMaxDomainReached:function(e){"use strict";return this._maxDomainReached=e,this.triggerEvent("onMaxDomainReached",[e])},checkIfMinDomainIsReached:function(e,t){"use strict";this.minDomainIsReached(e)&&this.onMinDomainReached(!0),2===arguments.length&&this._maxDomainReached&&!this.maxDomainIsReached(t)&&this.onMaxDomainReached(!1)},checkIfMaxDomainIsReached:function(e,t){"use strict";this.maxDomainIsReached(e)&&this.onMaxDomainReached(!0),2===arguments.length&&this._minDomainReached&&!this.minDomainIsReached(t)&&this.onMinDomainReached(!1)},formatNumber:d3.format(",g"),formatDate:function(e,t){"use strict";if(arguments.length<2&&(t="title"),"function"==typeof t)return t(e);var n=d3.time.format(t);return n(e)},getSubDomainTitle:function(e){"use strict";if(null!==e.v||this.options.considerMissingDataAsZero){var t=e.v;return null===t&&this.options.considerMissingDataAsZero&&(t=0),this.options.subDomainTitleFormat.filled.format({count:this.formatNumber(t),name:this.options.itemName[1!==t?1:0],connector:this._domainType[this.options.subDomain].format.connector,date:this.formatDate(new Date(e.t),this.options.subDomainDateFormat)})}return this.options.subDomainTitleFormat.empty.format({date:this.formatDate(new Date(e.t),this.options.subDomainDateFormat)})},loadNextDomain:function(e){"use strict";if(this._maxDomainReached||0===e)return!1;var t=this.loadNewDomains(this.NAVIGATE_RIGHT,this.getDomain(this.getNextDomain(),e));return this.afterLoadNextDomain(t.end),this.checkIfMaxDomainIsReached(this.getNextDomain().getTime(),t.start),!0},loadPreviousDomain:function(e){"use strict";if(this._minDomainReached||0===e)return!1;var t=this.loadNewDomains(this.NAVIGATE_LEFT,this.getDomain(this.getDomainKeys()[0],-e).reverse());return this.afterLoadPreviousDomain(t.start),this.checkIfMinDomainIsReached(t.start,t.end),!0},loadNewDomains:function(e,t){"use strict";function n(e){return{t:i._domainType[i.options.subDomain].extractUnit(e),v:null}}for(var i=this,r=e===this.NAVIGATE_LEFT,o=-1,a=t.length,s=this.getDomainKeys();++o<a;){if(r&&this.minDomainIsReached(t[o])){t=t.slice(0,o+1);break}if(!r&&this.maxDomainIsReached(t[o])){t=t.slice(0,o);break}}for(t=t.slice(-this.options.range),o=0,a=t.length;a>o;o++)this._domains.set(t[o].getTime(),this.getSubDomain(t[o]).map(n)),this._domains.remove(r?s.pop():s.shift());return s=this.getDomainKeys(),r&&(t=t.reverse()),this.paint(e),this.getDatas(this.options.data,t[0],this.getSubDomain(t[t.length-1]).pop(),function(){i.fill(i.lastInsertedSvg)}),{start:t[r?0:1],end:s[s.length-1]}},maxDomainIsReached:function(e){"use strict";return null!==this.options.maxDate&&this.options.maxDate.getTime()<e},minDomainIsReached:function(e){"use strict";return null!==this.options.minDate&&this.options.minDate.getTime()>=e},getDomainKeys:function(){"use strict";return this._domains.keys().map(function(e){return parseInt(e,10)}).sort(function(e,t){return e-t})},positionSubDomainX:function(e){"use strict";var t=this._domainType[this.options.subDomain].position.x(new Date(e));return t*this.options.cellSize+t*this.options.cellPadding},positionSubDomainY:function(e){"use strict";var t=this._domainType[this.options.subDomain].position.y(new Date(e));return t*this.options.cellSize+t*this.options.cellPadding},getSubDomainColumnNumber:function(e){"use strict";if(this.options.rowLimit>0){var t=this._domainType[this.options.subDomain].maxItemNumber;return"function"==typeof t&&(t=t(e)),Math.ceil(t/this.options.rowLimit)}var n=this._domainType[this.options.subDomain].defaultColumnNumber;return"function"==typeof n&&(n=n(e)),this.options.colLimit||n},getSubDomainRowNumber:function(e){"use strict";if(this.options.colLimit>0){var t=this._domainType[this.options.subDomain].maxItemNumber;return"function"==typeof t&&(t=t(e)),Math.ceil(t/this.options.colLimit)}var n=this._domainType[this.options.subDomain].defaultRowNumber;return"function"==typeof n&&(n=n(e)),this.options.rowLimit||n},getHighlightClassName:function(e){"use strict";if(e=new Date(e),this.options.highlight.length>0)for(var t in this.options.highlight)if(this.options.highlight[t]instanceof Date&&this.dateIsEqual(this.options.highlight[t],e))return" highlight"+(this.isNow(this.options.highlight[t])?" now":"");return""},isNow:function(e){"use strict";return this.dateIsEqual(e,new Date)},dateIsEqual:function(e,t){"use strict";switch(this.options.subDomain){case"x_min":case"min":return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()&&e.getHours()===t.getHours()&&e.getMinutes()===t.getMinutes();case"x_hour":case"hour":return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()&&e.getHours()===t.getHours();case"x_day":case"day":return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate();case"x_week":case"week":return e.getFullYear()===t.getFullYear()&&this.getWeekNumber(e)===this.getWeekNumber(t);case"x_month":case"month":return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth();default:return!1}},dateIsLessThan:function(e,t){"use strict";function n(e,t){switch(t){case"x_min":case"min":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes()).getTime();case"x_hour":case"hour":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours()).getTime();case"x_day":case"day":return new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime();case"x_week":case"week":case"x_month":case"month":return new Date(e.getFullYear(),e.getMonth()).getTime();default:return e.getTime()}}return e instanceof Date||(e=new Date(e)),t instanceof Date||(t=new Date(t)),n(e,this.options.subDomain)<n(t,this.options.subDomain)},getDayOfYear:d3.time.format("%j"),getWeekNumber:function(e){"use strict";var t=this.options.weekStartOnMonday===!0?d3.time.format("%W"):d3.time.format("%U");return t(e)},getMonthWeekNumber:function(e){"use strict";"number"==typeof e&&(e=new Date(e));var t=this.getWeekNumber(new Date(e.getFullYear(),e.getMonth()));return this.getWeekNumber(e)-t-1},getWeekNumberInYear:function(e){"use strict";"number"==typeof e&&(e=new Date(e))},getDayCountInMonth:function(e){"use strict";return this.getEndOfMonth(e).getDate()},getDayCountInYear:function(e){"use strict";return"number"==typeof e&&(e=new Date(e)),1===new Date(e.getFullYear(),1,29).getMonth()?366:365},getWeekDay:function(e){"use strict";return this.options.weekStartOnMonday===!1?e.getDay():0===e.getDay()?6:e.getDay()-1},getEndOfMonth:function(e){"use strict";return"number"==typeof e&&(e=new Date(e)),new Date(e.getFullYear(),e.getMonth()+1,0)},jumpDate:function(e,t,n){"use strict";var i=new Date(e);switch(n){case"hour":i.setHours(i.getHours()+t);break;case"day":i.setHours(i.getHours()+24*t);break;case"week":i.setHours(i.getHours()+24*t*7);break;case"month":i.setMonth(i.getMonth()+t);break;case"year":i.setFullYear(i.getFullYear()+t)}return new Date(i)},getMinuteDomain:function(e,t){"use strict";var n=new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours()),i=null;return i=t instanceof Date?new Date(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours()):new Date(+n+1e3*t*60),d3.time.minutes(Math.min(n,i),Math.max(n,i))},getHourDomain:function(e,t){"use strict";var n=new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours()),i=null;t instanceof Date?i=new Date(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours()):(i=new Date(n),i.setHours(i.getHours()+t));var r=d3.time.hours(Math.min(n,i),Math.max(n,i)),o=0,a=r.length;for(o=0;a>o;o++)if(o>0&&r[o].getHours()===r[o-1].getHours()){this.DSTDomain.push(r[o].getTime()),r.splice(o,1);break}return"number"==typeof t&&r.length>Math.abs(t)&&r.splice(r.length-1,1),r},getDayDomain:function(e,t){"use strict";var n=new Date(e.getFullYear(),e.getMonth(),e.getDate()),i=null;return t instanceof Date?i=new Date(t.getFullYear(),t.getMonth(),t.getDate()):(i=new Date(n),i=new Date(i.setDate(i.getDate()+parseInt(t,10)))),d3.time.days(Math.min(n,i),Math.max(n,i))},getWeekDomain:function(e,t){"use strict";var n;this.options.weekStartOnMonday===!1?n=new Date(e.getFullYear(),e.getMonth(),e.getDate()-e.getDay()):1===e.getDay()?n=new Date(e.getFullYear(),e.getMonth(),e.getDate()):0===e.getDay()?(n=new Date(e.getFullYear(),e.getMonth(),e.getDate()),n.setDate(n.getDate()-6)):n=new Date(e.getFullYear(),e.getMonth(),e.getDate()-e.getDay()+1);var i=new Date(n),r=t;return"object"!=typeof t&&(r=new Date(i.setDate(i.getDate()+7*t))),this.options.weekStartOnMonday===!0?d3.time.mondays(Math.min(n,r),Math.max(n,r)):d3.time.sundays(Math.min(n,r),Math.max(n,r))},getMonthDomain:function(e,t){"use strict";var n=new Date(e.getFullYear(),e.getMonth()),i=null;return t instanceof Date?i=new Date(t.getFullYear(),t.getMonth()):(i=new Date(n),i=i.setMonth(i.getMonth()+t)),d3.time.months(Math.min(n,i),Math.max(n,i))},getYearDomain:function(e,t){"use strict";var n=new Date(e.getFullYear(),0),i=null;return i=t instanceof Date?new Date(t.getFullYear(),0):new Date(e.getFullYear()+t,0),d3.time.years(Math.min(n,i),Math.max(n,i))},getDomain:function(e,t){"use strict";switch("number"==typeof e&&(e=new Date(e)),arguments.length<2&&(t=this.options.range),this.options.domain){case"hour":var n=this.getHourDomain(e,t);return"number"==typeof t&&n.length<t&&(t>0?n.push(this.getHourDomain(n[n.length-1],2)[1]):n.shift(this.getHourDomain(n[0],-2)[0])),n;case"day":return this.getDayDomain(e,t);case"week":return this.getWeekDomain(e,t);case"month":return this.getMonthDomain(e,t);case"year":return this.getYearDomain(e,t)}},getSubDomain:function(e){"use strict";"number"==typeof e&&(e=new Date(e));var t=this,n=function(e,n){switch(n){case"year":return t.getDayCountInYear(e);case"month":return t.getDayCountInMonth(e);case"week":return 7}},i=function(e,t){switch(t){case"hour":return 60;case"day":return 1440;case"week":return 10080}},r=function(e,n){switch(n){case"day":return 24;case"week":return 168;case"month":return 24*t.getDayCountInMonth(e)}},o=function(e,n){if("month"===n){var i=new Date(e.getFullYear(),e.getMonth()+1,0),r=t.getWeekNumber(i),o=t.getWeekNumber(new Date(e.getFullYear(),e.getMonth()));return o>r&&(o=0,r++),r-o+1}return"year"===n?t.getWeekNumber(new Date(e.getFullYear(),11,31)):void 0};switch(this.options.subDomain){case"x_min":case"min":return this.getMinuteDomain(e,i(e,this.options.domain));case"x_hour":case"hour":return this.getHourDomain(e,r(e,this.options.domain));case"x_day":case"day":return this.getDayDomain(e,n(e,this.options.domain));case"x_week":case"week":return this.getWeekDomain(e,o(e,this.options.domain));case"x_month":case"month":return this.getMonthDomain(e,12)}},getNextDomain:function(e){"use strict";return 0===arguments.length&&(e=1),this.getDomain(this.jumpDate(this.getDomainKeys().pop(),e,this.options.domain),1)[0]},getPreviousDomain:function(e){"use strict";return 0===arguments.length&&(e=1),this.getDomain(this.jumpDate(this.getDomainKeys().shift(),-e,this.options.domain),1)[0]},getDatas:function(e,t,n,i,r,o){"use strict";var a=this;arguments.length<5&&(r=!0),arguments.length<6&&(o=this.APPEND_ON_UPDATE);var s=function(e){r!==!1?"function"==typeof r?e=r(e):"function"==typeof a.options.afterLoadData?e=a.options.afterLoadData(e):console.log("Provided callback for afterLoadData is not a function."):"csv"!==a.options.dataType&&"tsv"!==a.options.dataType||(e=this.interpretCSV(e)),a.parseDatas(e,o,t,n),"function"==typeof i&&i()};switch(typeof e){case"string":if(""===e)return s({}),!0;var l=this.parseURI(e,t,n),u="GET";null!==a.options.dataPostPayload&&(u="POST");var c=null;switch(null!==a.options.dataPostPayload&&(c=this.parseURI(a.options.dataPostPayload,t,n)),this.options.dataType){case"json":d3.json(l,s).send(u,c);break;case"csv":d3.csv(l,s).send(u,c);break;case"tsv":d3.tsv(l,s).send(u,c);break;case"txt":d3.text(l,"text/plain",s).send(u,c)}return!1;case"object":if(e===Object(e))return s(e),!1;default:return s({}),!0}},parseDatas:function(e,t,n,i){"use strict";t===this.RESET_ALL_ON_UPDATE&&this._domains.forEach(function(e,t){t.forEach(function(e,t,n){n[t].v=null})});var r={},o=function(e){return e.t};for(var a in e){var s=new Date(1e3*a),l=this.getDomain(s)[0].getTime();if(this.DSTDomain.indexOf(l)>=0&&this._domains.has(l-36e5)&&(l-=36e5),!isNaN(a)&&e.hasOwnProperty(a)&&this._domains.has(l)&&l>=+n&&+i>l){var u=this._domains.get(l);r.hasOwnProperty(l)||(r[l]=u.map(o));var c=r[l].indexOf(this._domainType[this.options.subDomain].extractUnit(s));t===this.RESET_SINGLE_ON_UPDATE?u[c].v=e[a]:isNaN(u[c].v)?u[c].v=e[a]:u[c].v+=e[a]}}},parseURI:function(e,t,n){"use strict";return e=e.replace(/\{\{t:start\}\}/g,t.getTime()/1e3),e=e.replace(/\{\{t:end\}\}/g,n.getTime()/1e3),e=e.replace(/\{\{d:start\}\}/g,t.toISOString()),e=e.replace(/\{\{d:end\}\}/g,n.toISOString())},interpretCSV:function(e){"use strict";var t,n,i={},r=Object.keys(e[0]);for(t=0,n=e.length;n>t;t++)i[e[t][r[0]]]=+e[t][r[1]];return i},resize:function(){"use strict";var e=this,t=e.options,n=t.displayLegend?e.Legend.getDim("width")+t.legendMargin[1]+t.legendMargin[3]:0,i=t.displayLegend?e.Legend.getDim("height")+t.legendMargin[0]+t.legendMargin[2]:0,r=e.graphDim.width-t.domainGutter-t.cellPadding,o=e.graphDim.height-t.domainGutter-t.cellPadding;this.root.transition().duration(t.animationDuration).attr("width",function(){return"middle"===t.legendVerticalPosition||"center"===t.legendVerticalPosition?r+n:Math.max(r,n)}).attr("height",function(){return"middle"===t.legendVerticalPosition||"center"===t.legendVerticalPosition?Math.max(o,i):o+i}),this.root.select(".graph").transition().duration(t.animationDuration).attr("y",function(){return"top"===t.legendVerticalPosition?i:0}).attr("x",function(){return"middle"!==t.legendVerticalPosition&&"center"!==t.legendVerticalPosition||"left"!==t.legendHorizontalPosition?0:n})},next:function(e){"use strict";return 0===arguments.length&&(e=1),this.loadNextDomain(e)},previous:function(e){"use strict";return 0===arguments.length&&(e=1),this.loadPreviousDomain(e)},jumpTo:function(e,t){"use strict";arguments.length<2&&(t=!1);var n=this.getDomainKeys(),i=n[0],r=n[n.length-1];return i>e?this.loadPreviousDomain(this.getDomain(i,e).length):t?this.loadNextDomain(this.getDomain(i,e).length):e>r?this.loadNextDomain(this.getDomain(r,e).length):!1},rewind:function(){"use strict";this.jumpTo(this.options.start,!0)},update:function(e,t,n){"use strict";arguments.length<2&&(t=!0),
  arguments.length<3&&(n=this.RESET_ALL_ON_UPDATE);var i=this.getDomainKeys(),r=this;this.getDatas(e,new Date(i[0]),this.getSubDomain(i[i.length-1]).pop(),function(){r.fill()},t,n)},setLegend:function(){"use strict";var e=this.options.legend.slice(0);arguments.length>=1&&Array.isArray(arguments[0])&&(this.options.legend=arguments[0]),arguments.length>=2&&(Array.isArray(arguments[1])&&arguments[1].length>=2?this.options.legendColors=[arguments[1][0],arguments[1][1]]:this.options.legendColors=arguments[1]),(arguments.length>0&&!arrayEquals(e,this.options.legend)||arguments.length>=2)&&(this.Legend.buildColors(),this.fill()),this.Legend.redraw(this.graphDim.width-this.options.domainGutter-this.options.cellPadding)},removeLegend:function(){"use strict";return this.options.displayLegend?(this.options.displayLegend=!1,this.Legend.remove(),!0):!1},showLegend:function(){"use strict";return this.options.displayLegend?!1:(this.options.displayLegend=!0,this.Legend.redraw(this.graphDim.width-this.options.domainGutter-this.options.cellPadding),!0)},highlight:function(e){"use strict";return(this.options.highlight=this.expandDateSetting(e)).length>0?(this.fill(),!0):!1},destroy:function(e){"use strict";return this.root.transition().duration(this.options.animationDuration).attr("width",0).attr("height",0).remove().each("end",function(){"function"==typeof e?e():"undefined"!=typeof e&&console.log("Provided callback for destroy() is not a function.")}),null},getSVG:function(){"use strict";for(var e={".cal-heatmap-container":{},".graph":{},".graph-rect":{},"rect.highlight":{},"rect.now":{},"text.highlight":{},"text.now":{},".domain-background":{},".graph-label":{},".subdomain-text":{},".q0":{},".qi":{}},t=1,n=this.options.legend.length+1;n>=t;t++)e[".q"+t]={};var i=this.root,r=["stroke","stroke-width","stroke-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-miterlimit","fill","fill-opacity","fill-rule","marker","marker-start","marker-mid","marker-end","alignement-baseline","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","kerning","text-anchor","shape-rendering","text-transform","font-family","font","font-size","font-weight"],o=function(t,n,i){-1!==r.indexOf(n)&&(e[t][n]=i)},a=function(e){return i.select(e)[0][0]};for(var s in e)if(e.hasOwnProperty(s)){var l=a(s);if(null!==l)if("getComputedStyle"in window){var u=getComputedStyle(l,null);if(0!==u.length)for(var c=0;c<u.length;c++)o(s,u.item(c),u.getPropertyValue(u.item(c)));else for(var d in u)u.hasOwnProperty(d)&&o(s,d,u[d])}else if("currentStyle"in l){var f=l.currentStyle;for(var p in f)o(s,p,f[p])}}var h='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><style type="text/css"><![CDATA[ ';for(var m in e){h+=m+" {\n";for(var g in e[m])h+="	"+g+":"+e[m][g]+";\n";h+="}\n"}return h+="]]></style>",h+=(new XMLSerializer).serializeToString(this.root[0][0]),h+="</svg>"}};var DomainPosition=function(){"use strict";this.positions=d3.map()};DomainPosition.prototype.getPosition=function(e){"use strict";return this.positions.get(e)},DomainPosition.prototype.getPositionFromIndex=function(e){"use strict";var t=this.getKeys();return this.positions.get(t[e])},DomainPosition.prototype.getLast=function(){"use strict";var e=this.getKeys();return this.positions.get(e[e.length-1])},DomainPosition.prototype.setPosition=function(e,t){"use strict";this.positions.set(e,t)},DomainPosition.prototype.shiftRightBy=function(e){"use strict";this.positions.forEach(function(t,n){this.set(t,n-e)});var t=this.getKeys();this.positions.remove(t[0])},DomainPosition.prototype.shiftLeftBy=function(e){"use strict";this.positions.forEach(function(t,n){this.set(t,n+e)});var t=this.getKeys();this.positions.remove(t[t.length-1])},DomainPosition.prototype.getKeys=function(){"use strict";return this.positions.keys().sort(function(e,t){return parseInt(e,10)-parseInt(t,10)})};var Legend=function(e){"use strict";this.calendar=e,this.computeDim(),null!==e.options.legendColors&&this.buildColors()};Legend.prototype.computeDim=function(){"use strict";var e=this.calendar.options;this.dim={width:e.legendCellSize*(e.legend.length+1)+e.legendCellPadding*e.legend.length,height:e.legendCellSize}},Legend.prototype.remove=function(){"use strict";this.calendar.root.select(".graph-legend").remove(),this.calendar.resize()},Legend.prototype.redraw=function(e){"use strict";function t(e){e.attr("width",l.legendCellSize).attr("height",l.legendCellSize).attr("x",function(e,t){return t*(l.legendCellSize+l.legendCellPadding)})}function n(){switch(l.legendHorizontalPosition){case"right":return"center"===l.legendVerticalPosition||"middle"===l.legendVerticalPosition?e+l.legendMargin[3]:e-o.getDim("width")-l.legendMargin[1];case"middle":case"center":return Math.round(e/2-o.getDim("width")/2);default:return l.legendMargin[3]}}function i(){return"bottom"===l.legendVerticalPosition?a.graphDim.height+l.legendMargin[0]-l.domainGutter-l.cellPadding:l.legendMargin[0]}if(!this.calendar.options.displayLegend)return!1;var r,o=this,a=this.calendar,s=a.root,l=a.options;this.computeDim();var u=l.legend.slice(0);u.push(u[u.length-1]+1);var c=a.root.select(".graph-legend");null!==c[0][0]?(s=c,r=s.select("g").selectAll("rect").data(u)):(s="top"===l.legendVerticalPosition?s.insert("svg",".graph"):s.append("svg"),s.attr("x",n()).attr("y",i()),r=s.attr("class","graph-legend").attr("height",o.getDim("height")).attr("width",o.getDim("width")).append("g").selectAll().data(u)),r.enter().append("rect").call(t).attr("class",function(e){return a.Legend.getClass(e,null===a.legendScale)}).attr("fill-opacity",0).call(function(e){null!==a.legendScale&&null!==l.legendColors&&l.legendColors.hasOwnProperty("base")&&e.attr("fill",l.legendColors.base)}).append("title"),r.exit().transition().duration(l.animationDuration).attr("fill-opacity",0).remove(),r.transition().delay(function(e,t){return l.animationDuration*t/10}).call(t).attr("fill-opacity",1).call(function(e){e.attr("fill",function(e,t){return null===a.legendScale?"":0===t?a.legendScale(e-1):a.legendScale(l.legend[t-1])}),e.attr("class",function(e){return a.Legend.getClass(e,null===a.legendScale)})}),r.select("title").text(function(e,t){return 0===t?l.legendTitleFormat.lower.format({min:l.legend[t],name:l.itemName[1]}):t===u.length-1?l.legendTitleFormat.upper.format({max:l.legend[t-1],name:l.itemName[1]}):l.legendTitleFormat.inner.format({down:l.legend[t-1],up:l.legend[t],name:l.itemName[1]})}),s.transition().duration(l.animationDuration).attr("x",n()).attr("y",i()).attr("width",o.getDim("width")).attr("height",o.getDim("height")),s.select("g").transition().duration(l.animationDuration).attr("transform",function(){return"vertical"===l.legendOrientation?"rotate(90 "+l.legendCellSize/2+" "+l.legendCellSize/2+")":""}),a.resize()},Legend.prototype.getDim=function(e){"use strict";var t="horizontal"===this.calendar.options.legendOrientation;switch(e){case"width":return this.dim[t?"width":"height"];case"height":return this.dim[t?"height":"width"]}},Legend.prototype.buildColors=function(){"use strict";var e=this.calendar.options;if(null===e.legendColors)return this.calendar.legendScale=null,!1;var t=[];if(Array.isArray(e.legendColors))t=e.legendColors;else{if(!e.legendColors.hasOwnProperty("min")||!e.legendColors.hasOwnProperty("max"))return e.legendColors=null,!1;t=[e.legendColors.min,e.legendColors.max]}var n=e.legend.slice(0);n[0]>0?n.unshift(0):n[0]<0&&n.unshift(n[0]-(n[n.length-1]-n[0])/n.length);var i=d3.scale.linear().range(t).interpolate(d3.interpolateHcl).domain([d3.min(n),d3.max(n)]),r=n.map(function(e){return i(e)});return this.calendar.legendScale=d3.scale.threshold().domain(e.legend).range(r),!0},Legend.prototype.getClass=function(e,t){"use strict";if(null===e||isNaN(e))return"";for(var n=[this.calendar.options.legend.length+1],i=0,r=this.calendar.options.legend.length-1;r>=i;i++){if(this.calendar.options.legend[0]>0&&0>e){n=["1","i"];break}if(e<=this.calendar.options.legend[i]){n=[i+1];break}}return 0===e&&n.push(0),n.unshift(""),(n.join(" r")+(t?n.join(" q"):"")).trim()},String.prototype.format=function(){"use strict";var e=this;for(var t in arguments[0])if(arguments[0].hasOwnProperty(t)){var n=new RegExp("\\{"+t+"\\}","gi");e=e.replace(n,arguments[0][t])}return e},"function"==typeof define&&define.amd?define(["d3"],function(){"use strict";return CalHeatMap}):"object"==typeof module&&module.exports?module.exports=CalHeatMap:window.CalHeatMap=CalHeatMap;var app=angular.module("genesys",["angularFileUpload","ngTouch","offClick","angularFileUpload","ngAnimate","ui.bootstrap"]);app.filter("yesno",function(){return function(e){return e?"yes":"no"}}),app.filter("humanReadable",function(e){return function(t){var n=new Date(t.replace(/-/g,"/"));return e("date")(n,"EEE MMM d, y | h:mm a")}}),function(){"use strict";function e(e){var t={};return t.message="",t.broadcast=function(e,t){this.message=e,"success"==t?this.broadcastSuccessAlert():"error"==t?this.broadcastErrorAlert():"info"==t?this.broadcastInfoAlert():this.broadcastInfoAlert()},t.broadcastSuccessAlert=function(){e.$broadcast("successAlert")},t.broadcastErrorAlert=function(){e.$broadcast("errorAlert")},t.broadcastInfoAlert=function(){e.$broadcast("infoAlert")},t}angular.module("genesys").factory("AlertService",e),e.$inject=["$rootScope"]}(),function(){"use strict";function e(e){var t={};return t.broadcastShowCheckedIn=function(){e.$broadcast("showCheckedIn")},t}angular.module("genesys").factory("SharedService",e),e.$inject=["$rootScope"]}(),function(){"use strict";function e(e){return{store:function(t){return e.post("/checkin/",t)},getTodayByLocation:function(t){return t||(t=""),e.get("/checkin/today/"+t)},getForMember:function(t,n){return e.get("/checkin/member/"+t+"?interval="+n)},chartDataByLocation:function(t){return e.get("/checkin/chart/"+t)},heatmapDataByLocation:function(t){return e.get("/checkin/heatmap/"+t)},totalsByLocation:function(t){return e.get("/checkin/totals/"+t)}}}angular.module("genesys").factory("Checkin",e),e.$inject=["$http"]}(),function(){"use strict";function e(e,t){return{upload:function(e){return t.upload({url:"/member/image",file:e})}}}angular.module("genesys").factory("Image",e),e.$inject=["$http","$upload"]}(),function(){"use strict";function e(e){return{store:function(t){return e.post("/member/kickout",t)},getByLocationId:function(t){return e.get("/location/kickouts",{params:{locationId:t}})}}}angular.module("genesys").factory("Kickout",e),e.$inject=["$http"]}(),function(){"use strict";function e(e){return{all:function(){return e.get("/leader/all")},create:function(t){return e.post("/leader",t)},search:function(t){return e.post("/leader/search",t)},updateLocations:function(t){return e.post("/leader/locations",t)},assignToLocation:function(t){return e.post("/leader/assign",t)},unassignFromLocation:function(t){return e.post("/leader/unassign",t)}}}angular.module("genesys").factory("Leader",e),e.$inject=["$http"]}(),function(){"use strict";function e(e){return{get:function(){return e.get("/lesson")}}}angular.module("genesys").factory("Lesson",e),e.$inject=["$http"]}(),function(){"use strict";function e(e){return{all:function(){return e.get("/location")},leaders:function(){return e.get("/location/leaders")},updateGoal:function(t){return e.post("/location/goal",t)},updateDirector:function(t){return e.post("/location/director",t)}}}angular.module("genesys").factory("Location",e),e.$inject=["$http"]}(),function(){function e(e){return{search:function(t){return e.post("/member/search",t)},get:function(t){return e.get("/member/get/"+t)},getStatus:function(t){return e.get("/member/status/"+t)},update:function(t){return e.put("/member/update/",t)},create:function(t){return e.post("/member",t)}}}angular.module("genesys").factory("Member",e),e.$inject=["$http"]}(),function(){"use strict";function e(e){return{getAll:function(){return e.get("/school")}}}angular.module("genesys").factory("School",e),e.$inject=["$http"]}(),function(){"use strict";function e(e){return{get:function(t){return e.get("/session/"+t)},store:function(t){return e.post("/session",t)}}}angular.module("genesys").factory("Session",e),e.$inject=["$http"]}(),function(){"use strict";function e(e){return{get:function(){return e.get("/shift/get")}}}angular.module("genesys").factory("Shift",e),e.$inject=["$http"]}(),function(){function e(e){return{restrict:"E",scope:{locationId:"="},template:"<div></div>",link:function(e,t,n){}}}angular.module("genesys").directive("adminCheckinBarChart",e),e.$inject=["Checkin"]}(),function(){"use strict";function e(e,t,n){return{restrict:"E",template:'<div class="alert-container slide-up" ng-show="show">'+"<div ng-class=\"{'success-alert' : alertType === 'success', 'info-alert' : alertType === 'info', 'error-alert' : alertType === 'error'}\">{{ message }}</div><i class=\"fa fa-close\" ng-click=\"show = false\"></i></div>",scope:!1,link:function(e,i,r){function o(){e.message=n.message,e.show=!0,t(function(){e.show=!1},4e3)}e.message="",e.show=!1,e.alertType="success",e.$on("successAlert",function(){e.alertType="success",o()}),e.$on("infoAlert",function(){e.alertType="info",o()}),e.$on("errorAlert",function(){e.alertType="error",o()})}}}angular.module("genesys").directive("alerter",e),e.$inject=["$window","$timeout","AlertService"]}(),function(){"use strict";function e(){return function(e,t,n){n.$observe("backImg",function(e){t.css({"background-image":"url("+e+")","background-size":"cover"})})}}angular.module("genesys").directive("backImg",e),e.$inject=[]}(),function(){"use strict";function e(e){return{restrict:"E",template:'<div id="cal-heatmap"></div>',link:function(t,n,i){function r(){o()}function o(){e.heatmapDataByLocation(LOCATION_ID).success(function(e){t.heatmapData=e.data,a()})}function a(){var e=9,i=new Date,r=new CalHeatMap;i.setMonth(i.getMonth()-e),r.init({itemSelector:n[0],domain:"month",range:10,displayLegend:!1,start:i,itemName:["check-in","check-ins"],data:t.heatmapData})}t.heatmapData={},r()}}}angular.module("genesys").directive("heatMap",e),e.$inject=["Checkin"]}(),function(){"use strict";function e(e){return{restrict:"E",scope:{member:"=member",loaded:"=loaded"},template:'<div class="rank-container"><div class="rank-tube-outer">'+"<div class=\"rank-tube-inner\" ng-class=\"{ 'new-width' : member.rank.abbreviation === 'N', 'junior-varsity-width' : member.rank.abbreviation === 'JV', 'varsity-width' : member.rank.abbreviation === 'V', 'advanced-width' : member.rank.abbreviation === 'A' }\"><span class=\"rank-abbreviation-indicator\">{{ member.rank.abbreviation }}</span></div><span class=\"rank-loading-indicator\" ng-hide=\"loaded\">Fetching Rank...</span></div><div class=\"rank-labels\"><span ng-class=\"{ 'active' : member.rank.abbreviation === 'N' }\">New</span><span ng-class=\"{ 'active' : member.rank.abbreviation === 'JV' }\">Junior Varsity</span><span ng-class=\"{ 'active' : member.rank.abbreviation === 'V' }\">Varsity</span><span ng-class=\"{ 'active' : member.rank.abbreviation === 'A' }\">Advanced</span></div></div>",link:function(e,t,n){}}}angular.module("genesys").directive("rankTube",e),e.$inject=["Member"]}(),function(){function e(e,n){return{restrict:"A",link:function(i,r,o){var a=o.squareBreak;i.getWidth=function(){return $(r).width()},i.$watch(i.getWidth,function(t){e.innerWidth<parseInt(a,10)?$(r).height("auto"):$(r).height(t)},!0),angular.element(e).bind("resize",function(){n.cancel(t),t=n(function(){i.$apply()},5,!1)})}}}angular.module("genesys").directive("square",e);var t;e.$inject=["$window","$timeout"]}(),function(){"use strict";function e(e){return{restrict:"E",template:'<span ng-show="loaded" class="StatusTag" ng-bind="statusTagText" ng-class="{ \'StatusTag--good\' : good === true, \'StatusTag--bad\' : good !== true, \'StatusTag--block\' : block }"></span>',scope:{member:"=member",loaded:"=loaded",block:"=block"},link:function(t,n,i){function r(){t.member.status?(t.statusTagText=t.member.status.name,"Good"===t.member.status.name?t.good=!0:t.good=!1):e.getStatus(t.member.id).success(function(e){t.statusTagText=e.data.name,"Good"===e.data.name?t.good=!0:t.good=!1}).error(function(e){console.log("there was an error")})}t.statusTagText="",t.good=!0,t.$watch(function(e){return e.member},function(){t.loaded&&r()})}}}angular.module("genesys").directive("statusTag",e),e.$inject=["Member"]}(),function(){function e(e,t){function n(){i()}function i(){t.getTodayByLocation().then(function(t){e.checkins=t.data.data,console.debug("response",t)})}n()}angular.module("genesys").controller("AdminIndexController",e),e.$inject=["$scope","Checkin"]}(),function(){function e(e,t,n,i,r){function o(){a(),s()}function a(){n.all().success(function(t){e.leaders=t.data})}function s(){t.all().success(function(t){e.locations=t.data})}function l(){for(var t=0;t<e.locations.length;t++)e.locations[t].isChecked=!1}e.leaders=[],e.newLeader={locationIdCollection:[]},e.locations=[],e.createLeader=function(){var t=e.newLeader;return t.firstName&&t.lastName?void n.create(t).success(function(t){r.broadcast("Leader created!","success"),e.leaders.push(t.data),e.clearLeader()}).error(function(e){r.broadcast("Something went wront, it was not your fault","error")}):!1},e.clearLeader=function(){e.newLeader={locationIdCollection:[]},l()},e.unassignFromLocation=function(t,i){var o={locationId:i,leaderId:t.id};n.unassignFromLocation(o).success(function(n){e.leaders[e.leaders.indexOf(t)]=n.data,r.broadcast("Location unassigned","success")})},e.openLocationAssignmentModal=function(t){var n=i.open({templateUrl:"../../modals/templates/locationAssignmentModal.html",controller:"LocationAssignmentModalController",resolve:{leader:function(){return t}}});n.result.then(function(n){e.leaders[e.leaders.indexOf(t)].locations=n,r.broadcast("Locations Updated!","success")})},e.changeLocationAssignment=function(t){var n=e.locations[t].id;e.locations[t].isChecked?-1===e.newLeader.locationIdCollection.indexOf(n)&&e.newLeader.locationIdCollection.push(n):-1!==e.leader.locationIdCollection.indexOf(n)&&e.leader.locationIdCollection.splice(e.leader.locationIdCollection.indexOf(n),1)},o()}angular.module("genesys").controller("AdminLeadersController",e),e.$inject=["$scope","Location","Leader","$uibModal","AlertService"]}(),function(){function e(e,t,n,i){function r(){o()}function o(){t.all().success(function(t){e.locations=t.data,console.debug("$scope.locations",t)})}e.locations=[],e.openLocationGoalAssignmentModal=function(t){var r=n.open({templateUrl:"../../modals/templates/goalAssignmentModal.html",controller:"GoalAssignmentModalController",resolve:{location:function(){return t}}});r.result.then(function(n){e.locations[e.locations.indexOf(t)].goal=n,i.broadcast("Goal updated!","success")})},e.openLocationDirectorEditModal=function(t){var r=n.open({templateUrl:"../../modals/templates/directorEditModal.html",controller:"DirectorEditModalController",resolve:{location:function(){return t}}});r.result.then(function(n){e.locations[e.locations.indexOf(t)].director=n,i.broadcast("Director email updated!","success")})},r()}angular.module("genesys").controller("AdminLocationsController",e),e.$inject=["$scope","Location","$uibModal","AlertService"]}(),function(){"use strict";function e(e,t){function n(){i()}function i(){t.totalsByLocation(LOCATION_ID).success(function(t){e.totals.day=t.data.day,e.totals.week=t.data.week,e.totals.month=t.data.month,e.totals.all=t.data.all})}e.totals={},n()}angular.module("genesys").controller("CenterController",e),e.$inject=["$scope","Checkin"]}(),function(){"use strict";function e(e,t,n,i,r){e.image=null,e.spinner=!1,e.plus=!0,e.member={},e.created=!1,e.createdMember={},e.$watch("files",function(){e.onFileSelect(e.files)}),e.onFileSelect=function(n){var i;n&&n.length&&(i=n[0],e.spinner=!0,e.plus=!1,t.upload(i).success(function(t){e.spinner=!1,e.image=t.data,e.member.image=t.data}).error(function(t){e.spinner=!1,e.plus=!0}))},e.saveMember=function(){return n.create(e.member).success(function(t){e.created=!0,e.createdMember=t.data,document.body.scrollTop=document.documentElement.scrollTop=0}).error(function(){i.broadcast("There was an error, please try again","error")}),!1},e.checkInNewMember=function(){var t={memberId:e.createdMember.id,locationId:LOCATION_ID};r.store(t).success(function(e){document.location.href="/"}).error(function(e){i.broadcast(e.message,"error")})},e.redirectToDashboard=function(){document.location.href="/"}}angular.module("genesys").controller("CreateMemberController",e),e.$inject=["$scope","Image","Member","AlertService","Checkin"]}(),function(){"use strict";function e(e,t,n,i,r){e.checkInLogs=[],e.getCheckedIn=function(){i.getTodayByLocation(LOCATION_ID).success(function(t){e.checkInLogs=t.data}).error(function(){r.broadcast("Sorry, something went wrong","error")})},e.getCheckedIn(),e.$on("showCheckedIn",function(){e.getCheckedIn()})}angular.module("genesys").controller("DashboardController",e),e.$inject=["$scope","Member","SharedService","Checkin","AlertService"]}(),function(){function e(e){e.navOpen=!1,e.test=function(){console.log("off click!!!")},e.toggleOpen=function(){e.navOpen=!e.navOpen},e.navClose=function(){console.log("nav should be closing"),e.navOpen=!1},e.$watch("navOpen",function(){console.debug("navOpen",e.navOpen)})}angular.module("genesys").controller("MasterController",e),e.$inject=["$scope"]}(),function(){"use strict";function e(e,t,n,i,r,o,a,s,l,u,c,d){function f(){c.leaders().success(function(t){e.leaders=t.data}).error(function(e){console.log("there was an error")})}function p(){i.get().success(function(t){e.lessonsArray=t.data}).error(function(e){console.log("There was en error getting the lessons")})}function h(){o.get().success(function(t){e.shifts=t.data}).error(function(e){console.log(e.message)})}function m(){l.getAll().success(function(t){e.schools=t.data}).error(function(e){s.broadcast("There was an error, edit functionality may have problems")})}function g(){d.getForMember(MEMBER_ID,e.checkinInterval).success(function(t){e.checkins.push.apply(e.checkins,t.data),console.debug("$scope.checkins",e.checkins),e.interval++})}function v(e){return!!(e.shiftId&&e.leaderId&&e.comments)}e.details=!0,e.lessons=!1,e.kickout=!1,e.edit=!1,e.member={},e.checkins=[],e.checkinInterval=0,e.loaded=!1,e.sessions=[],e.lessonsArray=[],e.leaders=[],e.shifts=[],e.schools=[],e.showLeaderResults=!1,e.leaderId=null,e.memberId=null,e.lessonId=null,e.sessionNotes=null,e.photoHasBeenChanged=!1,e.photoHasBeenSaved=!0,e.changePage=function(t){e.details=!1,e.lessons=!1,e.kickout=!1,e.edit=!1,e.photoHasBeenChanged,"details"==t?e.details=!0:"lessons"==t?e.lessons=!0:"kickout"==t?e.kickout=!0:"edit"==t?e.edit=!0:e.details=!0},e.fetchData=function(){return null===MEMBER_ID?!1:void t.get(MEMBER_ID).success(function(t){t.data.birthDate&&(t.data.birthDate=new Date(t.data.birthDate)),e.member=t.data,e.loaded=!0}).error(function(e){s.broadcast("Sorry, there was a problem fetching data. This page may be rendered incorrectly.","error")})},e.updateMember=function(){t.update(e.member).success(function(t){s.broadcast(t.message,"success"),t.data.birthDate&&(t.data.birthDate=new Date(t.data.birthDate)),e.member=t.data,e.changePage("details"),e.photoHasBeenSaved=!0,document.body.scrollTop=document.documentElement.scrollTop=0}).error(function(e){s.broadcast("Sorry, something went wrong","error")})},e.init=function(){p(),f(),m(),h(),g()},e.getSessions=function(t){n.get(t).success(function(t){e.sessions=t.data}).error(function(e){console.log(e.message)})},e.saveSession=function(){var t={memberId:e.memberId,lessonId:e.lessonId,leaderId:e.leaderId,notes:e.sessionNotes};n.store(t).success(function(t){e.sessions.unshift(t.data),e.lessonId=null,e.leaderId=null,e.sessionNotes=""}).error(function(e){console.log("Something went wrong")})},e.clear=function(){e.showResults=!1,e.leaderQueryResults=[]},e.createKickout=function(){var t=e.kickoutForm;return t.memberId=MEMBER_ID,t.locationId=LOCATION_ID,v(t)?void a.store(t).success(function(t){s.broadcast(t.message,"success"),e.fetchData(),e.changePage("details")}).error(function(e){s.broadcast("There was an error, please fill in all fields","error")}):(s.broadcast("Please check all of the fields","error"),!1)},e.$watch("files",function(){e.onFileSelect(e.files)}),e.onFileSelect=function(t){var n;t&&t.length&&(n=t[0],e.spinner=!0,e.plus=!1,u.upload(n).success(function(t){e.spinner=!1,e.image=t.data,e.member.image=t.data,e.photoHasBeenChanged=!0,e.photoHasBeenSaved=!1}).error(function(t){e.spinner=!1,e.plus=!0,console.log("There was an error")}))},e.init(),e.fetchData()}angular.module("genesys").controller("MemberPageController",e),e.$inject=["$scope","Member","Session","Lesson","Leader","Shift","Kickout","AlertService","School","Image","Location","Checkin"]}(),function(){function e(e,t,n,i){e.query="",e.results=[],e.showResults=!1,e.searchForMember=function(){if(e.query.length>=2){var n={query:e.query};t.search(n).success(function(t){e.query.length>=2&&(e.results=t.data,e.showResults=!0)}).error(function(){console.log("There was a problem searching for this member")})}else e.clear()},e.clear=function(){e.showResults=!1,e.results=[]},e.blurSearch=function(){$("#member-search-input").blur()},e.checkIn=function(t,r){if(e.results[r].checkedIn!==!0){var o={memberId:t,locationId:LOCATION_ID};i.store(o).success(function(t){e.results[r].checkedIn=!0,setTimeout(function(){n.broadcastShowCheckedIn(),e.results=[],e.query=""},1e3)}).error(function(e){console.log(e.message)})}},e.$on("showCheckedIn",function(){e.showResults=!1})}angular.module("genesys").controller("SearchController",e),e.$inject=["$scope","Member","SharedService","Checkin"]}(),function(){"use strict";function e(e,t,n,i){function r(){o()}function o(){n.getByLocationId(LOCATION_ID).success(function(t){e.kickouts=t.data,console.log(t)}).error(function(){i.broadcast("There was a problem fetching Kickouts","error")})}e.kickouts=[],r()}angular.module("genesys").controller("ShiftController",e),e.$inject=["$scope","Checkin","Kickout","AlertService"]}();var $search=$(".search"),$result=$(".result"),$resultsWrapper=$(".results-wrapper"),memberList=[];createNewMember("Alexander","Carr"),createNewMember("Brian","Clauzel"),createNewMember("Wesley","Baertsch");var Header={init:function(){Header.stickify()},element:$(".nav-container"),previousDistance:0,stickify:function(){$(window).scroll(function(){var e=$(document).scrollTop();e>150?(e>Header.previousDistance&&e>Header.previousDistance+10?Header.element.addClass("hidden"):e<Header.previousDistance&&e<Header.previousDistance+10&&Header.element.removeClass("hidden"),Header.previousDistance=e):e>0&&(e>Header.previousDistance?Header.element.addClass("hidden"):e<Header.previousDistance&&Header.element.removeClass("hidden"),Header.previousDistance=e)})}};sizeResults(),function(){"use strict";function e(e,t,n,i,r){e.location=angular.copy(n),e.email=e.location.director,e.save=function(){var o={locationId:n.id,director:e.email};t.updateDirector(o).success(function(e){r.close(e.data)}).error(function(){i.broadcast('Sorry, something went wrong on our end. Try again, or email "austenpayan@gmail.com"')})},e.cancel=function(){r.dismiss("cancel")}}angular.module("genesys").controller("DirectorEditModalController",e),e.$inject=["$scope","Location","location","AlertService","$uibModalInstance"]}(),function(){function e(e,t,n,i,r){e.location=angular.copy(t),e.goal=e.location.goal,e.save=function(){var o={locationId:t.id,goal:e.goal};n.updateGoal(o).success(function(e){r.close(e.data)}).error(function(){i.broadcast("Sorry, there was a problem on our end. Contact admin.","error")})},e.cancel=function(){r.dismiss("cancel")}}angular.module("genesys").controller("GoalAssignmentModalController",e),e.$inject=["$scope","location","Location","AlertService","$uibModalInstance"]}(),app.controller("LocationAssignmentModalController",["$scope","$uibModalInstance","Leader","Location","leader",function(e,t,n,i,r){function o(){e.leader.locationIdCollection=u(e.leader.locations),a()}function a(){i.all().success(function(t){e.locations=t.data,l()})}function s(t){for(var n=!1,i=0;i<e.leader.locations.length;i++){if(e.leader.locations[i].id==t){n=!0;break}n=!1}return n}function l(){for(var t=0;t<e.locations.length;t++)s(e.locations[t].id)?e.locations[t].isChecked=!0:e.locations[t].isChecked=!1}function u(e){var t=e.map(function(e){return e.id});return t}e.leader=r,e.locations=[],e.save=function(){var i={locations:e.leader.locationIdCollection,leaderId:e.leader.id};n.updateLocations(i).success(function(e){t.close(e.data)})},e.cancel=function(){t.dismiss("cancel")},e.changeLocationAssignment=function(t){var n=e.locations[t].id;e.locations[t].isChecked?-1===e.leader.locationIdCollection.indexOf(n)&&e.leader.locationIdCollection.push(n):-1!==e.leader.locationIdCollection.indexOf(n)&&e.leader.locationIdCollection.splice(e.leader.locationIdCollection.indexOf(n),1)},o()}]);