/*! * Copyright 2014 Drifty Co. * http://drifty.com/ * * Ionic, v0.9.26 * A powerful HTML5 mobile app framework. * http://ionicframework.com/ * * By @maxlynch, @benjsperry, @adamdbradley <3 * * Licensed under the MIT license. Please see LICENSE for more information. * */ function $LocationDecorator(a,b){return a.__hash=a.hash,a.hash=function(c){return angular.isDefined(c)&&b(function(){var a=document.querySelector(".scroll-content");a&&(a.scrollTop=0)},0,!1),a.__hash(c)},a}angular.module("ionic.service",["ionic.service.bind","ionic.service.platform","ionic.service.actionSheet","ionic.service.gesture","ionic.service.loading","ionic.service.modal","ionic.service.popup","ionic.service.templateLoad","ionic.service.view","ionic.decorator.location"]),angular.module("ionic.ui.service",["ionic.ui.service.scrollDelegate","ionic.ui.service.slideBoxDelegate","ionic.ui.service.sideMenuDelegate"]),angular.module("ionic.ui",["ionic.ui.content","ionic.ui.scroll","ionic.ui.tabs","ionic.ui.viewState","ionic.ui.header","ionic.ui.sideMenu","ionic.ui.slideBox","ionic.ui.list","ionic.ui.checkbox","ionic.ui.toggle","ionic.ui.radio","ionic.ui.touch"]),angular.module("ionic",["ionic.service","ionic.ui.service","ionic.ui","ngAnimate","ngSanitize","ui.router"]),angular.element.prototype.addClass=function(a){var b,c,d,e,f,g;if(a&&"ng-scope"!=a&&"ng-isolate-scope"!=a)for(b=0;b')(f),i=angular.element(h[0].querySelector(".action-sheet-wrapper")),j=function(a){d.leave(i,function(){a&&e.cancel()}),d.removeClass(h,"active",function(){f.$destroy()}),b[0].body.classList.remove("action-sheet-open")},k=function(){j()};f.$on("$destroy",function(){g.offHardwareBackButton(k)}),g.onHardwareBackButton(k),f.cancel=function(){j(!0)},f.buttonClicked=function(a){(e.buttonClicked&&e.buttonClicked(a))===!0&&j(!1)},f.destructiveButtonClicked=function(){(e.destructiveButtonClicked&&e.destructiveButtonClicked())===!0&&j(!1)},b[0].body.appendChild(h[0]),b[0].body.classList.add("action-sheet-open");var l=new ionic.views.ActionSheet({el:h[0]});return f.sheet=l,d.addClass(h,"active"),d.enter(i,h,null,function(){}),l}}}]),angular.module("ionic.service.bind",[]).factory("$ionicBind",["$parse","$interpolate",function(a,b){var c=/^\s*([@=&])(\??)\s*(\w*)\s*$/;return function(d,e,f){angular.forEach(f||{},function(f,g){var h,i,j=f.match(c)||[],k=j[3]||g,l=j[1];switch(l){case"@":if(!e[k])return;e.$observe(k,function(a){d[g]=a}),e[k]&&(d[g]=b(e[k])(d));break;case"=":if(!e[k])return;i=d.$watch(e[k],function(a){d[g]=a}),d.$on("$destroy",i);break;case"&":if(e[k]&&e[k].match(RegExp(g+"(.*?)")))throw new Error('& expression binding "'+g+'" looks like it will recursively call "'+e[k]+'" and cause a stack overflow! Please choose a different scopeName.');h=a(e[k]),d[g]=function(a){return h(d,a)}}})}}]),angular.module("ionic.service.gesture",[]).factory("$ionicGesture",[function(){return{on:function(a,b,c){return window.ionic.onGesture(a,b,c[0])},off:function(a,b,c){return window.ionic.offGesture(a,b,c)}}}]),angular.module("ionic.service.loading",["ionic.ui.loading"]).factory("$ionicLoading",["$rootScope","$document","$compile",function(a,b,c){return{show:function(d){var e={content:"",animation:"fade-in",showBackdrop:!0,maxWidth:200,showDelay:0};d=angular.extend(e,d);var f=a.$new(!0);angular.extend(f,d);var g=angular.element(b[0].querySelector(".loading-backdrop"));g.length&&g.remove();var h=c(""+d.content+"")(f);b[0].body.appendChild(h[0]);var i=new ionic.views.Loading({el:h[0],maxWidth:d.maxWidth,showDelay:d.showDelay});return i.show(),f.loading=i,i}}}]),angular.module("ionic.service.modal",["ionic.service.templateLoad","ionic.service.platform","ngAnimate"]).factory("$ionicModal",["$rootScope","$document","$compile","$animate","$q","$timeout","$ionicPlatform","$ionicTemplateLoader",function(a,b,c,d,e,f,g,h){function i(){document.body.classList.remove("modal-open")}var j=ionic.views.Modal.inherit({initialize:function(a){ionic.views.Modal.prototype.initialize.call(this,a),this.animation=a.animation||"slide-in-up"},show:function(){var a=this,c=angular.element(this.el);if(document.body.classList.add("modal-open"),a._isShown=!0,c.parent().length?d.addClass(c,this.animation,function(){}):(c.addClass(this.animation),d.enter(c,angular.element(b[0].body),null,function(){}),ionic.views.Modal.prototype.show.call(a)),!this.didInitEvents){var e=function(){a.hide()};a.scope.$on("$destroy",function(){g.offHardwareBackButton(e)}),g.onHardwareBackButton(e),this.didInitEvents=!0}this.scope.$parent.$broadcast("modal.shown",this)},hide:function(){this._isShown=!1;var a=angular.element(this.el);d.removeClass(a,this.animation,function(){i(a[0])}),ionic.views.Modal.prototype.hide.call(this),this.scope.$parent.$broadcast("modal.hidden",this)},remove:function(){var a=this,b=angular.element(this.el);this._isShown=!1,d.leave(angular.element(this.el),function(){i(b[0]),a.scope.$parent.$broadcast("modal.removed",a),a.scope.$destroy()})},isShown:function(){return!!this._isShown}}),k=function(b,d){var e=d.scope&&d.scope.$new()||a.$new(!0),f=c(b)(e);d.el=f[0];var g=new j(d);return g.scope=e,d.scope||(e.modal=g),g};return{fromTemplate:function(a,b){var c=k(a,b||{});return c},fromTemplateUrl:function(a,b,c){return h.load(a).then(function(a){var d=k(a,c||{});return b?b(d):null,d})}}}]),function(a){"use strict";angular.module("ionic.service.platform",[]).provider("$ionicPlatform",function(){return{$get:["$q",function(b){return{onHardwareBackButton:function(b){a.Platform.ready(function(){document.addEventListener("backbutton",b,!1)})},offHardwareBackButton:function(b){a.Platform.ready(function(){document.removeEventListener("backbutton",b)})},is:function(b){return a.Platform.is(b)},ready:function(c){var d=b.defer();return a.Platform.ready(function(){d.resolve(),c()}),d.promise}}}]}})}(ionic),angular.module("ionic.service.popup",["ionic.service.templateLoad"]).factory("$ionicPopup",["$rootScope","$document","$compile","TemplateLoader",function(a,b,c){var d=function(){var a=angular.element(b[0].querySelector(".popup"));if(a.length){var c=a.scope();if(c.popup)return c}};return{alert:function(e,f){var g=d();if(g)return g.popup.alert(e);var h={title:e,animation:"fade-in"};opts=angular.extend(h,opts);var i=f&&f.$new()||a.$new(!0);angular.extend(i,opts);var j=c(""+opts.content+"")(i);b[0].body.appendChild(j[0]);var k=new ionic.views.Popup({el:j[0]});return k.alert(e),i.popup=k,k},confirm:function(){},prompt:function(){},show:function(){}}}]),angular.module("ionic.service.templateLoad",[]).factory("$ionicTemplateLoader",["$q","$http","$templateCache",function(a,b,c){return{load:function(a){return b.get(a,{cache:c}).then(function(a){return a.data&&a.data.trim()})}}}]),angular.module("ionic.service.view",["ui.router","ionic.service.platform"]).run(["$rootScope","$state","$location","$document","$animate","$ionicPlatform",function(a,b,c,d,e,f){function g(b){return a.$viewHistory.backView?a.$viewHistory.backView.go():ionic.Platform.exitApp(),b.preventDefault(),!1}a.$viewHistory={histories:{root:{historyId:"root",parentHistoryId:null,stack:[],cursor:-1}},backView:null,forwardView:null,currentView:null,disabledRegistrableTagNames:[]},a.$on("viewState.changeHistory",function(d,e){if(e){var f=e.historyId?a.$viewHistory.histories[e.historyId]:null;if(f&&f.cursor>-1&&f.cursor-1&&h.stack.length>0&&h.cursor=k.index;o--)n.stack[o].destory(),n.stack.splice(o)}}else l.navAction="initialView";e.histories[l.viewId]=this.createView({viewId:l.viewId,index:h.stack.length,historyId:h.historyId,backViewId:i&&i.viewId?i.viewId:null,forwardViewId:null,stateId:g,stateName:this.getCurrentStateName(),stateParams:this.getCurrentStateParams(),url:c.url(),scrollValues:null}),h.stack.push(e.histories[l.viewId])}return this.setNavViews(l.viewId),h.cursor=e.currentView.index,l},setNavViews:function(b){var c=a.$viewHistory;c.currentView=this._getView(b),c.backView=this._getBackView(c.currentView),c.forwardView=this._getForwardView(c.currentView),a.$broadcast("$viewHistory.historyChange",{showBack:c.backView&&c.backView.historyId===c.currentView.historyId})},registerHistory:function(a){a.$historyId=ionic.Utils.nextUid()},createView:function(a){var b=new h;return b.initialize(a)},getCurrentView:function(){return a.$viewHistory.currentView},getBackView:function(){return a.$viewHistory.backView},getForwardView:function(){return a.$viewHistory.forwardView},getNavDirection:function(){return a.$viewHistory.navDirection},getCurrentStateName:function(){return b&&b.current?b.current.name:null},isCurrentStateNavView:function(a){return b&&b.current&&b.current.views&&b.current.views[a]?!0:!1},getCurrentStateParams:function(){var a;if(b&&b.params)for(var c in b.params)b.params.hasOwnProperty(c)&&(a=a||{},a[c]=b.params[c]);return a},getCurrentStateId:function(){var a;if(b&&b.current&&b.current.name){if(a=b.current.name,b.params)for(var c in b.params)b.params.hasOwnProperty(c)&&b.params[c]&&(a+="_"+c+"="+b.params[c]);return a}return ionic.Utils.nextUid()},goToHistoryRoot:function(b){if(b){var c=a.$viewHistory.histories[b];if(c&&c.stack.length){if(a.$viewHistory.currentView&&a.$viewHistory.currentView.viewId===c.stack[0].viewId)return;a.$viewHistory.forcedNav={viewId:c.stack[0].viewId,navAction:"moveBack",navDirection:"back"},c.stack[0].go()}}},_getView:function(b){return b?a.$viewHistory.histories[b]:null},_getBackView:function(a){return a?this._getView(a.backViewId):null},_getForwardView:function(a){return a?this._getView(a.forwardViewId):null},_getHistory:function(b){var c=this._getParentHistoryObj(b);return a.$viewHistory.histories[c.historyId]||(a.$viewHistory.histories[c.historyId]={historyId:c.historyId,parentHistoryId:this._getParentHistoryObj(c.scope.$parent).historyId,stack:[],cursor:-1}),a.$viewHistory.histories[c.historyId]},_getParentHistoryObj:function(b){for(var c=b;c;){if(c.hasOwnProperty("$historyId"))return{historyId:c.$historyId,scope:c};c=c.$parent}return{historyId:"root",scope:a}},getRenderer:function(a,b,c){function d(a){for(var b="";!b&&a;)b=a.getAttribute("animation"),a=a.parentElement;return b}function e(){j&&a[0].classList.add(j),"back"===f.navDirection?a[0].classList.add("reverse"):a[0].classList.remove("reverse")}var f,h,i=this,j=angular.isDefined(c.$nextAnimation)?c.$nextAnimation:d(a[0]);return c.$nextAnimation=void 0,function(b){return{enter:function(c){return h&&b?(e(),c.addClass("ng-enter"),document.body.classList.add("disable-pointer-events"),void g.enter(c,a,null,function(){document.body.classList.remove("disable-pointer-events"),j&&a[0].classList.remove(j)})):void a.append(c)},leave:function(){var c=a.contents();return h&&b?(e(),void g.leave(c,function(){c.remove()})):void c.remove()},register:function(a){return f=i.register(c,a),h=null!==j&&null!==f.navDirection,f}}}},disableRegisterByTagName:function(b){a.$viewHistory.disabledRegistrableTagNames.push(b.toUpperCase())},isTagNameRegistrable:function(b){var c,d,e=a.$viewHistory.disabledRegistrableTagNames;for(c=0;c
{{titleText}}
'}}])}(),function(a){"use strict";angular.module("ionic.ui.header",["ngAnimate","ngSanitize"]).directive("barHeader",["$ionicScrollDelegate",function(a){return{restrict:"C",link:function(b,c){a.tapScrollToTop(c)}}}]).directive("ionHeaderBar",["$ionicScrollDelegate",function(){return{restrict:"E",replace:!0,transclude:!0,template:'

',scope:{leftButtons:"=",rightButtons:"=",title:"=",type:"@",alignTitle:"@"},link:function(b,c){var d=new a.views.HeaderBar({el:c[0],alignTitle:b.alignTitle||"center"});c.addClass(b.type),b.headerBarView=d,b.$watch("leftButtons",function(){d.align()}),b.$watch("rightButtons",function(){d.align()}),b.$watch("title",function(){d.align()})}}}]).directive("ionFooterBar",function(){return{restrict:"E",replace:!0,transclude:!0,template:'
',scope:{type:"@"},link:function(a,b){b.addClass(a.type)}}})}(ionic),function(){"use strict";angular.module("ionic.ui.checkbox",[]).directive("ionCheckbox",function(){return{restrict:"E",replace:!0,require:"?ngModel",scope:{ngModel:"=?",ngValue:"=?",ngChecked:"=?",ngChange:"&"},transclude:!0,template:'
',compile:function(a,b){var c=a.find("input");b.name&&c.attr("name",b.name),b.ngChecked&&c.attr("ng-checked","ngChecked"),b.ngTrueValue&&c.attr("ng-true-value",b.ngTrueValue),b.ngFalseValue&&c.attr("ng-false-value",b.ngFalseValue)}}})}(),function(){"use strict";angular.module("ionic.ui.content",["ionic.ui.service","ionic.ui.scroll"]).directive("ionPane",function(){return{restrict:"E",link:function(a,b){b.addClass("pane")}}}).directive("ionContent",["$parse","$timeout","$ionicScrollDelegate","$controller","$ionicBind",function(a,b,c,d,e){return{restrict:"E",replace:!0,transclude:!0,require:"^?ionNavView",scope:!0,template:'
',compile:function(a,c,f){function g(a,g,h){var i,j,k=angular.element(g[0].querySelector(".scroll"));if(f(a,function(a){k.append(a)}),e(a,h,{$onRefresh:"&onRefresh",$onRefreshOpening:"&onRefreshOpening",$onScroll:"&onScroll",$onScrollComplete:"&onScrollComplete",$onInfiniteScroll:"&onInfiniteScroll",refreshComplete:"=",infiniteScrollDistance:"@",hasBouncing:"@",scroll:"@",padding:"@",hasScrollX:"@",hasScrollY:"@",scrollbarX:"@",scrollbarY:"@",startX:"@",startY:"@",scrollEventInterval:"@"}),"false"!==a.scroll){if("true"===c.overflowScroll)return void g.addClass("overflow-scroll");j=d("$ionicScroll",{$scope:a,scrollViewOptions:{el:g[0],bouncing:a.$eval(a.hasBouncing),startX:a.$eval(a.startX)||0,startY:a.$eval(a.startY)||0,scrollbarX:a.$eval(a.scrollbarX)!==!1,scrollbarY:a.$eval(a.scrollbarY)!==!1,scrollingX:a.$eval(a.hasScrollX)===!0,scrollingY:a.$eval(a.hasScrollY)!==!1,scrollEventInterval:parseInt(a.scrollEventInterval,10)||20,scrollingComplete:function(){a.$onScrollComplete({scrollTop:this.__scrollTop,scrollLeft:this.__scrollLeft})}}}),i=a.$parent.scrollView=j.scrollView,a.$on("$viewContentLoaded",function(c,d){d||(d={});var e=d.scrollValues;e&&b(function(){i.scrollTo(+e.left||null,+e.top||null)},0),a.$on("$destroy",function(){d.scrollValues=i.getValues()})}),c.refreshComplete&&(a.refreshComplete=function(){a.scrollView&&(j.refresher&&j.refresher.classList.remove("active"),i.finishPullToRefresh(),a.$parent.$broadcast("scroll.onRefreshComplete"))})}}return"true"==c.hasHeader&&a.addClass("has-header"),"true"==c.hasSubheader&&a.addClass("has-subheader"),"true"==c.hasFooter&&a.addClass("has-footer"),"true"==c.hasTabs&&a.addClass("has-tabs"),"true"==c.padding&&a.find("div").addClass("padding"),{pre:g}}}}]).directive("ionRefresher",function(){return{restrict:"E",replace:!0,require:["^?ionContent","^?ionList"],template:'
',scope:!0}}).directive("ionScrollRefresher",function(){return{restrict:"E",replace:!0,transclude:!0,template:'
'}}).directive("ionInfiniteScroll",["$ionicBind",function(a){return{restrict:"E",require:"^?$ionicScroll",template:'
',link:function(b,c,d){setTimeout(function(){function e(){var a=b.distance||"1%";return a.indexOf("%")>-1?g.getScrollMax().top*(1-parseInt(a,10)/100):g.getScrollMax().top-parseInt(a,10)}var f=c.controller("$ionicScroll"),g=f.scrollView;a(b,d,{distance:"@infiniteScrollDistance"});var h=!1;b.$on("scroll.infiniteScrollComplete",function(){c[0].classList.remove("active"),setTimeout(function(){g.resize()}),h=!1}),f.$element.on("scroll",ionic.animationFrameThrottle(function(){!h&&g.getValues().top>=e()&&(c[0].classList.add("active"),h=!0,b.$apply(angular.bind(b,b.$onInfiniteScroll)))}))})}}}])}(),function(){"use strict";angular.module("ionic.ui.list",["ngAnimate"]).directive("ionItem",["$timeout","$parse",function(){return{restrict:"E",require:"?^ionList",replace:!0,transclude:!0,scope:{item:"=",itemType:"@",canDelete:"@",canReorder:"@",canSwipe:"@",onDelete:"&",optionButtons:"&",deleteIcon:"@",reorderIcon:"@"},template:'
',link:function(a,b,c,d){if(d){var e=d.scope,f=d.attrs;c.$observe("href",function(b){b&&(a.href=b.trim())}),a.itemType||(a.itemType=e.itemType),b.addClass(a.itemType||e.itemType),a.itemClass=a.itemType,"false"!==(c.canDelete?a.canDelete:e.canDelete)&&(c.onDelete||f.onDelete)&&(a.deleteClick=function(){c.onDelete?a.onDelete({item:a.item}):f.onDelete&&e.onDelete({item:a.item})},a.deleteIconClass=a.deleteIcon||e.deleteIcon||"ion-minus-circled"),"true"===(c.canReorder?a.canReorder:e.canReorder)&&(a.reorderIconClass=a.reorderIcon||e.reorderIcon||"ion-navicon"),"false"!==(c.canSwipe?a.canSwipe:e.canSwipe)&&(a.itemOptionButtons=a.optionButtons(),"undefined"==typeof a.itemOptionButtons&&(a.itemOptionButtons=e.optionButtons()))}}}}]).directive("ionList",["$timeout",function(a){return{restrict:"E",replace:!0,transclude:!0,require:"^?$ionicScroll",scope:{itemType:"@",canDelete:"@",canReorder:"@",canSwipe:"@",showDelete:"=",showReorder:"=",onDelete:"&",onReorder:"&",optionButtons:"&",deleteIcon:"@",reorderIcon:"@"},template:"
",controller:["$scope","$attrs",function(a,b){this.scope=a,this.attrs=b}],link:function(b,c,d,e){b.listView=new ionic.views.ListView({el:c[0],listEl:c[0].children[0],scrollEl:e&&e.element,scrollView:e&&e.scrollView,onReorder:function(a,c,d){b.$apply(function(){b.onReorder({el:a,start:c,end:d})})}}),d.animation&&c[0].classList.add(d.animation);var f=b.$watch("showReorder",function(b){b?c[0].classList.add("item-options-hide"):b===!1&&a(function(){c[0].classList.remove("item-options-hide")},250)});b.$on("$destroy",function(){f()})}}}])}(),function(){"use strict";angular.module("ionic.ui.loading",[]).directive("ionLoading",function(){return{restrict:"E",replace:!0,transclude:!0,link:function(a,b){b.addClass(a.animation||"")},template:'
'}})}(),function(a){"use strict";angular.module("ionic.ui.radio",[]).directive("ionRadio",function(){return{restrict:"E",replace:!0,require:"?ngModel",scope:{ngModel:"=?",ngValue:"=?",ngChange:"&",icon:"@"},transclude:!0,template:'',compile:function(a,b){b.name&&a.children().eq(0).attr("name",b.name),b.icon&&a.children().eq(2).removeClass("ion-checkmark").addClass(b.icon)}}}).directive("ionRadioButtons",function(){return{restrict:"E",replace:!0,require:"?ngModel",scope:{value:"@"},transclude:!0,template:'
',controller:["$scope","$element",function(a,b){this.select=function(a){for(var c,d=b.children(),e=0;e
',transclude:!0,scope:{direction:"@",paging:"@",onRefresh:"&",onScroll:"&",refreshComplete:"=",scroll:"@",scrollbarX:"@",scrollbarY:"@"},controller:function(){},compile:function(a,b){function d(a,d){var e,f,g=d[0].children[0];"true"==b.padding&&g.classList.add("padding"),a.$eval(a.paging)===!0&&g.classList.add("scroll-paging"),a.direction||(a.direction="y");var h=a.$eval(a.paging)===!0,i={el:d[0],paging:h,scrollbarX:a.$eval(a.scrollbarX)!==!1,scrollbarY:a.$eval(a.scrollbarY)!==!1,scrollingX:a.direction.indexOf("x")>=0,scrollingY:a.direction.indexOf("y")>=0};h&&(i.speedMultiplier=.8,i.bouncing=!1),f=c("$ionicScroll",{$scope:a,scrollViewOptions:i}),e=a.$parent.scrollView=f.scrollView}return{pre:d}}}}])}(),function(){"use strict";angular.module("ionic.ui.sideMenu",["ionic.service.gesture","ionic.service.view"]).run(["$ionicViewService",function(a){a.disableRegisterByTagName("ion-side-menus")}]).directive("ionSideMenus",function(){return{restrict:"ECA",controller:["$scope","$attrs",function(a){angular.extend(this,ionic.controllers.SideMenuController.prototype),ionic.controllers.SideMenuController.call(this,{left:{width:275},right:{width:275}}),a.sideMenuContentTranslateX=0,a.sideMenuController=this}],replace:!0,transclude:!0,template:'
'}}).directive("ionSideMenuContent",["$timeout","$ionicGesture",function(a,b){return{restrict:"AC",require:"^ionSideMenus",scope:!0,compile:function(c,d){return function(c,e,f,g){e.addClass("menu-content"),angular.isDefined(d.dragContent)?c.$watch(d.dragContent,function(a){c.dragContent=a}):c.dragContent=!0;var h=!1,i=!1,j=function(a){if(c.dragContent){if(h||a.gesture.srcEvent.defaultPrevented)return;i=!0,g._handleDrag(a),a.gesture.srcEvent.preventDefault()}},k=function(a){i&&a.gesture.srcEvent.preventDefault()},l=b.on("dragright",j,e),m=b.on("dragleft",j,e),n=b.on("dragup",k,e),o=b.on("dragdown",k,e),p=function(a){i=!1,h||g._endDrag(a),h=!1},q=b.on("release",p,e);g.setContent({onDrag:function(){},endDrag:function(){},getTranslateX:function(){return c.sideMenuContentTranslateX||0},setTranslateX:ionic.animationFrameThrottle(function(b){e[0].style[ionic.CSS.TRANSFORM]=0===b?"none":"translate3d("+b+"px, 0, 0)",a(function(){c.sideMenuContentTranslateX=b})}),enableAnimation:function(){c.animationEnabled=!0,e[0].classList.add("menu-animated")},disableAnimation:function(){c.animationEnabled=!1,e[0].classList.remove("menu-animated")}}),c.$on("$destroy",function(){b.off(m,"dragleft",j),b.off(l,"dragright",j),b.off(n,"dragup",j),b.off(o,"dragdown",j),b.off(q,"release",p)})}}}}]).directive("ionSideMenu",function(){return{restrict:"E",require:"^ionSideMenus",replace:!0,transclude:!0,scope:!0,template:'',compile:function(a,b,c){return angular.isUndefined(b.isEnabled)&&b.$set("isEnabled","true"),angular.isUndefined(b.width)&&b.$set("width","275"),function(a,b,d,e){a.side=d.side; var f=e[a.side]=new ionic.views.SideMenu({width:275,el:b[0],isEnabled:!0});a.$watch(d.width,function(a){var b=+a;b&&b==a&&f.setWidth(+a)}),a.$watch(d.isEnabled,function(a){f.setIsEnabled(!!a)}),c(a,function(a){b.append(a)})}}}})}(),function(){"use strict";angular.module("ionic.ui.slideBox",[]).directive("ionSlideBox",["$timeout","$compile","$ionicSlideBoxDelegate",function(a,b,c){return{restrict:"E",replace:!0,transclude:!0,scope:{doesContinue:"@",slideInterval:"@",showPager:"@",disableScroll:"@",onSlideChanged:"&",activeSlide:"=?"},controller:["$scope","$element",function(b,d){var e=b.$eval(b.doesContinue)===!0,f=e?b.$eval(b.slideInterval)||4e3:0,g=new ionic.views.Slider({el:d[0],auto:f,disableScroll:b.$eval(b.disableScroll)===!0||!1,continuous:e,startSlide:b.activeSlide,slidesChanged:function(){b.currentSlide=g.getPos(),a(function(){})},callback:function(c){b.currentSlide=c,b.onSlideChanged({index:b.currentSlide}),b.$parent.$broadcast("slideBox.slideChanged",c),b.activeSlide=c,a(function(){})}});b.$watch("activeSlide",function(a){angular.isDefined(a)&&g.slide(a)}),b.$on("slideBox.nextSlide",function(){g.next()}),b.$on("slideBox.prevSlide",function(){g.prev()}),b.$on("slideBox.setSlide",function(a,b){g.slide(b)}),b.$parent.slideBox=g,c.register(b,d),this.getNumSlides=function(){return g.getNumSlides()},a(function(){g.load()})}],template:'
',link:function(a,c){if(a.$eval(a.showPager)!==!1){var d=a.$new(),e=angular.element("");c.append(e),b(e)(d)}}}}]).directive("ionSlide",function(){return{restrict:"E",require:"^ionSlideBox",compile:function(a){return a.addClass("slider-slide"),function(){}}}}).directive("ionPager",function(){return{restrict:"E",replace:!0,require:"^ionSlideBox",template:'
',link:function(a,b,c,d){var e=function(a){for(var c=b[0].children,d=c.length,e=0;d>e;e++)e==a?c[e].classList.add("active"):c[e].classList.remove("active")};a.numSlides=function(){return new Array(d.getNumSlides())},a.$watch("currentSlide",function(a){e(a)})}}})}(),angular.module("ionic.ui.tabs",["ionic.service.view"]).run(["$ionicViewService",function(a){a.disableRegisterByTagName("ion-tabs")}]).controller("$ionicTabs",["$scope","$ionicViewService","$element",function(a,b){var c=a.tabsController=this;c.tabs=[],c.selectedTab=null,c.add=function(a){b.registerHistory(a),c.tabs.push(a),1===c.tabs.length&&c.select(a)},c.remove=function(a){var b=c.tabs.indexOf(a);if(-1!==b){if(a.$tabSelected)if(c.deselect(a),1===c.tabs.length);else{var d=b===c.tabs.length-1?b-1:b+1;c.select(c.tabs[d])}c.tabs.splice(b,1)}},c.getTabIndex=function(a){return c.tabs.indexOf(a)},c.deselect=function(a){a.$tabSelected&&(c.selectedTab=null,a.$tabSelected=!1,(a.onDeselect||angular.noop)())},c.select=function(d,e){var f;if(angular.isNumber(d)?(f=d,d=c.tabs[f]):f=c.tabs.indexOf(d),!d||-1==f)throw new Error('Cannot select tab "'+f+'"!');if(c.selectedTab&&c.selectedTab.$historyId==d.$historyId)e&&b.goToHistoryRoot(d.$historyId);else if(angular.forEach(c.tabs,function(a){c.deselect(a)}),c.selectedTab=d,d.$tabSelected=!0,(d.onSelect||angular.noop)(),e){var g={type:"tab",tabIndex:f,historyId:d.$historyId,navViewName:d.navViewName,hasNavView:!!d.navViewName,title:d.title,url:d.href,uiSref:d.uiSref};a.$emit("viewState.changeHistory",g)}}}]).directive("ionTabs",["$ionicViewService","$ionicBind",function(a,b){return{restrict:"E",replace:!0,scope:!0,transclude:!0,controller:"$ionicTabs",template:'
',compile:function(a,c,d){return angular.isUndefined(c.tabsType)&&c.$set("tabsType","tabs-positive"),function(a,c,e,f){b(a,e,{$animation:"@animation",$tabsStyle:"@tabsStyle",$tabsType:"@tabsType"}),f.$scope=a,f.$element=c,f.$tabsElement=angular.element(c[0].querySelector(".tabs")),d(a,function(a){c.append(a)})}}}}]).controller("$ionicTab",["$scope","$ionicViewService","$rootScope","$element",function(a){this.$scope=a}]).directive("ionTab",["$rootScope","$animate","$ionicBind","$compile","$ionicViewService",function(a,b,c,d,e){function f(a,b){return angular.isDefined(b)?" "+a+'="'+b+'"':""}return{restrict:"E",require:["^ionTabs","ionTab"],replace:!0,transclude:"element",controller:"$ionicTab",scope:!0,compile:function(a,g,h){return function(a,i,j,k){function l(){e.isCurrentStateNavView(a.navViewName)&&tabsCtrl.select(a)}var m,n,o;tabsCtrl=k[0],tabCtrl=k[1],c(a,j,{animate:"=",leftButtons:"=",rightButtons:"=",onSelect:"&",onDeselect:"&",title:"@",uiSref:"@",href:"@"}),o=angular.element(""),o.data("$ionTabsController",tabsCtrl),o.data("$ionTabController",tabCtrl),tabsCtrl.$tabsElement.append(d(o)(a)),tabsCtrl.add(a),a.$on("$destroy",function(){tabsCtrl.remove(a),o.isolateScope().$destroy(),o.remove()}),a.$watch("$tabSelected",function(c){c||a.$broadcast("tab.hidden",a),m&&m.$destroy(),m=null,n&&b.leave(n),n=null,c&&(m=a.$new(),h(m,function(a){a[0].removeAttribute("title"),b.enter(a,tabsCtrl.$element),a.addClass("pane"),n=a}),a.$broadcast("tab.shown",a))}),h(a,function(b){var c=b[0].querySelector("ion-nav-view");c&&(a.navViewName=c.getAttribute("name"),l(),a.$on("$stateChangeSuccess",l))})}}}}]).directive("ionTabNav",function(){return{restrict:"E",replace:!0,require:["^ionTabs","^ionTab"],template:'{{badge}}',scope:{title:"@",icon:"@",iconOn:"@",iconOff:"@",badge:"=",badgeStyle:"@"},compile:function(){return function(a,b,c,d){var e=d[0],f=d[1];a.getIconOn=function(){return a.iconOn||a.icon},a.getIconOff=function(){return a.iconOff||a.icon},a.isTabActive=function(){return e.selectedTab===f.$scope},a.selectTab=function(a){a.preventDefault(),e.select(f.$scope,!0)}}}}}),function(){"use strict";angular.module("ionic.ui.toggle",[]).directive("ionToggle",function(){return{restrict:"E",replace:!0,require:"?ngModel",scope:{ngModel:"=?",ngValue:"=?",ngChecked:"=?",ngChange:"&",ngDisabled:"=?"},transclude:!0,template:'
',compile:function(a,b){var c=a.find("input");b.name&&c.attr("name",b.name),b.ngChecked&&c.attr("ng-checked","ngChecked"),b.ngTrueValue&&c.attr("ng-true-value",b.ngTrueValue),b.ngFalseValue&&c.attr("ng-false-value",b.ngFalseValue)}}})}(window.ionic),function(a,b){"use strict";a.module("ionic.ui.touch",[]).config(["$provide",function(a){a.decorator("ngClickDirective",["$delegate",function(a){return a.shift(),a}])}]).directive("ngClick",["$parse",function(a){function c(a){b.tapElement(a.target,a)}return function(d,e,f){var g=a(f.ngClick);e.on("click",function(a){d.$apply(function(){g(d,{$event:a})})}),b.on("tap",c,e[0]),e.onclick=function(){},d.$on("$destroy",function(){b.off("tap",c,e[0])})}}]).directive("ionStopEvent",function(){function a(a){a.stopPropagation()}return{restrict:"A",link:function(b,c,d){c.bind(d.ionStopEvent,a)}}})}(window.angular,window.ionic),function(){"use strict";angular.module("ionic.ui.viewState",["ionic.service.view","ionic.service.gesture","ngSanitize"]).directive("ionNavBar",["$ionicViewService","$rootScope","$animate","$compile",function(a,b,c,d){return{restrict:"E",replace:!0,scope:{animation:"@",type:"@",backType:"@backButtonType",backLabel:"@backButtonLabel",backIcon:"@backButtonIcon",alignTitle:"@"},controller:function(){},template:'',compile:function(){return function(a,b){function e(b){return angular.isDefined(b.hideBackButton)&&(a.backButtonEnabled=!!b.hideBackButton),a.isReverse="back"==b.navDirection,a.animateEnabled=!(!b.navDirection||b.animate===!1),a.leftButtons=b.leftButtons,a.rightButtons=b.rightButtons,a.oldTitle=a.title,a.title=b&&b.title||"",a.animateEnabled?void f():void g.align()}function f(){var e,f,h;h=b[0].querySelectorAll(".title"),h.length&&(e=d('

')(a),angular.element(h[0]).replaceWith(e)),f=d('

')(a),ionic.requestAnimationFrame(function(){e&&c.leave(angular.element(e));var d=e&&angular.element(e)||null;c.enter(f,b,d,function(){g.align()}),angular.forEach(h,function(a){a&&a.parentNode&&angular.element(a).remove()}),a.$digest(),ionic.requestAnimationFrame(function(){f[0].classList.remove("invisible")})})}a.backButtonEnabled=!1,a.animateEnabled=!0,a.isReverse=!1,a.isInvisible=!0,a.navBarClass=function(){return(a.type?" "+a.type:"")+(a.isReverse?" reverse":"")+(a.isInvisible?" invisible":"")+(!a.animationDisabled&&a.animation?" "+a.animation:"")};var g=new ionic.views.HeaderBar({el:b[0],alignTitle:a.alignTitle||"center"});a.headerBarView=g,a.$on("viewState.viewEnter",function(a,b){e(b)}),a.$on("viewState.showNavBar",function(b,c){a.isInvisible=!c});var h=[a.$parent.$on("$viewHistory.historyChange",function(b,c){a.backButtonEnabled=!!c.showBack}),a.$parent.$on("viewState.leftButtonsChanged",function(b,c){a.leftButtons=c}),a.$parent.$on("viewState.rightButtonsChanged",function(b,c){a.rightButtons=c}),a.$parent.$on("viewState.showBackButton",function(b,c){a.backButtonEnabled=!!c}),a.$parent.$on("viewState.titleUpdated",function(b,c){a.title=c&&c.title||""})];a.$on("$destroy",function(){for(var a=0;a {{label}}',link:function(a){a.goBack=b}}}]).directive("ionNavView",["$ionicViewService","$state","$compile","$controller","$animate",function(a,b,c,d,e){var f=!1,g={restrict:"E",terminal:!0,priority:2e3,transclude:!0,controller:["$scope",function(a){this.setNextAnimation=function(b){a.$nextAnimation=b}}],compile:function(h,i,j){return function(h,i,k){function l(f){e.enabled()===!1&&(f=!1);var g=b.$current&&b.$current.locals[o];if(g!==n){var j=a.getRenderer(i,k,h);if(m&&(m.$destroy(),m=null),!g)return n=null,s.state=null,i.append(q);var l=angular.element("
").html(g.$template).contents(),r=j().register(l);j(f).leave(),n=g,s.state=g.$$state,j(f).enter(l);var t=c(l);if(m=h.$new(),m.$navDirection=r.navDirection,g.$$controller){g.$scope=m;var u=d(g.$$controller,g);i.children().data("$ngControllerController",u)}t(m);var v=a._getView(r.viewId)||{};m.$broadcast("$viewContentLoaded",v),p&&m.$eval(p),l=null}}var m,n,o=k[g.name]||k.name||"",p=k.onload||"",q=j(h);i.append(q);var r=i.parent().inheritedData("$uiView");o.indexOf("@")<0&&(o=o+"@"+(r?r.state.name:""));var s={name:o,state:null};i.data("$uiView",s);var t=function(){if(!f){f=!0;try{l(!0)}catch(a){throw f=!1,a}f=!1}};h.$on("$stateChangeSuccess",t),h.$on("$viewContentLoading",t),l(!1)}}};return g}])}(),function(){"use strict";angular.module("ionic.ui.virtRepeat",[]).directive("ionVirtRepeat",function(){return{require:["?ngModel","^virtualList"],transclude:"element",priority:1e3,terminal:!0,compile:function(){return function(a,b,c,d){var e=d[1];e.listView.renderViewport=function(){}}}}})}(ionic),function(){"use strict";function a(a){var b=a.match(/^\s*([\$\w]+)\s+in\s+(\S*)\s*$/);if(!b)throw new Error("Expected sfVirtualRepeat in form of '_item_ in _collection_' but got '"+a+"'.");return{value:b[1],collection:b[2]}}function b(a){var b={overflow:"auto"},c=window.getComputedStyle?window.getComputedStyle(a[0]):a[0].currentStyle,d=c&&c.getPropertyValue("max-height"),e=c&&c.getPropertyValue("height");d&&"0px"!==d?b.maxHeight=d:b.height=e&&"0px"!==e?e:window.innerHeight,a.css(b)}function c(a){var b={margin:0,padding:0,border:0,"box-sizing":"border-box"};a.css(b)}function d(a){var b=window.getComputedStyle?window.getComputedStyle(a):a.currentStyle,c=b&&b.getPropertyValue("max-height"),d=b&&b.getPropertyValue("height");if(d&&"0px"!==d&&"auto"!==d)$log.info('Row height is "%s" from css height',d);else if(c&&"0px"!==c&&"none"!==c)d=c,$log.info('Row height is "%s" from css max-height',d);else{if(!a.clientHeight)throw new Error("Unable to compute height of row");d=a.clientHeight+"px",$log.info('Row height is "%s" from client height',d)}return angular.element(a).css("height",d),parseInt(d,10)}angular.module("ionic.ui.virtualRepeat",[]).directive("ionVirtualRepeat",["$log",function(e){return{require:["?ngModel, ^virtualList"],transclude:"element",priority:1e3,terminal:!0,compile:function(f,g){var h=a(g.sfVirtualRepeat);return function(a,f,g,i){function j(a,b,c){var d=c.$new();return d[h.value]=b[a],d.$index=a,d.$first=0===a,d.$last=a===b.length-1,d.$middle=!(d.$first||d.$last),d.$watch(function(){d[h.value]=b[a]}),d}function k(a,b,c,d,e){var f,g,h,i=document.createDocumentFragment(),k=[];for(g=a;g!==b;g++)h=j(g,c,d),f=linker(h,angular.noop),k.push(f),i.appendChild(f[0]);return e.after(i),k}function l(){var a=clip(v.firstActive,v.firstVisible-v.lowWater,v.firstVisible-v.highWater),b=clip(v.firstActive+v.active,v.firstVisible+v.visible+v.lowWater,v.firstVisible+v.visible+v.highWater);v.firstActive=Math.max(0,a),v.active=Math.min(b,v.total)-v.firstActive}function m(b){s&&a.$apply(function(){v.firstVisible=Math.floor(b.target.scrollTop/s),v.visible=Math.ceil(u.viewport[0].clientHeight/s),e.log("scroll to row %o",v.firstVisible),t=b.target.scrollTop+b.target.clientHeight>=b.target.scrollHeight,l(),e.log(" state is now %o",v),e.log(" sticky = %o",t)})}function n(a){var b=a.$eval(h.collection);return b.length!==v.total&&(v.total=b.length,l()),{start:v.firstActive,active:v.active,len:b.length}}function o(a,b){var c,d,e=Array.prototype[a];for(d=0;b>d;d++)c=e.call(r),c.scope().$destroy(),c.remove()}function p(a,b,c){var g,i=b.start+b.active,j=c.$eval(h.collection);if(a===b)e.info("initial listen"),g=k(a.start,i,j,c,f),r=g,r.length&&(s=d(g[0][0]));else{var l=a.start+a.active,m=a.start>=b.start,n=m?a.start-b.start:b.start-a.start,p=l>=i?l-i:i-l,q=n<(m?b.active:a.active);if(e.info("change by %o,%o rows %s",n,p,m?"forward":"backward"),q){if(m?(e.info("need to remove from the top"),o("shift",n)):n&&(e.info("need to add at the top"),g=k(a.start,b.start,j,c,f),r=g.concat(r)),i>l)e.info("need to remove from the bottom"),o("pop",i-l);else if(p){var v=r[r.length-1];e.info("need to add to the bottom"),g=k(i,l,j,c,v),r=r.concat(g)}}else e.info("non-contiguous change"),o("pop",r.length),r=k(a.start,l,j,c,f);!s&&r.length&&(s=d(r[0][0])),u.content.css({"padding-top":a.start*s+"px"})}u.content.css({height:a.len*s+"px"}),t&&(u.viewport[0].scrollTop=u.viewport[0].clientHeight+u.viewport[0].scrollHeight)}var q=i[1],r=[],s=0,t=!1,u=q.element,v="ngModel"in g?a.$eval(g.ngModel):{};v.firstActive=0,v.firstVisible=0,v.visible=0,v.active=0,v.total=0,v.lowWater=v.lowWater||100,v.highWater=v.highWater||300,c(u.content),b(u.viewport),u.bind("momentumScrolled",m),a.$on("$destroy",function(){u.unbind("momentumScrolled",m)}),a.$watch(n,p,!0)}}}}])}(ionic),function(){"use strict";angular.module("ionic.ui.scroll").controller("$ionicScroll",["$scope","scrollViewOptions","$timeout","$ionicScrollDelegate","$window",function(a,b,c,d,e){function f(){i.resize()}var g=this,h=this.element=b.el,i=this.scrollView=new ionic.views.Scroll(b);angular.isDefined(b.bouncing)||ionic.Platform.ready(function(){i.options.bouncing=!ionic.Platform.isAndroid()});var j=this.$element=angular.element(h);j.data("$$ionicScrollController",this),d.register(a,j,i),e.addEventListener("resize",f),a.$on("$destroy",function(){e.removeEventListener("resize",f)}),c(function(){if(i.run(),g.refresher=h.querySelector(".scroll-refresher"),g.refresher){var b=g.refresher.clientHeight||0;i.activatePullToRefresh(b,function(){g.refresher.classList.add("active"),a.$onRefreshOpening&&a.$onRefreshOpening()},function(){g.refresher.classList.remove("refreshing"),g.refresher.classList.remove("active")},function(){g.refresher.classList.add("refreshing"),a.$onRefresh&&a.$onRefresh(),a.$parent.$broadcast("scroll.onRefresh")})}})}])}();