var timerModule,app,URLHelper,eventComboApp;(function(){"use strict";angular.module("mdDatetimePickerDemo",["ngMaterialDatePicker"]).controller("CreateEventController",function(n){n.date=new Date;n.time=new Date;n.dateTime=new Date;n.minDate=moment().subtract(1,"month");n.maxDate=moment().add(1,"month")}).directive("exSourceCode",function(){return{template:'<h4>{{title}}<\/h4><pre  hljs class="html"><code>{{sourceCode}}<\/code><\/pre>',scope:{},link:function(n,t,i){var r=angular.element(t.parent()[0].querySelector(i.target||"md-input-container")),u;r.length&&(n.title=i.title||"Source Code",u=r[0].outerHTML.replace("ng-model=","angularModel=").replace(/ng-[a-z\-]+/g,"").replace(/ +/g," ").replace("angularModel=","ng-model="),n.sourceCode=style_html(u,{indent_size:2,indent_char:" ",max_char:78,brace_style:"expand"}))}}}).directive("hljs",function(n){return{link:function(t,i){n(function(){hljs.highlightBlock(i[0].querySelector("code"))},100)}}})})(),function(){angular.module("ocNgRepeat",[]).directive("ngRepeatOwlCarousel",function(){return{restrict:"A",scope:{carouselInit:"&"},link:function(n){if(n.$parent!=null&&n.$parent.$last)return n.carouselInit()()}}})}.call(this),function(n){"use strict";function f(n){return new RegExp("(^|\\s+)"+n+"(\\s+|$)")}function e(n,u){var f=t(n,u)?r:i;f(n,u)}var t,i,r,u;"classList"in document.documentElement?(t=function(n,t){return n.classList.contains(t)},i=function(n,t){n.classList.add(t)},r=function(n,t){n.classList.remove(t)}):(t=function(n,t){return f(t).test(n.className)},i=function(n,i){t(n,i)||(n.className=n.className+" "+i)},r=function(n,t){n.className=n.className.replace(f(t)," ")});u={hasClass:t,addClass:i,removeClass:r,toggleClass:e,has:t,add:i,remove:r,toggle:e};typeof define=="function"&&define.amd?define(u):n.classie=u}(window),function(n,t){"use strict";typeof module!="undefined"&&module.exports?module.exports=t(require("angular")):typeof define=="function"&&define.amd?define(["angular"],t):t(n.angular)}(window,function(n){"use strict";n.module("angucomplete-alt",[]).directive("angucompleteAlt",["$q","$parse","$http","$sce","$timeout","$templateCache","$interpolate",function(n,t,i,r,u,f,e){function tt(t,f,e,l){function ii(n,i){n&&(typeof n=="object"?(t.searchStr=vt(n),ht({originalObject:n})):typeof n=="string"&&n.length>0?t.searchStr=n:console&&console.error&&console.error("Tried to set "+(!i?"":"initial")+" value of angucomplete to",n,"which is an invalid value"),ut(!0))}function ri(n){rt=null;t.hideResults(n);document.body.removeEventListener("click",ri)}function ui(n){return n.which?n.which:n.keyCode}function ht(n){typeof t.selectedObject=="function"?t.selectedObject(n,t.selectedObjectData):t.selectedObject=n;n?ut(!0):ut(!1)}function wi(n){return function(i){return t[n]?t[n](i):i}}function bi(n){ht({originalObject:n});t.clearSelected&&(t.searchStr=null);et()}function vt(n){return t.titleField.split(",").map(function(t){return st(n,t)}).join(" ")}function st(n,t){var u,i,r;if(t)for(u=t.split("."),i=n,r=0;r<u.length;r++)i=i[u[r]];else i=n;return i}function fi(n,i){var e,u,f;if(f=new RegExp(i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"i"),n)return n.match&&n.replace||(n=n.toString()),u=n.match(f),e=u?n.replace(f,'<span class="'+t.matchClass+'">'+u[0]+"<\/span>"):n,r.trustAsHtml(e)}function ut(n){t.notEmpty=n;at=t.searchStr;t.fieldRequired&&l&&t.inputName&&l[t.inputName].$setValidity(pt,n)}function ki(n){var i=ui(n);if(i!==v&&i!==a)if(i===s||i===c)n.preventDefault();else if(i===o)n.preventDefault(),!t.showDropdown&&t.searchStr&&t.searchStr.length>=it&&(vi(),t.searching=!0,yi(t.searchStr));else if(i===h)et(),t.$apply(function(){ft.val(t.searchStr)});else{if(it===0&&!t.searchStr)return;t.searchStr&&t.searchStr!==""?t.searchStr.length>=it&&(vi(),lt&&u.cancel(lt),t.searching=!0,lt=u(function(){yi(t.searchStr)},t.pause)):t.showDropdown=!1;at&&at!==t.searchStr&&!t.clearSelected&&t.$apply(function(){ht()})}}function di(n){!t.overrideSuggestions||t.selectedObject&&t.selectedObject.originalObject===t.searchStr||(n&&n.preventDefault(),u.cancel(lt),ct(),bi(t.searchStr))}function gi(n){var t=getComputedStyle(n);return n.offsetHeight+parseInt(t.marginTop,10)+parseInt(t.marginBottom,10)}function nr(){return tt.getBoundingClientRect().top+parseInt(getComputedStyle(tt).maxHeight,10)}function ei(){return f[0].querySelectorAll(".angucomplete-row")[t.currentIndex]}function tr(){return ei().getBoundingClientRect().top-(tt.getBoundingClientRect().top+parseInt(getComputedStyle(tt).paddingTop,10))}function oi(n){tt.scrollTop=tt.scrollTop+n}function si(){var n=t.results[t.currentIndex];t.matchClass?ft.val(vt(n.originalObject)):ft.val(n.title)}function ir(n){var i=ui(n),r=null,u=null;i===c&&t.results?(t.currentIndex>=0&&t.currentIndex<t.results.length?(n.preventDefault(),t.selectResult(t.results[t.currentIndex])):(di(n),et()),t.$apply()):i===o&&t.results?(n.preventDefault(),t.currentIndex+1<t.results.length&&t.showDropdown&&(t.$apply(function(){t.currentIndex++;si()}),bt&&(r=ei(),nr()<r.getBoundingClientRect().bottom&&oi(gi(r))))):i===s&&t.results?(n.preventDefault(),t.currentIndex>=1?(t.$apply(function(){t.currentIndex--;si()}),bt&&(u=tr(),u<0&&oi(u-1))):t.currentIndex===0&&t.$apply(function(){t.currentIndex=-1;ft.val(t.searchStr)})):i===y?t.results&&t.results.length>0&&t.showDropdown&&(t.currentIndex===-1&&t.overrideSuggestions||(t.currentIndex===-1&&(t.currentIndex=0),t.selectResult(t.results[t.currentIndex]),t.$digest())):i===h&&n.preventDefault()}function hi(n){return function(i,r,u,f){r||u||f||!i.data||(i=i.data);t.searching=!1;kt(st(dt(i),t.remoteUrlDataField),n)}}function ci(n,i,r,u){(t.searching=wt,i||r||u||(i=n.status),i!==0&&i!==-1)&&(t.remoteUrlErrorCallback?t.remoteUrlErrorCallback(n,i,r,u):console&&console.error&&console.error("http error"))}function ct(){ot&&ot.resolve()}function li(r){var u={},f=t.remoteUrl+encodeURIComponent(r);t.remoteUrlRequestFormatter&&(u={params:t.remoteUrlRequestFormatter(r)},f=t.remoteUrl);!t.remoteUrlRequestWithCredentials||(u.withCredentials=!0);ct();ot=n.defer();u.timeout=ot.promise;wt=!0;i.get(f,u).success(hi(r)).error(ci).finally(function(){wt=!1})}function ai(i){ct();ot=n.defer();t.remoteApiHandler(i,ot.promise).then(hi(i)).catch(ci)}function et(){t.showDropdown=!1;t.results=[];tt&&(tt.scrollTop=0)}function vi(){t.showDropdown=ni;t.currentIndex=t.focusFirst?0:-1;t.results=[]}function rr(n){var i,r,u,e,o=t.searchFields.split(","),f=[];for(typeof t.parseInput()!="undefined"&&(n=t.parseInput()(n)),i=0;i<t.localData.length;i++){for(r=!1,u=0;u<o.length;u++)e=st(t.localData[i],o[u])||"",r=r||e.toString().toLowerCase().indexOf(n.toString().toLowerCase())>=0;r&&(f[f.length]=t.localData[i])}return f}function ur(n,i,r){if(!r)return!1;for(var u in i)if(i[u].toLowerCase()===r.toLowerCase())return t.selectResult(n),!0;return!1}function yi(n){!n||n.length<it||(t.localData?t.$apply(function(){var i;i=typeof t.localSearch()!="undefined"?t.localSearch()(n,t.localData):rr(n);t.searching=!1;kt(i,n)}):t.remoteApiHandler?ai(n):li(n))}function kt(n,i){var r,u,f,e,o,s;if(n&&n.length>0)for(t.results=[],r=0;r<n.length;r++)t.titleField&&t.titleField!==""&&(e=o=vt(n[r])),u="",t.descriptionField&&(u=s=st(n[r],t.descriptionField)),f="",t.imageField&&(f=st(n[r],t.imageField)),t.matchClass&&(o=fi(e,i),s=fi(u,i)),t.results[t.results.length]={title:o,description:s,image:f,originalObject:n[r]};else t.results=[];t.showDropdown=t.autoMatch&&t.results.length===1&&ur(t.results[0],{title:e,desc:u||""},t.searchStr)?!1:t.results.length!==0||ti?!0:!1}function pi(){t.localData?(t.searching=!1,kt(t.localData,"")):t.remoteApiHandler?(t.searching=!0,ai("")):(t.searching=!0,li(""))}var ft=f.find("input"),it=p,lt=null,yt,pt=d,dt,at=null,ot=null,wt=!1,tt=f[0].querySelector(".angucomplete-dropdown"),bt=!1,rt=null,gt,ni,ti;f.on("mousedown",function(n){n.target.id?(rt=n.target.id,rt===t.id+"_dropdown"&&document.body.addEventListener("click",ri)):rt=n.target.className});t.currentIndex=t.focusFirst?0:null;t.searching=!1;gt=t.$watch("initialValue",function(n){n&&(gt(),ii(n,!0))});t.$watch("fieldRequired",function(n,i){n!==i&&(n?at&&t.currentIndex!==-1?ut(!0):ut(!1):l[t.inputName].$setValidity(pt,!0))});t.$on("angucomplete-alt:clearInput",function(n,i){i&&i!==t.id||(t.searchStr=null,ht(),ut(!1),et())});t.$on("angucomplete-alt:changeInput",function(n,i,r){!i||i!==t.id||(ii(r),t.$apply())});t.onFocusHandler=function(){t.focusIn&&t.focusIn();it!==0||t.searchStr&&t.searchStr.length!==0||(t.currentIndex=t.focusFirst?0:t.currentIndex,t.showDropdown=!0,pi())};t.hideResults=function(){rt&&(rt===t.id+"_dropdown"||rt.indexOf("angucomplete")>=0)?rt=null:(yt=u(function(){et();t.$apply(function(){t.searchStr&&t.searchStr.length>0&&ft.val(t.searchStr)})},k),ct(),t.focusOut&&t.focusOut())};t.resetHideResults=function(){yt&&u.cancel(yt)};t.hoverRow=function(n){t.currentIndex=n};t.selectResult=function(n){t.matchClass&&(n.title=vt(n.originalObject),n.description=st(n.originalObject,t.descriptionField));t.searchStr=t.clearSelected?null:n.title;ht(n);et()};t.inputChangeHandler=function(n){return n.length<it?(ct(),et()):n.length===0&&it===0&&pi(),t.inputChanged&&(n=t.inputChanged(n)),n};t.fieldRequiredClass&&t.fieldRequiredClass!==""&&(pt=t.fieldRequiredClass);t.minlength&&t.minlength!==""&&(it=parseInt(t.minlength,10));t.pause||(t.pause=b);t.clearSelected||(t.clearSelected=!1);t.overrideSuggestions||(t.overrideSuggestions=!1);t.fieldRequired&&l&&(t.initialValue?ut(!0):ut(!1));t.inputType=e.type?e.type:"text";t.textSearching=e.textSearching?e.textSearching:g;t.textNoResults=e.textNoResults?e.textNoResults:nt;ni=t.textSearching==="false"?!1:!0;ti=t.textNoResults==="false"?!1:!0;t.maxlength=e.maxlength?e.maxlength:w;ft.on("keydown",ir);ft.on("keyup compositionend",ki);dt=wi("remoteUrlResponseFormatter");u(function(){var n=getComputedStyle(tt);bt=n.maxHeight&&n.overflowY==="auto"})}var o=40,a=39,s=38,v=37,h=27,c=13,y=9,p=3,w=524288,b=500,k=200,d="autocomplete-required",g="Searching...",nt="No results found",l="/angucomplete-alt/index.html";return f.put(l,'<div class="angucomplete-holder" ng-class="{\'angucomplete-dropdown-visible\': showDropdown}">  <input id="{{id}}_value" name="{{inputName}}" tabindex="{{fieldTabindex}}" ng-class="{\'angucomplete-input-not-empty\': notEmpty}" ng-model="searchStr" ng-disabled="disableInput" type="{{inputType}}" placeholder="{{placeholder}}" maxlength="{{maxlength}}" ng-focus="onFocusHandler()" class="{{inputClass}}" ng-focus="resetHideResults()" ng-blur="hideResults($event)" autocapitalize="off" autocorrect="off" autocomplete="off" ng-change="inputChangeHandler(searchStr)"/>  <div id="{{id}}_dropdown" class="angucomplete-dropdown" ng-show="showDropdown">    <div class="angucomplete-searching" ng-show="searching" ng-bind="textSearching"><\/div>    <div class="angucomplete-searching" ng-show="!searching && (!results || results.length == 0)" ng-bind="textNoResults"><\/div>    <div class="angucomplete-row" ng-repeat="result in results" ng-click="selectResult(result)" ng-mouseenter="hoverRow($index)" ng-class="{\'angucomplete-selected-row\': $index == currentIndex}">      <div ng-if="imageField" class="angucomplete-image-holder">        <img ng-if="result.image && result.image != \'\'" ng-src="{{result.image}}" class="angucomplete-image"/>        <div ng-if="!result.image && result.image != \'\'" class="angucomplete-image-default"><\/div>      <\/div>      <div class="angucomplete-title" ng-if="matchClass" ng-bind-html="result.title"><\/div>      <div class="angucomplete-title" ng-if="!matchClass">{{ result.title }}<\/div>      <div ng-if="matchClass && result.description && result.description != \'\'" class="angucomplete-description" ng-bind-html="result.description"><\/div>      <div ng-if="!matchClass && result.description && result.description != \'\'" class="angucomplete-description">{{result.description}}<\/div>    <\/div>  <\/div><\/div>'),{restrict:"EA",require:"^?form",scope:{selectedObject:"=",selectedObjectData:"=",disableInput:"=",initialValue:"=",localData:"=",localSearch:"&",remoteUrlRequestFormatter:"=",remoteUrlRequestWithCredentials:"@",remoteUrlResponseFormatter:"=",remoteUrlErrorCallback:"=",remoteApiHandler:"=",id:"@",type:"@",placeholder:"@",textSearching:"@",textNoResults:"@",remoteUrl:"@",remoteUrlDataField:"@",titleField:"@",descriptionField:"@",imageField:"@",inputClass:"@",pause:"@",searchFields:"@",minlength:"@",matchClass:"@",clearSelected:"@",overrideSuggestions:"@",fieldRequired:"=",fieldRequiredClass:"@",inputChanged:"=",autoMatch:"@",focusOut:"&",focusIn:"&",fieldTabindex:"@",inputName:"@",focusFirst:"@",parseInput:"&"},templateUrl:function(n,t){return t.templateUrl||l},compile:function(n){var t=e.startSymbol(),i=e.endSymbol(),r;return t==="{{"&&i==="}}"||(r=n.html().replace(/\{\{/g,t).replace(/\}\}/g,i),n.html(r)),tt}}}])});angular.module("ngScrollbar",[]).directive("ngScrollbar",["$parse","$window",function(n,t){return{restrict:"A",replace:!0,transclude:!0,scope:{showYScrollbar:"=?isBarShown"},link:function(n,i,r){var c,h,y,s,b,k,p,d,g,nt,w,tt={bottom:r.hasOwnProperty("bottom")},o=angular.element(t),ht=!!o[0].addEventListener,ct=!!o[0].removeEventListener,u={top:0},e={top:0},lt=function(){p={position:"relative",overflow:"hidden","max-width":"100%",height:"100%"};e.height&&(p.height=e.height+"px");d={position:"absolute",height:u.height+"px",top:u.top+"px"};g={position:"relative","line-height":u.height+"px"};nt={position:"relative",top:e.top+"px",overflow:"hidden"}},l=function(){s.css("top",u.top+"px");var n=u.top/e.height;e.top=-Math.round(e.scrollHeight*n);h.css("top",e.top+"px")},at=function(n){var t=n.hasOwnProperty("offsetY")?n.offsetY:n.layerY,i=Math.max(0,Math.min(parseInt(u.trackHeight,10)-parseInt(u.height,10),t));u.top=i;l();n.stopPropagation()},a=function(n){var o=n,t=o.detail,i=o.wheelDelta,r=225,s=r-1;return t=t?i&&(f=i/t)?t/f:-t/1.35:i/120,t=1>t?-1>t?(-Math.pow(t,2)-s)/r:t:(Math.pow(t,2)+s)/r,n.delta=Math.min(Math.max(t/2,-1),1),n.delta=n.delta*40,u.top=Math.max(0,Math.min(parseInt(e.height,10)-parseInt(u.height,10),parseInt(u.top,10)-n.delta)),l(),n.preventDefault?void n.preventDefault():!1},v=0,it=function(n,t,i){u.top=Math.max(0,Math.min(parseInt(u.trackHeight,10)-parseInt(u.height,10),i));n.stopPropagation()},rt=function(n){var t=n.pageY-s[0].scrollTop-v;it(n,0,t);l()},ut=function(n){o.off("mousemove",rt);o.off("mouseup",ut);n.stopPropagation()},ft=function(n){var t=n.originalEvent.changedTouches[0].pageY-s[0].scrollTop-v;it(n,0,t);l()},et=function(n){o.off("touchmove",ft);o.off("touchend",et);n.stopPropagation()},vt=function(n){var t=void 0!==o[0].onmousewheel?"mousewheel":"DOMMouseScroll";ht?n.addEventListener(t,a,!1):n.attachEvent("onmousewheel",a)},yt=function(n){var t=void 0!==o[0].onmousewheel?"mousewheel":"DOMMouseScroll";ct?n.removeEventListener(t,a,!1):n.detachEvent("onmousewheel",a)},ot=function(t){t=tt.bottom||t;c=angular.element(i.children()[0]);h=angular.element(c.children()[0]);y=angular.element(c.children()[1]);s=angular.element(angular.element(y.children()[0]).children()[0]);b=angular.element(s.children()[0]);k=angular.element(angular.element(y.children()[0]).children()[1]);e.height=i[0].offsetHeight;e.scrollHeight=h[0].scrollHeight;e.height<e.scrollHeight?(n.showYScrollbar=!0,n.$emit("scrollbar.show"),u.height=Math.round(e.height/e.scrollHeight*e.height),u.trackHeight=e.height,lt(),i.css({overflow:"hidden"}),c.css(p),h.css(nt),s.css(d),b.css(g),k.bind("click",at),vt(h[0]),s.on("mousedown",function(n){v=n.pageY-s[0].offsetTop;o.on("mouseup",ut);o.on("mousemove",rt);n.preventDefault()}),s.on("touchstart",function(n){v=n.originalEvent.changedTouches[0].pageY-s[0].offsetTop;o.on("touchend",et);o.on("touchmove",ft);n.preventDefault()}),t?(tt.bottom=!1,u.top=parseInt(e.height,10)-parseInt(u.height,10)):u.top=Math.max(0,Math.min(parseInt(e.height,10)-parseInt(u.height,10),parseInt(u.top,10))),l()):(n.showYScrollbar=!1,n.$emit("scrollbar.hide"),s.off("mousedown"),yt(h[0]),h.attr("style","position:relative;top:0"),c.css({height:"100%"}))},st=function(t,i){null!=w&&clearTimeout(w);var r=!!i&&!!i.rollToBottom;w=setTimeout(function(){e.height=null;ot(r);n.$$phase||n.$digest();n.$parent.$$phase||n.$parent.$digest()},72)};ot();r.rebuildOn&&r.rebuildOn.split(" ").forEach(function(t){n.$on(t,st)});r.hasOwnProperty("rebuildOnResize")&&o.on("resize",st)},template:'<div><div class="ngsb-wrap"><div class="ngsb-container" ng-transclude><\/div><div class="ngsb-scrollbar" style="position: absolute; display: block;" ng-show="showYScrollbar"><div class="ngsb-thumb-container"><div class="ngsb-thumb-pos" oncontextmenu="return false;"><div class="ngsb-thumb" ><\/div><\/div><div class="ngsb-track"><\/div><\/div><\/div><\/div><\/div>'}}]),function(n,t){"use strict";function i(t,i){var r=n.createElement("script");r.src=t;r.onload=i;r.onerror=function(){throw Error('Error loading "'+t+'"');};n.getElementsByTagName("head")[0].appendChild(r)}angular.module("googlechart",[]).constant("googleChartApiConfig",{version:"1",optionalSettings:{packages:["corechart"]}}).factory("googleChartApiProxy",["$rootScope","$q","googleChartApiConfig",function(n,r,u){var f=r.defer(),e=function(){var i={callback:function(){var t=u.optionalSettings.callback;n.$apply(function(){f.resolve()});angular.isFunction(t)&&t.call(this)}};i=angular.extend({},u.optionalSettings,i);t.google.load("visualization",u.version,i)};return i("//www.google.com/jsapi",e),function(n,t){var i=Array.prototype.slice.call(arguments,2);return function(){f.promise.then(function(){n.apply(t,i.concat(Array.prototype.slice.call(arguments)))})}}}]).directive("googleChart",["$timeout","$window","$rootScope","googleChartApiProxy",function(n,t,i,r){return{restrict:"A",scope:{chart:"=chart",onReady:"&",select:"&"},link:function(t,u){function e(n,i,r){var e,o,f,u;if(typeof t.chart.formatters[n]!="undefined"){if(t.formatters[n]==null)if(t.formatters[n]=[],n==="color")for(e=0;e<t.chart.formatters[n].length;e++){for(o=new i,u=0;u<t.chart.formatters[n][e].formats.length;u++)f=t.chart.formatters[n][e].formats[u],typeof f.fromBgColor!="undefined"&&typeof f.toBgColor!="undefined"?o.addGradientRange(f.from,f.to,f.color,f.fromBgColor,f.toBgColor):o.addRange(f.from,f.to,f.color,f.bgcolor);t.formatters[n].push(o)}else for(u=0;u<t.chart.formatters[n].length;u++)t.formatters[n].push(new i(t.chart.formatters[n][u]));for(u=0;u<t.formatters[n].length;u++)t.chart.formatters[n][u].columnNum<r.getNumberOfColumns()&&t.formatters[n][u].format(r,t.chart.formatters[n][u].columnNum);(n==="arrow"||n==="bar"||n==="color")&&(t.chart.options.allowHtml=!0)}}function f(){f.triggered||t.chart==undefined||(f.triggered=!0,n(function(){var i,r;f.triggered=!1;typeof t.formatters=="undefined"&&(t.formatters={});i=t.chart.data instanceof google.visualization.DataTable?t.chart.data:new google.visualization.DataTable(t.chart.data,.5);typeof t.chart.formatters!="undefined"&&(e("number",google.visualization.NumberFormat,i),e("arrow",google.visualization.ArrowFormat,i),e("date",google.visualization.DateFormat,i),e("bar",google.visualization.BarFormat,i),e("color",google.visualization.ColorFormat,i));r={chartType:t.chart.type,dataTable:i,view:t.chart.view,options:t.chart.options,containerId:u[0]};t.chartWrapper==null?(t.chartWrapper=new google.visualization.ChartWrapper(r),google.visualization.events.addListener(t.chartWrapper,"ready",function(){t.chart.displayed=!0;t.onReady()}),google.visualization.events.addListener(t.chartWrapper,"error",function(n){console.log("Chart not displayed due to error: "+n.message)}),google.visualization.events.addListener(t.chartWrapper,"select",function(){var n=t.chartWrapper.getChart().getSelection()[0];n&&t.$apply(function(){t.select({selectedItem:n})})})):(t.chartWrapper.setChartType(t.chart.type),t.chartWrapper.setDataTable(i),t.chartWrapper.setView(t.chart.view),t.chartWrapper.setOptions(t.chart.options));n(function(){t.chartWrapper.draw()})},0,!0))}t.$watch("chart",function(){f()},!0);i.$on("resizeMsg",function(){n(function(){t.chartWrapper.draw()})});f=r(f,this)}}}]).run(["$rootScope","$window",function(n,t){angular.element(t).bind("resize",function(){n.$emit("resizeMsg")})}])}(document,window),function(){function e(n){var t=function(n,i){var r=s({},t,i||{});return h(n,r)};return s(t,{language:"en",delimiter:", ",spacer:" ",conjunction:"",serialComma:!0,units:["y","mo","w","d","h","m","s"],languages:{},round:!1,unitMeasures:{y:315576e5,mo:26298e5,w:6048e5,d:864e5,h:36e5,m:6e4,s:1e3,ms:1}},n)}function h(n,t){var i,h,r,s,e,l,c,a,v,y,p,u;if(n=Math.abs(n),s=t.languages[t.language]||f[t.language],!s)throw new Error("No language "+s+".");for(e=[],i=0,h=t.units.length;i<h;i++)l=t.units[i],c=t.unitMeasures[l],a=i+1===h?n/c:Math.floor(n/c),e.push({unitCount:a,unitName:l}),n-=a*c;for(v=0,i=0;i<e.length;i++)if(e[i].unitCount){v=i;break}if(t.round)for(i=e.length-1;i>=0;i--){if(r=e[i],r.unitCount=Math.round(r.unitCount),i===0)break;p=e[i-1];y=t.unitMeasures[p.unitName]/t.unitMeasures[r.unitName];(r.unitCount%y==0||t.largest&&t.largest-1<i-v)&&(p.unitCount+=r.unitCount/y,r.unitCount=0)}for(u=[],i=0,e.length;i<h;i++)if(r=e[i],r.unitCount&&u.push(o(r.unitCount,r.unitName,s,t)),u.length===t.largest)break;if(u.length)if(t.conjunction&&u.length!==1){if(u.length===2)return u.join(t.conjunction);if(u.length>2)return u.slice(0,-1).join(t.delimiter)+(t.serialComma?",":"")+t.conjunction+u.slice(-1)}else return u.join(t.delimiter);else return o(0,t.units[t.units.length-1],s,t)}function o(n,t,i,r){var f,e,u,o;return f=r.decimal===void 0?i.decimal:r.decimal,e=n.toString().replace(".",f),u=i[t],o=typeof u=="function"?u(n):u,e+r.spacer+o}function s(n){for(var t,r,i=1;i<arguments.length;i++){t=arguments[i];for(r in t)t.hasOwnProperty(r)&&(n[r]=t[r])}return n}function t(n){return n===1?0:Math.floor(n)!==n?1:n%10>=2&&n%10<=4&&n%100<10?2:3}function i(n){return n===1?0:Math.floor(n)!==n?1:n%10>=2&&n%10<=4&&!(n%100>10&&n%100<20)?2:3}function n(n){return Math.floor(n)!==n?2:n%100>=5&&n%100<=20||n%10>=5&&n%10<=9||n%10==0?0:n%10==1?1:n>1?2:0}function r(n){return n===1||n%10==1&&n%100>20?0:Math.floor(n)!==n||n%10>=2&&n%100>20||n%10>=2&&n%100<10?1:2}var f={ar:{y:function(n){return n===1?"سنة":"سنوات"},mo:function(n){return n===1?"شهر":"أشهر"},w:function(n){return n===1?"أسبوع":"أسابيع"},d:function(n){return n===1?"يوم":"أيام"},h:function(n){return n===1?"ساعة":"ساعات"},m:function(n){return n===1?"دقيقة":"دقائق"},s:function(n){return n===1?"ثانية":"ثواني"},ms:function(n){return n===1?"جزء من الثانية":"أجزاء من الثانية"},decimal:","},ca:{y:function(n){return"any"+(n!==1?"s":"")},mo:function(n){return"mes"+(n!==1?"os":"")},w:function(n){return"setman"+(n!==1?"es":"a")},d:function(n){return"di"+(n!==1?"es":"a")},h:function(n){return"hor"+(n!==1?"es":"a")},m:function(n){return"minut"+(n!==1?"s":"")},s:function(n){return"segon"+(n!==1?"s":"")},ms:function(n){return"milisegon"+(n!==1?"s":"")},decimal:","},cs:{y:function(n){return["rok","roku","roky","let"][t(n)]},mo:function(n){return["měsíc","měsíce","měsíce","měsíců"][t(n)]},w:function(n){return["týden","týdne","týdny","týdnů"][t(n)]},d:function(n){return["den","dne","dny","dní"][t(n)]},h:function(n){return["hodina","hodiny","hodiny","hodin"][t(n)]},m:function(n){return["minuta","minuty","minuty","minut"][t(n)]},s:function(n){return["sekunda","sekundy","sekundy","sekund"][t(n)]},ms:function(n){return["milisekunda","milisekundy","milisekundy","milisekund"][t(n)]},decimal:","},da:{y:"år",mo:function(n){return"måned"+(n!==1?"er":"")},w:function(n){return"uge"+(n!==1?"r":"")},d:function(n){return"dag"+(n!==1?"e":"")},h:function(n){return"time"+(n!==1?"r":"")},m:function(n){return"minut"+(n!==1?"ter":"")},s:function(n){return"sekund"+(n!==1?"er":"")},ms:function(n){return"millisekund"+(n!==1?"er":"")},decimal:","},de:{y:function(n){return"Jahr"+(n!==1?"e":"")},mo:function(n){return"Monat"+(n!==1?"e":"")},w:function(n){return"Woche"+(n!==1?"n":"")},d:function(n){return"Tag"+(n!==1?"e":"")},h:function(n){return"Stunde"+(n!==1?"n":"")},m:function(n){return"Minute"+(n!==1?"n":"")},s:function(n){return"Sekunde"+(n!==1?"n":"")},ms:function(n){return"Millisekunde"+(n!==1?"n":"")},decimal:","},en:{y:function(n){return"year"+(n!==1?"s":"")},mo:function(n){return"month"+(n!==1?"s":"")},w:function(n){return"week"+(n!==1?"s":"")},d:function(n){return"day"+(n!==1?"s":"")},h:function(n){return"hour"+(n!==1?"s":"")},m:function(n){return"minute"+(n!==1?"s":"")},s:function(n){return"second"+(n!==1?"s":"")},ms:function(n){return"millisecond"+(n!==1?"s":"")},decimal:"."},es:{y:function(n){return"año"+(n!==1?"s":"")},mo:function(n){return"mes"+(n!==1?"es":"")},w:function(n){return"semana"+(n!==1?"s":"")},d:function(n){return"día"+(n!==1?"s":"")},h:function(n){return"hora"+(n!==1?"s":"")},m:function(n){return"minuto"+(n!==1?"s":"")},s:function(n){return"segundo"+(n!==1?"s":"")},ms:function(n){return"milisegundo"+(n!==1?"s":"")},decimal:","},fi:{y:function(n){return n===1?"vuosi":"vuotta"},mo:function(n){return n===1?"kuukausi":"kuukautta"},w:function(n){return"viikko"+(n!==1?"a":"")},d:function(n){return"päivä"+(n!==1?"ä":"")},h:function(n){return"tunti"+(n!==1?"a":"")},m:function(n){return"minuutti"+(n!==1?"a":"")},s:function(n){return"sekunti"+(n!==1?"a":"")},ms:function(n){return"millisekunti"+(n!==1?"a":"")},decimal:","},fr:{y:function(n){return"an"+(n!==1?"s":"")},mo:"mois",w:function(n){return"semaine"+(n!==1?"s":"")},d:function(n){return"jour"+(n!==1?"s":"")},h:function(n){return"heure"+(n!==1?"s":"")},m:function(n){return"minute"+(n!==1?"s":"")},s:function(n){return"seconde"+(n!==1?"s":"")},ms:function(n){return"milliseconde"+(n!==1?"s":"")},decimal:","},gr:{y:function(n){return n===1?"χρόνος":"χρόνια"},mo:function(n){return n===1?"μήνας":"μήνες"},w:function(n){return n===1?"εβδομάδα":"εβδομάδες"},d:function(n){return n===1?"μέρα":"μέρες"},h:function(n){return n===1?"ώρα":"ώρες"},m:function(n){return n===1?"λεπτό":"λεπτά"},s:function(n){return n===1?"δευτερόλεπτο":"δευτερόλεπτα"},ms:function(n){return n===1?"χιλιοστό του δευτερολέπτου":"χιλιοστά του δευτερολέπτου"},decimal:","},hu:{y:"év",mo:"hónap",w:"hét",d:"nap",h:"óra",m:"perc",s:"másodperc",ms:"ezredmásodperc",decimal:","},id:{y:"tahun",mo:"bulan",w:"minggu",d:"hari",h:"jam",m:"menit",s:"detik",ms:"milidetik",decimal:"."},is:{y:"ár",mo:function(n){return"mánuð"+(n!==1?"ir":"ur")},w:function(n){return"vik"+(n!==1?"ur":"a")},d:function(n){return"dag"+(n!==1?"ar":"ur")},h:function(n){return"klukkutím"+(n!==1?"ar":"i")},m:function(n){return"mínút"+(n!==1?"ur":"a")},s:function(n){return"sekúnd"+(n!==1?"ur":"a")},ms:function(n){return"millisekúnd"+(n!==1?"ur":"a")},decimal:"."},it:{y:function(n){return"ann"+(n!==1?"i":"o")},mo:function(n){return"mes"+(n!==1?"i":"e")},w:function(n){return"settiman"+(n!==1?"e":"a")},d:function(n){return"giorn"+(n!==1?"i":"o")},h:function(n){return"or"+(n!==1?"e":"a")},m:function(n){return"minut"+(n!==1?"i":"o")},s:function(n){return"second"+(n!==1?"i":"o")},ms:function(n){return"millisecond"+(n!==1?"i":"o")},decimal:","},ja:{y:"年",mo:"月",w:"週",d:"日",h:"時間",m:"分",s:"秒",ms:"ミリ秒",decimal:"."},ko:{y:"년",mo:"개월",w:"주일",d:"일",h:"시간",m:"분",s:"초",ms:"밀리 초",decimal:"."},lt:{y:function(n){return n%10==0||n%100>=10&&n%100<=20?"metų":"metai"},mo:function(n){return["mėnuo","mėnesiai","mėnesių"][r(n)]},w:function(n){return["savaitė","savaitės","savaičių"][r(n)]},d:function(n){return["diena","dienos","dienų"][r(n)]},h:function(n){return["valanda","valandos","valandų"][r(n)]},m:function(n){return["minutė","minutės","minučių"][r(n)]},s:function(n){return["sekundė","sekundės","sekundžių"][r(n)]},ms:function(n){return["milisekundė","milisekundės","milisekundžių"][r(n)]},decimal:","},ms:{y:"tahun",mo:"bulan",w:"minggu",d:"hari",h:"jam",m:"minit",s:"saat",ms:"milisaat",decimal:"."},nl:{y:"jaar",mo:function(n){return n===1?"maand":"maanden"},w:function(n){return n===1?"week":"weken"},d:function(n){return n===1?"dag":"dagen"},h:"uur",m:function(n){return n===1?"minuut":"minuten"},s:function(n){return n===1?"seconde":"seconden"},ms:function(n){return n===1?"milliseconde":"milliseconden"},decimal:","},no:{y:"år",mo:function(n){return"måned"+(n!==1?"er":"")},w:function(n){return"uke"+(n!==1?"r":"")},d:function(n){return"dag"+(n!==1?"er":"")},h:function(n){return"time"+(n!==1?"r":"")},m:function(n){return"minutt"+(n!==1?"er":"")},s:function(n){return"sekund"+(n!==1?"er":"")},ms:function(n){return"millisekund"+(n!==1?"er":"")},decimal:","},pl:{y:function(n){return["rok","roku","lata","lat"][i(n)]},mo:function(n){return["miesiąc","miesiąca","miesiące","miesięcy"][i(n)]},w:function(n){return["tydzień","tygodnia","tygodnie","tygodni"][i(n)]},d:function(n){return["dzień","dnia","dni","dni"][i(n)]},h:function(n){return["godzina","godziny","godziny","godzin"][i(n)]},m:function(n){return["minuta","minuty","minuty","minut"][i(n)]},s:function(n){return["sekunda","sekundy","sekundy","sekund"][i(n)]},ms:function(n){return["milisekunda","milisekundy","milisekundy","milisekund"][i(n)]},decimal:","},pt:{y:function(n){return"ano"+(n!==1?"s":"")},mo:function(n){return n!==1?"meses":"mês"},w:function(n){return"semana"+(n!==1?"s":"")},d:function(n){return"dia"+(n!==1?"s":"")},h:function(n){return"hora"+(n!==1?"s":"")},m:function(n){return"minuto"+(n!==1?"s":"")},s:function(n){return"segundo"+(n!==1?"s":"")},ms:function(n){return"milissegundo"+(n!==1?"s":"")},decimal:","},ru:{y:function(t){return["лет","год","года"][n(t)]},mo:function(t){return["месяцев","месяц","месяца"][n(t)]},w:function(t){return["недель","неделя","недели"][n(t)]},d:function(t){return["дней","день","дня"][n(t)]},h:function(t){return["часов","час","часа"][n(t)]},m:function(t){return["минут","минута","минуты"][n(t)]},s:function(t){return["секунд","секунда","секунды"][n(t)]},ms:function(t){return["миллисекунд","миллисекунда","миллисекунды"][n(t)]},decimal:","},uk:{y:function(t){return["років","рік","роки"][n(t)]},mo:function(t){return["місяців","місяць","місяці"][n(t)]},w:function(t){return["неділь","неділя","неділі"][n(t)]},d:function(t){return["днів","день","дні"][n(t)]},h:function(t){return["годин","година","години"][n(t)]},m:function(t){return["хвилин","хвилина","хвилини"][n(t)]},s:function(t){return["секунд","секунда","секунди"][n(t)]},ms:function(t){return["мілісекунд","мілісекунда","мілісекунди"][n(t)]},decimal:","},sv:{y:"år",mo:function(n){return"månad"+(n!==1?"er":"")},w:function(n){return"veck"+(n!==1?"or":"a")},d:function(n){return"dag"+(n!==1?"ar":"")},h:function(n){return"timm"+(n!==1?"ar":"e")},m:function(n){return"minut"+(n!==1?"er":"")},s:function(n){return"sekund"+(n!==1?"er":"")},ms:function(n){return"millisekund"+(n!==1?"er":"")},decimal:","},tr:{y:"yıl",mo:"ay",w:"hafta",d:"gün",h:"saat",m:"dakika",s:"saniye",ms:"milisaniye",decimal:","},vi:{y:"năm",mo:"tháng",w:"tuần",d:"ngày",h:"giờ",m:"phút",s:"giây",ms:"mili giây",decimal:","},zh_CN:{y:"年",mo:"个月",w:"周",d:"天",h:"小时",m:"分钟",s:"秒",ms:"毫秒",decimal:"."},zh_TW:{y:"年",mo:"個月",w:"周",d:"天",h:"小時",m:"分鐘",s:"秒",ms:"毫秒",decimal:"."}},u=e({});u.getSupportedLanguages=function(){var t=[],n;for(n in f)f.hasOwnProperty(n)&&t.push(n);return t};u.humanizer=e;typeof define=="function"&&define.amd?define(function(){return u}):typeof module!="undefined"&&module.exports?module.exports=u:this.humanizeDuration=u}();timerModule=angular.module("timer",[]).directive("timer",["$compile",function(n){return{restrict:"EA",replace:!1,scope:{interval:"=interval",startTimeAttr:"=startTime",endTimeAttr:"=endTime",countdownattr:"=countdown",finishCallback:"&finishCallback",autoStart:"&autoStart",language:"@?",fallback:"@?",maxTimeUnit:"=",seconds:"=?",minutes:"=?",hours:"=?",days:"=?",months:"=?",years:"=?",secondsS:"=?",minutesS:"=?",hoursS:"=?",daysS:"=?",monthsS:"=?",yearsS:"=?"},controller:["$scope","$element","$attrs","$timeout","I18nService","$interpolate","progressBarService",function(t,i,r,u,f,e,o){function s(){t.timeoutId&&clearTimeout(t.timeoutId)}function l(){var n={};r.startTime!==undefined&&(t.millis=moment().diff(moment(t.startTimeAttr)));n=c.getTimeUnits(t.millis);t.maxTimeUnit&&t.maxTimeUnit!=="day"?t.maxTimeUnit==="second"?(t.seconds=Math.floor(t.millis/1e3),t.minutes=0,t.hours=0,t.days=0,t.months=0,t.years=0):t.maxTimeUnit==="minute"?(t.seconds=Math.floor(t.millis/1e3%60),t.minutes=Math.floor(t.millis/6e4),t.hours=0,t.days=0,t.months=0,t.years=0):t.maxTimeUnit==="hour"?(t.seconds=Math.floor(t.millis/1e3%60),t.minutes=Math.floor(t.millis/6e4%60),t.hours=Math.floor(t.millis/36e5),t.days=0,t.months=0,t.years=0):t.maxTimeUnit==="month"?(t.seconds=Math.floor(t.millis/1e3%60),t.minutes=Math.floor(t.millis/6e4%60),t.hours=Math.floor(t.millis/36e5%24),t.days=Math.floor(t.millis/864e5%30),t.months=Math.floor(t.millis/2592e6),t.years=0):t.maxTimeUnit==="year"&&(t.seconds=Math.floor(t.millis/1e3%60),t.minutes=Math.floor(t.millis/6e4%60),t.hours=Math.floor(t.millis/36e5%24),t.days=Math.floor(t.millis/864e5%30),t.months=Math.floor(t.millis/2592e6%12),t.years=Math.floor(t.millis/31536e6)):(t.seconds=Math.floor(t.millis/1e3%60),t.minutes=Math.floor(t.millis/6e4%60),t.hours=Math.floor(t.millis/36e5%24),t.days=Math.floor(t.millis/864e5),t.months=0,t.years=0);t.secondsS=t.seconds===1?"":"s";t.minutesS=t.minutes===1?"":"s";t.hoursS=t.hours===1?"":"s";t.daysS=t.days===1?"":"s";t.monthsS=t.months===1?"":"s";t.yearsS=t.years===1?"":"s";t.secondUnit=n.seconds;t.minuteUnit=n.minutes;t.hourUnit=n.hours;t.dayUnit=n.days;t.monthUnit=n.months;t.yearUnit=n.years;t.sseconds=t.seconds<10?"0"+t.seconds:t.seconds;t.mminutes=t.minutes<10?"0"+t.minutes:t.minutes;t.hhours=t.hours<10?"0"+t.hours:t.hours;t.ddays=t.days<10?"0"+t.days:t.days;t.mmonths=t.months<10?"0"+t.months:t.months;t.yyears=t.years<10?"0"+t.years:t.years}var c,h;typeof String.prototype.trim!="function"&&(String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")});t.autoStart=r.autoStart||r.autostart;t.language=t.language||"en";t.fallback=t.fallback||"en";t.$watch("language",function(n){n!==undefined&&c.init(n,t.fallback)});c=new f;c.init(t.language,t.fallback);t.displayProgressBar=0;t.displayProgressActive="active";i.html().trim().length===0?i.append(n("<span>"+e.startSymbol()+"millis"+e.endSymbol()+"<\/span>")(t)):i.append(n(i.contents())(t));t.startTime=null;t.endTime=null;t.timeoutId=null;t.countdown=angular.isNumber(t.countdownattr)&&parseInt(t.countdownattr,10)>=0?parseInt(t.countdownattr,10):undefined;t.isRunning=!1;t.$on("timer-start",function(){t.start()});t.$on("timer-resume",function(){t.resume()});t.$on("timer-stop",function(){t.stop()});t.$on("timer-clear",function(){t.clear()});t.$on("timer-reset",function(){t.reset()});t.$on("timer-set-countdown",function(n,i){t.countdown=i});t.$watch("startTimeAttr",function(n,i){n!==i&&t.isRunning&&t.start()});t.$watch("endTimeAttr",function(n,i){n!==i&&t.isRunning&&t.start()});t.start=function(){t.startTime=t.startTimeAttr?moment(t.startTimeAttr):moment();t.endTime=t.endTimeAttr?moment(t.endTimeAttr):null;angular.isNumber(t.countdown)||(t.countdown=angular.isNumber(t.countdownattr)&&parseInt(t.countdownattr,10)>0?parseInt(t.countdownattr,10):undefined);s();h();t.isRunning=!0;t.$emit("timer-started",{timeoutId:t.timeoutId,millis:t.millis,seconds:t.seconds,minutes:t.minutes,hours:t.hours,days:t.days})};t.resume=function(){s();t.countdownattr&&(t.countdown+=1);t.startTime=moment().diff(moment(t.stoppedTime).diff(moment(t.startTime)));h();t.isRunning=!0;t.$emit("timer-started",{timeoutId:t.timeoutId,millis:t.millis,seconds:t.seconds,minutes:t.minutes,hours:t.hours,days:t.days})};t.stop=t.pause=function(){var n=t.timeoutId;t.clear();t.$emit("timer-stopped",{timeoutId:n,millis:t.millis,seconds:t.seconds,minutes:t.minutes,hours:t.hours,days:t.days})};t.clear=function(){t.stoppedTime=moment();s();t.timeoutId=null;t.isRunning=!1};t.reset=function(){t.startTime=t.startTimeAttr?moment(t.startTimeAttr):moment();t.endTime=t.endTimeAttr?moment(t.endTimeAttr):null;t.countdown=angular.isNumber(t.countdownattr)&&parseInt(t.countdownattr,10)>0?parseInt(t.countdownattr,10):undefined;s();h();t.isRunning=!1;t.clear();t.$emit("timer-reseted",{timeoutId:t.timeoutId,millis:t.millis,seconds:t.seconds,minutes:t.minutes,hours:t.hours,days:t.days})};i.bind("$destroy",function(){s();t.isRunning=!1});t.countdownattr?(t.millis=t.countdownattr*1e3,t.addCDSeconds=function(n){t.countdown+=n;t.isRunning||t.start()},t.$on("timer-add-cd-seconds",function(n,i){t.addCDSeconds(i)}),t.$on("timer-set-countdown-seconds",function(n,i){t.isRunning||t.clear();t.countdown=i;t.millis=i*1e3;l()})):t.millis=0;l();h=function h(){var n=null,i;if(t.millis=moment().diff(t.startTime),i=t.millis%1e3,t.endTimeAttr&&(n=t.endTimeAttr,t.millis=moment(t.endTime).diff(moment()),i=t.interval-t.millis%1e3),t.countdownattr&&(n=t.countdownattr,t.millis=t.countdown*1e3),t.millis<0){t.stop();t.millis=0;l();t.finishCallback&&t.$eval(t.finishCallback);return}l();t.timeoutId=setTimeout(function(){h();t.$apply()},t.interval-i);t.$emit("timer-tick",{timeoutId:t.timeoutId,millis:t.millis,seconds:t.seconds,minutes:t.minutes,hours:t.hours,days:t.days});t.countdown>0?t.countdown--:t.countdown<=0&&(t.stop(),t.finishCallback&&t.$eval(t.finishCallback));n!==null&&(t.progressBar=o.calculateProgressBar(t.startTime,t.millis,t.endTime,t.countdownattr),t.progressBar===100&&(t.displayProgressActive=""))};(t.autoStart===undefined||t.autoStart===!0)&&t.start()}]}}]).directive("timerControls",function(){return{restrict:"EA",scope:!0,controller:["$scope",function(n){n.timerStatus="reset";n.$on("timer-started",function(){n.timerStatus="started"});n.$on("timer-stopped",function(){n.timerStatus="stopped"});n.$on("timer-reset",function(){n.timerStatus="reset"});n.timerStart=function(){n.$broadcast("timer-start")};n.timerStop=function(){n.$broadcast("timer-stop")};n.timerResume=function(){n.$broadcast("timer-resume")};n.timerToggle=function(){switch(n.timerStatus){case"started":n.timerStop();break;case"stopped":n.timerResume();break;case"reset":n.timerStart()}};n.timerAddCDSeconds=function(t){n.$broadcast("timer-add-cd-seconds",t)}}]}});typeof module!="undefined"&&typeof exports!="undefined"&&module.exports===exports&&(module.exports=timerModule);app=angular.module("timer");app.factory("I18nService",function(){var n=function(){};return n.prototype.language="en",n.prototype.fallback="en",n.prototype.timeHumanizer={},n.prototype.init=function(n,t){var i=humanizeDuration.getSupportedLanguages();this.fallback=t!==undefined?t:"en";i.indexOf(t)===-1&&(this.fallback="en");this.language=n;i.indexOf(n)===-1&&(this.language=this.fallback);this.timeHumanizer=humanizeDuration.humanizer({language:this.language,halfUnit:!1})},n.prototype.getTimeUnits=function(n){var t=Math.round(n/1e3)*1e3,i={};return typeof this.timeHumanizer!="undefined"?i={millis:this.timeHumanizer(t,{units:["ms"]}),seconds:this.timeHumanizer(t,{units:["s"]}),minutes:this.timeHumanizer(t,{units:["m","s"]}),hours:this.timeHumanizer(t,{units:["h","m","s"]}),days:this.timeHumanizer(t,{units:["d","h","m","s"]}),months:this.timeHumanizer(t,{units:["mo","d","h","m","s"]}),years:this.timeHumanizer(t,{units:["y","mo","d","h","m","s"]})}:console.error('i18nService has not been initialized. You must call i18nService.init("en") for example'),i},n});app=angular.module("timer");app.factory("progressBarService",function(){var n=function(){};return n.prototype.calculateProgressBar=function(n,t,i,r){var u=0,f,e;return t=t/1e3,i!==null?(f=moment(i),e=f.diff(n,"seconds"),u=t*100/e):u=t*100/r,u=100-u,u=Math.round(u*10)/10,u>100&&(u=100),u},new n});URLHelper=URLHelper||{};URLHelper.helpers={getQueryStringParams:function(n){for(var u=window.location.search.substring(1),r=u.split("&"),i,t=0;t<r.length;t++)if(i=r[t].split("="),i[0]==n)return i[1]}};eventComboApp=angular.module("EventComboApp",["ngMaterial","ngRoute","ngScrollbar","ngMessages","angular.filter","mdDatetimePickerDemo","ocNgRepeat","ngCookies","ngSanitize","angucomplete-alt","dndLists","googlechart","vcRecaptcha","tci.editor","ec.phone.field","timer","angularPagination"]);eventComboApp.service("broadcastService",["$rootScope",function(n){var t=function(t,i){n.$broadcast(t,i)},i=function(n){t("EventInfoLoaded",n)},r=function(n){t("ErrorExternalLogin",n)},u=function(n){t("CallLogin",n)},f=function(n){t("CallLogout",n)},e=function(n){t("CompleteExternalLogin",n)},o=function(n){t("LoggedIn",n)},s=function(n){t("LoggedOut",n)},h=function(n){t("LoginProcessed",n)},c=function(n){t("AddFavoriteProcessed",n)},l=function(n){t("AddFavoriteWithLoginProcessed",n)},a=function(n){t("CurrentCoordinatesChanged",n)},v=function(n){t("ReloadPage",n)},y=function(n){t("SetCitySearchRedirect",n)},p=function(n){t("ShowMessage",n)},w=function(n){t("ShowLoadingMessage",n)},b=function(n){t("PurchaseSuccess",n)},k=function(n){t("PurchaseError",n)},d=function(n){t("EventPublished",n)},g=function(n){t("ShowEventComboContactDialog",n)};return{EventInfoLoaded:i,ErrorExternalLogin:r,CallLogin:u,CallLogout:f,CompleteExternalLogin:e,LoggedIn:o,LoggedOut:s,LoginProcessed:h,AddFavoriteProcessed:c,AddFavoriteWithLoginProcessed:l,CurrentCoordinatesChanged:a,ReloadPage:v,SetCitySearchRedirect:y,ShowMessage:p,ShowLoadingMessage:w,PurchaseSuccess:b,PurchaseError:k,EventPublished:d,ShowEventComboContactDialog:g}}]);eventComboApp.service("socialService",["$window",function(n){var t=function(n){return FB.ui({method:"share",href:n},function(){}),!1},i=function(n){return FB.ui({method:"send",link:n},function(){}),!1},r=function(t,i){return n.open("https://twitter.com/intent/tweet?url="+encodeURIComponent(i)+"&via=Eventcombo&related=Eventcombo&text="+encodeURIComponent(t)+"","targetWindow","toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=626,height=436"),!1},u=function(t,i,r){return n.open("https://www.linkedin.com/shareArticle?mini=true&url="+encodeURIComponent(i)+"&title="+encodeURIComponent(t)+"&summary="+encodeURIComponent(r)+"&source=Eventcombo","targetWindow","toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=626,height=436"),!1},f=function(t,i,r){var u=encodeURIComponent("\r\n");return n.open("https://wa.me/?text="+encodeURIComponent(i)+u+encodeURIComponent(t)+u+u+encodeURIComponent(r)),!1};return{FacebookShare:t,FacebookSend:i,TwitterShare:r,LinkedInShare:u,WhatsAppShare:f}}]);eventComboApp.service("geoService",["$cookies","$window","$http","broadcastService",function(n,t,i,r){function u(n,t){if(!Array.isArray(n))return"";var i={};return n.forEach(function(n){n.types&&Array.isArray(n.types)&&n.types.some(function(n){return n===t})&&(i=n)}),i}var o=new google.maps.Geocoder,s=function(n,t,i){var r=new google.maps.LatLng(n,t);o.geocode({latLng:r},function(n,t){if(t===google.maps.GeocoderStatus.OK){var r=u(n,"locality"),f=u(r.address_components,"locality"),e=u(r.address_components,"administrative_area_level_1");f&&e&&i&&i(f.long_name+", "+e.short_name)}})},f=function(){if(typeof n.getObject("ECGeoCoordinates")=="undefined")return{latitude:"40.712784",longitude:"-74.0059413",city:"New York, NY",isDefault:!0};var t=n.getObject("ECGeoCoordinates");return{latitude:t.latitude,longitude:t.longitude,city:t.city,isDefault:!1}},e=function(t,i,u,e){var o=f(),s;return(o.latitude!==t||o.longitude!==i||o.city!==u)&&(o.latitude=t,o.longitude=i,o.city=u,s=new Date,s.setDate(s.getDate()+365),n.putObject("ECGeoCoordinates",{latitude:t,longitude:i,city:u},{path:"/",expires:s}),e||r.CurrentCoordinatesChanged()),o},l=function(n){var t=f();t.city?n(t.city):s(t.latitude,t.longitude,function(i){e(t.latitude,t.longitude,i,!0);n(i)})},h=function(n){i({method:"get",datatype:"data.json",url:"/CommonAPI/GetCoordinatesByIP"}).then(function(t){var i=t.data;i&&i.lng&&e(i.lat,i.lng,"",n)})},c=f();(!c||c.isDefault)&&(t.navigator.geolocation?t.navigator.geolocation.getCurrentPosition(function(n){e(n.coords.latitude,n.coords.longitude,"",!1)},function(){h(!1)}):h(!1));var a=new RegExp(/^\d{5}(?:[-\s]\d{4})?$/),v=new RegExp(/^([ABCEGHJKLMNPRSTVXY]\d[ABCEGHJKLMNPRSTVWXYZ])\ {0,1}(\d[ABCEGHJKLMNPRSTVWXYZ]\d)$/),y=function(n){if(!n)return!1;return a.test(n.toString())||v.test(n.toString().replace(/\W+/g,""))},p=function(n,t,i){o.geocode({address:n},function(n,r){var f,e,o;r===google.maps.GeocoderStatus.OK&&(f=u(n,"postal_code"),f&&f.address_components&&(e=u(f.address_components,"locality"),o=u(f.address_components,"administrative_area_level_1"),(e||o)&&t&&t(i,e.long_name,o.short_name)))})};return{GetCoordinates:f,SetCoordinates:e,GetCityByCoordinates:s,GetCurrentCity:l,IsUsorCanadianZipCode:y,GetInfoByZip:p}}]);eventComboApp.service("eventService",["$http","$window",function(n,t){return getEvent=function(t,i){return n({method:"get",datatype:"data.json",url:"/eventmanagement/getevent",params:{eventId:t,timezone:i}})},saveEvent=function(t){return n({method:"post",url:"/eventmanagement/saveevent",dataType:"json",data:{json:angular.toJson(t)}})},saveDates=function(t){return n({method:"post",url:"/eventmanagement/saveDates",dataType:"json",data:{json:angular.toJson(t)}})},discoveryEvents=function(t){return n({method:"get",datatype:"data.json",url:"/home/discoveryeventsrequest",params:{json:angular.toJson(t)}})},editEvent=function(n){t.location.href="/EventManagement/EditEvent?eventId="+n},eventDashboard=function(n){t.location.href="/manageevent/index?eventId="+n+"#/dashboard"},eventInvite=function(n){t.location.href="/account/manageemailinvite?eventId="+n+"#/manageemailinvite"},checkForDeleteObjectFromMap=function(t,i){return n({method:"get",datatype:"data.json",url:"/eventmanagement/CheckForDeleteObjectFromMap",params:{sectionId:t,eventId:i}})},checkForDeleteSeatFromMap=function(t){return n({method:"post",datatype:"data.json",url:"/eventmanagement/CheckForDeleteSeatsFromMap",data:t})},checkForTicketDelete=function(t){return n({method:"get",datatype:"data.json",url:"/eventmanagement/CheckForTicketDelete",params:{ticketId:t}})},getOrganizerMembership=function(t){return n({method:"get",datatype:"data.json",url:"/membership/GetOrganizerMemberships",params:{orgId:t}})},getAllEventRooms=function(t){return n({method:"get",datatype:"data.json",url:"/VirtualEvent/GetAllEventRooms",params:{eventId:t}})},updateEventHall=function(t){return n({method:"post",url:"/eventmanagement/updateEventHall",dataType:"json",data:{json:angular.toJson(t)}})},canChangeVenueMap=function(t){return n({method:"get",url:"/eventmanagement/CanChangeSeatingMap",dataType:"json",params:{eId:t}})},saveEventSchedule=function(t,i){return n({method:"post",url:"/eventmanagement/SaveEventSchedule",dataType:"json",data:{scheduleModel:t,json:angular.toJson(i)}})},deleteSchedule=function(t,i){return n({method:"post",url:"/eventmanagement/deleteSchedule",dataType:"json",params:{eventId:t,scheduleId:i}})},updateScheduleStatus=function(t,i,r){return n({method:"post",url:"/eventmanagement/UpdateScheduleStatus",dataType:"json",params:{eventId:t,scheduleId:i,scheduleStatus:r}})},getCategoriesOfEvent=function(t){return n({method:"get",datatype:"data.json",url:"/EventManagement/GetCategoriesOfEvent",params:{eventId:t}})},getDocumentsOfEvent=function(t){return n({method:"get",datatype:"data.json",url:"/Document/GetAllDocumentsOfEvent",params:{eventId:t}})},getPollsOfEvent=function(t){return n({method:"get",datatype:"data.json",url:"/SurveyAndPolls/GetPollsOfEvent",params:{eventId:t}})},getSelfCheckInQrCodeSettings=function(t,i){return n({method:"get",datatype:"data.json",url:"/eventmanagement/GetQrCodeSettings",params:{eventId:t,scheduleId:i}})},saveSelfCheckQRCodeSettings=function(t){return n({method:"post",datatype:"data.json",url:"/eventmanagement/SaveQrCodeSettings",data:{model:t}})},{GetEvent:getEvent,SaveEvent:saveEvent,SaveDates:saveDates,DiscoveryEvents:discoveryEvents,EditEvent:editEvent,EventDashboard:eventDashboard,EventInvite:eventInvite,CheckForDeleteObjectFromMap:checkForDeleteObjectFromMap,CheckForTicketDelete:checkForTicketDelete,GetOrganizerMembership:getOrganizerMembership,UpdateEventHall:updateEventHall,CanChangeVenueMap:canChangeVenueMap,CheckForDeleteSeatFromMap:checkForDeleteSeatFromMap,GetAllEventRooms:getAllEventRooms,SaveEventSchedule:saveEventSchedule,DeleteSchedule:deleteSchedule,GetCategoriesOfEvent:getCategoriesOfEvent,GetDocumentsOfEvent:getDocumentsOfEvent,GetPollsOfEvent:getPollsOfEvent,GetSelfCheckInQrCodeSettings:getSelfCheckInQrCodeSettings,SaveSelfCheckQRCodeSettings:saveSelfCheckQRCodeSettings,UpdateScheduleStatus:updateScheduleStatus}}]);eventComboApp.service("accountService",["$rootScope","$http","broadcastService",function(n,t,i){var r=!0,u="",f="Log In / Sign Up",e="",o=function(){t.get("/account/getstatus").then(function(n){n.data&&(u=n.data.BaseUserId,r=!u,f=r?"Log In / Sign Up":n.data.BaseUserName?n.data.BaseUserName:n.data.BaseUserEmail,e=r?"":n.data.BaseUserImage)},function(){r=!0;u="";f="Log In / Sign Up";e=""})};o();n.$on("LoggedIn",function(n,t){t?o():i.reloadPage()});var s=function(n){i.CallLogin(n)},h=function(){return!r},c=function(){return u},l=function(){return f},a=function(){return e},v=function(n){i.CallLogout(n)};return{UserRegistered:h,UserId:c,UserName:l,UserImage:a,StartLogin:s,StartLogout:v}}])