text: /*!
   * Metro UI CSS v3.0.7 (http://metroui.org.ua)
   * Copyright 2012-2015 Sergey Pimenov
   * Licensed under MIT (http://metroui.org.ua/license.html)
   */
  function addTouchEvents(a){hasTouch&&(a.addEventListener("touchstart",touch2Mouse,!0),a.addEventListener("touchmove",touch2Mouse,!0),a.addEventListener("touchend",touch2Mouse,!0))}function touch2Mouse(a){var b,c=a.changedTouches[0];switch(a.type){case"touchstart":b="mousedown";break;case"touchend":b="mouseup";break;case"touchmove":b="mousemove";break;default:return}"mousedown"==b&&(eventTimer=(new Date).getTime(),startX=c.clientX,startY=c.clientY,mouseDown=!0),"mouseup"==b&&((new Date).getTime()-eventTimer<=500?b="click":(new Date).getTime()-eventTimer>1e3&&(b="longclick"),eventTimer=0,mouseDown=!1),"mousemove"==b&&mouseDown&&(deltaX=c.clientX-startX,deltaY=c.clientY-startY,moveDirection=deltaX>deltaY?"horizontal":"vertical");var d=document.createEvent("MouseEvent");d.initMouseEvent(b,!0,!0,window,1,c.screenX,c.screenY,c.clientX,c.clientY,!1,!1,!1,!1,0,null),c.target.dispatchEvent(d),a.preventDefault()}if("undefined"==typeof jQuery)throw new Error("Metro's JavaScript requires jQuery");window.METRO_VERSION="3.0.5",void 0===window.METRO_AUTO_REINIT&&(window.METRO_AUTO_REINIT=!0),void 0===window.METRO_LANGUAGE&&(window.METRO_LANGUAGE="en"),void 0===window.METRO_LOCALE&&(window.METRO_LOCALE="EN_en"),void 0===window.METRO_CURRENT_LOCALE&&(window.METRO_CURRENT_LOCALE="en"),void 0===window.METRO_SHOW_TYPE&&(window.METRO_SHOW_TYPE="slide"),void 0===window.METRO_DEBUG&&(window.METRO_DEBUG=!0),window.canObserveMutation="MutationObserver"in window,String.prototype.isUrl=function(){"use strict";var a=/^(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;return a.test(this)},String.prototype.isColor=function(){"use strict";return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(this)},Array.prototype.shuffle=function(){for(var a,b,c=this.length;0!==c;)b=Math.floor(Math.random()*c),c-=1,a=this[c],this[c]=this[b],this[b]=a;return this},Array.prototype.clone=function(){return this.slice(0)},Array.prototype.unique=function(){for(var a=this.concat(),b=0;b<a.length;++b)for(var c=b+1;c<a.length;++c)a[b]===a[c]&&a.splice(c--,1);return a},window.uniqueId=function(){"use strict";var a=(new Date).getTime(),b="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(b){var c=(a+16*Math.random())%16|0;return a=Math.floor(a/16),("x"==b?c:3&c|8).toString(16)});return b};var dateFormat=function(){"use strict";var a=/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,b=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,c=/[^-+\dA-Z]/g,d=function(a,b){for(a=String(a),b=b||2;a.length<b;)a="0"+a;return a};return function(e,f,g){var h=dateFormat;1!==arguments.length||"[object String]"!==Object.prototype.toString.call(e)||/\d/.test(e)||(f=e,e=void 0),e=e?new Date(e):new Date,f=String(h.masks[f]||f||h.masks["default"]),"UTC:"===f.slice(0,4)&&(f=f.slice(4),g=!0);var i=window.METRO_CURRENT_LOCALE||"en",j=g?"getUTC":"get",k=e[j+"Date"](),l=e[j+"Day"](),m=e[j+"Month"](),n=e[j+"FullYear"](),o=e[j+"Hours"](),p=e[j+"Minutes"](),q=e[j+"Seconds"](),r=e[j+"Milliseconds"](),s=g?0:e.getTimezoneOffset(),t={d:k,dd:d(k),ddd:window.METRO_LOCALES[i].days[l],dddd:window.METRO_LOCALES[i].days[l+7],m:m+1,mm:d(m+1),mmm:window.METRO_LOCALES[i].months[m],mmmm:window.METRO_LOCALES[i].months[m+12],yy:String(n).slice(2),yyyy:n,h:o%12||12,hh:d(o%12||12),H:o,HH:d(o),M:p,MM:d(p),s:q,ss:d(q),l:d(r,3),L:d(r>99?Math.round(r/10):r),t:12>o?"a":"p",tt:12>o?"am":"pm",T:12>o?"A":"P",TT:12>o?"AM":"PM",Z:g?"UTC":(String(e).match(b)||[""]).pop().replace(c,""),o:(s>0?"-":"+")+d(100*Math.floor(Math.abs(s)/60)+Math.abs(s)%60,4),S:["th","st","nd","rd"][k%10>3?0:(k%100-k%10!==10)*k%10]};return f.replace(a,function(a){return a in t?t[a]:a.slice(1,a.length-1)})}}();dateFormat.masks={"default":"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"},Date.prototype.format=function(a,b){"use strict";return dateFormat(this,a,b)},function(a){"use strict";a.fn.reverse=Array.prototype.reverse,a.Metro=function(b){b=a.extend({},b)},a.Metro.initWidgets=function(){var b;b=a("[data-role]"),a.each(b,function(){var b=a(this),c=b.data("role").split(/\s*,\s*/);c.map(function(c){try{void 0!==a.fn[c]&&a.fn[c].call(b)}catch(d){window.METRO_DEBUG&&console.log(d.message,d.stack)}})})}}(jQuery),$(function(){"use strict";if($.Metro.initWidgets(),window.METRO_AUTO_REINIT)if(window.canObserveMutation){var a,b,c;b={childList:!0,subtree:!0},c=function(a){a.map(function(a){if(a.addedNodes)for(var b,c,d,e=0,f=a.addedNodes.length;f>e;e++)b=$(a.addedNodes[e]),d=b.find("[data-role]"),c=void 0!==b.data("role")?$.merge(d,b):d,c.length&&$.each(c,function(){var a=$(this),b=a.data("role").split(/\s*,\s*/);b.map(function(b){try{void 0!==$.fn[b]&&$.fn[b].call(a)}catch(c){window.METRO_DEBUG&&console.log(c.message,c.stack)}})})})},a=new MutationObserver(c),a.observe(document,b)}else{var d,e=$("body").html();setInterval(function(){d=$("body").html(),e!==d&&(e=d,$.Metro.initWidgets())},100)}}),function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a(jQuery)}(function(a){var b=0,c=Array.prototype.slice;a.cleanData=function(b){return function(c){var d,e,f;for(f=0;null!=(e=c[f]);f++)try{d=a._data(e,"events"),d&&d.remove&&a(e).triggerHandler("remove")}catch(g){}b(c)}}(a.cleanData),a.widget=function(b,c,d){var e,f,g,h,i={},j=b.split(".")[0];return b=b.split(".")[1],e=j+"-"+b,d||(d=c,c=a.Widget),a.expr[":"][e.toLowerCase()]=function(b){return!!a.data(b,e)},a[j]=a[j]||{},f=a[j][b],g=a[j][b]=function(a,b){return this._createWidget?void(arguments.length&&this._createWidget(a,b)):new g(a,b)},a.extend(g,f,{version:d.version,_proto:a.extend({},d),_childConstructors:[]}),h=new c,h.options=a.widget.extend({},h.options),a.each(d,function(b,d){return a.isFunction(d)?void(i[b]=function(){var a=function(){return c.prototype[b].apply(this,arguments)},e=function(a){return c.prototype[b].apply(this,a)};return function(){var b,c=this._super,f=this._superApply;return this._super=a,this._superApply=e,b=d.apply(this,arguments),this._super=c,this._superApply=f,b}}()):void(i[b]=d)}),g.prototype=a.widget.extend(h,{widgetEventPrefix:f?h.widgetEventPrefix||b:b},i,{constructor:g,namespace:j,widgetName:b,widgetFullName:e}),f?(a.each(f._childConstructors,function(b,c){var d=c.prototype;a.widget(d.namespace+"."+d.widgetName,g,c._proto)}),delete f._childConstructors):c._childConstructors.push(g),a.widget.bridge(b,g),g},a.widget.extend=function(b){for(var d,e,f=c.call(arguments,1),g=0,h=f.length;h>g;g++)for(d in f[g])e=f[g][d],f[g].hasOwnProperty(d)&&void 0!==e&&(b[d]=a.isPlainObject(e)?a.isPlainObject(b[d])?a.widget.extend({},b[d],e):a.widget.extend({},e):e);return b},a.widget.bridge=function(b,d){var e=d.prototype.widgetFullName||b;a.fn[b]=function(f){var g="string"==typeof f,h=c.call(arguments,1),i=this;return g?this.each(function(){var c,d=a.data(this,e);return"instance"===f?(i=d,!1):d?a.isFunction(d[f])&&"_"!==f.charAt(0)?(c=d[f].apply(d,h),c!==d&&void 0!==c?(i=c&&c.jquery?i.pushStack(c.get()):c,!1):void 0):a.error("no such method '"+f+"' for "+b+" widget instance"):a.error("cannot call methods on "+b+" prior to initialization; attempted to call method '"+f+"'")}):(h.length&&(f=a.widget.extend.apply(null,[f].concat(h))),this.each(function(){var b=a.data(this,e);b?(b.option(f||{}),b._init&&b._init()):a.data(this,e,new d(f,this))})),i}},a.Widget=function(){},a.Widget._childConstructors=[],a.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(c,d){d=a(d||this.defaultElement||this)[0],this.element=a(d),this.uuid=b++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=a(),this.hoverable=a(),this.focusable=a(),d!==this&&(a.data(d,this.widgetFullName,this),this._on(!0,this.element,{remove:function(a){a.target===d&&this.destroy()}}),this.document=a(d.style?d.ownerDocument:d.document||d),this.window=a(this.document[0].defaultView||this.document[0].parentWindow)),this.options=a.widget.extend({},this.options,this._getCreateOptions(),c),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:a.noop,_getCreateEventData:a.noop,_create:a.noop,_init:a.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetFullName).removeData(a.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:a.noop,widget:function(){return this.element},option:function(b,c){var d,e,f,g=b;if(0===arguments.length)return a.widget.extend({},this.options);if("string"==typeof b)if(g={},d=b.split("."),b=d.shift(),d.length){for(e=g[b]=a.widget.extend({},this.options[b]),f=0;f<d.length-1;f++)e[d[f]]=e[d[f]]||{},e=e[d[f]];if(b=d.pop(),1===arguments.length)return void 0===e[b]?null:e[b];e[b]=c}else{if(1===arguments.length)return void 0===this.options[b]?null:this.options[b];g[b]=c}return this._setOptions(g),this},_setOptions:function(a){var b;for(b in a)this._setOption(b,a[b]);return this},_setOption:function(a,b){return this.options[a]=b,"disabled"===a&&(this.widget().toggleClass(this.widgetFullName+"-disabled",!!b),b&&(this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus"))),this},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_on:function(b,c,d){var e,f=this;"boolean"!=typeof b&&(d=c,c=b,b=!1),d?(c=e=a(c),this.bindings=this.bindings.add(c)):(d=c,c=this.element,e=this.widget()),a.each(d,function(d,g){function h(){return b||f.options.disabled!==!0&&!a(this).hasClass("ui-state-disabled")?("string"==typeof g?f[g]:g).apply(f,arguments):void 0}"string"!=typeof g&&(h.guid=g.guid=g.guid||h.guid||a.guid++);var i=d.match(/^([\w:-]*)\s*(.*)$/),j=i[1]+f.eventNamespace,k=i[2];k?e.delegate(k,j,h):c.bind(j,h)})},_off:function(b,c){c=(c||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,b.unbind(c).undelegate(c),this.bindings=a(this.bindings.not(b).get()),this.focusable=a(this.focusable.not(b).get()),this.hoverable=a(this.hoverable.not(b).get())},_delay:function(a,b){function c(){return("string"==typeof a?d[a]:a).apply(d,arguments)}var d=this;return setTimeout(c,b||0)},_hoverable:function(b){this.hoverable=this.hoverable.add(b),this._on(b,{mouseenter:function(b){a(b.currentTarget).addClass("ui-state-hover")},mouseleave:function(b){a(b.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(b){this.focusable=this.focusable.add(b),this._on(b,{focusin:function(b){a(b.currentTarget).addClass("ui-state-focus")},focusout:function(b){a(b.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(b,c,d){var e,f,g=this.options[b];if(d=d||{},c=a.Event(c),c.type=(b===this.widgetEventPrefix?b:this.widgetEventPrefix+b).toLowerCase(),c.target=this.element[0],f=c.originalEvent)for(e in f)e in c||(c[e]=f[e]);return this.element.trigger(c,d),!(a.isFunction(g)&&g.apply(this.element[0],[c].concat(d))===!1||c.isDefaultPrevented())}},a.each({show:"fadeIn",hide:"fadeOut"},function(b,c){a.Widget.prototype["_"+b]=function(d,e,f){"string"==typeof e&&(e={effect:e});var g,h=e?e===!0||"number"==typeof e?c:e.effect||c:b;e=e||{},"number"==typeof e&&(e={duration:e}),g=!a.isEmptyObject(e),e.complete=f,e.delay&&d.delay(e.delay),g&&a.effects&&a.effects.effect[h]?d[b](e):h!==b&&d[h]?d[h](e.duration,e.easing,f):d.queue(function(c){a(this)[b](),f&&f.call(d[0]),c()})}});a.widget}),jQuery.easing.jswing=jQuery.easing.swing,jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(a,b,c,d,e){return jQuery.easing[jQuery.easing.def](a,b,c,d,e)},easeInQuad:function(a,b,c,d,e){return d*(b/=e)*b+c},easeOutQuad:function(a,b,c,d,e){return-d*(b/=e)*(b-2)+c},easeInOutQuad:function(a,b,c,d,e){return(b/=e/2)<1?d/2*b*b+c:-d/2*(--b*(b-2)-1)+c},easeInCubic:function(a,b,c,d,e){return d*(b/=e)*b*b+c},easeOutCubic:function(a,b,c,d,e){return d*((b=b/e-1)*b*b+1)+c},easeInOutCubic:function(a,b,c,d,e){return(b/=e/2)<1?d/2*b*b*b+c:d/2*((b-=2)*b*b+2)+c},easeInQuart:function(a,b,c,d,e){return d*(b/=e)*b*b*b+c},easeOutQuart:function(a,b,c,d,e){return-d*((b=b/e-1)*b*b*b-1)+c},easeInOutQuart:function(a,b,c,d,e){return(b/=e/2)<1?d/2*b*b*b*b+c:-d/2*((b-=2)*b*b*b-2)+c},easeInQuint:function(a,b,c,d,e){return d*(b/=e)*b*b*b*b+c},easeOutQuint:function(a,b,c,d,e){return d*((b=b/e-1)*b*b*b*b+1)+c},easeInOutQuint:function(a,b,c,d,e){return(b/=e/2)<1?d/2*b*b*b*b*b+c:d/2*((b-=2)*b*b*b*b+2)+c},easeInSine:function(a,b,c,d,e){return-d*Math.cos(b/e*(Math.PI/2))+d+c},easeOutSine:function(a,b,c,d,e){return d*Math.sin(b/e*(Math.PI/2))+c},easeInOutSine:function(a,b,c,d,e){return-d/2*(Math.cos(Math.PI*b/e)-1)+c},easeInExpo:function(a,b,c,d,e){return 0==b?c:d*Math.pow(2,10*(b/e-1))+c},easeOutExpo:function(a,b,c,d,e){return b==e?c+d:d*(-Math.pow(2,-10*b/e)+1)+c},easeInOutExpo:function(a,b,c,d,e){return 0==b?c:b==e?c+d:(b/=e/2)<1?d/2*Math.pow(2,10*(b-1))+c:d/2*(-Math.pow(2,-10*--b)+2)+c},easeInCirc:function(a,b,c,d,e){return-d*(Math.sqrt(1-(b/=e)*b)-1)+c},easeOutCirc:function(a,b,c,d,e){return d*Math.sqrt(1-(b=b/e-1)*b)+c},easeInOutCirc:function(a,b,c,d,e){return(b/=e/2)<1?-d/2*(Math.sqrt(1-b*b)-1)+c:d/2*(Math.sqrt(1-(b-=2)*b)+1)+c},easeInElastic:function(a,b,c,d,e){var f=1.70158,g=0,h=d;if(0==b)return c;if(1==(b/=e))return c+d;if(g||(g=.3*e),h<Math.abs(d)){h=d;var f=g/4}else var f=g/(2*Math.PI)*Math.asin(d/h);return-(h*Math.pow(2,10*(b-=1))*Math.sin(2*(b*e-f)*Math.PI/g))+c},easeOutElastic:function(a,b,c,d,e){var f=1.70158,g=0,h=d;if(0==b)return c;if(1==(b/=e))return c+d;if(g||(g=.3*e),h<Math.abs(d)){h=d;var f=g/4}else var f=g/(2*Math.PI)*Math.asin(d/h);return h*Math.pow(2,-10*b)*Math.sin(2*(b*e-f)*Math.PI/g)+d+c},easeInOutElastic:function(a,b,c,d,e){var f=1.70158,g=0,h=d;if(0==b)return c;if(2==(b/=e/2))return c+d;if(g||(g=.3*e*1.5),h<Math.abs(d)){h=d;var f=g/4}else var f=g/(2*Math.PI)*Math.asin(d/h);return 1>b?-.5*h*Math.pow(2,10*(b-=1))*Math.sin(2*(b*e-f)*Math.PI/g)+c:h*Math.pow(2,-10*(b-=1))*Math.sin(2*(b*e-f)*Math.PI/g)*.5+d+c},easeInBack:function(a,b,c,d,e,f){return void 0==f&&(f=1.70158),d*(b/=e)*b*((f+1)*b-f)+c},easeOutBack:function(a,b,c,d,e,f){return void 0==f&&(f=1.70158),d*((b=b/e-1)*b*((f+1)*b+f)+1)+c},easeInOutBack:function(a,b,c,d,e,f){return void 0==f&&(f=1.70158),(b/=e/2)<1?d/2*b*b*(((f*=1.525)+1)*b-f)+c:d/2*((b-=2)*b*(((f*=1.525)+1)*b+f)+2)+c},easeInBounce:function(a,b,c,d,e){return d-jQuery.easing.easeOutBounce(a,e-b,0,d,e)+c},easeOutBounce:function(a,b,c,d,e){return(b/=e)<1/2.75?7.5625*d*b*b+c:2/2.75>b?d*(7.5625*(b-=1.5/2.75)*b+.75)+c:2.5/2.75>b?d*(7.5625*(b-=2.25/2.75)*b+.9375)+c:d*(7.5625*(b-=2.625/2.75)*b+.984375)+c},easeInOutBounce:function(a,b,c,d,e){return e/2>b?.5*jQuery.easing.easeInBounce(a,2*b,0,d,e)+c:.5*jQuery.easing.easeOutBounce(a,2*b-e,0,d,e)+.5*d+c}}),function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?module.exports=a:a(jQuery)}(function(a){function b(b){var e,f=b||window.event,g=[].slice.call(arguments,1),h=0,i=0,j=0,k=0,l=0;return b=a.event.fix(f),b.type="mousewheel",f.wheelDelta&&(h=f.wheelDelta),f.detail&&(h=-1*f.detail),f.deltaY&&(j=-1*f.deltaY,h=j),f.deltaX&&(i=f.deltaX,h=-1*i),void 0!==f.wheelDeltaY&&(j=f.wheelDeltaY),void 0!==f.wheelDeltaX&&(i=-1*f.wheelDeltaX),k=Math.abs(h),(!c||c>k)&&(c=k),l=Math.max(Math.abs(j),Math.abs(i)),(!d||d>l)&&(d=l),e=h>0?"floor":"ceil",h=Math[e](h/c),i=Math[e](i/d),j=Math[e](j/d),g.unshift(b,h,i,j),(a.event.dispatch||a.event.handle).apply(this,g)}var c,d,e=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],f="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"];if(a.event.fixHooks)for(var g=e.length;g;)a.event.fixHooks[e[--g]]=a.event.mouseHooks;a.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var a=f.length;a;)this.addEventListener(f[--a],b,!1);else this.onmousewheel=b},teardown:function(){if(this.removeEventListener)for(var a=f.length;a;)this.removeEventListener(f[--a],b,!1);else this.onmousewheel=null}},a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})}),function(){function a(a){var b=Array.prototype.slice.call(document.querySelectorAll(a),0);b.forEach(function(a){var b=a.textContent.replace(/^[\r\n]+/,"").replace(/\s+$/g,"");if(/^\S/gm.test(b))return void(a.textContent=b);for(var c,d,e,f=/^[\t ]+/gm,g=1e3;c=f.exec(b);)e=c[0].length,g>e&&(g=e,d=c[0]);1e3!=g&&(a.textContent=b.replace(new RegExp("^"+d,"gm"),""))})}document.addEventListener("DOMContentLoaded",function(){a("pre code, textarea")},!1)}();var hasTouch="ontouchend"in window,eventTimer,moveDirection="undefined",startX,startY,deltaX,deltaY,mouseDown=!1;!function(a){"use strict";a.widget("metro.accordion",{version:"3.0.0",options:{closeAny:!1,speed:"fast",onFrameOpen:function(){return!0},onFrameOpened:function(){},onFrameClose:function(){return!0},onFrameClosed:function(){}},init:function(){var b=this,c=this.element;c.on("click",".heading",function(c){var d=a(this).parent();return d.hasClass("disabled")?!1:(d.hasClass("active")?b._closeFrame(d):b._openFrame(d),c.preventDefault(),void c.stopPropagation())})},_closeAllFrames:function(){var b=this,c=this.element.children(".frame.active");a.each(c,function(){b._closeFrame(a(this))})},_openFrame:function(a){var b=this.options,c=a.children(".content");if("string"==typeof b.onFrameOpen){if(!window[b.onFrameOpen](a))return!1}else if(!b.onFrameOpen(a))return!1;b.closeAny&&this._closeAllFrames(),c.slideDown(b.speed),a.addClass("active"),"string"==typeof b.onFrameOpened?window[b.onFrameOpened](a):b.onFrameOpened(a)},_closeFrame:function(a){var b=this.options,c=a.children(".content");if("string"==typeof b.onFrameClose){if(!window[b.onFrameClose](a))return!1}else if(!b.onFrameClose(a))return!1;c.slideUp(b.speed,function(){a.removeClass("active")}),"string"==typeof b.onFrameClosed?window[b.onFrameClosed](a):b.onFrameClosed(a)},_create:function(){var a=this,b=(this.options,this.element);this._setOptionsData(),a.init(),b.data("accordion",this)},_setOptionsData:function(){var b=this.options;a.each(this.element.data(),function(c,d){if(c in b)try{b[c]=a.parseJSON(d)}catch(e){b[c]=d}})},_destroy:function(){},_setOption:function(a,b){this._super("_setOption",a,b)}})}(jQuery),function(a){"use strict";a.widget("metro.appbar",{version:"3.0.0",options:{flexstyle:"app-bar-menu",flexclean:!1,flextolerance:3},_create:function(){var b=this.element,c=this.options;a.each(b.data(),function(b,d){if(b in c)try{c[b]=a.parseJSON(d)}catch(e){c[b]=d}}),this._initBar(),b.data("appbar",this)},_calculateFreeSpace:function(){var b,c,d=this,e=(this.element,this.options,0),f=0;e=a(d.menusParent).width(),b=a(d.menusParent).children(":visible").not(".app-bar-pullmenu");for(var g,h=[],i=[],j=[],k=0,l=b.length;l>k;k++)switch(g=a(b[k]).css("float")){case"left":h.push(b[k]);break;case"right":i.push(b[k]);break;default:j.push(b[k])}i.reverse(),b=new Array,b=h.concat(j,i),b=a(b),f+=parseInt(a(b).first().css("margin-left"));for(var k=0,l=b.length-1;l>=k;k++)f+=a(b[k]).outerWidth(),k!==l&&(f+=Math.max(parseInt(a(b[k]).css("margin-right")),parseInt(a(b[k+1]).css("margin-left"))));return f+=parseInt(a(b[l]).css("margin-right")),c=e-f,d.freeSpace=c,d.childrenWidth=f,d.menusParentWidth=e,c},_originIndexMove:function(b,c){var d=a(b).children().filter(function(){return parseInt(a(this).attr("data-flexorderorigin"))<parseInt(a(c).attr("data-flexorderorigin"))});d.length>0?a(d).last().after(c):(d=a(b).children().filter(function(){return parseInt(a(this).attr("data-flexorderorigin"))>parseInt(a(c).attr("data-flexorderorigin"))}),d.length>0?a(d).first().before(c):a(b).append(c))},_moveMenuEntry:function(b){{var c=this;this.element,this.options}if(b=b||"toPullMenu","toPullMenu"===b){var d=a(c.allMenuEntries).not(".app-bar-pullmenu-entry").last();if(0===d.length)return!1;var e=a(d).parent(),f=a(c.flexVisibles).index(a(d).parent()),g=a(c.pullMenu).find(".app-bar-pullmenubar").eq(f);return c._originIndexMove(g,d),a(d).addClass("app-bar-pullmenu-entry"),a(g).removeClass("hidden").show(),0===a(e).children().length&&a(e).addClass("hidden"),a(c.pullButton).show(),d}if("fromPullMenu"===b){var h=a(c.allMenuEntries).filter(".app-bar-pullmenu-entry").first(),g=a(h).parent(),f=a(g).index(),e=a(c.flexVisibles).eq(f);return a(e).removeClass("hidden"),a(h).removeClass("app-bar-pullmenu-entry"),c._originIndexMove(e,h),0===a(g).children().length&&a(g).addClass("hidden").hide(),0===a(c.pullMenu).children(".app-bar-pullmenubar").not(".hidden").length&&(a(c.pullMenu).hide().addClass("hidden"),a(c.pullButton).hide()),0===h.length?!1:h}},_checkMenuEntries:function(){for(var a=this,b=(this.element,this.options),c=!1,d=0,e=a.allMenuEntries.length;e>d;d++){a._calculateFreeSpace();var f=a.freeSpace;if(!(f<b.flextolerance||b.flexclean)){if(a._moveMenuEntry("fromPullMenu")){c=!0;continue}break}if(!a._moveMenuEntry("toPullMenu"))break;if(c)break}},resize:function(){{var a=this;this.element,this.options}a.initiatedAsFlex&&this._checkMenuEntries()},_initBar:function(){var b=this,c=this.element,d=this.options;b.lastFlexAction=void 0,b.pullButton=a(c).find(".app-bar-pullbutton");var e=a(c).find(".app-bar-menu");b.initiatedAsFlex=!1,d.flexclean=a(c).is("[data-flexclean='true']")||d.flexclean,d.flexstyle=a(c).attr("data-flexstyle")||d.flexstyle;var f,g;b.flexVisibles=a(),b.allMenuEntries=a(),b.menusParent=a(),b.pullMenu=a(),e.length>0&&a(c).is(":not('.no-flexible')")&&(b.flexVisibles=a(e).not(".no-flexible"),b.flexVisibles.length>0&&(b.initiatedAsFlex=!0,b.flexVisibles.sort(function(b,c){var d=parseInt(a(b).data("flexorder"))||a(b).index()+1,e=parseInt(a(c).data("flexorder"))||a(c).index()+1;return d-e}),a(b.flexVisibles).each(function(){f=this,g=a(f).children(),a(g).each(function(){a(this).attr("data-flexorderorigin",a(this).index()),a(this).is("[data-flexorder]")||a(this).attr("data-flexorder",a(this).index()+1)}),g.sort(function(b,c){var d=parseInt(a(b).data("flexorder")),e=parseInt(a(c).data("flexorder"));return d-e}),a(f).is("[data-flexdirection='reverse']")&&g.reverse(),a.merge(b.allMenuEntries,a(g).not(".no-flexible"))}),b.menusParent=a(c).find(".app-bar-menu").first().parent(),b.pullButton.length>0||(b.pullButton=a('<div class="app-bar-pullbutton automatic"></div>'),a(b.menusParent).append(b.pullButton)),b.pullMenu=a('<nav class="app-bar-pullmenu hidden" />'),b.flexVisibles.each(function(){a(b.pullMenu).append(a('<ul class="app-bar-pullmenubar hidden '+d.flexstyle+'" />'))}),a(b.menusParent).append(a('<div class="clearfix" style="width: 0;">')),a(b.pullMenu).addClass("flexstyle-"+d.flexstyle),a(b.menusParent).append(b.pullMenu),b._checkMenuEntries(),a(b.pullButton).on("click",function(){b=a(this).closest("[data-role=appbar]").data("appbar"),a(b.pullMenu).is(":hidden")?(a(b.pullMenu).show(),a(b.pullMenu).find(".app-bar-pullmenubar").hide().not(".hidden").slideDown("fast")):a(b.pullMenu).find(".app-bar-pullmenubar").not(".hidden").show().slideUp("fast",function(){a(b.pullMenu).hide()})}),a(window).resize(function(){a("[data-role=appbar]:not(.no-flexible)").each(function(){a(this).data("appbar").resize()})}),a(window).load(function(){a("[data-role=appbar]:not(.no-flexible)").each(function(){a(this).data("appbar").resize()})}),a("[data-role=appbar]:not(.no-flexible) [src]").on("load",function(){var b=a(this).closest("[data-role=appbar]").data("appbar");b.resize()})))},_destroy:function(){},_setOption:function(a,b){this._super("_setOption",a,b)}})}(jQuery),function(a){"use strict";a.widget("metro.group",{version:"3.0.0",options:{groupType:"one-state",buttonStyle:!1,onChange:function(){return!0},onChanged:function(){}},_create:function(){var b=this.element,c=this.options;a.each(b.data(),function(b,d){if(b in c)try{c[b]=a.parseJSON(d)}catch(e){c[b]=d}}),b.hasClass("group-of-buttons")||b.addClass("group-of-buttons");for(var d=b.find(".button, .toolbar-button"),e=0;e<d.length;e++)a(d[e]).data("index",e);c.buttonStyle!==!1&&d.addClass(c.buttonStyle),b.on("click",".button, .toolbar-button",function(){if("string"==typeof c.onChange){if(!window[c.onChange](a(this).data("index"),this))return!1}else if(!c.onChange(a(this).data("index"),this))return!1;"one-state"===c.groupType?(d.removeClass("active"),a(this).addClass("active")):a(this).toggleClass("active"),"string"==typeof c.onChanged?window[c.onChanged](a(this).data("index"),this):c.onChanged(a(this).data("index"),this)}),b.data("group",this)},_destroy:function(){},_setOption:function(a,b){this._super("_setOption",a,b)}})}(jQuery),window.METRO_LOCALES={en:{months:["January","February","March","April","May","June","July","August","September","October","November","December","Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Su","Mo","Tu","We","Th","Fr","Sa"],buttons:["Today","Clear","Cancel","Help","Prior","Next","Finish"]},fr:{months:["Janvier","Février","Mars","Avril","Mai","Juin","Juillet","Août","Septembre","Octobre","Novembre","Décembre","Jan","Fév","Mars","Avr","Mai","Juin","Juil","Août","Sept","Oct","Nov","Déc"],days:["Dimanche","Lundi","Mardi","Mercredi","Jeudi","Vendredi","Samedi","Di","Lu","Ma","Me","Je","Ve","Sa"],buttons:["Aujourd'hui","Effacer","Annuler","Aide","Précedent","Suivant","Fin"]},nl:{months:["Januari","Februari","Maart","April","Mei","Juni","Juli","Augustus","September","Oktober","November","December","Jan","Feb","Mrt","Apr","Mei","Jun","Jul","Aug","Sep","Okt","Nov","Dec"],days:["Zondag","Maandag","Dinsdag","Woensdag","Donderdag","Vrijdag","Zaterdag","Zo","Ma","Di","Wo","Do","Vr","Za"],buttons:["Vandaag","Verwijderen","Annuleren","Hulp","Vorige","Volgende","Einde"]},ua:{months:["Січень","Лютий","Березень","Квітень","Травень","Червень","Липень","Серпень","Вересень","Жовтень","Листопад","Грудень","Січ","Лют","Бер","Кві","Тра","Чер","Лип","Сер","Вер","Жов","Лис","Гру"],days:["Неділя","Понеділок","Вівторок","Середа","Четвер","П’ятниця","Субота","Нд","Пн","Вт","Ср","Чт","Пт","Сб"],buttons:["Сьогодні","Очистити","Скасувати","Допомога","Назад","Вперед","Готово"]},ru:{months:["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь","Янв","Фев","Мар","Апр","Май","Июн","Июл","Авг","Сен","Окт","Ноя","Дек"],days:["Воскресенье","Понедельник","Вторник","Среда","Четверг","Пятница","Суббота","Вс","Пн","Вт","Ср","Чт","Пт","Сб"],buttons:["Сегодня","Очистить","Отменить","Помощь","Назад","Вперед","Готово"]},zhCN:{months:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月","一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],days:["星期日","星期一","星期二","星期三","星期四","星期五","星期六","日","一","二","三","四","五","六"],buttons:["今日","清除","Cancel","Help","Prior","Next","Finish"]},it:{months:["Gennaio","Febbraio","Marzo","Aprile","Maggio","Giugno","Luglio","Agosto","Settembre","Ottobre","Novembre","Dicembre","Gen"," Feb","Mar","Apr","Mag","Giu","Lug","Ago","Set","Ott","Nov","Dic"],days:["Lunedì","Martedì","Mercoledì","Giovedì","Venerdì","Sabato","Domenica","Lun","Mar","Mer","Gio","Ven","Sab","Dom"],buttons:["Oggi","Cancella","Cancel","Help","Prior","Next","Finish"]},de:{months:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember","Jan","Feb","Mrz","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],days:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag","So","Mo","Di","Mi","Do","Fr","Sa"],buttons:["Heute","Zurücksetzen","Abbrechen","Hilfe","Früher","Später","Fertig"]},es:{months:["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre","Ene","Feb","Mar","Abr","May","Jun","Jul","Ago","Sept","Oct","Nov","Dic"],days:["Domingo","Lunes","Martes","Miércoles","Jueves","Viernes","Sábado","Do","Lu","Mar","Mié","Jue","Vi","Sáb"],buttons:["Hoy","Limpiar","Cancel","Help","Prior","Next","Finish"]},pt:{months:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro","Jan","Fev","Mar","Abr","Mai","Jun","Jul","Ago","Set","Out","Nov","Dez"],days:["Domingo","Segunda-feira","Terça-feira","Quarta-feira","Quinta-feira","Sexta-feira","Sabado","Dom","Seg","Ter","Qua","Qui","Sex","Sab"],buttons:["Hoje","Limpar","Cancelar","Ajuda","Anterior","Seguinte","Terminar"]},pl:{months:["Styczeń","Luty","Marzec","Kwiecień","Maj","Czerwiec","Lipiec","Sierpień","Wrzesień","Październik","Listopad","Grudzień","Sty","Lut","Mar","Kwi","Maj","Cze","Lip","Sie","Wrz","Paź","Lis","Gru"],days:["Niedziela","Poniedziałek","Wtorek","Środa","Czwartek","Piątek","Sobota","Nd","Pon","Wt","Śr","Czw","Pt","Sob"],buttons:["Dzisiaj","Wyczyść","Anuluj","Pomoc","Poprzedni","Następny","Koniec"]},cs:{months:["Leden","Únor","Březen","Duben","Květen","Červen","Červenec","Srpen","Září","Říjen","Listopad","Prosinec","Led","Ún","Bř","Dub","Kvě","Če","Čer","Srp","Zá","Ří","Li","Pro"],days:["Neděle","Pondělí","Úterý","Středa","Čtvrtek","Pátek","Sobota","Ne","Po","Út","St","Čt","Pá","So"],buttons:["Dnes","Vyčistit","Zrušit","Pomoc","Předešlý","Další","Dokončit"]}},function(a){"use strict";a.widget("metro.calendar",{version:"3.0.0",options:{format:"yyyy-mm-dd",multiSelect:!1,startMode:"day",weekStart:window.METRO_CALENDAR_WEEK_START,otherDays:!0,date:new Date,minDate:!1,maxDate:!1,preset:!1,exclude:!1,stored:!1,buttons:!0,buttonToday:!0,buttonClear:!0,locale:"en",actions:!0,condensedGrid:!1,getDates:function(){},dayClick:function(){}},_year:0,_month:0,_day:0,_today:new Date,_event:"",_mode:"day",_distance:0,_events:[],_create:function(){var b=this,c=this.element,d=this.options;a.each(c.data(),function(b,c){if(b in d)try{d[b]=a.parseJSON(c)}catch(e){d[b]=c}}),"string"==typeof d.date&&(d.date=new Date(d.date)),d.minDate!==!1&&"string"==typeof d.minDate&&(d.minDate=new Date(d.minDate+"T00:00:00Z")-864e5),d.maxDate!==!1&&"string"==typeof d.maxDate&&(d.maxDate=new Date(d.maxDate+"T00:00:00Z")),this.locales=window.METRO_LOCALES,this._year=d.date.getFullYear(),this._distance=d.date.getFullYear()-4,this._month=d.date.getMonth(),this._day=d.date.getDate(),this._mode=d.startMode,c.data("_storage",[]),c.data("_exclude",[]),c.data("_stored",[]),c.hasClass("calendar")||c.addClass("calendar");var e,f;d.preset&&(e=/\s*,\s*/,f=d.preset.split(e),a.each(f,function(){void 0!==new Date(this)&&b.setDate(this)})),d.exclude&&(e=/\s*,\s*/,f=d.exclude.split(e),a.each(f,function(){void 0!==new Date(this)&&b.setDateExclude(this)})),d.stored&&(e=/\s*,\s*/,f=d.stored.split(e),a.each(f,function(){void 0!==new Date(this)&&b.setDateStored(this)})),this._renderCalendar(),c.data("calendar",this)},_renderButtons:function(b){var c,d,e=this.options;if(this.options.buttons){var f=e.buttonToday?"<button class='button calendar-btn-today small-button success'>"+this.locales[e.locale].buttons[0]+"</button>":"",g=e.buttonClear?"<button class='button calendar-btn-clear small-button warning'>"+this.locales[e.locale].buttons[1]+"</button>":"";c=a("<div/>").addClass("calendar-row calendar-actions"),d=a("<div/>").addClass("align-center").html(f+g),d.appendTo(c),c.appendTo(b)}},_renderMonth:function(){var b=this.options,c=this._year,d=this._month,e=(this._day,this._event,28);1===d&&(c%100!==0&&c%4===0||c%400===0)&&(e=29);var f,g,h,i,j,k=["31",""+e,"31","30","31","30","31","31","30","31","30","31"],l=k[d],m=new Date(c,d,1).getDay();this.element.html(""),f=a("<div/>").addClass("calendar-grid"),b.condensedGrid&&f.addClass("condensed no-border"),
  g=a("<div/>").addClass("calendar-row no-margin"),a("<div/>").addClass("calendar-cell align-center").html("<a class='btn-previous-year' href='#'>-</a>").appendTo(g),a("<div/>").addClass("calendar-cell align-center").html("<a class='btn-previous-month' href='#'>&#12296;</a>").appendTo(g),a("<div/>").addClass("calendar-cell sel-month align-center").html("<a class='btn-select-month' href='#'>"+this.locales[b.locale].months[d]+" "+c+"</a>").appendTo(g),a("<div/>").addClass("calendar-cell align-center").html("<a class='btn-next-month' href='#'>&#12297;</a>").appendTo(g),a("<div/>").addClass("calendar-cell align-center").html("<a class='btn-next-year' href='#'>+</a>").appendTo(g),g.addClass("calendar-header").appendTo(f);var n;for(g=a("<div/>").addClass("calendar-row week-days"),i=0;7>i;i++)b.weekStart?(n=i+1,7===n&&(n=0),h=a("<div/>").addClass("calendar-cell align-center day-of-week").appendTo(g),j=a("<div/>").html(this.locales[b.locale].days[n+7]).appendTo(h)):(h=a("<div/>").addClass("calendar-cell align-center day-of-week").appendTo(g),j=a("<div/>").html(this.locales[b.locale].days[i+7]).appendTo(h));g.addClass("calendar-subheader").appendTo(f);var o=this._month-1;0>o&&(o=11);var p=k[o],q=(b.weekStart?m+6:m)%7,r="";for(g=a("<div/>").addClass("calendar-row"),i=0;q>i;i++)b.otherDays&&(r=p-(q-i-1)),h=a("<div/>").addClass("calendar-cell empty").appendTo(g),j=a("<div/>").addClass("other-day").html(r).appendTo(h),b.otherDays||j.css("visibility","hidden");var s,t,u,v=(b.weekStart?m+6:m)%7;for(i=1;l>=i;i++)v%=7,0===v&&(g.appendTo(f),g=a("<div/>").addClass("calendar-row")),h=a("<div/>").addClass("calendar-cell align-center day"),j=a("<div/>").appendTo(h),b.minDate!==!1&&new Date(c,d,i)<b.minDate||b.maxDate!==!1&&new Date(c,d,i)>b.maxDate?(h.removeClass("day"),j.addClass("other-day"),u=i):u="<a href='#'>"+i+"</a>",j.html(u),c===this._today.getFullYear()&&d===this._today.getMonth()&&this._today.getDate()===i&&h.addClass("today"),s=new Date(this._year,this._month,i).format("yyyy-mm-dd"),this.element.data("_storage").indexOf(s)>=0&&(t=h.find("a"),t.parent().parent().addClass("selected")),this.element.data("_exclude").indexOf(s)>=0&&(t=h.find("a"),t.parent().parent().addClass("exclude")),this.element.data("_stored").indexOf(s)>=0&&(t=h.find("a"),t.parent().parent().addClass("stored")),h.appendTo(g),v++;var w="";for(i=v+1;7>=i;i++)b.otherDays&&(w=i-v),h=a("<div/>").addClass("calendar-cell empty").appendTo(g),j=a("<div/>").addClass("other-day").html(w).appendTo(h),b.otherDays||j.css("visibility","hidden");g.appendTo(f),this._renderButtons(f),f.appendTo(this.element)},_renderMonths:function(){var b,c,d,e,f;for(this.element.html(""),b=a("<div/>").addClass("calendar-grid"),this.options.condensedGrid&&b.addClass("condensed no-border"),c=a("<div/>").addClass("calendar-row"),a("<div/>").addClass("calendar-cell sel-minus align-center").html("<a class='btn-previous-year' href='#'>-</a>").appendTo(c),a("<div/>").addClass("calendar-cell sel-year align-center").html("<a class='btn-select-year' href='#'>"+this._year+"</a>").appendTo(c),a("<div/>").addClass("calendar-cell sel-plus align-center").html("<a class='btn-next-year' href='#'>+</a>").appendTo(c),c.addClass("calendar-header").appendTo(b),c=a("<div/>").addClass("calendar-row"),f=0,e=0;12>e;e++)d=a("<div/>").addClass("calendar-cell month-cell align-center month").html("<a href='#' data-month='"+e+"'>"+this.locales[this.options.locale].months[e+12]+"</a>"),this._month===e&&(new Date).getFullYear()===this._year&&d.addClass("today"),d.appendTo(c),(f+1)%4===0&&(c.appendTo(b),c=a("<div/>").addClass("calendar-row")),f+=1;this._renderButtons(b),b.appendTo(this.element)},_renderYears:function(){var b,c,d,e,f;for(this.element.html(""),b=a("<div/>").addClass("calendar-grid"),this.options.condensedGrid&&b.addClass("condensed no-border"),c=a("<div/>").addClass("calendar-row cells4"),a("<div/>").addClass("calendar-cell sel-minus align-center").html("<a class='btn-previous-year' href='#'>-</a>").appendTo(c),a("<div/>").addClass("calendar-cell sel-year align-center").html("<a class='btn-none-btn'>"+this._distance+"-"+(this._distance+11)+"</a>").appendTo(c),a("<div/>").addClass("calendar-cell sel-plus align-center").html("<a class='btn-next-year' href='#'>+</a>").appendTo(c),c.addClass("calendar-header").appendTo(b),c=a("<div/>").addClass("calendar-row"),f=0,e=this._distance;e<this._distance+12;e++)d=a("<div/>").addClass("calendar-cell year-cell align-center year").html("<a href='#' data-year='"+e+"'>"+e+"</a>"),(new Date).getFullYear()===e&&d.addClass("today"),d.appendTo(c),(f+1)%4===0&&(c.appendTo(b),c=a("<div/>").addClass("calendar-row")),f+=1;this._renderButtons(b),b.appendTo(this.element)},_renderCalendar:function(){switch(this._mode){case"year":this._renderYears();break;case"month":this._renderMonths();break;default:this._renderMonth()}this._initButtons()},_initButtons:function(){var b=this,c=this.options,d=this.element.find(".calendar-grid");"day"===this._mode?(d.find(".btn-select-month").on("click",function(a){a.preventDefault(),a.stopPropagation(),b._mode="month",b._renderCalendar()}),d.find(".btn-previous-month").on("click",function(a){b._event="eventPrevious",a.preventDefault(),a.stopPropagation(),b._month-=1,b._month<0&&(b._year-=1,b._month=11),b._renderCalendar()}),d.find(".btn-next-month").on("click",function(a){b._event="eventNext",a.preventDefault(),a.stopPropagation(),b._month+=1,12===b._month&&(b._year+=1,b._month=0),b._renderCalendar()}),d.find(".btn-previous-year").on("click",function(a){b._event="eventPrevious",a.preventDefault(),a.stopPropagation(),b._year-=1,b._renderCalendar()}),d.find(".btn-next-year").on("click",function(a){b._event="eventNext",a.preventDefault(),a.stopPropagation(),b._year+=1,b._renderCalendar()}),d.find(".day a").on("click",function(e){if(e.preventDefault(),e.stopPropagation(),a(this).parent().parent().hasClass("exclude"))return!1;var f=new Date(b._year,b._month,parseInt(a(this).html())).format(b.options.format,null),g=new Date(b._year,b._month,parseInt(a(this).html()));b.options.multiSelect?(a(this).parent().parent().toggleClass("selected"),a(this).parent().parent().hasClass("selected")?b._addDate(f):b._removeDate(f)):(d.find(".day a").parent().parent().removeClass("selected"),a(this).parent().parent().addClass("selected"),b.element.data("_storage",[]),b._addDate(f)),"string"==typeof c.dayClick?window[c.dayClick](f,g):c.dayClick(f,g)})):"month"===this._mode?(d.find(".month a").on("click",function(c){b._event="eventNext",c.preventDefault(),c.stopPropagation(),b._month=parseInt(a(this).data("month")),b._mode="day",b._renderCalendar()}),d.find(".btn-previous-year").on("click",function(a){b._event="eventPrevious",a.preventDefault(),a.stopPropagation(),b._year-=1,b._renderCalendar()}),d.find(".btn-next-year").on("click",function(a){b._event="eventNext",a.preventDefault(),a.stopPropagation(),b._year+=1,b._renderCalendar()}),d.find(".btn-select-year").on("click",function(a){b._event="eventNext",a.preventDefault(),a.stopPropagation(),b._mode="year",b._renderCalendar()})):(d.find(".year a").on("click",function(c){b._event="eventNext",c.preventDefault(),c.stopPropagation(),b._year=parseInt(a(this).data("year")),b._mode="month",b._renderCalendar()}),d.find(".btn-previous-year").on("click",function(a){b._event="eventPrevious",a.preventDefault(),a.stopPropagation(),b._distance-=10,b._renderCalendar()}),d.find(".btn-next-year").on("click",function(a){b._event="eventNext",a.preventDefault(),a.stopPropagation(),b._distance+=10,b._renderCalendar()})),d.find(".calendar-btn-today").on("click",function(a){a.preventDefault(),a.stopPropagation(),b._mode=b.options.startMode,b.options.date=new Date,b._year=b.options.date.getFullYear(),b._month=b.options.date.getMonth(),b._day=b.options.date.getDate(),b._renderCalendar()}),d.find(".calendar-btn-clear").on("click",function(a){a.preventDefault(),a.stopPropagation(),b.options.date=new Date,b._year=b.options.date.getFullYear(),b._month=b.options.date.getMonth(),b._day=b.options.date.getDate(),b.element.data("_storage",[]),b._renderCalendar()})},_addDate:function(a){var b=this.element.data("_storage").indexOf(a);0>b&&this.element.data("_storage").push(a)},_removeDate:function(a){var b=this.element.data("_storage").indexOf(a);this.element.data("_storage").splice(b,1)},_addDateExclude:function(a){var b=this.element.data("_exclude").indexOf(a);0>b&&this.element.data("_exclude").push(a)},_addDateStored:function(a){var b=this.element.data("_stored").indexOf(a);0>b&&this.element.data("_stored").push(a)},_removeDateExclude:function(a){var b=this.element.data("_exclude").indexOf(a);this.element.data("_exclude").splice(b,1)},_removeDateStored:function(a){var b=this.element.data("_stored").indexOf(a);this.element.data("_stored").splice(b,1)},setDate:function(a){var b;a=new Date(a),b=new Date(a.getFullYear()+"/"+(a.getMonth()+1)+"/"+a.getDate()).format("yyyy-mm-dd"),this._addDate(b),this._renderCalendar()},setDateExclude:function(a){var b;a=new Date(a),b=new Date(a.getFullYear()+"/"+(a.getMonth()+1)+"/"+a.getDate()).format("yyyy-mm-dd"),this._addDateExclude(b),this._renderCalendar()},setDateStored:function(a){var b;a=new Date(a),b=new Date(a.getFullYear()+"/"+(a.getMonth()+1)+"/"+a.getDate()).format("yyyy-mm-dd"),this._addDateStored(b),this._renderCalendar()},getDate:function(a){return new Date(void 0!==a?this.element.data("_storage")[a]:this.element.data("_storage")[0]).format(this.options.format)},getDates:function(){var b;return b=a.merge(a.merge([],this.element.data("_storage")),this.element.data("_stored")),b.unique()},unsetDate:function(a){var b;a=new Date(a),b=new Date(a.getFullYear()+"-"+(a.getMonth()+1)+"-"+a.getDate()).format("yyyy-mm-dd"),this._removeDate(b),this._renderCalendar()},unsetDateExclude:function(a){var b;a=new Date(a),b=new Date(a.getFullYear()+"-"+(a.getMonth()+1)+"-"+a.getDate()).format("yyyy-mm-dd"),this._removeDateExclude(b),this._renderCalendar()},unsetDateStored:function(a){var b;a=new Date(a),b=new Date(a.getFullYear()+"-"+(a.getMonth()+1)+"-"+a.getDate()).format("yyyy-mm-dd"),this._removeDateStored(b),this._renderCalendar()},_destroy:function(){},_setOption:function(a,b){this._super("_setOption",a,b)}})}(jQuery),function(a){"use strict";a.widget("metro.carousel",{version:"3.0.0",options:{auto:!0,period:5e3,duration:1e3,effect:"slide",effectFunc:"linear",direction:"left",controls:!0,controlNext:!1,controlPrev:!1,markers:!0,stop:!0,width:"100%",height:!1,_slides:{},_currentIndex:0,_interval:0,_outPosition:0,_animating:!1},_create:function(){var b=this,c=this.options,d=this.element;a.each(d.data(),function(b,d){if(b in c)try{c[b]=a.parseJSON(d)}catch(e){c[b]=d}}),c._slides=d.find(".slide");var e=0;a.each(c._slides,function(){var b,c=a(this);b=c.outerHeight(),b>e&&(e=b)}),d.css({width:c.width,height:c.height?c.height:e}),c._slides.length<=1||(c.markers&&this._markers(),c.controls&&this._controls(),c.stop&&d.on("mouseenter",function(){clearInterval(c._interval)}).on("mouseleave",function(){b.options.auto&&b._autoStart()}),d.find(".slide").hide(),d.find(".slide:nth-child(1)").show(),c.auto&&this._autoStart(),d.data("carousel",this))},_autoStart:function(){var a=this,b=this.options;b._interval=setInterval(function(){a._slideTo("left"===b.direction?"next":"prior")},b.period)},_slideTo:function(b){var c,d=this.element,e=this.options,f=e._slides[e._currentIndex];switch(void 0===b&&(b="next"),"prior"===b?(e._currentIndex-=1,e._currentIndex<0&&(e._currentIndex=e._slides.length-1),e._outPosition=this.element.width()):"next"===b&&(e._currentIndex+=1,e._currentIndex>=e._slides.length&&(e._currentIndex=0),e._outPosition=-this.element.width()),c=e._slides[e._currentIndex],this.options.effect){case"switch":this._effectSwitch(f,c);break;case"slowdown":this._effectSlowdown(f,c,this.options.duration);break;case"fade":this._effectFade(f,c,this.options.duration);break;default:this._effectSlide(f,c,this.options.duration)}d.find(".carousel-bullets a").each(function(){var b=a(this).data("num");b===e._currentIndex?a(this).addClass("bullet-on"):a(this).removeClass("bullet-on")})},_slideToSlide:function(a){var b=this.options,c=b._slides[b._currentIndex],d=b._slides[a];switch(b._outPosition=a>b._currentIndex?-this.element.width():this.element.width(),this.options.effect){case"switch":this._effectSwitch(c,d);break;case"slowdown":this._effectSlowdown(c,d);break;case"fade":this._effectFade(c,d);break;default:this._effectSlide(c,d)}b._currentIndex=a},_controls:function(){var b,c,d=this,e=this.element,f=this.options;b=a("<span/>").addClass("carousel-switch-next").html("&gt;"),c=a("<span/>").addClass("carousel-switch-prev").html("&lt;"),f.controlNext&&b.html(f.controlNext),f.controlPrev&&c.html(f.controlPrev),b.appendTo(e),c.appendTo(e),f._slides.length>1?(c.on("click",function(){f._animating===!1&&(d._slideTo("prior"),f._animating=!0,setTimeout(function(){f._animating=!1},f.duration))}),b.on("click",function(){f._animating===!1&&(d._slideTo("next"),f._animating=!0,setTimeout(function(){f._animating=!1},f.duration))})):(b.hide(),c.hide())},_markers:function(){var b,c,d,e=this,f=this.options;for(b=a('<div class="carousel-bullets" />'),d=0;d<f._slides.length;d++)c=a('<a class="carousel-bullet" href="javascript:void(0)" data-num="'+d+'"></a>'),0===d&&c.addClass("bullet-on"),c.appendTo(b);b.find("a").on("click",function(c){var d=a(this),g=d.data("num");return b.find("a").removeClass("bullet-on"),d.addClass("bullet-on"),g===f._currentIndex?!1:(e._slideToSlide(g),c.preventDefault(),void c.stopPropagation())}),b.appendTo(this.element)},_effectSwitch:function(b,c){a(b).hide(),a(c).css({left:0}).show(),this.element.css({height:a(c).outerHeight()})},_effectSlide:function(b,c){var d=this.options;a(b).animate({left:d._outPosition},d.duration,d.effectFunc),a(c).css("left",-1*d._outPosition).show(),this.element.css({height:a(c).outerHeight()}),a(c).animate({left:0},d.duration,d.effectFunc)},_effectSlowdown:function(b,c){var d=this.options,e={duration:d.duration,easing:"doubleSqrt"};a.easing.doubleSqrt=function(a){return Math.sqrt(Math.sqrt(a))},a(b).animate({left:d._outPosition},e),a(c).css("left",-1*d._outPosition).show(),this.element.css({height:a(c).outerHeight()}),a(c).animate({left:0},e)},_effectFade:function(b,c){var d=this.options;a(b).fadeOut(d.duration),a(c).css({left:0}).fadeIn(d.duration),this.element.css({height:a(c).outerHeight()})},_destroy:function(){},_setOption:function(a,b){this._super("_setOption",a,b)}})}(jQuery),function(a){"use strict";a.widget("metro.countdown",{version:"3.0.0",options:{stop:!1,days:!1,hours:!1,minutes:!1,seconds:!1,backgroundColor:"bg-cyan",digitColor:"fg-white",dividerColor:"fg-dark",labelColor:"fg-grayLight",labels:{days:"days",hours:"hours",minutes:"mins",seconds:"secs"},onTick:function(){},onStop:function(){}},_interval:0,_interval2:0,_alarmOn:void 0,_create:function(){var b=this,c=this.element,d=this.options;a.each(c.data(),function(b,c){if(b in d)try{d[b]=a.parseJSON(c)}catch(e){d[b]=c}}),this._alarmOn=new Date,d.stop!==!1&&(this._alarmOn=new Date(d.stop));var e=864e5,f=36e5,g=6e4,h=1e3;d.days!==!1&&("object"==typeof this._alarmOn&&(this._alarmOn=this._alarmOn.getTime()),this._alarmOn=this._alarmOn+d.days*e),d.hours!==!1&&("object"==typeof this._alarmOn&&(this._alarmOn=this._alarmOn.getTime()),this._alarmOn=this._alarmOn+d.hours*f),d.minutes!==!1&&("object"==typeof this._alarmOn&&(this._alarmOn=this._alarmOn.getTime()),this._alarmOn=this._alarmOn+d.minutes*g),d.seconds!==!1&&("object"==typeof this._alarmOn&&(this._alarmOn=this._alarmOn.getTime()),this._alarmOn=this._alarmOn+d.seconds*h),this._createDigits(),c.find(".digit").text("0"),b._tick(),c.data("countdown",this)},_createDigits:function(){var b,c,d=this.element,e=this.options,f=["days","hours","minutes","seconds"];f.map(function(f){b=a("<div/>").addClass("part "+f).attr("data-day-text",e.labels[f]).appendTo(d),a("<div/>").addClass("digit").appendTo(b),a("<div/>").addClass("digit").appendTo(b),e.labelColor.isColor()?b.css({color:e.labelColor}):b.addClass(e.labelColor),e.backgroundColor.isColor()?b.find(".digit").css({background:e.backgroundColor}):b.find(".digit").addClass(e.backgroundColor),e.digitColor.isColor()?b.find(".digit").css({color:e.digitColor}):b.find(".digit").addClass(e.digitColor),"seconds"!==f&&(c=a("<div/>").addClass("divider").text(":").appendTo(d),e.dividerColor.isColor()?c.css({color:e.dividerColor}):c.addClass(e.dividerColor))})},_blink:function(){this.element.toggleClass("tick")},_tick:function(){var a,b,c,d,e,f=this,g=this.options,h=this.element,i=86400,j=3600,k=60;this._interval2=setInterval(function(){f._blink()},500),this._interval=setInterval(function(){a=Math.floor((f._alarmOn-new Date)/1e3),0>a&&(a=0),b=Math.floor(a/i),a-=b*i,f._update("days",b),0===b&&h.find(".part.days").addClass("disabled"),c=Math.floor(a/j),a-=c*j,f._update("hours",c),0===b&&0===c&&h.find(".part.hours").addClass("disabled"),d=Math.floor(a/k),a-=d*k,f._update("minutes",d),0===b&&0===c&&0===d&&h.find(".part.minutes").addClass("disabled"),e=a,f._update("seconds",e),"string"==typeof g.onTick?window[g.onTick](b,c,d,e):g.onTick(b,c,d,e),0===b&&0===c&&0===d&&0===e&&(h.find(".part").addClass("disabled"),"string"==typeof g.onStop?window[g.onStop]():g.onStop(),f._stop("all"),f._trigger("alarm"),clearInterval(f._interval))},1e3)},_update:function(a,b){var c,d,e=this.element,f=Math.floor(b/10)%10,g=b%10;c=e.find("."+a+" .digit:eq(0)"),d=e.find("."+a+" .digit:eq(1)"),g!==parseInt(d.text())&&(d.toggleClass("scaleIn"),setTimeout(function(){d.text(g).toggleClass("scaleIn")},500)),f!==parseInt(c.text())&&(c.toggleClass("scaleIn"),setTimeout(function(){c.text(f).toggleClass("scaleIn")},500))},_stop:function(){clearInterval(this._interval),clearInterval(this._interval2)},_destroy:function(){},_setOption:function(a,b){this._super("_setOption",a,b)}})}(jQuery),function(a){"use strict";a.widget("metro.datatable",{version:"3.0.0",options:{},_create:function(){var b=this.element,c=this.options;if(a.each(b.data(),function(b,d){try{c[b]=a.parseJSON(d)}catch(e){c[b]=d}}),jQuery().dataTable)try{b.dataTable(c)}catch(d){}else alert("dataTable plugin required");b.data("datatable",this)},_destroy:function(){},_setOption:function(a,b){this._super("_setOption",a,b)}})}(jQuery),function(a){"use strict";a.widget("metro.datepicker",{version:"3.0.0",options:{format:"yyyy.mm.dd",preset:!1,minDate:!1,maxDate:!1,effect:"fade",position:"bottom",locale:window.METRO_CURRENT_LOCALE,weekStart:window.METRO_CALENDAR_WEEK_START,otherDays:!1,exclude:!1,stored:!1,buttons:!1,buttonToday:!0,buttonClear:!0,condensedGrid:!1,selected:function(){}},_calendar:void 0,_create:function(){var b=this,c=this.element,d=this.options,e=c.children("input"),f=c.children("button");a.each(c.data(),function(b,c){if(b in d)try{d[b]=a.parseJSON(c)}catch(e){d[b]=c}}),this._createCalendar(),e.attr("readonly",!0),f.attr("type","button"),f.on("click",function(a){a.stopPropagation(),"none"===b._calendar.css("display")?b._show():b._hide()}),c.on("click",function(a){a.stopPropagation(),"none"===b._calendar.css("display")?b._show():b._hide()}),a("html").on("click",function(){a(".calendar-dropdown").hide()}),c.data("datepicker",this)},_createCalendar:function(){var b,c=this,d=this.element,e=this.options;switch(b=a("<div/>").css({position:"absolute",display:"none","max-width":220,"z-index":1e3}).addClass("calendar calendar-dropdown").appendTo(d),b.calendar({multiSelect:!1,format:e.format,buttons:!1,buttonToday:!1,buttonClear:!1,locale:e.locale,otherDays:e.otherDays,weekStart:e.weekStart,condensedGrid:e.condensedGrid,exclude:e.exclude,stored:e.stored,date:e.preset?e.preset:new Date,minDate:e.minDate,maxDate:e.maxDate,dayClick:function(a,d){b.calendar("setDate",d),c.element.children("input[type=text]").val(a),c.element.children("input[type=text]").trigger("change",d),c.element.children("input[type=text]").blur(),c.options.selected(a,d),c._hide()}}),e.preset!==!1&&(b.calendar("setDate",e.preset),d.find("input, .datepicker-output").val(b.calendar("getDate"))),this.options.position){case"top":b.css({top:0-b.height(),left:0});break;default:b.css({top:"100%",left:0})}this._calendar=b},_show:function(){"slide"===this.options.effect?(a(".calendar-dropdown").slideUp("fast"),this._calendar.slideDown("fast")):"fade"===this.options.effect?(a(".calendar-dropdown").fadeOut("fast"),this._calendar.fadeIn("fast")):(a(".calendar-dropdown").hide(),this._calendar.show())},_hide:function(){"slide"===this.options.effect?this._calendar.slideUp("fast"):"fade"===this.options.effect?this._calendar.fadeOut("fast"):this._calendar.hide()},_destroy:function(){},_setOption:function(a,b){this._super("_setOption",a,b)}})}(jQuery),function(a){"use strict";a.widget("metro.dialog",{version:"3.0.0",options:{modal:!1,overlay:!1,overlayColor:"default",type:"default",place:"center",position:"default",content:!1,hide:!1,width:"auto",height:"auto",background:"default",color:"default",closeButton:!1,windowsStyle:!1,_interval:void 0,_overlay:void 0,onDialogOpen:function(){},onDialogClose:function(){}},_create:function(){var b=this.element,c=this.options;a.each(b.data(),function(b,d){if(b in c)try{c[b]=a.parseJSON(d)}catch(e){c[b]=d}}),c.overlay&&this._createOverlay(),this._createDialog(),b.data("dialog",this)},_createOverlay:function(){var b=(this.element,this.options),c=a("body").find(".dialog-overlay");0===c.length&&(c=a("<div/>").addClass("dialog-overlay")),b.overlayColor&&(b.overlayColor.isColor()?c.css({background:b.overlayColor}):c.addClass(b.overlayColor)),b._overlay=c},_createDialog:function(){var b=this,c=this.element,d=this.options;c.addClass("dialog"),"default"!==d.type&&c.addClass(d.type),d.windowsStyle&&(d.width="auto",c.css({left:0,right:0})),"default"!==d.background&&(d.background.isColor()?c.css({background:d.background}):c.addClass(d.background)),"default"!==d.color&&(d.color.isColor()?c.css({color:d.color}):c.addClass(d.color)),c.css({width:d.width,height:d.height}),d.closeButton&&a("<span/>").addClass("dialog-close-button").appendTo(c).on("click",function(){b.close()}),c.hide()},_setPosition:function(){var b=this.element,c=this.options,d=b.width(),e=b.height();b.css({left:c.windowsStyle===!1?(a(window).width()-d)/2:0,top:(a(window).height()-e)/2})},open:function(){var a,b=this,c=this.element,d=this.options;this._setPosition(),c.data("opened",!0),d.overlay&&(a=d._overlay,a.appendTo("body").show()),c.fadeIn(),"string"==typeof d.onDialogOpen?window[d.onDialogOpen](c):d.onDialogOpen(c),d.hide&&parseInt(d.hide)>0&&(d._interval=setTimeout(function(){b.close()},parseInt(d.hide)))},close:function(){var b=this.element,c=this.options;clearInterval(c._interval),c.overlay&&a("body").find(".dialog-overlay").remove(),b.data("opened",!1),b.fadeOut(),"string"==typeof c.onDialogClose?window[c.onDialogClose](b):c.onDialogClose(b)},_destroy:function(){},_setOption:function(a,b){this._super("_setOption",a,b)}})}(jQuery),function(a){"use strict";a.widget("metro.dropdown",{version:"3.0.0",options:{effect:window.METRO_SHOW_TYPE,toggleElement:!1,noClose:!1},_create:function(){var b,c=this,d=this.element,e=this.options,f=this.element,g=this.name,h=this.element.parent();a.each(d.data(),function(b,c){if(b in e)try{e[b]=a.parseJSON(c)}catch(d){e[b]=c}}),b=e.toggleElement?a(e.toggleElement):h.children(h.children(".dropdown-toggle").length>0?".dropdown-toggle":"a:nth-child(1)"),void 0!==METRO_SHOW_TYPE&&(this.options.effect=METRO_SHOW_TYPE),b.on("click."+g,function(b){if(h.siblings(h[0].tagName).removeClass("active-container"),a(".active-container").removeClass("active-container"),"block"!==f.css("display")||f.hasClass("keep-open")){if(a("[data-role=dropdown]").each(function(b,d){f.parents("[data-role=dropdown]").is(d)||a(d).hasClass("keep-open")||"block"!==a(d).css("display")||c._close(d)}),f.hasClass("horizontal")){f.css({visibility:"hidden",display:"block"});var d=a(f.children("li")[0]).outerWidth();f.css({visibility:"visible",display:"none"});var e=f.children("li").length*d+(f.children("li").length-1);f.css("width",e)}c._open(f),h.addClass("active-container")}else c._close(f);b.preventDefault(),b.stopPropagation()}),e.noClose===!0&&d.on("click",function(a){a.stopPropagation()}),a(f).find("li.disabled a").on("click",function(a){a.preventDefault()}),a(document).on("click",function(){a("[data-role=dropdown]").each(function(b,c){a(c).hasClass("keep-open")||"block"!==a(c).css("display")||a(c).hide()})}),d.data("dropdown",this)},_open:function(b){switch(this.options.effect){case"fade":a(b).fadeIn("fast");break;case"slide":a(b).slideDown("fast");break;default:a(b).show()}this._trigger("onOpen",null,b)},_close:function(b){switch(this.options.effect){case"fade":a(b).fadeOut("fast");break;case"slide":a(b).slideUp("fast");break;default:a(b).hide()}this._trigger("onClose",null,b)},_destroy:function(){},_setOption:function(a,b){this._super("_setOption",a,b)}})}(jQuery),function(a){"use strict";a.widget("metro.fitImage",{version:"3.0.0",options:{shadow:!1,overlay:!1,type:"default",frameColor:"default",format:"hd"},_create:function(){var b,c,d,e,f,g=this.element,h=this.options,i=g.parent(),j=g.attr("src");a.each(g.data(),function(b,c){if(b in h)try{h[b]=a.parseJSON(c)}catch(d){h[b]=c}}),a("<img/>").attr("src",j).load(function(){b=this.width,c=this.height}).remove();var k=a("<div/>").addClass("image-container").css("width","100%").appendTo(i),l=a("<div/>").addClass("frame").appendTo(k);switch(d=l.innerWidth(),e=l.innerHeight(),h.format){case"sd":e=3*d/4;break;case"square":e=d;break;case"cycle":e=d;break;case"fill-h":e="100%",k.css("height","100%");break;case"fill":e="100%",k.css("height","100%");break;default:e=9*d/16}if(f=a("<div/>").css({width:"100%",height:e,"background-image":"url("+j+")","background-size":"cover","background-repeat":"no-repeat","border-radius":"cycle"===h.format?"50%":"0"}),a(window).on("resize",function(){var a=l.innerWidth(),b=l.innerHeight();switch(h.format){case"sd":b=3*a/4;break;case"square":b=a;break;case"cycle":b=a;break;case"fill-h":b="100%",k.css("height","100%");break;case"fill":b="100%",k.css("height","100%");break;default:b=9*a/16}f.css({height:b})}),"default"!==h.frameColor&&(h.frameColor.isUrl()?l.css("background-color",h.frameColor):l.addClass(h.frameColor)),h.overlay!==!1){a("<div/>").addClass("image-overlay").html(h.overlay).appendTo(k)}switch(h.shadow!==!1&&k.addClass("block-shadow"),f.appendTo(l),h.type){case"diamond":k.addClass("diamond"),f.addClass("image-replacer");break;case"bordered":k.addClass("bordered");break;case"polaroid":k.addClass("polaroid");break;case"handing":k.addClass("handing");break;case"handing-ani":k.addClass("handing ani");break;case"handing-ani-hover":k.addClass("handing ani-hover")}k.addClass("image-format-"+h.format),g.remove()},_destroy:function(){},_setOption:function(a,b){this._super("_setOption",a,b)}})}(jQuery),function(a){"use strict";a.widget("metro.grid",{version:"3.0.0",options:{equalHeight:!0},_create:function(){var b=this,c=this.element,d=this.options;a.each(c.data(),function(b,c){if(b in d)try{d[b]=a.parseJSON(c)}catch(e){d[b]=c}}),d.equalHeight&&(setTimeout(function(){b._setEqualHeight()},50),a(window).on("resize",function(){b._setEqualHeight()})),c.data("grid",this)},_setEqualHeight:function(){var b=this.element,c=(this.options,b.find(".row"));a.each(c,function(){var b=a(this),c=b.children(".cell"),d=0;c.css("min-height","0"),a.each(c,function(){a(this).outerHeight()>d&&(d=a(this).outerHeight())}),c.css("min-height",d)})},_destroy:function(){},_setOption:function(a,b){this._super("_setOption",a,b)}})}(jQuery),function(a){"use strict";a.widget("metro.hint",{version:"3.0.0",options:{hintPosition:"auto",hintBackground:"#FFFCC0",hintColor:"#000000",hintMaxSize:200,hintMode:"default",hintShadow:!1,hintBorder:!0,_hint:void 0},_create:function(){var b=this,c=(this.element,this.options);this.element.on("mouseenter",function(d){a(".hint, .hint2").remove(),b.createHint(),c._hint.show(),d.preventDefault()}),this.element.on("mouseleave",function(a){c._hint.hide().remove(),a.preventDefault()})},createHint:function(){var b,c=this.element,d=c.data("hint").split("|"),e=this.options;if(a.each(c.data(),function(b,c){if(b in e)try{e[b]=a.parseJSON(c)}catch(d){e[b]=c}}),"TD"===c[0].tagName||"TH"===c[0].tagName){var f=a("<div/>").css("display","inline-block").html(c.html());c.html(f),c=f}var g=d.length>1?d[0]:!1,h=d.length>1?d[1]:d[0];b=a("<div/>").appendTo("body"),b.addClass(2===e.hintMode?"hint2":"hint"),e.hintBorder||b.addClass("no-border"),g&&a("<div/>").addClass("hint-title").html(g).appendTo(b),a("<div/>").addClass("hint-text").html(h).appendTo(b),b.addClass(e.position),e.hintShadow&&b.addClass("shadow"),e.hintBackground&&(e.hintBackground.isColor()?b.css("background-color",e.hintBackground):b.addClass(e.hintBackground)),e.hintColor&&(e.hintColor.isColor()?b.css("color",e.hintColor):b.addClass(e.hintColor)),e.hintMaxSize>0&&b.css({"max-width":e.hintMaxSize}),"top"===e.hintPosition?(b.addClass("top"),b.css({top:c.offset().top-a(window).scrollTop()-b.outerHeight()-20,left:2===e.hintMode?c.offset().left+c.outerWidth()/2-b.outerWidth()/2-a(window).scrollLeft():c.offset().left-a(window).scrollLeft()})):"right"===e.hintPosition?(b.addClass("right"),b.css({top:2===e.hintMode?c.offset().top+c.outerHeight()/2-b.outerHeight()/2-a(window).scrollTop()-10:c.offset().top-10-a(window).scrollTop(),left:c.offset().left+c.outerWidth()+15-a(window).scrollLeft()})):"left"===e.hintPosition?(b.addClass("left"),b.css({top:2===e.hintMode?c.offset().top+c.outerHeight()/2-b.outerHeight()/2-a(window).scrollTop()-10:c.offset().top-10-a(window).scrollTop(),left:c.offset().left-b.outerWidth()-10-a(window).scrollLeft()})):(b.addClass("bottom"),b.css({top:c.offset().top-a(window).scrollTop()+c.outerHeight(),left:2===e.hintMode?c.offset().left+c.outerWidth()/2-b.outerWidth()/2-a(window).scrollLeft():c.offset().left-a(window).scrollLeft()})),e._hint=b},_destroy:function(){},_setOption:function(a,b){this._super("_setOption",a,b)}})}(jQuery),function(a){"use strict";a.widget("metro.input",{version:"3.0.0",options:{showLabelOnValue:!1},_create:function(){var b=this.element,c=this.options;a.each(b.data(),function(b,d){if(b in c)try{c[b]=a.parseJSON(d)}catch(e){c[b]=d}}),b.hasClass("file")&&this._createInputFile(),b.hasClass("text")&&this._createInputText(),b.hasClass("password")&&this._createInputText(),b.hasClass("select")&&this._createInputSelect(),b.hasClass("textarea")&&this._createInputTextarea(),b.hasClass("modern")&&this._createInputModern(),b.data("input",this)},_createInputModern:function(){var a=this.element,b=a.find("input"),c=a.find(".placeholder");b.on("blur",function(){c.css(""!==b.val()?{display:"none"}:{display:"block"})}),b.on("focus",function(){c.css(""!==b.val()?{display:"none"}:{display:"block"})})},_createInputFile:function(){var b,c,d,e=this.element;b=a("<input type='text' class='input-file-wrapper' readonly style='z-index: 1; cursor: default;'>"),c=e.children(".button"),d=e.children('input[type="file"]'),d.css("z-index",0),b.insertAfter(d),d.attr("tabindex","-1"),c.attr("type","button"),b.attr("placeholder",d.attr("placeholder")),d.on("change",function(){var c=a(this).val();""!==c&&(b.val(c.replace(/.+[\\\/]/,"")),b.attr("title",c.replace(/.+[\\\/]/,"")))}),e.on("click",".button, .input-file-wrapper",function(){d.trigger("click")})},_createInputText:function(){var b=this.element,c=b.find(".helper-button.clear"),d=b.find(".helper-button.reveal"),e=b.find("input"),f=b.find(".helper-button"),g=b.find(".button"),h=b.find(".input-state-error, .input-state-warning, .input-state-info, .input-state-success, .input-state-required"),i=0;a.each(g,function(){var b=a(this);i+=b.outerWidth()}),e.css({"padding-right":i+5}),h.css({right:i+8}),f.attr("tabindex",-1).attr("type","button"),c&&c.on("click",function(){e.val("").trigger("change").focus()}),d&&b.hasClass("password")&&d.on("mousedown",function(){e.attr("type","text")}).on("mouseup",function(){e.attr("type","password").focus()})},_createInputSelect:function(){},_createInputTextarea:function(){},
  _destroy:function(){},_setOption:function(a,b){this._super("_setOption",a,b)}})}(jQuery),function(a){"use strict";a.widget("metro.keypad",{version:"3.0.0",options:{target:!1,shuffle:!1,length:!1,keys:["1","2","3","4","5","6","7","8","9","0"]},_create:function(){var b=this.element,c=this.options;a.each(b.data(),function(b,d){if(b in c)try{c[b]=a.parseJSON(d)}catch(e){c[b]=d}}),"string"==typeof c.keys&&(c.keys=c.keys.split(",")),this._createKeypad(),b.data("keypad",this)},_shuffleKeys:function(b){var c=(this.element,this.options),d=c.keys.slice(0),b=this._keypad,e=d.length+2;c.shuffle&&(d=d.shuffle()),b.html("").css({width:e/4*32+2*(e/4+1)+2}),d.map(function(c){a("<div/>").addClass("key").html(c).data("key",c).appendTo(b)}),a("<div/>").addClass("key").html("&larr;").data("key","&larr;").appendTo(b),a("<div/>").addClass("key").html("&times;").data("key","&times;").appendTo(b)},_createKeypad:function(){var b,c=this,d=this.element,e=this.options;d.hasClass("input-control")?(b=a("<div/>").addClass("keypad keypad-dropdown").css({position:"absolute","z-index":1e3,display:"none"}).appendTo(d),e.target=d.find("input"),d.on("click",function(c){"none"===b.css("display")?b.show():b.hide();var d=a(".keypad.keypad-dropdown");a.each(d,function(){a(this).is(b)||a(this).hide()}),c.stopPropagation()}),a("html").on("click",function(){a(".keypad.keypad-dropdown").hide()})):(b=d,b.addClass("keypad")),e.target!==!1&&a(e.target).attr("readonly",!0),"dropdown"===b.parent().data("role")&&b.parent().css({top:"100%"}),this._keypad=b,this._shuffleKeys(),b.on("click",".key",function(b){var d=a(this);if(e.target)if("&larr;"!==d.data("key")&&"&times;"!==d.data("key")){if(e.length&&a(e.target).val().length===e.length)return!1;a(e.target).val(a(e.target).val()+""+d.data("key"))}else if("&times;"===d.data("key")&&a(e.target).val(""),"&larr;"===d.data("key")){var f=a(e.target).val();a(e.target).val(f.substring(0,f.length-1))}e.shuffle&&c._shuffleKeys(),b.preventDefault(),b.stopPropagation()})},_destroy:function(){},_setOption:function(a,b){this._super("_setOption",a,b)}})}(jQuery),function(a){"use strict";a.widget("metro.listview",{version:"3.0.0",options:{onExpand:function(){},onCollapse:function(){},onActivate:function(){}},_create:function(){var b=this.element,c=this.options;a.each(b.data(),function(b,d){if(b in c)try{c[b]=a.parseJSON(d)}catch(e){c[b]=d}}),this._initList(),this._createEvents(),b.data("listview",this)},_initList:function(){var b=this.element,c=(this.options,b.find(".list-group"));a.each(c,function(){var b=a(this);b.hasClass("collapsed")&&b.find(".list-group-content").hide()})},_createEvents:function(){var b=this.element,c=this.options;b.on("click",".list-group-toggle",function(b){var d=a(this),e=d.parent();d.parent().hasClass("keep-open")||(e.toggleClass("collapsed"),e.hasClass("collapsed")?(d.siblings(".list-group-content").slideUp("fast"),"string"==typeof c.onCollapse?window[c.onCollapse](e):c.onCollapse(e)):(d.siblings(".list-group-content").slideDown("fast"),"string"==typeof c.onExpand?window[c.onExpand](e):c.onExpand(e)),b.preventDefault(),b.stopPropagation())}),b.on("click",".list",function(d){var e=a(this);b.find(".list").removeClass("active"),e.addClass("active"),"string"==typeof c.onActivate?window[c.onActivate](e):c.onActivate(e),d.preventDefault(),d.stopPropagation()})},_destroy:function(){},_setOption:function(a,b){this._super("_setOption",a,b)}})}(jQuery),function(a){"use strict";var b=!1,c=[],d={_container:null,_notify:null,_timer:null,version:"3.0.0",options:{icon:"",caption:"",content:"",shadow:!0,width:"auto",height:"auto",style:!1,position:"right",timeout:3e3,keepOpen:!1,type:"default"},init:function(b){return this.options=a.extend({},this.options,b),this._build(),this},_build:function(){var d=this,e=this.options;if(this._container=b||a("<div/>").addClass("notify-container").appendTo("body"),b=this._container,""===e.content||void 0===e.content)return!1;if(this._notify=a("<div/>").addClass("notify"),"default"!==e.type&&this._notify.addClass(e.type),e.shadow&&this._notify.addClass("shadow"),e.style&&void 0!==e.style.background&&this._notify.css("background-color",e.style.background),e.style&&void 0!==e.style.color&&this._notify.css("color",e.style.color),""!==e.icon){a(e.icon).addClass("notify-icon").appendTo(this._notify)}""!==e.caption&&void 0!==e.caption&&a("<div/>").addClass("notify-title").html(e.caption).appendTo(this._notify),""!==e.content&&void 0!==e.content&&a("<div/>").addClass("notify-text").html(e.content).appendTo(this._notify);var f=a("<span/>").addClass("notify-closer").appendTo(this._notify);f.on("click",function(){d.close(0)}),"auto"!==e.width&&this._notify.css("min-width",e.width),"auto"!==e.height&&this._notify.css("min-height",e.height),this._notify.hide().appendTo(this._container).fadeIn("slow"),c.push(this._notify),e.keepOpen||this.close(e.timeout)},close:function(a){var b=this;return void 0===a?this._hide():(setTimeout(function(){b._hide()},a),this)},_hide:function(){var b=this;return void 0!==this._notify?(this._notify.fadeOut("slow",function(){a(this).remove(),c.splice(c.indexOf(b._notify),1)}),this):!1},closeAll:function(){return c.forEach(function(a){a.hide("slow",function(){a.remove(),c.splice(c.indexOf(a),1)})}),this}};a.Notify=function(a){return Object.create(d).init(a)},a.Notify.show=function(b,c,d){return a.Notify({content:b,caption:c,icon:d})}}(jQuery),function(a){"use strict";a.widget("metro.panel",{version:"3.0.0",options:{},_create:function(){var b=this.element,c=this.options;if(a.each(b.data(),function(b,d){if(b in c)try{c[b]=a.parseJSON(d)}catch(e){c[b]=d}}),b.hasClass("collapsible")||b.addClass("collapsible"),b.hasClass("collapsible")){var d=b.children(".heading"),e=b.children(".content");d.on("click",function(){b.hasClass("collapsed")?e.slideDown("fast",function(){b.removeClass("collapsed")}):e.slideUp("fast",function(){b.addClass("collapsed")})})}b.data("panel",this)},_destroy:function(){},_setOption:function(a,b){this._super("_setOption",a,b)}})}(jQuery),function(a){"use strict";a.widget("metro.widget",{version:"3.0.0",options:{someValue:null},_create:function(){var b=this.element,c=this.options;a.each(b.data(),function(b,d){if(b in c)try{c[b]=a.parseJSON(d)}catch(e){c[b]=d}}),b.data("widget",this)},_destroy:function(){},_setOption:function(a,b){this._super("_setOption",a,b)}})}(jQuery),function(a){"use strict";a.widget("metro.popover",{version:"3.0.0",options:{popoverText:"",popoverTimeout:3e3,popoverPosition:"top",popoverBackground:"bg-cyan",popoverColor:"fg-white",popoverMode:"none",popoverShadow:!0},popover:{},_create:function(){var a=this.element;this.createPopover(),a.data("popover",this)},createPopover:function(){var b,c=this,d=this.options;b=this.element,a.each(b.data(),function(b,c){if(b in d)try{d[b]=a.parseJSON(c)}catch(e){d[b]=c}});var e,f;switch(e=a("<div/>").addClass("popover").appendTo("body").hide(),a("<div/>").appendTo(e),d.popoverShadow&&e.addClass("popover-shadow"),d.popoverBackground&&("#"===d.popoverBackground[0]?e.css("background-color",d.popoverBackground):e.addClass(d.popoverBackground)),d.popoverColor&&("#"===d.popoverColor[0]?e.css("color",d.popoverColor):e.addClass(d.popoverColor)),d.popoverPosition){case"left":f="marker-on-right";break;case"right":f="marker-on-left";break;case"bottom":f="marker-on-top";break;default:f="marker-on-bottom"}e.css({position:"fixed"}),e.addClass(f),this.popover=e,this.setText(d.popoverText),b.on(d.popoverMode,function(){e.data("visible")||c.show()}),a(window).scroll(function(){c.popover.data("visible")&&c.setPosition()})},setPosition:function(){var b=this.options,c=this.popover,d=this.element;return"top"===b.popoverPosition?c.css({top:d.offset().top-a(window).scrollTop()-c.outerHeight()-10,left:d.offset().left+d.outerWidth()/2-c.outerWidth()/2-a(window).scrollLeft()}):"bottom"===b.popoverPosition?c.css({top:d.offset().top-a(window).scrollTop()+d.outerHeight()+10,left:d.offset().left+d.outerWidth()/2-c.outerWidth()/2-a(window).scrollLeft()}):"right"===b.popoverPosition?c.css({top:d.offset().top+d.outerHeight()/2-c.outerHeight()/2-a(window).scrollTop(),left:d.offset().left+d.outerWidth()-a(window).scrollLeft()+10}):"left"===b.popoverPosition&&c.css({top:d.offset().top+d.outerHeight()/2-c.outerHeight()/2-a(window).scrollTop(),left:d.offset().left-c.outerWidth()-a(window).scrollLeft()-10}),this},setText:function(a){this.popover.children("div").html(a)},show:function(){var a=this.options,b=this.popover;this.setPosition(),b.fadeIn(function(){b.data("visible",!0),setTimeout(function(){b.fadeOut(function(){b.data("visible",!1)})},a.popoverTimeout)})},_destroy:function(){},_setOption:function(a,b){this._super("_setOption",a,b)}})}(jQuery),function(a){"use strict";a.widget("metro.preloader",{version:"3.0.0",options:{type:"ring",style:"light"},_create:function(){var b=this.element,c=this.options;a.each(b.data(),function(b,d){if(b in c)try{c[b]=a.parseJSON(d)}catch(e){c[b]=d}}),this._createStructure(),b.data("preloader",this)},_createRing:function(){{var b,c,d,e=this.element;this.options}for(b=0;5>b;b++)c=a("<div/>").addClass("wrap").appendTo(e),d=a("<div/>").addClass("circle").appendTo(c)},_createMetro:function(){{var b,c,d=this.element;this.options}for(b=0;5>b;b++)c=a("<div/>").addClass("circle").appendTo(d)},_createStructure:function(){var a=this.element,b=this.options;switch(a.addClass("preloader-"+b.type),"light"!==b.style&&a.addClass(b.style+"-style"),a.html(""),b.type){case"ring":this._createRing();break;case"metro":this._createMetro()}},_destroy:function(){},_setOption:function(a,b){this._super("_setOption",a,b)}})}(jQuery),function(a){"use strict";a.widget("metro.presenter",{version:"3.0.0",options:{height:"200",width:"100%",effect:"random",duration:1e3,timeout:2e3,sceneTimeout:2e3,easing:"swing"},_acts:void 0,_currentAct:0,_actDone:!0,_interval:void 0,_effects:["top","bottom","left","right"],_actor_positions:[],_create:function(){var b=this.element,c=this.options;a.each(b.data(),function(b,d){if(b in c)try{c[b]=a.parseJSON(d)}catch(e){c[b]=d}}),this._createPresenter(),this._showScene(),b.data("presenter",this)},_createPresenter:function(){var a=this.element,b=this.options,c=a.find(".act");c.hide(),this._acts=c,a.css({height:b.height,width:b.width})},_showScene:function(){{var a=this;this.element,this.options}this._interval=setInterval(function(){a._actDone&&(a._currentAct++,a._currentAct==a._acts.length&&(a._currentAct=0),a._showAct())},500)},_closeAct:function(){var b=this,c=(this.element,this.options),d=this._currentAct;setTimeout(function(){void 0!==b._acts[d]&&a(b._acts[d]).fadeOut(1e3,function(){b._actDone=!0})},c.sceneTimeout)},_showAct:function(){var b,c=this,d=this.element,e=this.options,f=a(this._acts[this._currentAct]),g=f.find(".actor");this._actDone=!1,f.fadeIn(1e3),g.css({opacity:0,position:"absolute",display:"none"}),b=0,a.each(g,function(){var f,h,i,j,k=a(this),l={top:k.data("position").split(",")[0],left:k.data("position").split(",")[1]};f=void 0!==k.data("effect")?k.data("effect"):e.effect,"random"===f&&(f=c._effects[Math.floor(Math.random()*c._effects.length)]),h=void 0!==k.data("duration")?k.data("duration"):e.duration,i=void 0!==k.data("timeout")?k.data("timeout"):e.timeout,j=void 0!==k.data("easing")?k.data("easing"):e.easing,"top"===f?setTimeout(function(){k.css({top:-d.height(),left:l.left,display:"block"}).animate({top:l.top,left:l.left,opacity:1},h,j,function(){k[0]==g[g.length-1]&&c._closeAct()})},b*i):"bottom"===f?setTimeout(function(){k.css({top:d.height(),left:l.left,display:"block"}).animate({top:l.top,left:l.left,opacity:1},h,j,function(){k[0]==g[g.length-1]&&c._closeAct()})},b*i):"left"===f?setTimeout(function(){k.css({left:-d.width(),top:l.top,display:"block"}).animate({top:l.top,left:l.left,opacity:1},h,j,function(){k[0]==g[g.length-1]&&c._closeAct()})},b*i):"right"===f?setTimeout(function(){k.css({left:d.width(),top:l.top,display:"block"}).animate({top:l.top,left:l.left,opacity:1},h,j,function(){k[0]==g[g.length-1]&&c._closeAct()})},b*i):setTimeout(function(){k.css({top:l.top,left:l.left,display:"block"}).animate({top:l.top,left:l.left,opacity:1},h,"swing",function(){k[0]==g[g.length-1]&&c._closeAct()})},b*i),b++})},_destroy:function(){},_setOption:function(a,b){this._super("_setOption",a,b)}})}(jQuery),function(a){"use strict";a.widget("metro.progressBar",{version:"3.0.0",options:{color:"default",colors:!1,value:0},colorsDim:{},_create:function(){var b=this,c=this.element,d=this.options,e=c.children(".bar:last-child");if(a.each(c.data(),function(b,c){if(b in d)try{d[b]=a.parseJSON(c)}catch(e){d[b]=c}}),0===e.length&&(e=a("<div/>").addClass("bar").appendTo(c)),d.colors){var f=0;a.each(d.colors,function(a,c){b.colorsDim[a]=[f,c],f=c+1})}this.progress(d.value),this.color(d.color),c.data("progressBar",this)},color:function(a){var b=this.element,c=this.options,d=b.children(".bar:last-child"),e=/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(a);e?d.css({"background-color":a}):d.removeClass(function(a,b){return(b.match(/(^|\s)bg-\S+/g)||[]).join(" ")}).addClass(a),c.color=a},progress:function(b){if(void 0===b)return this.options.value;var c=this.element,d=this.options,e=this.colorsDim,f=c.children(".bar:last-child"),g=this;parseInt(b)<0||(d.colors&&a.each(e,function(a,c){return b>=c[0]&&b<=c[1]?(g.color(a),!0):void 0}),d.value=b,f.animate({width:d.value+"%"},100))},_destroy:function(){},_setOption:function(a,b){this._super("_setOption",a,b)}})}(jQuery),function(a){"use strict";a.widget("metro.rating",{version:"3.0.0",options:{stars:5,value:0,half:!0,"static":!1,showScore:!0,scoreTitle:"Current: ",size:"default",colorRate:!1,onRate:function(){return!0},onRated:function(){}},_value:0,_values:[],_create:function(){var b=this.element,c=this.options;a.each(b.data(),function(b,d){if(b in c)try{c[b]=a.parseJSON(d)}catch(e){c[b]=d}}),this._value=parseFloat(c.value),this._values[0]=Math.ceil(1*c.stars/3),this._values[1]=Math.ceil(2*c.stars/3),this._values[2]=c.stars,this._createRating(),this._createEvents(),this._setValue(this._value),this._setScore(this._value),b.data("rating",this)},_createRating:function(){var b,c,d,e=this.element,f=this.options;switch(e.hasClass("rating")||e.addClass("rating"),f.size){case"small":e.addClass("small");break;case"large":e.addClass("large")}for(f["static"]&&e.addClass("static"),b=0;b<f.stars;b++)c=a("<span/>").addClass("star").appendTo(e).data("star-value",b+1);f.showScore&&(d=a("<span/>").addClass("score").appendTo(e))},_createEvents:function(){var b,c=this,d=this.element,e=this.options;b=d.find(".star"),b.on("click",function(b){if(e["static"]||d.hasClass("static")||d.data("static"))return!1;if("string"==typeof e.onRate){if(!window[e.onRate](a(this).data("star-value"),this,c))return!1}else if(!e.onRate(a(this).data("star-value"),this,c))return!1;"string"==typeof e.onRated?window[e.onRated](a(this).data("star-value"),this,c):e.onRated(a(this).data("star-value"),this,c),c._value=a(this).data("star-value"),c._setValue(),c._setScore(),b.preventDefault(),b.stopPropagation()})},_setValue:function(){var b,c=this.options,d=this.element;if(c.stars){b=d.find(".star").removeClass("on half");var e=Math.floor(this._value)-1,f=10*(this._value-Math.floor(this._value))>0;a(b[e]).addClass("on"),a(b[e]).prevAll().addClass("on"),f&&a(b[e]).next().addClass("on half")}c.colorRate&&(d.removeClass("poor regular good"),this._value<=this._values[0]?d.addClass("poor"):this._value>this._values[0]&&this._value<=this._values[1]?d.addClass("regular"):this._value>this._values[1]&&d.addClass("good"))},_setScore:function(){var a=this._value,b=this.element,c=this.options;void 0!==a&&b.find(".score").html(c.scoreTitle+a)},value:function(a){return void 0===a?this._value:(this._value=a,this._setValue(),this._setScore(),void 0)},_destroy:function(){},_setOption:function(a,b){this._super("_setOption",a,b)}})}(jQuery),function(a){"use strict";a.widget("metro.select",{version:"3.0.0",options:{},_create:function(){var b=this.element,c=this.options,d=["templateResult","templateSelection","matcher","initSelection","query"];if(a.each(b.data(),function(b,d){try{c[b]=a.parseJSON(d)}catch(e){c[b]=d}}),d.map(function(a){void 0!==c[a]&&(c[a]=window[c[a]])}),void 0!==c.dropdownParent&&(c.dropdownParent=a(c.dropdownParent)),jQuery().select2)try{b.find("select").select2(c)}catch(e){}else alert("Select2 plugin required");b.data("select",this)},_destroy:function(){},_setOption:function(a,b){this._super("_setOption",a,b)}})}(jQuery),function(a){"use strict";a.widget("metro.slider",{version:"3.0.0",options:{position:0,accuracy:0,color:"default",completeColor:"default",markerColor:"default",colors:!1,showHint:!1,permanentHint:!1,hintPosition:"top",vertical:!1,min:0,max:100,animate:!0,minValue:0,maxValue:100,currValue:0,returnType:"value",target:!1,onChange:function(){},onChanged:function(){},_slider:{vertical:!1,offset:0,length:0,marker:0,ppp:0,start:0,stop:0}},_create:function(){var b=this,c=this.element,d=this.options,e=d._slider;a.each(c.data(),function(b,c){if(b in d)try{d[b]=a.parseJSON(c)}catch(e){d[b]=c}}),d.accuracy=d.accuracy<0?0:d.accuracy,d.min=d.min<0?0:d.min,d.min=d.min>d.max?d.max:d.min,d.max=d.max>100?100:d.max,d.max=d.max<d.min?d.min:d.max,d.position=this._correctValue(c.data("position")>d.min?c.data("position")>d.max?d.max:c.data("position"):d.min),d.colors=d.colors?d.colors.split(","):!1,e.vertical=d.vertical,d.vertical&&!c.hasClass("vertical")&&c.addClass("vertical"),d.permanentHint&&!c.hasClass("permanent-hint")&&c.addClass("permanent-hint"),d.vertical||"bottom"!==d.hintPosition||c.addClass("hint-bottom"),d.vertical&&"left"===d.hintPosition&&c.addClass("hint-left"),this._createSlider(),this._initPoints(),this._placeMarker(d.position),addTouchEvents(c[0]),c.children(".marker").on("mousedown",function(a){a.preventDefault(),b._startMoveMarker(a)}),c.on("mousedown",function(a){a.preventDefault(),b._startMoveMarker(a)}),c.data("slider",this)},_startMoveMarker:function(b){var c,d=this.element,e=this.options,f=this,g=d.children(".slider-hint");a(d).on("mousemove",function(a){f._movingMarker(a),d.hasClass("permanent-hint")||g.css("display","block")}),a(d).on("mouseup mouseleave",function(){a(d).off("mousemove"),a(d).off("mouseup"),d.data("value",e.position),d.trigger("changed",e.position),c="value"===e.returnType?f._valueToRealValue(e.position):e.position,"string"==typeof e.onChanged?window[e.onChanged](c,d):e.onChanged(c,d),d.hasClass("permanent-hint")||g.css("display","none")}),this._initPoints(),this._movingMarker(b)},_movingMarker:function(b){var c,d,e,f=this.element,g=this.options,h=g._slider.vertical,i=g._slider.offset,j=g._slider.start,k=g._slider.stop,l=g._slider.length,m=g._slider.marker;c=h?b.pageY-i:b.pageX-i,j>c?c=j:c>k&&(c=k),e=h?l-c-m/2:c-m/2,d=this._pixToPerc(e),this._placeMarker(d),g.currValue=this._valueToRealValue(d),g.position=d;var n="value"===g.returnType?this._valueToRealValue(g.position):g.position;g.target&&a(g.target).val(n),"string"==typeof g.onChange?window[g.onChange](n,f):g.onChange(n,f)},_placeMarker:function(a){var b,c,d,e,f,g=this.options,h=0,i=this.element,j=this.element.children(".marker"),k=this.element.children(".complete"),l=this.element.children(".slider-hint"),m=this._percToPix(g.position);if(d=g.colors.length,e=g._slider.length/d,g._slider.vertical){var n=this._percToPix(g.position)+g._slider.marker,o=g._slider.length-n;b=this._percToPix(a)+g._slider.marker,c=g._slider.length-b,this._animate(j.css("top",o),{top:c}),this._animate(k.css("height",n),{height:b}),d&&(h=Math.round(b/e)-1,k.css("background-color",g.colors[0>h?0:h])),g.showHint&&(f=this._valueToRealValue(a),l.html(f).css("top",c-l.height()/2+(i.hasClass("large")?8:0)))}else b=this._percToPix(a),this._animate(j.css("left",m),{left:b}),this._animate(k.css("width",m),{width:b}),d&&(h=Math.round(b/e)-1,k.css("background-color",g.colors[0>h?0:h])),g.showHint&&(f=this._valueToRealValue(a),l.html(f).css({left:b-l.width()/2+(i.hasClass("large")?6:0)}))},_valueToRealValue:function(a){var b,c=this.options,d=(c.maxValue-c.minValue)/100;return b=a*d+c.minValue,Math.round(b)},_animate:function(a,b){var c=this.options;c.animate?a.stop(!0).animate(b):a.css(b)},_pixToPerc:function(a){var b;return b=a*this.options._slider.ppp,Math.round(this._correctValue(b))},_percToPix:function(a){return 0===this.options._slider.ppp?0:Math.round(a/this.options._slider.ppp)},_correctValue:function(a){var b=this.options,c=b.accuracy,d=b.max,e=b.min;return 0===c?a:a===d?d:a===e?e:(a=Math.floor(a/c)*c+Math.round(a%c/c)*c,a>d?d:e>a?e:a)},_initPoints:function(){var a=this.options,b=a._slider,c=this.element;b.vertical?(b.offset=c.offset().top,b.length=c.height(),b.marker=c.children(".marker").height()):(b.offset=c.offset().left,b.length=c.width(),b.marker=c.children(".marker").width()),b.ppp=a.max/(b.length-b.marker),b.start=b.marker/2,b.stop=b.length-b.marker/2},_createSlider:function(){var b,c,d,e=this.element,f=this.options;e.html(""),b=a("<div/>").addClass("complete").appendTo(e),c=a("<a/>").addClass("marker").appendTo(e),f.showHint&&(d=a("<span/>").addClass("slider-hint").appendTo(e)),"default"!==f.color&&(f.color.isColor()?e.css("background-color",f.color):e.addClass(f.color)),"default"!==f.completeColor&&(f.completeColor.isColor()?b.css("background-color",f.completeColor):b.addClass(f.completeColor)),"default"!==f.markerColor&&(f.markerColor.isColor()?c.css("background-color",f.markerColor):c.addClass(f.markerColor))},value:function(a){var b,c=this.options;return"undefined"!=typeof a?(a=a>c.max?c.max:a,a=a<c.min?c.min:a,this._placeMarker(parseInt(a)),c.position=parseInt(a),b="value"===c.returnType?this._valueToRealValue(c.position):c.position,"string"==typeof c.onChange?window[c.onChange](b,this.element):c.onChange(b,this.element),this):b="value"===c.returnType?this._valueToRealValue(c.position):c.position},_destroy:function(){},_setOption:function(a,b){this._super("_setOption",a,b)}})}(jQuery),function(a){"use strict";a.widget("metro.stepper",{version:"3.0.0",options:{steps:3,start:1,type:"default",clickable:!0,onStep:function(){},onStepClick:function(){}},_create:function(){var b=this.element,c=this.options,d=b.attr("id");a.each(b.data(),function(b,d){if(b in c)try{c[b]=a.parseJSON(d)}catch(e){c[b]=d}}),b.hasClass("stepper")||b.addClass("stepper"),void 0===d&&(d=window.uniqueId(this.widgetName+"_"),b.attr("id",d)),this._createStepper(),c.clickable&&this._createEvents(),this._positioningSteps(),this._stepTo(c.start),b.data("stepper",this)},_createEvents:function(){var b=this.element,c=this.options;b.on("click","li",function(){var d=a(this).data("step");"string"==typeof c.onStepClick?window[c.onStepClick](d-1,d):c.onStepClick(d-1,d),b.trigger("stepclick",d)})},_createStepper:function(){var b,c,d,e=this.element,f=this.options;switch(c=a("<ul/>"),f.type){case"diamond":e.addClass("diamond");break;case"cycle":e.addClass("cycle")}for(b=0;b<f.steps;b++)d=a("<li/>").data("step",b+1).appendTo(c);c.appendTo(e)},_positioningSteps:function(){var b=this.element,c=(this.options,b.find("li")),d=b.width(),e=c.length-1,f=a(c[0]).width();a.each(c,function(b,c){var g=0===b?0:(d-f)/e*b;a(c).animate({left:g})})},_stepTo:function(b){var c=this.element,d=this.options,e=c.find("li");e.removeClass("current").removeClass("complete"),a.each(e,function(c,e){b-1>c&&a(e).addClass("complete"),c===b-1&&(a(e).addClass("current"),"string"==typeof d.onStep?window[d.onStep](c+1,e):d.onStep(c+1,e))})},stepTo:function(a){this._stepTo(a)},first:function(){var a=this.options;a.start=1,this._stepTo(a.start)},last:function(){var a=this.element,b=this.options,c=a.find("li");b.start=c.length,this._stepTo(b.start)},next:function(){var a=this.element,b=this.options,c=a.find("li");b.start+1>c.length||(b.start++,this._stepTo(b.start))},prior:function(){var a=this.options;a.start-1!==0&&(a.start--,this._stepTo(a.start))},_destroy:function(){},_setOption:function(a,b){this._super("_setOption",a,b)}})}(jQuery),function(a){a.widget("metro.streamer",{version:"3.0.0",options:{scrollBar:!1,meterStart:9,meterStop:19,meterInterval:20,slideToTime:"default",slideSleep:1e3,slideSpeed:1e3,onClick:function(){},onLongClick:function(){}},_create:function(){var b=this.element,c=this.options,d=b.find(".stream"),e=b.find(".event"),f=b.find(".events"),g=b.find(".events-area"),h=b.find(".event-group"),i=b.find(".event-stream");a.each(b.data(),function(b,d){if(b in c)try{c[b]=a.parseJSON(d)}catch(e){c[b]=d}}),b.data("streamSelect",-1);var j,k,l,m=a("<ul/>").addClass("meter"),n=c.meterStart,o=c.meterStop,p=c.meterInterval,q=[];for(j=n;o>j;j++)for(k=0;60>k;k+=p)l=(10>j?"0"+j:j)+":"+(10>k?"0"+k:k),a("<li/>").addClass("js-interval-"+l.replace(":","-")).html("<em>"+l+"</em>").appendTo(m),q.push(l);b.data("intervals",q),m.insertBefore(b.find(".events-grid")),b.find(".event-stream").each(function(b,c){var e=0,f=a(c).find(".event");f.each(function(b,c){e+=a(c).outerWidth()+parseInt(a(c).css("margin-left"))}),a(c).css({width:e+2*(f.length-1)+1}),a(c).find(".time").css("background-color",a(d[b]).css("background-color"))}),f.css({"overflow-x":c.scrollBar?"scroll":"hidden"}),b.css({height:b.find(".streams").outerHeight()+(c.scrollBar?20:0)});var r=0;h.each(function(b,c){r+=a(c).outerWidth()}),r+=2*(h.length-1)+10,g.css("width",r),e.each(function(a,b){addTouchEvents(b)}),b.mousewheel(function(a,b){var c=50*b;return f.scrollLeft(f.scrollLeft()-c),!1}),d.each(function(c,d){a(d).mousedown(function(){b.data("streamSelect")==c?(e.removeClass("event-disable"),b.data("streamSelect",-1)):(b.data("streamSelect",c),e.addClass("event-disable"),a(i[c]).find(".event").removeClass("event-disable"))})}),this._createEvents(),this.slideToTime(c.slideToTime,c.slideSleep,c.slideSpeed),b.data("streamer",this)},_createEvents:function(){var b=this,c=this.element,d=this.options,e=c.find(".event");e.on("click",function(b){b.ctrlKey&&a(this).toggleClass("selected"),b.preventDefault(),d.onClick(a(this))}),c.find(".js-go-previous-time").on("click",function(){var a=c.data("intervals").indexOf(c.data("current-time"));if(0!=a){a--;var e=c.data("intervals")[a];b.slideToTime(e,0,d.slideSpeed)}}),c.find(".js-go-next-time").on("click",function(){var a=c.data("intervals").indexOf(c.data("current-time"));if(a!=c.data("intervals").length-1){a++;var e=c.data("intervals")[a];b.slideToTime(e,0,d.slideSpeed)}}),c.find(".js-show-all-streams").on("click",function(a){c.find(".event").removeClass("event-disable"),c.data("streamSelect",-1),a.preventDefault()}),c.find(".js-schedule-mode").on("click",function(b){a(this).toggleClass("active"),c.data("schedule-mode",a(this).hasClass("inverse")),b.preventDefault()})},slideToTime:function(a,b,c){var d,e,f=this,g=this.element;"default"===a?(d=g.find(".meter li")[0],a=d.className.replace("js-interval-","").replace("-",":")):(e=a.split(":"),1===e[0].length&&(a="0"+a)),d=g.find(".meter li.js-interval-"+a.replace(":","-"))[0],setTimeout(function(){g.find(".events").animate({scrollLeft:d.offsetLeft},c,function(){f._afterSlide()})},b),g.data("current-time",a)},_afterSlide:function(){},_destroy:function(){},_setOption:function(a,b){this._super("_setOption",a,b)}})}(jQuery),function(a){"use strict";a.widget("metro.tabControl",{version:"3.0.0",options:{openTarget:!1,saveState:!1,onTabClick:function(){return!0},onTabChanged:function(){},_current:{tab:!1,frame:!1}},_create:function(){{var b,c,d,e=this.element,f=this.options,g=e.children(".tabs").find("li").children("a");e.children(".frames").children("div")}if(a.each(e.data(),function(b,c){if(b in f)try{f[b]=a.parseJSON(c)}catch(d){f[b]=c}}),f.saveState&&void 0!==e.attr("id")&&""!==e.attr("id").trim()){var h=window.localStorage.getItem(e.attr("id")+"-stored-tab");h&&"undefined"!==h&&(b=e.find("a[href='"+h+"']"),b&&(c=b.attr("href"),d=c&&c.isUrl()?!1:a(c),f._current.tab=b,f._current.frame=d))}if(f._current.tab||f.openTarget===!1||(b=e.find("a[href='"+f.openTarget+"']"),b&&(c=b.attr("href"),d=c&&c.isUrl()?!1:a(c),f._current.tab=b,f._current.frame=d)),f._current.tab||a.each(g,function(b,c){var d=a(c),e=d.attr("href"),g=e.isUrl()?!1:a(e);d.parent().hasClass("active")&&!d.parent().hasClass("disabled")&&g!==!1&&(f._current.tab=d,f._current.frame=g)}),!f._current.tab)for(var i=0;i<g.length;i++)if(!a(g[i]).attr("href").isUrl()&&!a(g[i]).parent().hasClass("disabled")){f._current.tab=a(g[i]),f._current.frame=a(a(g[i]).attr("href"));break}this._createEvents(),this._openTab(),e.data("tabControl",this)},_hideTabs:function(){var b=this.element,c=b.outerWidth(),d=b.children(".tabs").find("li:not(.non-visible-tabs)"),e=b.children(".tabs").find(".non-visible-tabs").children(".d-menu");a.each(d,function(){var b=a(this),d=this;if(d.offsetLeft+d.offsetWidth+30>c){var f=b.clone(!0);f.appendTo(e),b.remove()}})},_openTab:function(){var a=this.element,b=this.options,c=a.children(".tabs").find("li").children("a"),d=a.children(".frames").children("div");c.parent().removeClass("active"),d.hide(),b._current.tab.parent().addClass("active"),b._current.frame.show(),b.saveState&&void 0!==a.attr("id")&&""!==a.attr("id").trim()&&window.localStorage.setItem(a.attr("id")+"-stored-tab",b._current.tab.attr("href"))},_createEvents:function(){{var b=this,c=this.element,d=this.options;c.children(".tabs").find("li").children("a"),c.children(".frames").children("div")}c.on("click",".tabs > li > a",function(c){var e=a(this),f=e.attr("href"),g=a(f);if(e.parent().hasClass("disabled"))return!1;if("string"==typeof d.onTabClick){if(!window[d.onTabClick](e))return!1}else if(!d.onTabClick(e))return!1;return f.isUrl()?(window.location.href=f,!0):(d._current.tab=e,d._current.frame=g,b._openTab(),"string"==typeof d.onTabChanged?window[d.onTabChanged](e):d.onTabChanged(e),c.preventDefault(),void c.stopPropagation())})},hideTab:function(){},showTab:function(){},_destroy:function(){},_setOption:function(a,b){this._super("_setOption",a,b)}})}(jQuery),function(a){"use strict";a.widget("metro.tile",{version:"3.0.0",options:{effect:"slideLeft",period:4e3,duration:700,easing:"doubleSqrt"},_frames:{},_currentIndex:0,_interval:0,_outPosition:0,_size:{},_create:function(){var b=this.element,c=this.options;a.each(b.data(),function(b,d){if(b in c)try{c[b]=a.parseJSON(d)}catch(e){c[b]=d}}),this._createTransformTile(),this._createLiveTile(),b.data("tile",this)},_createLiveTile:function(){{var b=this,c=this.element;this.options}return this._frames=c.find(".live-slide"),this._frames.length<=1?!1:(a.easing.doubleSqrt=function(a){return Math.sqrt(Math.sqrt(a))},this._size={width:c.width(),height:c.height()},c.on("mouseenter",function(){b.stop()}),c.on("mouseleave",function(){b.start()}),void this.start())},start:function(){var a=this;this._interval=setInterval(function(){a._animate()},this.options.period)},stop:function(){clearInterval(this._interval)},_animate:function(){var a,b=this._frames[this._currentIndex];switch(this._currentIndex+=1,this._currentIndex>=this._frames.length&&(this._currentIndex=0),a=this._frames[this._currentIndex],this.options.effect){case"slideLeft":this._effectSlideLeft(b,a);break;case"slideRight":this._effectSlideRight(b,a);break;case"slideDown":this._effectSlideDown(b,a);break;case"slideUpDown":this._effectSlideUpDown(b,a);break;case"slideLeftRight":this._effectSlideLeftRight(b,a);break;default:this._effectSlideUp(b,a)}},_effectSlideLeftRight:function(a,b){this._currentIndex%2===0?this._effectSlideLeft(a,b):this._effectSlideRight(a,b)},_effectSlideUpDown:function(a,b){this._currentIndex%2===0?this._effectSlideUp(a,b):this._effectSlideDown(a,b)},_effectSlideUp:function(b,c){var d=this._size.height,e={duration:this.options.duration,easing:this.options.easing};a(b).animate({top:-d},e),a(c).css({top:d}).show().animate({top:0},e)},_effectSlideDown:function(b,c){var d=this._size.height,e={duration:this.options.duration,easing:this.options.easing};a(b).animate({top:d},e),a(c).css({top:-d}).show().animate({top:0},e)},_effectSlideLeft:function(b,c){var d=this._size.width,e={duration:this.options.duration,easing:this.options.easing};a(b).animate({left:-1*d},e),a(c).css({left:d}).show().animate({left:0},e)},_effectSlideRight:function(b,c){
  var d=this._size.width,e={duration:this.options.duration,easing:this.options.easing};a(b).animate({left:d},e),a(c).css({left:-d}).show().animate({left:0},e)},_createTransformTile:function(){var b=this.element,c=(this.options,{w:b.width(),h:b.height()});b.on("mousedown",function(d){var e=d.pageX-a(this).offset().left,f=d.pageY-a(this).offset().top,g="top";e<1*c.w/3&&(f<1*c.h/2||f>1*c.h/2)?g="left":e>2*c.w/3&&(f<1*c.h/2||f>1*c.h/2)?g="right":e>1*c.w/3&&e<2*c.w/3&&f>c.h/2&&(g="bottom"),a(this).addClass("tile-transform-"+g),"A"===b[0].tagName&&b.attr("href")&&setTimeout(function(){document.location.href=b.attr("href")},500)}),b.on("mouseup",function(){a(this).removeClass("tile-transform-left").removeClass("tile-transform-right").removeClass("tile-transform-top").removeClass("tile-transform-bottom")}),b.on("mouseleave",function(){a(this).removeClass("tile-transform-left").removeClass("tile-transform-right").removeClass("tile-transform-top").removeClass("tile-transform-bottom")})},_destroy:function(){},_setOption:function(a,b){this._super("_setOption",a,b)}})}(jQuery),function(a){"use strict";a.widget("metro.treeview",{version:"3.0.0",options:{doubleClick:!0,onClick:function(){},onExpand:function(){},onCollapse:function(){}},_create:function(){var b=this.element,c=this.options;a.each(b.data(),function(b,d){if(b in c)try{c[b]=a.parseJSON(d)}catch(e){c[b]=d}}),this._initTree(),this._createEvents(),b.data("treeview",this)},_createCheckbox:function(b,c){var d,e,f;d=a("<label/>").addClass("input-control checkbox small-check").insertBefore(b),e=a("<input/>").attr("type","checkbox").appendTo(d),f=a("<span/>").addClass("check").appendTo(d),void 0!==c.data("name")&&e.attr("name",c.data("name")),void 0!==c.data("id")&&e.attr("id",c.data("id")),void 0!==c.data("checked")&&e.prop("checked",c.data("checked")),void 0!==c.data("readonly")&&e.prop("disabled",c.data("readonly")),void 0!==c.data("disabled")&&(e.prop("disabled",c.data("disabled")),c.data("disabled")===!0&&c.addClass("disabled")),void 0!==c.data("value")&&e.val(c.data("value"))},_createRadio:function(b,c){var d,e,f;d=a("<label/>").addClass("input-control radio small-check").insertBefore(b),e=a("<input/>").attr("type","radio").appendTo(d),f=a("<span/>").addClass("check").appendTo(d),void 0!==c.data("name")&&e.attr("name",c.data("name")),void 0!==c.data("id")&&e.attr("id",c.data("id")),void 0!==c.data("checked")&&e.prop("checked",c.data("checked")),void 0!==c.data("readonly")&&e.prop("disabled",c.data("readonly")),void 0!==c.data("disabled")&&(e.prop("disabled",c.data("disabled")),c.data("disabled")===!0&&c.addClass("disabled")),void 0!==c.data("value")&&e.val(c.data("value"))},_initTree:function(){var b=this,c=this.element,d=(this.options,c.find(".leaf"));a.each(d,function(){{var c=a(this),d=c.parent("li"),e=c.siblings("ul");a(c.parents(".node")[0])}"checkbox"===d.data("mode")&&b._createCheckbox(c,d),"radio"===d.data("mode")&&b._createRadio(c,d),e.length>0&&(d.hasClass("node")||d.addClass("node")),d.hasClass("collapsed")&&e.hide()})},_renderChecks:function(b){var c=this.element,d=(this.options,b.is(":checked")),e=a(b.parent().parent()),f=e.children("ul").find('[type="checkbox"]');f.prop("checked",d).removeClass("indeterminate"),a.each(c.find(".node[data-mode=checkbox]").reverse(),function(){var b=a(this),c=b.children(".input-control").find('[type="checkbox"]'),d=b.children("ul").find('[type="checkbox"]'),e=b.children("ul").find('[type="checkbox"]:checked');c.removeClass("indeterminate"),0===e.length?(c.prop("checked",!1),c.removeClass("indeterminate")):e.length>0&&d.length>e.length&&(c.prop("checked",!0),c.addClass("indeterminate"))})},_createEvents:function(){var b=this,c=this.element,d=this.options;c.on("change","input:checkbox",function(){b._renderChecks(a(this))}),c.on("click","input",function(){var c,e,f=a(this),g=a(f.parents(".node")[0]),h=f.parent("li"),i=f.siblings(".input-control").find("input:checkbox"),j=f.siblings(".input-control").find("input:radio");i.length>0&&(c=!i.is(":checked"),e=i.is(":disabled"),e||i.prop("checked",c),b._renderChecks(i)),j.length>0&&(e=j.is(":disabled"),e||j.prop("checked",!0)),"string"==typeof d.onClick?window[d.onClick](f,h,g,b):d.onClick(f,h,g,b)}),c.on("click",".leaf",function(){var e=a(this),f=a(e.parents(".node")[0]),g=e.parent("li");c.find(".leaf").parent("li").removeClass("active"),g.addClass("active"),"string"==typeof d.onClick?window[d.onClick](e,g,f,b):d.onClick(e,g,f,b)}),d.doubleClick&&c.on("dblclick",".leaf",function(c){var e=a(this),f=e.parent("li"),g=a(e.parents(".node")[0]);return f.hasClass("keep-open")?!1:(f.toggleClass("collapsed"),f.hasClass("collapsed")?(f.children("ul").fadeOut("fast"),"string"==typeof d.onCollapse?window[d.onCollapse](e,f,g,b):d.onCollapse(e,f,g,b)):(f.children("ul").fadeIn("fast"),"string"==typeof d.onExpand?window[d.onExpand](f,e,g):d.onExpand(f,e,g)),c.stopPropagation(),void c.preventDefault())}),c.on("click",".node-toggle",function(c){var e=a(this).siblings(".leaf"),f=a(this).parent("li"),g=a(e.parents(".node")[0]);return f.hasClass("keep-open")?!1:(f.toggleClass("collapsed"),f.hasClass("collapsed")?(f.children("ul").fadeOut("fast"),"string"==typeof d.onCollapse?window[d.onCollapse](e,f,g,b):d.onCollapse(e,f,g,b)):(f.children("ul").fadeIn("fast"),"string"==typeof d.onExpand?window[d.onExpand](e,f,g,b):d.onExpand(e,f,g,b)),c.stopPropagation(),void c.preventDefault())})},addLeaf:function(b,c,d){var e,f,g,h=this.element;if(b&&("LI"===b[0].tagName&&b.addClass("node"),0===b.children(".node-toggle").length&&a("<span/>").addClass("node-toggle").appendTo(b)),g=b?a(b).children("ul"):h.children("ul"),0===g.length&&(g=a("<ul/>").appendTo(b?b:h)),f=a("<li/>").appendTo(g),e=void 0!==d&&void 0!==d.tagName?a("<"+d.tagName+"/>").addClass("leaf").appendTo(f):a("<span/>").addClass("leaf").appendTo(f),e.html(c),void 0!==d&&(a.each(d,function(a,b){f.attr("data-"+a,b)}),void 0!==d.mode))switch(d.mode){case"checkbox":this._createCheckbox(e,f);break;case"radio":this._createRadio(e,f)}return this},_destroy:function(){},_setOption:function(a,b){this._super("_setOption",a,b)}})}(jQuery),function(a){"use strict";a.widget("metro.validator",{version:"1.0.0",options:{showErrorState:!0,showErrorHint:!0,showRequiredState:!0,showSuccessState:!0,hintSize:0,hintBackground:"#FFFCC0",hintColor:"#000000",hideError:2e3,hideHint:5e3,hintEasing:"easeInQuad",hintEasingTime:400,hintMode:"hint",hintPosition:"right",focusInput:!0,onBeforeSubmit:function(){return!0},onErrorInput:function(){},onSubmit:function(){return!0}},_scroll:0,funcs:{required:function(a){return""!==a.trim()},minlength:function(a,b){return void 0==b||isNaN(b)||0>=b?!1:a.trim().length>=b},maxlength:function(a,b){return void 0==b||isNaN(b)||0>=b?!1:a.trim().length<=b},min:function(a,b){return void 0==b||isNaN(b)?!1:""===a.trim()?!1:isNaN(a)?!1:a>=b},max:function(a,b){return void 0==b||isNaN(b)?!1:""===a.trim()?!1:isNaN(a)?!1:b>=a},email:function(a){return/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i.test(a)},url:function(a){return/^(?:[a-z]+:)?\/\//i.test(a)},date:function(a){return!("Invalid Date"===new Date(a)||isNaN(new Date(a)))},number:function(a){return a-0==a&&(""+a).trim().length>0},digits:function(a){return/^\d+$/.test(a)},hexcolor:function(a){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(a)},pattern:function(a,b){if(void 0==b)return!1;var c=new RegExp(b);return c.test(a)}},_create:function(){var b=this.element,c=this.options;a.each(b.data(),function(b,d){if(b in c)try{c[b]=a.parseJSON(d)}catch(e){c[b]=d}}),"line"!==c.hintMode&&(c.hintMode="hint2"),this._scroll=a(window).scrollTop(),this._createValidator(),b.data("validator",this)},_createValidator:function(){var b=this,c=this.element,d=this.options,e=c.find("[data-validate-func]");c.attr("novalidate","novalidate"),d.showRequiredState&&a.each(e,function(){var b=a(this);b.parent().hasClass("input-control")?b.parent().addClass("required"):b.addClass("required")}),e.on("focus",function(){}),a(window).scroll(function(){var b=a(this).scrollTop(),c=isNaN(b-this._scroll)?0:b-this._scroll;a(".validator-hint.hint2").css({top:"-="+c}),this._scroll=b}),c[0].onsubmit?(this._onsubmit=c[0].onsubmit,c[0].onsubmit=null):this._onsubmit=null,c[0].onsubmit=function(){return b._submit()}},_submit:function(){var b=this,c=this.element,d=this.options,e=c.find("[data-validate-func]"),f=c.find(":submit").attr("disabled","disabled").addClass("disabled"),g=0;return a(".validator-hint").hide(),e.removeClass("error success"),a.each(e,function(b,c){var d=a(c);d.parent().hasClass("input-control")&&d.parent().removeClass("error success")}),a.each(e,function(c,e){var f=a(e),h=f.data("validateFunc"),i=f.data("validateArg"),j=b.funcs[h](f.val(),i);j||("string"==typeof d.onErrorInput?window[d.onErrorInput](f):d.onErrorInput(f)),!j&&d.showErrorState&&b._showError(f),!j&&d.showErrorHint&&setTimeout(function(){b._showErrorHint(f)},100*c),j&&d.showSuccessState&&b._showSuccess(f),!j&&0==c&&d.focusInput&&f.focus(),g+=j?0:1}),g+="string"==typeof d.onBeforeSubmit?window[d.onBeforeSubmit](c,g)?0:1:d.onBeforeSubmit(c,g)?0:1,0!==g?(f.removeAttr("disabled").removeClass("disabled"),!1):(g="string"==typeof d.onSubmit?window[d.onSubmit](c[0]):g=d.onSubmit(c[0]),f.removeAttr("disabled").removeClass("disabled"),g)},_showSuccess:function(a){a.parent().hasClass("input-control")?a.parent().addClass("success"):a.addClass("success")},_showError:function(a){var b=this.options;a.parent().hasClass("input-control")?a.parent().addClass("error"):a.addClass("error"),b.hideError&&b.hideError>0&&setTimeout(function(){a.parent().removeClass("error")},b.hideError)},_showErrorHint:function(b){var c,d,e,f=this.options,g=b.data("validateHint"),h=b.data("validateHintPosition")||f.hintPosition,i=b.data("validateHintMode")||f.hintMode,j=b.data("validateHintBackground")||f.hintBackground,k=b.data("validateHintColor")||f.hintColor;return void 0===g?!1:(c=a("<div/>").addClass(i+" validator-hint"),c.html(void 0!==g?this._format(g,b.val()):""),c.css({"min-width":f.hintSize}),j.isColor()?c.css("background-color",j):c.addClass(j),k.isColor()?c.css("color",k):c.addClass(k),void("line"===i?(c.addClass("hint2").addClass("line"),c.css({position:"relative",width:b.parent().hasClass("input-control")?b.parent().width():b.width(),"z-index":100}),c.appendTo(b.parent()),c.fadeIn(f.hintEasingTime,function(){setTimeout(function(){c.hide().remove()},f.hideHint)})):(c.appendTo("body"),"right"===h?(e=b.offset().left+b.outerWidth()+15-a(window).scrollLeft(),d=b.offset().top+b.outerHeight()/2-c.outerHeight()/2-a(window).scrollTop()-10,c.addClass(h),c.css({top:d,left:a(window).width()+100}),c.show().animate({left:e},f.hintEasingTime,f.hintEasing,function(){setTimeout(function(){c.hide().remove()},f.hideHint)})):"left"===h?(e=b.offset().left-c.outerWidth()-10-a(window).scrollLeft(),d=b.offset().top+b.outerHeight()/2-c.outerHeight()/2-a(window).scrollTop()-10,c.addClass(h),c.css({top:d,left:-b.offset().left-c.outerWidth()-10}),c.show().animate({left:e},f.hintEasingTime,f.hintEasing,function(){setTimeout(function(){c.hide().remove()},f.hideHint)})):"top"===h?(e=b.offset().left+b.outerWidth()/2-c.outerWidth()/2-a(window).scrollLeft(),d=b.offset().top-a(window).scrollTop()-c.outerHeight()-20,c.addClass(h),c.css({top:-c.outerHeight(),left:e}).show().animate({top:d},f.hintEasingTime,f.hintEasing,function(){setTimeout(function(){c.hide().remove()},f.hideHint)})):(e=b.offset().left+b.outerWidth()/2-c.outerWidth()/2-a(window).scrollLeft(),d=b.offset().top-a(window).scrollTop()+b.outerHeight(),c.addClass(h),c.css({top:a(window).height(),left:e}).show().animate({top:d},f.hintEasingTime,f.hintEasing,function(){setTimeout(function(){c.hide().remove()},f.hideHint)})))))},_format:function(b,c){return 1===arguments.length?function(){var c=a.makeArray(arguments);return c.unshift(b),a.validator.format.apply(this,c)}:(arguments.length>2&&c.constructor!==Array&&(c=a.makeArray(arguments).slice(1)),c.constructor!==Array&&(c=[c]),a.each(c,function(a,c){b=b.replace(new RegExp("\\{"+a+"\\}","g"),function(){return c})}),b)},_destroy:function(){},_setOption:function(a,b){this._super("_setOption",a,b)}})}(jQuery),function(a){"use strict";a.widget("metro.window",{version:"3.0.0",options:{parent:"default",captionStyle:!1,contentStyle:!1,buttons:{btnMin:!1,btnMax:!1,btnClose:!1},title:!1,content:!1,icon:!1,type:"default",size:!1,onBtnMinClick:function(a){a.preventDefault()},onBtnMaxClick:function(a){a.preventDefault()},onBtnCloseClick:function(a){a.preventDefault()},onShow:function(a){a.preventDefault()},onHide:function(a){a.preventDefault()}},_create:function(){var b=this.element,c=this.options;a.each(b.data(),function(b,d){if(b in c)try{c[b]=a.parseJSON(d)}catch(e){c[b]=d}}),this._createWindow(),b.data("window",this)},_createWindow:function(){var b,c,d=this.element,e=this.options,f=d;f.addClass("window"),b=a("<div/>").addClass("window-caption"),c=a("<div/>").addClass("window-content"),(e.icon||e.title)&&b.appendTo(f),c.appendTo(f),"object"==typeof e.size&&a.each(e.size,function(a,b){c.css(a,b)}),e.captionStyle&&"object"==typeof e.captionStyle&&a.each(e.captionStyle,function(a,c){c.isColor()?b.css(a,c+" !important"):b.addClass(c)}),e.contentStyle&&"object"==typeof e.contentStyle&&a.each(e.contentStyle,function(a,b){b.isColor()?c.css(a,b+" !important"):c.addClass(b)}),f.appendTo("default"!==e.parent?e.parent:d.parent()),this.icon(),this.title(),this.buttons(),this.content()},icon:function(){var b=this.options,c=this.element.children(".window-caption"),d=c.find(".window-caption-icon");b.icon&&(0===d.length?a("<span/>").addClass("window-caption-icon").html(b.icon).appendTo(c):d.html(b.icon))},title:function(){var b=this.options,c=this.element.children(".window-caption"),d=c.find(".window-caption-title");b.title&&(0===d.length?a("<span/>").addClass("window-caption-title").html(b.title).appendTo(c):d.html(b.title))},buttons:function(){var b,c,d,f=this.options,g=this.element.children(".window-caption");if(0!==g.length&&f.buttons){var h=f.buttons.btnMin,i=f.buttons.btnMax,j=f.buttons.btnClose;if(h&&h!==!1)if(b=a("<span/>").addClass("btn-min").appendTo(g),"object"==typeof h&&b.css(h),"string"==typeof f.onBtnMinClick){var k=window[f.onBtnMinClick];b.on("click",k)}else b.on("click",f.onBtnMinClick(e));if(i&&i!==!1)if(c=a("<span/>").addClass("btn-max").appendTo(g),"object"==typeof i&&c.css(i),"string"==typeof f.onBtnMaxClick){var l=window[f.onBtnMaxClick];c.on("click",l)}else c.on("click",f.onBtnMaxClick(e));if(j&&j!==!1)if(d=a("<span/>").addClass("btn-close").appendTo(g),"object"==typeof j&&d.css(j),"string"==typeof f.onBtnCloseClick){var m=window[f.onBtnCloseClick];d.on("click",m)}else d.on("click",f.onBtnCloseClick(e))}},content:function(){var b=this.options,c=b.content,d=this.element.children(".window-content");if(c)if(c.isUrl()){if(c.indexOf("youtube")>-1){var e=a("<iframe>"),f=a("<div/>").addClass("video-container").appendTo(d);e.attr("src",c).attr("frameborder","0"),e.appendTo(f)}}else d.html(c)},_destroy:function(){},_setOption:function(a,b){this._super("_setOption",a,b)}})}(jQuery),function(a){"use strict";a.widget("metro.wizard",{version:"3.0.0",options:{stepper:!0,stepperType:"default",stepperClickable:!1,startPage:"default",finishStep:"default",locale:window.METRO_CURRENT_LOCALE,buttons:{cancel:!0,help:!0,prior:!0,next:!0,finish:!0},onCancel:function(){},onHelp:function(){},onPrior:function(){return!0},onNext:function(){return!0},onFinish:function(){},onPage:function(){},onStepClick:function(){}},_stepper:void 0,_currentStep:0,_steps:void 0,_create:function(){var b=this,c=this.element,d=this.options,e=c.find(".step");a.each(c.data(),function(b,c){if(b in d)try{d[b]=a.parseJSON(c)}catch(e){d[b]=c}}),this._steps=e,d.stepper&&(this._stepper=this._createStepper(e.length).insertBefore(c.find(".steps")).stepper({clickable:d.stepperClickable}).on("stepclick",function(a,c){b.stepTo(c),"string"==typeof d.onStepClick?window[d.onStepClick](c):d.onStepClick(c)})),void 0!==c.data("locale")&&(d.locale=c.data("locale")),this._createEvents();var f="default"!==d.startPage&&parseInt(d.startPage)>1?d.startPage:1;this.stepTo(f),"string"==typeof d.onPage?window[d.onPage](this._currentStep+1,c):d.onPage(this._currentStep+1,c),c.data("wizard",this)},_createStepper:function(b){var c,d=this.options;return c=a("<div/>").addClass("stepper").attr("data-role","stepper").attr("data-steps",b),"default"!==d.stepperType&&c.addClass(d.stepperType),c},_createEvents:function(){var b=this,c=this.element,d=this.options;if(d.buttons){var e,f,g,h,i,j=a("<div/>").addClass("actions").appendTo(c),k=a("<div/>").addClass("group-left").appendTo(j),l=a("<div/>").addClass("group-right").appendTo(j);d.buttons.cancel&&(e=a("<button type='button'/>").addClass("btn-cancel").html(window.METRO_LOCALES[d.locale].buttons[2]),"boolean"==typeof d.buttons.cancel?e.appendTo(k):(d.buttons.cancel.title&&e.html(d.buttons.cancel.title),d.buttons.cancel.cls&&e.addClass(d.buttons.cancel.cls),e.appendTo(d.buttons.cancel.group&&"left"!==d.buttons.cancel.group?l:k)),e.on("click",function(){"string"==typeof d.onCancel?window[d.onCancel](b._currentStep+1,c):d.onCancel(b._currentStep+1,c)})),d.buttons.help&&(f=a("<button type='button'/>").addClass("btn-help").html(window.METRO_LOCALES[d.locale].buttons[3]),"boolean"==typeof d.buttons.help?f.appendTo(l):(d.buttons.help.title&&f.html(d.buttons.help.title),d.buttons.help.cls&&f.addClass(d.buttons.help.cls),f.appendTo(d.buttons.help.group&&"left"!==d.buttons.help.group?l:k)),f.on("click",function(){"string"==typeof d.onHelp?window[d.onHelp](b._currentStep+1,c):d.onHelp(b._currentStep+1,c)})),d.buttons.prior&&(g=a("<button type='button'/>").addClass("btn-prior").html(window.METRO_LOCALES[d.locale].buttons[4]),"boolean"==typeof d.buttons.prior?g.appendTo(l):(d.buttons.prior.title&&g.html(d.buttons.prior.title),d.buttons.prior.cls&&g.addClass(d.buttons.prior.cls),g.appendTo(d.buttons.prior.group&&"left"!==d.buttons.prior.group?l:k)),g.on("click",function(){"string"==typeof d.onPrior?window[d.onPrior](b._currentStep+1,c)&&b.prior():d.onPrior(b._currentStep+1,c)&&b.prior()})),d.buttons.next&&(h=a("<button type='button'/>").addClass("btn-next").html(window.METRO_LOCALES[d.locale].buttons[5]),"boolean"==typeof d.buttons.next?h.appendTo(l):(d.buttons.next.title&&h.html(d.buttons.next.title),d.buttons.next.cls&&h.addClass(d.buttons.next.cls),h.appendTo(d.buttons.next.group&&"left"!==d.buttons.next.group?l:k)),h.on("click",function(){"string"==typeof d.onNext?window[d.onNext](b._currentStep+1,c)&&b.next():d.onNext(b._currentStep+1,c)&&b.next()})),d.buttons.finish&&(i=a("<button type='button'/>").addClass("btn-finish").html(window.METRO_LOCALES[d.locale].buttons[6]),"boolean"==typeof d.buttons.finish?i.appendTo(l):(d.buttons.finish.title&&i.html(d.buttons.finish.title),d.buttons.finish.cls&&i.addClass(d.buttons.finish.cls),i.appendTo(d.buttons.finish.group&&"left"!==d.buttons.finish.group?l:k)),i.on("click",function(){"string"==typeof d.onFinish?window[d.onFinish](b._currentStep+1,c):d.onFinish(b._currentStep+1,c)}))}},next:function(){var b=this.options,c=this._currentStep+1;if(c===this._steps.length)return!1;this._currentStep=c,this._steps.hide(),a(this._steps[c]).show(),"string"==typeof b.onPage?window[b.onPage](this._currentStep+1,this.element):b.onPage(this._currentStep+1,this.element),void 0!==this._stepper&&this._stepper.stepper("stepTo",this._currentStep+1);var d="default"===b.finishStep?this._steps.length-1:b.finishStep;return c===d?this.element.find(".btn-finish").attr("disabled",!1):this.element.find(".btn-finish").attr("disabled",!0),c===this._steps.length-1?this.element.find(".btn-next").attr("disabled",!0):this.element.find(".btn-next").attr("disabled",!1),c>0&&this.element.find(".btn-prior").attr("disabled",!1),!0},prior:function(){var b=this._currentStep-1,c=this.options;if(0>b)return!1;this._currentStep=b,this._steps.hide(),a(this._steps[b]).show(),"string"==typeof c.onPage?window[c.onPage](this._currentStep+1,this.element):c.onPage(this._currentStep+1,this.element),void 0!==this._stepper&&this._stepper.stepper("stepTo",this._currentStep+1);var d="default"===c.finishStep?this._steps.length-1:c.finishStep;return b===d?this.element.find(".btn-finish").attr("disabled",!1):this.element.find(".btn-finish").attr("disabled",!0),0===b?this.element.find(".btn-prior").attr("disabled",!0):this.element.find(".btn-prior").attr("disabled",!1),d>b&&this.element.find(".btn-next").attr("disabled",!1),!0},stepTo:function(b){var c=b-1,d=this.options;if(0>c)return!1;this._currentStep=c,this._steps.hide(),a(this._steps[c]).show(),"string"==typeof d.onPage?window[d.onPage](this._currentStep+1,this.element):d.onPage(this._currentStep+1,this.element),void 0!==this._stepper&&this._stepper.stepper("stepTo",b);var e="default"===d.finishStep?this._steps.length-1:d.finishStep;return c===e?this.element.find(".btn-finish").attr("disabled",!1):this.element.find(".btn-finish").attr("disabled",!0),this.element.find(".btn-next").attr("disabled",c>=e),this.element.find(".btn-prior").attr("disabled",0>=c),!0},stepper:function(){return this._stepper},_destroy:function(){},_setOption:function(a,b){this._super("_setOption",a,b)}})}(jQuery),function(a){"use strict";a.widget("metro.wizard2",{version:"3.0.0",options:{start:1,finish:"default",buttonLabels:{prev:"&lt;",next:"&gt;",finish:"OK",help:"?"},onPrevClick:function(){return!0},onNextClick:function(){return!0},onFinishClick:function(){},onHelpClick:function(){}},_step:1,_steps:void 0,_create:function(){var b=this,c=this.element,d=this.options;a.each(c.data(),function(b,c){if(b in d)try{d[b]=a.parseJSON(c)}catch(e){d[b]=c}}),this._step=d.start,this._steps=c.children(".step"),this._height=0,this._width=0,"default"===d.finish&&(d.finish=this._steps.length),a.each(this._steps,function(c,d){a(d).outerHeight()>b._height&&(b._height=a(d).outerHeight()),a(d).hasClass("active")&&(b._step=c+1)}),this._width=c.innerWidth()-(24*(this._steps.length-1)+this._steps.length),c.children(".step").css({height:this._height+48}),a(window).resize(function(){b._width=c.innerWidth()-(24*(b._steps.length-1)+b._steps.length),b.step(b._step)}),this._createActionBar(),this.step(d.start),this._placeActionBar(),c.data("wizard2",this)},_createActionBar:function(){var b,c,d,e,f=this,g=this.element,h=this.options,i=a("<div/>").addClass("action-bar").appendTo(g);d=a("<button/>").html(h.buttonLabels.help).addClass("button cycle-button medium-button wiz-btn-help place-left").appendTo(i),e=a("<button/>").html(h.buttonLabels.finish).addClass("button cycle-button medium-button wiz-btn-finish place-right").appendTo(i),c=a("<button/>").html(h.buttonLabels.next).addClass("button cycle-button medium-button wiz-btn-next place-right").appendTo(i),b=a("<button/>").html(h.buttonLabels.prev).addClass("button cycle-button medium-button wiz-btn-prev place-right").appendTo(i),d.on("click",function(){"string"==typeof h.onHelpClick?window[h.onHelpClick](f._step):h.onHelpClick(f._step)}),e.on("click",function(){"string"==typeof h.onFinishClick?window[h.onFinishClick](f._step):h.onFinishClick(f._step)}),b.on("click",function(){"string"==typeof h.onPrevClick?window[h.onPrevClick](f._step)&&f.prev():h.onPrevClick(f._step)&&f.prev()}),c.on("click",function(){"string"==typeof h.onNextClick?window[h.onNextClick](f._step)&&f.next():h.onNextClick(f._step)&&f.next()})},_placeActionBar:function(){var a=this.element,b=(this.options,a.find(".action-bar")),c=a.find(".step.active"),d=c.position().left,e=c.innerWidth();b.css({left:d,width:e})},step:function(b){var c=this.options;this.element.children(".step").removeClass("active prev next"),a(this.element.children(".step")[b-1]).addClass("active").css("width",this._width),this.element.children(".step.active").prevAll().addClass("prev").css("width",0),this.element.children(".step.active").nextAll().addClass("next").css("width",0),this._placeActionBar(),1===b?this.element.find(".wiz-btn-prev").hide():this.element.find(".wiz-btn-prev").show(),b===this._steps.length?this.element.find(".wiz-btn-next").hide():this.element.find(".wiz-btn-next").show(),b!==c.finish?this.element.find(".wiz-btn-finish").hide():this.element.find(".wiz-btn-finish").show()},prev:function(){var a=this._step-1;return 0>=a?!1:(this._step=a,this.step(a),!0)},next:function(){var a=this._step+1;return a>this._steps.length?!1:(this._step=a,this.step(a),!0)},_destroy:function(){},_setOption:function(a,b){this._super("_setOption",a,b)}})}(jQuery);