/*! * ionic.bundle.js is a concatenation of: * ionic.js, angular.js, angular-animate.js, * angular-ui-router.js, and ionic-angular.js */ /*! * 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. * */ window.ionic={controllers:{},views:{},version:"0.9.26"},function(a){function b(a){return a*a*a}function c(a){return 3*a*a*(1-a)}function d(a){return 3*a*(1-a)*(1-a)}function e(a){return(1-a)*(1-a)*(1-a)}var f=function(a,b){return a||(a=0),b||(b=0),{x:a,y:b}};a.Animator={getQuadraticBezier:function(a,g,h,i,j){var k=new f;return k.x=g.x*b(a)+h.x*c(a)+i.x*d(a)+j.x*e(a),k.y=g.y*b(a)+h.y*c(a)+i.y*d(a)+j.y*e(a),k},getCubicBezier:function(a,b,c,d,e){epsilon=1e3/60/e/4;var f=function(b){var d=1-b;return 3*d*d*b*a+3*d*b*b*c+b*b*b},g=function(a){var c=1-a;return 3*c*c*a*b+3*c*a*a*d+a*a*a},h=function(b){var d=1-b;return 3*(2*(b-1)*b+d*d)*a+3*(-b*b*b+2*d*b)*c};return function(a){var b,c,d,e,i,j,k=a;for(d=k,j=0;8>j;j++){if(e=f(d)-k,Math.abs(e)d)return g(b);if(d>c)return g(c);for(;c>b;){if(e=f(d),Math.abs(e-k)e?b=d:c=d,d=.5*(c-b)+b}return g(d)}},animate:function(a){return{leave:function(){var b=function(){a.classList.remove("leave"),a.classList.remove("leave-active"),a.removeEventListener("webkitTransitionEnd",b),a.removeEventListener("transitionEnd",b)};return a.addEventListener("webkitTransitionEnd",b),a.addEventListener("transitionEnd",b),a.classList.add("leave"),a.classList.add("leave-active"),this},enter:function(){var b=function(){a.classList.remove("enter"),a.classList.remove("enter-active"),a.removeEventListener("webkitTransitionEnd",b),a.removeEventListener("transitionEnd",b)};return a.addEventListener("webkitTransitionEnd",b),a.addEventListener("transitionEnd",b),a.classList.add("enter"),a.classList.add("enter-active"),this}}}}}(ionic),function(a){var b=[],c=function(){for(var d=0;de;e++)if(c=d[e],c.nodeName&&c.nodeName.toLowerCase()==b){if(c==a)return f;f++}return Array.prototype.slice.call(a.parentNode.children).indexOf(a)},swapNodes:function(a,b){b.parentNode.insertBefore(a,b)},getParentWithClass:function(a,b){for(;a.parentNode;){if(a.parentNode.classList&&a.parentNode.classList.contains(b))return a.parentNode;a=a.parentNode}return null},getParentOrSelfWithClass:function(a,b){for(;a;){if(a.classList&&a.classList.contains(b))return a;a=a.parentNode}return null},rectContains:function(a,b,c,d,e,f){return c>a||a>e?!1:d>b||b>f?!1:!0}},a.requestAnimationFrame=a.DomUtil.requestAnimationFrame,a.animationFrameThrottle=a.DomUtil.animationFrameThrottle}(window.ionic),function(a){window.CustomEvent||!function(){var a;a=function(a,b){var c;b=b||{bubbles:!1,cancelable:!1,detail:void 0};try{c=document.createEvent("CustomEvent"),c.initCustomEvent(a,b.bubbles,b.cancelable,b.detail)}catch(d){c=document.createEvent("Event");for(var e in b)c[e]=b[e];c.initEvent(a,b.bubbles,b.cancelable)}return c},a.prototype=window.Event.prototype,window.CustomEvent=a}(),a.EventController={VIRTUALIZED_EVENTS:["tap","swipe","swiperight","swipeleft","drag","hold","release"],trigger:function(a,b,c,d){var e=new CustomEvent(a,{detail:b,bubbles:!!c,cancelable:!!d});b&&b.target&&b.target.dispatchEvent(e)||window.dispatchEvent(e)},on:function(b,c,d){for(var e=d||window,f=0,g=this.VIRTUALIZED_EVENTS.length;g>f;f++)if(b==this.VIRTUALIZED_EVENTS[f]){var h=new a.Gesture(d);return h.on(b,c),h}e.addEventListener(b,c)},off:function(a,b,c){c.removeEventListener(a,b)},onGesture:function(b,c,d){var e=new a.Gesture(d);return e.on(b,c),e},offGesture:function(a,b,c){a.off(b,c)},handlePopState:function(){}},a.on=function(){a.EventController.on.apply(a.EventController,arguments)},a.off=function(){a.EventController.off.apply(a.EventController,arguments)},a.trigger=a.EventController.trigger,a.onGesture=function(){return a.EventController.onGesture.apply(a.EventController.onGesture,arguments)},a.offGesture=function(){return a.EventController.offGesture.apply(a.EventController.offGesture,arguments)}}(window.ionic),function(a){function b(){if(!a.Gestures.READY){a.Gestures.event.determineEventTypes();for(var b in a.Gestures.gestures)a.Gestures.gestures.hasOwnProperty(b)&&a.Gestures.detection.register(a.Gestures.gestures[b]);a.Gestures.event.onTouch(a.Gestures.DOCUMENT,a.Gestures.EVENT_MOVE,a.Gestures.detection.detect),a.Gestures.event.onTouch(a.Gestures.DOCUMENT,a.Gestures.EVENT_END,a.Gestures.detection.detect),a.Gestures.READY=!0}}a.Gesture=function(b,c){return new a.Gestures.Instance(b,c||{})},a.Gestures={},a.Gestures.defaults={stop_browser_behavior:"disable-user-behavior"},a.Gestures.HAS_POINTEREVENTS=window.navigator.pointerEnabled||window.navigator.msPointerEnabled,a.Gestures.HAS_TOUCHEVENTS="ontouchstart"in window,a.Gestures.MOBILE_REGEX=/mobile|tablet|ip(ad|hone|od)|android|silk/i,a.Gestures.NO_MOUSEEVENTS=a.Gestures.HAS_TOUCHEVENTS&&window.navigator.userAgent.match(a.Gestures.MOBILE_REGEX),a.Gestures.EVENT_TYPES={},a.Gestures.DIRECTION_DOWN="down",a.Gestures.DIRECTION_LEFT="left",a.Gestures.DIRECTION_UP="up",a.Gestures.DIRECTION_RIGHT="right",a.Gestures.POINTER_MOUSE="mouse",a.Gestures.POINTER_TOUCH="touch",a.Gestures.POINTER_PEN="pen",a.Gestures.EVENT_START="start",a.Gestures.EVENT_MOVE="move",a.Gestures.EVENT_END="end",a.Gestures.DOCUMENT=window.document,a.Gestures.plugins={},a.Gestures.READY=!1,a.Gestures.Instance=function(c,d){var e=this;return null===c?void console.error("Null element passed to gesture (element does not exist). Not listening for gesture"):(b(),this.element=c,this.enabled=!0,this.options=a.Gestures.utils.extend(a.Gestures.utils.extend({},a.Gestures.defaults),d||{}),this.options.stop_browser_behavior&&a.Gestures.utils.stopDefaultBrowserBehavior(this.element,this.options.stop_browser_behavior),a.Gestures.event.onTouch(c,a.Gestures.EVENT_START,function(b){e.enabled&&a.Gestures.detection.startDetect(e,b)}),this)},a.Gestures.Instance.prototype={on:function(a,b){for(var c=a.split(" "),d=0;d0&&f==a.Gestures.EVENT_END?f=a.Gestures.EVENT_MOVE:k||(f=a.Gestures.EVENT_END),(k||null===c)&&(c=i),g.call(a.Gestures.detection,h.collectEventData(b,f,h.getTouchList(c,f),i)),a.Gestures.HAS_POINTEREVENTS&&f==a.Gestures.EVENT_END&&(k=a.Gestures.PointerEvent.updatePointer(f,i))),k||(c=null,d=!1,e=!1,a.Gestures.PointerEvent.reset())}})},determineEventTypes:function(){var b;b=a.Gestures.HAS_POINTEREVENTS?a.Gestures.PointerEvent.getEvents():a.Gestures.NO_MOUSEEVENTS?["touchstart","touchmove","touchend touchcancel"]:["touchstart mousedown","touchmove mousemove","touchend touchcancel mouseup"],a.Gestures.EVENT_TYPES[a.Gestures.EVENT_START]=b[0],a.Gestures.EVENT_TYPES[a.Gestures.EVENT_MOVE]=b[1],a.Gestures.EVENT_TYPES[a.Gestures.EVENT_END]=b[2]},getTouchList:function(b){return a.Gestures.HAS_POINTEREVENTS?a.Gestures.PointerEvent.getTouchList():b.touches?b.touches:(b.indentifier=1,[b])},collectEventData:function(b,c,d,e){var f=a.Gestures.POINTER_TOUCH;return(e.type.match(/mouse/)||a.Gestures.PointerEvent.matchType(a.Gestures.POINTER_MOUSE,e))&&(f=a.Gestures.POINTER_MOUSE),{center:a.Gestures.utils.getCenter(d),timeStamp:(new Date).getTime(),target:e.target,touches:d,eventType:c,pointerType:f,srcEvent:e,preventDefault:function(){this.srcEvent.preventManipulation&&this.srcEvent.preventManipulation(),this.srcEvent.preventDefault},stopPropagation:function(){this.srcEvent.stopPropagation()},stopDetect:function(){return a.Gestures.detection.stopDetect()}}}},a.Gestures.PointerEvent={pointers:{},getTouchList:function(){var a=this,b=[];return Object.keys(a.pointers).sort().forEach(function(c){b.push(a.pointers[c])}),b},updatePointer:function(b,c){return b==a.Gestures.EVENT_END?this.pointers={}:(c.identifier=c.pointerId,this.pointers[c.pointerId]=c),Object.keys(this.pointers).length},matchType:function(b,c){if(!c.pointerType)return!1;var d={};return d[a.Gestures.POINTER_MOUSE]=c.pointerType==c.MSPOINTER_TYPE_MOUSE||c.pointerType==a.Gestures.POINTER_MOUSE,d[a.Gestures.POINTER_TOUCH]=c.pointerType==c.MSPOINTER_TYPE_TOUCH||c.pointerType==a.Gestures.POINTER_TOUCH,d[a.Gestures.POINTER_PEN]=c.pointerType==c.MSPOINTER_TYPE_PEN||c.pointerType==a.Gestures.POINTER_PEN,d[b]},getEvents:function(){return["pointerdown MSPointerDown","pointermove MSPointerMove","pointerup pointercancel MSPointerUp MSPointerCancel"]},reset:function(){this.pointers={}}},a.Gestures.utils={extend:function(a,b,c){for(var d in b)void 0!==a[d]&&c||(a[d]=b[d]);return a},hasParent:function(a,b){for(;a;){if(a==b)return!0;a=a.parentNode}return!1},getCenter:function(a){for(var b=[],c=[],d=0,e=a.length;e>d;d++)b.push(a[d].pageX),c.push(a[d].pageY);return{pageX:(Math.min.apply(Math,b)+Math.max.apply(Math,b))/2,pageY:(Math.min.apply(Math,c)+Math.max.apply(Math,c))/2}},getVelocity:function(a,b,c){return{x:Math.abs(b/a)||0,y:Math.abs(c/a)||0}},getAngle:function(a,b){var c=b.pageY-a.pageY,d=b.pageX-a.pageX;return 180*Math.atan2(c,d)/Math.PI},getDirection:function(b,c){var d=Math.abs(b.pageX-c.pageX),e=Math.abs(b.pageY-c.pageY);return d>=e?b.pageX-c.pageX>0?a.Gestures.DIRECTION_LEFT:a.Gestures.DIRECTION_RIGHT:b.pageY-c.pageY>0?a.Gestures.DIRECTION_UP:a.Gestures.DIRECTION_DOWN},getDistance:function(a,b){var c=b.pageX-a.pageX,d=b.pageY-a.pageY;return Math.sqrt(c*c+d*d)},getScale:function(a,b){return a.length>=2&&b.length>=2?this.getDistance(b[0],b[1])/this.getDistance(a[0],a[1]):1},getRotation:function(a,b){return a.length>=2&&b.length>=2?this.getAngle(b[1],b[0])-this.getAngle(a[1],a[0]):0},isVertical:function(b){return b==a.Gestures.DIRECTION_UP||b==a.Gestures.DIRECTION_DOWN},stopDefaultBrowserBehavior:function(a,b){a&&a.classList&&(a.classList.add(b),a.onselectstart=function(){return!1})}},a.Gestures.detection={gestures:[],current:null,previous:null,stopped:!1,startDetect:function(b,c){this.current||(this.stopped=!1,this.current={inst:b,startEvent:a.Gestures.utils.extend({},c),lastEvent:!1,name:""},this.detect(c))},detect:function(b){if(this.current&&!this.stopped){b=this.extendEventData(b);for(var c=this.current.inst.options,d=0,e=this.gestures.length;e>d;d++){var f=this.gestures[d];if(!this.stopped&&c[f.name]!==!1&&f.handler.call(f,b,this.current.inst)===!1){this.stopDetect();break}}return this.current&&(this.current.lastEvent=b),b.eventType==a.Gestures.EVENT_END&&!b.touches.length-1&&this.stopDetect(),b}},stopDetect:function(){this.previous=a.Gestures.utils.extend({},this.current),this.current=null,this.stopped=!0},extendEventData:function(b){var c=this.current.startEvent;if(c&&(b.touches.length!=c.touches.length||b.touches===c.touches)){c.touches=[];for(var d=0,e=b.touches.length;e>d;d++)c.touches.push(a.Gestures.utils.extend({},b.touches[d]))}var f=b.timeStamp-c.timeStamp,g=b.center.pageX-c.center.pageX,h=b.center.pageY-c.center.pageY,i=a.Gestures.utils.getVelocity(f,g,h);return a.Gestures.utils.extend(b,{deltaTime:f,deltaX:g,deltaY:h,velocityX:i.x,velocityY:i.y,distance:a.Gestures.utils.getDistance(c.center,b.center),angle:a.Gestures.utils.getAngle(c.center,b.center),direction:a.Gestures.utils.getDirection(c.center,b.center),scale:a.Gestures.utils.getScale(c.touches,b.touches),rotation:a.Gestures.utils.getRotation(c.touches,b.touches),startEvent:c}),b},register:function(b){var c=b.defaults||{};return void 0===c[b.name]&&(c[b.name]=!0),a.Gestures.utils.extend(a.Gestures.defaults,c,!0),b.index=b.index||1e3,this.gestures.push(b),this.gestures.sort(function(a,b){return a.indexb.index?1:0}),this.gestures}},a.Gestures.gestures=a.Gestures.gestures||{},a.Gestures.gestures.Hold={name:"hold",index:10,defaults:{hold_timeout:500,hold_threshold:1},timer:null,handler:function(b,c){switch(b.eventType){case a.Gestures.EVENT_START:clearTimeout(this.timer),a.Gestures.detection.current.name=this.name,this.timer=setTimeout(function(){"hold"==a.Gestures.detection.current.name&&c.trigger("hold",b)},c.options.hold_timeout);break;case a.Gestures.EVENT_MOVE:b.distance>c.options.hold_threshold&&clearTimeout(this.timer);break;case a.Gestures.EVENT_END:clearTimeout(this.timer)}}},a.Gestures.gestures.Tap={name:"tap",index:100,defaults:{tap_max_touchtime:250,tap_max_distance:10,tap_always:!0,doubletap_distance:20,doubletap_interval:300},handler:function(b,c){if(b.eventType==a.Gestures.EVENT_END){var d=a.Gestures.detection.previous,e=!1;if(b.deltaTime>c.options.tap_max_touchtime||b.distance>c.options.tap_max_distance)return;d&&"tap"==d.name&&b.timeStamp-d.lastEvent.timeStamp0&&b.touches.length>c.options.swipe_max_touches)return;(b.velocityX>c.options.swipe_velocity||b.velocityY>c.options.swipe_velocity)&&(c.trigger(this.name,b),c.trigger(this.name+b.direction,b))}}},a.Gestures.gestures.Drag={name:"drag",index:50,defaults:{drag_min_distance:10,correct_for_drag_min_distance:!0,drag_max_touches:1,drag_block_horizontal:!0,drag_block_vertical:!0,drag_lock_to_axis:!1,drag_lock_min_distance:25},triggered:!1,handler:function(b,c){if(a.Gestures.detection.current.name!=this.name&&this.triggered)return c.trigger(this.name+"end",b),void(this.triggered=!1);if(!(c.options.drag_max_touches>0&&b.touches.length>c.options.drag_max_touches))switch(b.eventType){case a.Gestures.EVENT_START:this.triggered=!1;break;case a.Gestures.EVENT_MOVE:if(b.distancec.options.transform_min_rotation&&c.trigger("rotate",b),d>c.options.transform_min_scale&&(c.trigger("pinch",b),c.trigger("pinch"+(b.scale<1?"in":"out"),b));break;case a.Gestures.EVENT_END:this.triggered&&c.trigger(this.name+"end",b),this.triggered=!1}}},a.Gestures.gestures.Touch={name:"touch",index:-1/0,defaults:{prevent_default:!1,prevent_mouseevents:!1},handler:function(b,c){return c.options.prevent_mouseevents&&b.pointerType==a.Gestures.POINTER_MOUSE?void b.stopDetect():(c.options.prevent_default&&b.preventDefault(),void(b.eventType==a.Gestures.EVENT_START&&c.trigger(this.name,b)))}},a.Gestures.gestures.Release={name:"release",index:1/0,handler:function(b,c){b.eventType==a.Gestures.EVENT_END&&c.trigger(this.name,b)}}}(window.ionic),function(a){function b(){a.Platform.isCordova()?document.addEventListener("deviceready",c,!1):c(),window.removeEventListener("load",b,!1)}function c(){a.Platform.isReady=!0,a.Platform.detect();for(var b=0;b0?c=c.replace(".","_"):c+="_0",this.platforms.push(a+c.split("_")[0]),this.platforms.push(a+c),this.isAndroid()&&4.4>b&&(this.grade=4>b?"c":"b")}}},isCordova:function(){return!(!window.cordova&&!window.PhoneGap&&!window.phonegap)},isIPad:function(){return this.ua.toLowerCase().indexOf("ipad")>=0},isIOS:function(){return this.is("ios")},isAndroid:function(){return this.is("android")},platform:function(){return null===d&&this.setPlatform(this.device().platform),d},setPlatform:function(a){d="undefined"!=typeof a&&null!==a&&a.length?a.toLowerCase():this.ua.indexOf("Android")>0?"android":this.ua.indexOf("iPhone")>-1||this.ua.indexOf("iPad")>-1||this.ua.indexOf("iPod")>-1?"ios":"unknown"},version:function(){return null===e&&this.setVersion(this.device().version),e},setVersion:function(a){if("undefined"!=typeof a&&null!==a&&(a=a.split("."),a=parseFloat(a[0]+"."+(a.length>1?a[1]:0)),!isNaN(a)))return void(e=a);e=0;var b=this.platform(),c={android:/Android (\d+).(\d+)?/,ios:/OS (\d+)_(\d+)?/};c[b]&&(a=this.ua.match(c[b]),a.length>2&&(e=parseFloat(a[1]+"."+a[2])))},is:function(a){if(a=a.toLowerCase(),this.platforms)for(var b=0;b=0},exitApp:function(){this.ready(function(){navigator.app&&navigator.app.exitApp&&navigator.app.exitApp()})},showStatusBar:function(b){this.showStatusBar=b,this.ready(function(){a.Platform.showStatusBar?(StatusBar.show(),document.body.classList.remove("status-bar-hide")):(StatusBar.hide(),document.body.classList.add("status-bar-hide"))})},fullScreen:function(b,c){this.isFullScreen=b!==!1,a.DomUtil.ready(function(){a.Platform.isFullScreen?document.body.classList.add("fullscreen"):document.body.classList.remove("fullscreen")}),this.showStatusBar(c===!0)}};var d=null,e=null,f=[];window.addEventListener("load",b,!1)}(window.ionic),function(a,b,c){"use strict";function d(a){if(a.gesture&&a.gesture.srcEvent){var b=a.gesture.srcEvent,d=b.target;if(f(b))return j(b);for(;d;){if("INPUT"===d.tagName||"A"===d.tagName||"BUTTON"===d.tagName||"LABEL"===d.tagName||"TEXTAREA"===d.tagName||"SELECT"===d.tagName)return c.tapElement(d,b);d=d.parentElement}k()}}function e(a){return a.target.control?j(a):f(a)?j(a):void g(a)}function f(a){var b,c,d;for(b in l)if(c=l[b],d||(d=h(a)),d.x>c.x-o&&d.xc.y-o&&d.y=a.length)for(var d=c-a.length;d--+1;)a.push(void 0);return a.splice(c,0,a.splice(b,1)[0]),a},proxy:function(a,b){var c=Array.prototype.slice.call(arguments,2);return function(){return a.apply(b,c.concat(Array.prototype.slice.call(arguments)))}},debounce:function(a,b,c){var d,e,f,g,h;return function(){f=this,e=arguments,g=new Date;var i=function(){var j=new Date-g;b>j?d=setTimeout(i,b-j):(d=null,c||(h=a.apply(f,e)))},j=c&&!d;return d||(d=setTimeout(i,b)),j&&(h=a.apply(f,e)),h}},throttle:function(a,b,c){var d,e,f,g=null,h=0;c||(c={});var i=function(){h=c.leading===!1?0:Date.now(),g=null,f=a.apply(d,e)};return function(){var j=Date.now();h||c.leading!==!1||(h=j);var k=b-(j-h);return d=this,e=arguments,0>=k?(clearTimeout(g),g=null,h=j,f=a.apply(d,e)):g||c.trailing===!1||(g=setTimeout(i,k)),f}},inherit:function(b,c){var d,e=this;d=b&&b.hasOwnProperty("constructor")?b.constructor:function(){return e.apply(this,arguments)},a.extend(d,e,c);var f=function(){this.constructor=d};return f.prototype=e.prototype,d.prototype=new f,b&&a.extend(d.prototype,b),d.__super__=e.prototype,d},extend:function(a){for(var b=Array.prototype.slice.call(arguments,1),c=0;c2500&&(clearInterval(h),h=null)},1e3/d)),b}}(),stop:function(a){var b=null!=e[a];return b&&(e[a]=null),b},isRunning:function(a){return null!=e[a]},start:function(a,g,h,i,j,k){var l=b(),m=l,n=0,o=0,p=f++;if(k||(k=document.body),p%20===0){var q={};for(var r in e)q[r]=!0;e=q}var s=function(f){var q=f!==!0,r=b();if(!e[p]||g&&!g(p))return e[p]=null,void(h&&h(c-o/((r-l)/d),p,!1));if(q)for(var t=Math.round((r-m)/(d/c))-1,u=0;u1&&(n=1));var v=j?j(n):n;a(v,r,q)!==!1&&1!==n||!q?q&&(m=r,core.effect.Animate.requestAnimationFrame(s,k)):(e[p]=null,h&&h(c-o/((r-l)/d),p,1===n||null==i))};return e[p]=!0,core.effect.Animate.requestAnimationFrame(s,k),p}}}(this);var Scroller;!function(a){var b=function(){},c=function(a){return Math.pow(a-1,3)+1},d=function(a){return(a/=.5)<1?.5*Math.pow(a,3):.5*(Math.pow(a-2,3)+2)};a.views.Scroll=a.views.View.inherit({initialize:function(c){var d=this;this.__container=c.el,this.__content=c.el.firstElementChild,setTimeout(function(){d.__container&&d.__content&&(d.__container.scrollTop=0,d.__content.scrollTop=0)}),this.options={scrollingX:!1,scrollbarX:!0,scrollingY:!0,scrollbarY:!0,startX:0,startY:0,wheelDampen:6,minScrollbarSizeX:5,minScrollbarSizeY:5,scrollbarsFade:!0,scrollbarFadeDelay:300,scrollbarResizeFadeDelay:1e3,animating:!0,animationDuration:250,bouncing:!0,locking:!0,paging:!1,snapping:!1,zooming:!1,minZoom:.5,maxZoom:3,speedMultiplier:1,scrollingComplete:b,penetrationDeceleration:.03,penetrationAcceleration:.08,scrollEventInterval:50};for(var e in c)this.options[e]=c[e];this.hintResize=a.debounce(function(){d.resize()},1e3,!0),this.triggerScrollEvent=a.throttle(function(){a.trigger("scroll",{scrollTop:d.__scrollTop,scrollLeft:d.__scrollLeft,target:d.__container})},this.options.scrollEventInterval),this.triggerScrollEndEvent=function(){a.trigger("scrollend",{scrollTop:d.__scrollTop,scrollLeft:d.__scrollLeft,target:d.__container})},this.__scrollLeft=this.options.startX,this.__scrollTop=this.options.startY,this.__callback=this.getRenderFn(),this.__initEventHandlers(),this.__createScrollbars()},run:function(){this.resize(),this.__fadeScrollbars("out",this.options.scrollbarResizeFadeDelay)},__isSingleTouch:!1,__isTracking:!1,__didDecelerationComplete:!1,__isGesturing:!1,__isDragging:!1,__isDecelerating:!1,__isAnimating:!1,__clientLeft:0,__clientTop:0,__clientWidth:0,__clientHeight:0,__contentWidth:0,__contentHeight:0,__snapWidth:100,__snapHeight:100,__refreshHeight:null,__refreshActive:!1,__refreshActivate:null,__refreshDeactivate:null,__refreshStart:null,__zoomLevel:1,__scrollLeft:0,__scrollTop:0,__maxScrollLeft:0,__maxScrollTop:0,__scheduledLeft:0,__scheduledTop:0,__scheduledZoom:0,__lastTouchLeft:null,__lastTouchTop:null,__lastTouchMove:null,__positions:null,__minDecelerationScrollLeft:null,__minDecelerationScrollTop:null,__maxDecelerationScrollLeft:null,__maxDecelerationScrollTop:null,__decelerationVelocityX:null,__decelerationVelocityY:null,__transformProperty:null,__perspectiveProperty:null,__indicatorX:null,__indicatorY:null,__scrollbarFadeTimeout:null,__didWaitForSize:null,__sizerTimeout:null,__initEventHandlers:function(){function b(a){return a.target.tagName.match(IS_INPUT_LIKE_REGEX)||a.target.isContentEditable}var c=this,d=this.__container;if(d.addEventListener("scrollChildIntoView",function(b){var e=window.innerHeight,f=b.target,g=b.target.offsetHeight,h=f.getBoundingClientRect().top,i=a.DomUtil.getPositionInParent(f,d).top;h+g>e&&c.scrollTo(0,i+g-.5*e,!0),b.stopPropagation()}),"ontouchstart"in window)d.addEventListener("touchstart",function(a){a.defaultPrevented||b(a)||(c.doTouchStart(a.touches,a.timeStamp),a.preventDefault())},!1),document.addEventListener("touchmove",function(a){a.defaultPrevented||c.doTouchMove(a.touches,a.timeStamp)},!1),document.addEventListener("touchend",function(a){c.doTouchEnd(a.timeStamp)},!1);else{var e=!1;d.addEventListener("mousedown",function(a){a.defaultPrevented||b(a)||(c.doTouchStart([{pageX:a.pageX,pageY:a.pageY}],a.timeStamp),a.preventDefault(),e=!0)},!1),document.addEventListener("mousemove",function(a){e&&!a.defaultPrevented&&(c.doTouchMove([{pageX:a.pageX,pageY:a.pageY}],a.timeStamp),e=!0)},!1),document.addEventListener("mouseup",function(a){e&&(c.doTouchEnd(a.timeStamp),e=!1)},!1),document.addEventListener("mousewheel",function(a){c.scrollBy(a.wheelDeltaX/c.options.wheelDampen,-a.wheelDeltaY/c.options.wheelDampen)})}},__createScrollbar:function(a){var b=document.createElement("div"),c=document.createElement("div");return c.className="scroll-bar-indicator",b.className="h"==a?"scroll-bar scroll-bar-h":"scroll-bar scroll-bar-v",b.appendChild(c),b},__createScrollbars:function(){var a,b;this.options.scrollingX&&(a={el:this.__createScrollbar("h"),sizeRatio:1},a.indicator=a.el.children[0],this.options.scrollbarX&&this.__container.appendChild(a.el),this.__indicatorX=a),this.options.scrollingY&&(b={el:this.__createScrollbar("v"),sizeRatio:1},b.indicator=b.el.children[0],this.options.scrollbarY&&this.__container.appendChild(b.el),this.__indicatorY=b)},__resizeScrollbars:function(){var a=this;if(a.__fadeScrollbars("in"),a.__indicatorX){var b=Math.max(Math.round(a.__clientWidth*a.__clientWidth/a.__contentWidth),20); b>a.__contentWidth&&(b=0),a.__indicatorX.size=b,a.__indicatorX.minScale=this.options.minScrollbarSizeX/b,a.__indicatorX.indicator.style.width=b+"px",a.__indicatorX.maxPos=a.__clientWidth-b,a.__indicatorX.sizeRatio=a.__maxScrollLeft?a.__indicatorX.maxPos/a.__maxScrollLeft:1}if(a.__indicatorY){var c=Math.max(Math.round(a.__clientHeight*a.__clientHeight/a.__contentHeight),20);c>a.__contentHeight&&(c=0),a.__indicatorY.size=c,a.__indicatorY.minScale=this.options.minScrollbarSizeY/c,a.__indicatorY.maxPos=a.__clientHeight-c,a.__indicatorY.indicator.style.height=c+"px",a.__indicatorY.sizeRatio=a.__maxScrollTop?a.__indicatorY.maxPos/a.__maxScrollTop:1}},__repositionScrollbars:function(){var a,b,c,d,e,f=this,g=0,h=0;f.__indicatorX&&(f.__indicatorY&&(g=10),d=Math.round(f.__indicatorX.sizeRatio*f.__scrollLeft)||0,b=f.__scrollLeft-(f.__maxScrollLeft-g),f.__scrollLeft<0?(widthScale=Math.max(f.__indicatorX.minScale,(f.__indicatorX.size-Math.abs(f.__scrollLeft))/f.__indicatorX.size),d=0,f.__indicatorX.indicator.style[f.__transformOriginProperty]="left center"):b>0?(widthScale=Math.max(f.__indicatorX.minScale,(f.__indicatorX.size-b)/f.__indicatorX.size),d=f.__indicatorX.maxPos-g,f.__indicatorX.indicator.style[f.__transformOriginProperty]="right center"):(d=Math.min(f.__maxScrollLeft,Math.max(0,d)),widthScale=1),f.__indicatorX.indicator.style[f.__transformProperty]="translate3d("+d+"px, 0, 0) scaleX("+widthScale+")"),f.__indicatorY&&(e=Math.round(f.__indicatorY.sizeRatio*f.__scrollTop)||0,f.__indicatorX&&(h=10),c=f.__scrollTop-(f.__maxScrollTop-h),f.__scrollTop<0?(a=Math.max(f.__indicatorY.minScale,(f.__indicatorY.size-Math.abs(f.__scrollTop))/f.__indicatorY.size),e=0,f.__indicatorY.indicator.style[f.__transformOriginProperty]="center top"):c>0?(a=Math.max(f.__indicatorY.minScale,(f.__indicatorY.size-c)/f.__indicatorY.size),e=f.__indicatorY.maxPos-h,f.__indicatorY.indicator.style[f.__transformOriginProperty]="center bottom"):(e=Math.min(f.__maxScrollTop,Math.max(0,e)),a=1),f.__indicatorY.indicator.style[f.__transformProperty]="translate3d(0,"+e+"px, 0) scaleY("+a+")")},__fadeScrollbars:function(a,b){var c=this;if(this.options.scrollbarsFade){var d="scroll-bar-fade-out";c.options.scrollbarsFade===!0&&(clearTimeout(c.__scrollbarFadeTimeout),"in"==a?(c.__indicatorX&&c.__indicatorX.indicator.classList.remove(d),c.__indicatorY&&c.__indicatorY.indicator.classList.remove(d)):c.__scrollbarFadeTimeout=setTimeout(function(){c.__indicatorX&&c.__indicatorX.indicator.classList.add(d),c.__indicatorY&&c.__indicatorY.indicator.classList.add(d)},b||c.options.scrollbarFadeDelay))}},__scrollingComplete:function(){var a=this;a.options.scrollingComplete(),a.__fadeScrollbars("out")},resize:function(){this.setDimensions(this.__container.clientWidth,this.__container.clientHeight,Math.max(this.__content.scrollWidth,this.__content.offsetWidth),Math.max(this.__content.scrollHeight,this.__content.offsetHeight))},getRenderFn:function(){var a,b=this,c=this.__content,d=document.documentElement.style;"MozAppearance"in d?a="gecko":"WebkitAppearance"in d?a="webkit":"string"==typeof navigator.cpuClass&&(a="trident");var e,f={trident:"ms",gecko:"Moz",webkit:"Webkit",presto:"O"}[a],g=document.createElement("div"),h=f+"Perspective",i=f+"Transform",j=f+"TransformOrigin";return b.__perspectiveProperty=i,b.__transformProperty=i,b.__transformOriginProperty=j,g.style[h]!==e?function(a,d){c.style[i]="translate3d("+-a+"px,"+-d+"px,0)",b.__repositionScrollbars(),b.triggerScrollEvent()}:g.style[i]!==e?function(a,d){c.style[i]="translate("+-a+"px,"+-d+"px)",b.__repositionScrollbars(),b.triggerScrollEvent()}:function(a,d,e){c.style.marginLeft=a?-a/e+"px":"",c.style.marginTop=d?-d/e+"px":"",c.style.zoom=e||"",b.__repositionScrollbars(),b.triggerScrollEvent()}},setDimensions:function(a,b,c,d){var e=this;a===+a&&(e.__clientWidth=a),b===+b&&(e.__clientHeight=b),c===+c&&(e.__contentWidth=c),d===+d&&(e.__contentHeight=d),e.__computeScrollMax(),e.__resizeScrollbars(),e.scrollTo(e.__scrollLeft,e.__scrollTop,!0)},setPosition:function(a,b){var c=this;c.__clientLeft=a||0,c.__clientTop=b||0},setSnapSize:function(a,b){var c=this;c.__snapWidth=a,c.__snapHeight=b},activatePullToRefresh:function(a,b,c,d){var e=this;e.__refreshHeight=a,e.__refreshActivate=b,e.__refreshDeactivate=c,e.__refreshStart=d},triggerPullToRefresh:function(){this.__publish(this.__scrollLeft,-this.__refreshHeight,this.__zoomLevel,!0),this.__refreshStart&&this.__refreshStart()},finishPullToRefresh:function(){var a=this;a.__refreshActive=!1,a.__refreshDeactivate&&a.__refreshDeactivate(),a.scrollTo(a.__scrollLeft,a.__scrollTop,!0)},getValues:function(){var a=this;return{left:a.__scrollLeft,top:a.__scrollTop,zoom:a.__zoomLevel}},getScrollMax:function(){var a=this;return{left:a.__maxScrollLeft,top:a.__maxScrollTop}},zoomTo:function(a,b,c,d){var e=this;if(!e.options.zooming)throw new Error("Zooming is not enabled!");e.__isDecelerating&&(core.effect.Animate.stop(e.__isDecelerating),e.__isDecelerating=!1);var f=e.__zoomLevel;null==c&&(c=e.__clientWidth/2),null==d&&(d=e.__clientHeight/2),a=Math.max(Math.min(a,e.options.maxZoom),e.options.minZoom),e.__computeScrollMax(a);var g=(c+e.__scrollLeft)*a/f-c,h=(d+e.__scrollTop)*a/f-d;g>e.__maxScrollLeft?g=e.__maxScrollLeft:0>g&&(g=0),h>e.__maxScrollTop?h=e.__maxScrollTop:0>h&&(h=0),e.__publish(g,h,a,b)},zoomBy:function(a,b,c,d){var e=this;e.zoomTo(e.__zoomLevel*a,b,c,d)},scrollTo:function(a,b,c,d){var e=this;if(e.__isDecelerating&&(core.effect.Animate.stop(e.__isDecelerating),e.__isDecelerating=!1),null!=d&&d!==e.__zoomLevel){if(!e.options.zooming)throw new Error("Zooming is not enabled!");a*=d,b*=d,e.__computeScrollMax(d)}else d=e.__zoomLevel;e.options.scrollingX?e.options.paging?a=Math.round(a/e.__clientWidth)*e.__clientWidth:e.options.snapping&&(a=Math.round(a/e.__snapWidth)*e.__snapWidth):a=e.__scrollLeft,e.options.scrollingY?e.options.paging?b=Math.round(b/e.__clientHeight)*e.__clientHeight:e.options.snapping&&(b=Math.round(b/e.__snapHeight)*e.__snapHeight):b=e.__scrollTop,a=Math.max(Math.min(e.__maxScrollLeft,a),0),b=Math.max(Math.min(e.__maxScrollTop,b),0),a===e.__scrollLeft&&b===e.__scrollTop&&(c=!1),e.__publish(a,b,d,c)},scrollBy:function(a,b,c){var d=this,e=d.__isAnimating?d.__scheduledLeft:d.__scrollLeft,f=d.__isAnimating?d.__scheduledTop:d.__scrollTop;d.scrollTo(e+(a||0),f+(b||0),c)},doMouseZoom:function(a,b,c,d){var e=this,f=a>0?.97:1.03;return e.zoomTo(e.__zoomLevel*f,!1,c-e.__clientLeft,d-e.__clientTop)},doTouchStart:function(a,b){if(this.hintResize(),null==a.length)throw new Error("Invalid touch list: "+a);if(b instanceof Date&&(b=b.valueOf()),"number"!=typeof b)throw new Error("Invalid timestamp value: "+b);var c=this;c.__fadeScrollbars("in"),c.__interruptedAnimation=!0,c.__isDecelerating&&(core.effect.Animate.stop(c.__isDecelerating),c.__isDecelerating=!1,c.__interruptedAnimation=!0),c.__isAnimating&&(core.effect.Animate.stop(c.__isAnimating),c.__isAnimating=!1,c.__interruptedAnimation=!0);var d,e,f=1===a.length;f?(d=a[0].pageX,e=a[0].pageY):(d=Math.abs(a[0].pageX+a[1].pageX)/2,e=Math.abs(a[0].pageY+a[1].pageY)/2),c.__initialTouchLeft=d,c.__initialTouchTop=e,c.__zoomLevelStart=c.__zoomLevel,c.__lastTouchLeft=d,c.__lastTouchTop=e,c.__lastTouchMove=b,c.__lastScale=1,c.__enableScrollX=!f&&c.options.scrollingX,c.__enableScrollY=!f&&c.options.scrollingY,c.__isTracking=!0,c.__didDecelerationComplete=!1,c.__isDragging=!f,c.__isSingleTouch=f,c.__positions=[]},doTouchMove:function(a,b,c){if(null==a.length)throw new Error("Invalid touch list: "+a);if(b instanceof Date&&(b=b.valueOf()),"number"!=typeof b)throw new Error("Invalid timestamp value: "+b);var d=this;if(d.__isTracking){var e,f;2===a.length?(e=Math.abs(a[0].pageX+a[1].pageX)/2,f=Math.abs(a[0].pageY+a[1].pageY)/2):(e=a[0].pageX,f=a[0].pageY);var g=d.__positions;if(d.__isDragging){var h=e-d.__lastTouchLeft,i=f-d.__lastTouchTop,j=d.__scrollLeft,k=d.__scrollTop,l=d.__zoomLevel;if(null!=c&&d.options.zooming){var m=l;if(l=l/d.__lastScale*c,l=Math.max(Math.min(l,d.options.maxZoom),d.options.minZoom),m!==l){var n=e-d.__clientLeft,o=f-d.__clientTop;j=(n+j)*l/m-n,k=(o+k)*l/m-o,d.__computeScrollMax(l)}}if(d.__enableScrollX){j-=h*this.options.speedMultiplier;var p=d.__maxScrollLeft;(j>p||0>j)&&(d.options.bouncing?j+=h/2*this.options.speedMultiplier:j=j>p?p:0)}if(d.__enableScrollY){k-=i*this.options.speedMultiplier;var q=d.__maxScrollTop;(k>q||0>k)&&(d.options.bouncing||d.__refreshHeight&&0>k?(k+=i/2*this.options.speedMultiplier,d.__enableScrollX||null==d.__refreshHeight||(!d.__refreshActive&&k<=-d.__refreshHeight?(d.__refreshActive=!0,d.__refreshActivate&&d.__refreshActivate()):d.__refreshActive&&k>-d.__refreshHeight&&(d.__refreshActive=!1,d.__refreshDeactivate&&d.__refreshDeactivate()))):k=k>q?q:0)}g.length>60&&g.splice(0,30),g.push(j,k,b),d.__publish(j,k,l)}else{var r=d.options.locking?3:0,s=5,t=Math.abs(e-d.__initialTouchLeft),u=Math.abs(f-d.__initialTouchTop);d.__enableScrollX=d.options.scrollingX&&t>=r,d.__enableScrollY=d.options.scrollingY&&u>=r,g.push(d.__scrollLeft,d.__scrollTop,b),d.__isDragging=(d.__enableScrollX||d.__enableScrollY)&&(t>=s||u>=s),d.__isDragging&&(d.__interruptedAnimation=!1)}d.__lastTouchLeft=e,d.__lastTouchTop=f,d.__lastTouchMove=b,d.__lastScale=c}},doTouchEnd:function(a){if(a instanceof Date&&(a=a.valueOf()),"number"!=typeof a)throw new Error("Invalid timestamp value: "+a);var b=this;if(b.__isTracking){if(b.__isTracking=!1,b.__isDragging)if(b.__isDragging=!1,b.__isSingleTouch&&b.options.animating&&a-b.__lastTouchMove<=100){for(var c=b.__positions,d=c.length-1,e=d,f=d;f>0&&c[f]>b.__lastTouchMove-100;f-=3)e=f;if(e!==d){var g=c[d]-c[e],h=b.__scrollLeft-c[e-2],i=b.__scrollTop-c[e-1];b.__decelerationVelocityX=h/g*(1e3/60),b.__decelerationVelocityY=i/g*(1e3/60);var j=b.options.paging||b.options.snapping?4:1;(Math.abs(b.__decelerationVelocityX)>j||Math.abs(b.__decelerationVelocityY)>j)&&(b.__refreshActive||b.__startDeceleration(a))}else b.__scrollingComplete()}else a-b.__lastTouchMove>100&&b.__scrollingComplete();b.__isDecelerating||(b.__refreshActive&&b.__refreshStart?(b.__publish(b.__scrollLeft,-b.__refreshHeight,b.__zoomLevel,!0),b.__refreshStart&&b.__refreshStart()):((b.__interruptedAnimation||b.__isDragging)&&b.__scrollingComplete(),b.scrollTo(b.__scrollLeft,b.__scrollTop,!0,b.__zoomLevel),b.__refreshActive&&(b.__refreshActive=!1,b.__refreshDeactivate&&b.__refreshDeactivate()))),b.__positions.length=0}},__publish:function(a,b,e,f){var g=this,h=g.__isAnimating;if(h&&(core.effect.Animate.stop(h),g.__isAnimating=!1),f&&g.options.animating){g.__scheduledLeft=a,g.__scheduledTop=b,g.__scheduledZoom=e;var i=g.__scrollLeft,j=g.__scrollTop,k=g.__zoomLevel,l=a-i,m=b-j,n=e-k,o=function(a,b,c){c&&(g.__scrollLeft=i+l*a,g.__scrollTop=j+m*a,g.__zoomLevel=k+n*a,g.__callback&&g.__callback(g.__scrollLeft,g.__scrollTop,g.__zoomLevel))},p=function(a){return g.__isAnimating===a},q=function(a,b,c){b===g.__isAnimating&&(g.__isAnimating=!1),(g.__didDecelerationComplete||c)&&g.__scrollingComplete(),g.options.zooming&&g.__computeScrollMax()};g.__isAnimating=core.effect.Animate.start(o,p,q,g.options.animationDuration,h?c:d)}else g.__scheduledLeft=g.__scrollLeft=a,g.__scheduledTop=g.__scrollTop=b,g.__scheduledZoom=g.__zoomLevel=e,g.__callback&&g.__callback(a,b,e),g.options.zooming&&g.__computeScrollMax()},__computeScrollMax:function(a){var b=this;null==a&&(a=b.__zoomLevel),b.__maxScrollLeft=Math.max(b.__contentWidth*a-b.__clientWidth,0),b.__maxScrollTop=Math.max(b.__contentHeight*a-b.__clientHeight,0),b.__didWaitForSize||0!=b.__maxScrollLeft||0!=b.__maxScrollTop||(b.__didWaitForSize=!0,b.__waitForSize())},__waitForSize:function(){var a=this;clearTimeout(a.__sizerTimeout);var b=function(){a.resize(),a.options.scrollingX&&0==a.__maxScrollLeft||a.options.scrollingY&&0==a.__maxScrollTop};b(),a.__sizerTimeout=setTimeout(b,1e3)},__startDeceleration:function(){var a=this;if(a.options.paging){var b=Math.max(Math.min(a.__scrollLeft,a.__maxScrollLeft),0),c=Math.max(Math.min(a.__scrollTop,a.__maxScrollTop),0),d=a.__clientWidth,e=a.__clientHeight;a.__minDecelerationScrollLeft=Math.floor(b/d)*d,a.__minDecelerationScrollTop=Math.floor(c/e)*e,a.__maxDecelerationScrollLeft=Math.ceil(b/d)*d,a.__maxDecelerationScrollTop=Math.ceil(c/e)*e}else a.__minDecelerationScrollLeft=0,a.__minDecelerationScrollTop=0,a.__maxDecelerationScrollLeft=a.__maxScrollLeft,a.__maxDecelerationScrollTop=a.__maxScrollTop;var f=function(b,c,d){a.__stepThroughDeceleration(d)};a.__minVelocityToKeepDecelerating=a.options.snapping?4:.1;var g=function(){var b=Math.abs(a.__decelerationVelocityX)>=a.__minVelocityToKeepDecelerating||Math.abs(a.__decelerationVelocityY)>=a.__minVelocityToKeepDecelerating;return b||(a.__didDecelerationComplete=!0),b},h=function(){a.__isDecelerating=!1,a.__didDecelerationComplete&&a.__scrollingComplete(),a.options.paging&&a.scrollTo(a.__scrollLeft,a.__scrollTop,a.options.snapping)};a.__isDecelerating=core.effect.Animate.start(f,g,h)},__stepThroughDeceleration:function(a){var b=this,c=b.__scrollLeft+b.__decelerationVelocityX,d=b.__scrollTop+b.__decelerationVelocityY;if(!b.options.bouncing){var e=Math.max(Math.min(b.__maxDecelerationScrollLeft,c),b.__minDecelerationScrollLeft);e!==c&&(c=e,b.__decelerationVelocityX=0);var f=Math.max(Math.min(b.__maxDecelerationScrollTop,d),b.__minDecelerationScrollTop);f!==d&&(d=f,b.__decelerationVelocityY=0)}if(a?b.__publish(c,d,b.__zoomLevel):(b.__scrollLeft=c,b.__scrollTop=d),!b.options.paging){var g=.95;b.__decelerationVelocityX*=g,b.__decelerationVelocityY*=g}if(b.options.bouncing){var h=0,i=0,j=b.options.penetrationDeceleration,k=b.options.penetrationAcceleration;if(cb.__maxDecelerationScrollLeft&&(h=b.__maxDecelerationScrollLeft-c),db.__maxDecelerationScrollTop&&(i=b.__maxDecelerationScrollTop-d),0!==h){var l=h*b.__decelerationVelocityX<=b.__minDecelerationScrollLeft;l&&(b.__decelerationVelocityX+=h*j);var m=Math.abs(b.__decelerationVelocityX)<=b.__minVelocityToKeepDecelerating;(!l||m)&&(b.__decelerationVelocityX=h*k)}if(0!==i){var n=i*b.__decelerationVelocityY<=b.__minDecelerationScrollTop;n&&(b.__decelerationVelocityY+=i*j);var o=Math.abs(b.__decelerationVelocityY)<=b.__minVelocityToKeepDecelerating;(!n||o)&&(b.__decelerationVelocityY=i*k)}}}})}(ionic),function(a){"use strict";a.views.ActionSheet=a.views.View.inherit({initialize:function(a){this.el=a.el},show:function(){this.el.offsetWidth,this.el.classList.add("active")},hide:function(){this.el.offsetWidth,this.el.classList.remove("active")}})}(ionic),function(a){"use strict";a.views.HeaderBar=a.views.View.inherit({initialize:function(b){this.el=b.el,a.extend(this,{alignTitle:"center"},b),this.align()},align:a.animationFrameThrottle(function(b){var c=this.el.querySelector(b||".title");if(c){var d,e,f,g=this.el.childNodes,h=0,i=0,j=!0;for(d=0;d10&&(c.style.left=k+"px",c.style.right=k+"px"),c.offsetWidth0&&(c.style.right=i+5+"px")):"left"==this.alignTitle?(c.classList.add("titleEl-left"),h>0&&(c.style.left=h+15+"px")):"right"==this.alignTitle&&(c.classList.add("titleEl-right"),i>0&&(c.style.right=i+15+"px"))}})})}(ionic),function(a){"use strict";var b="item",c="item-content",d="item-sliding",e="item-options",f="item-placeholder",g="item-reordering",h="item-drag",i=function(){};i.prototype={start:function(){},drag:function(){},end:function(){}};var j=function(a){this.dragThresholdX=a.dragThresholdX||10,this.el=a.el};j.prototype=new i,j.prototype.start=function(f){var g,h,i,j;f.target.classList.contains(c)?g=f.target:f.target.classList.contains(b)&&(g=f.target.querySelector("."+c)),g&&(g.classList.remove(d),i=parseFloat(g.style[a.CSS.TRANSFORM].replace("translate3d(","").split(",")[0])||0,h=g.parentNode.querySelector("."+e),h&&(j=h.offsetWidth,this._currentDrag={buttonsWidth:j,content:g,startOffsetX:i}))},j.prototype.drag=a.animationFrameThrottle(function(b){var c;if(this._currentDrag&&(!this._isDragging&&(Math.abs(b.gesture.deltaX)>this.dragThresholdX||Math.abs(this._currentDrag.startOffsetX)>0)&&(this._isDragging=!0),this._isDragging)){c=this._currentDrag.buttonsWidth;var d=Math.min(0,this._currentDrag.startOffsetX+b.gesture.deltaX);-c>d&&(d=Math.min(-c,-c+.4*(b.gesture.deltaX+c))),this._currentDrag.content.style[a.CSS.TRANSFORM]="translate3d("+d+"px, 0, 0)",this._currentDrag.content.style.webkitTransition="none"}}),j.prototype.end=function(b,c){var d=this;if(!this._currentDrag)return void(c&&c());var e=-this._currentDrag.buttonsWidth;b.gesture.deltaX>-(this._currentDrag.buttonsWidth/2)&&("left"==b.gesture.direction&&Math.abs(b.gesture.velocityX)<.3?e=0:"right"==b.gesture.direction&&(e=0)),a.requestAnimationFrame(function(){d._currentDrag.content.style[a.CSS.TRANSFORM]=0===e?"":"translate3d("+e+"px, 0, 0)",d._currentDrag.content.style[a.CSS.TRANSFORM]="",d._currentDrag=null,c&&c()})};var k=function(a){this.dragThresholdY=a.dragThresholdY||0,this.onReorder=a.onReorder,this.el=a.el,this.scrollEl=a.scrollEl,this.scrollView=a.scrollView};k.prototype=new i,k.prototype._moveElement=function(b){var c=b.gesture.center.pageY-this._currentDrag.elementHeight/2;this.el.style[a.CSS.TRANSFORM]="translate3d(0, "+c+"px, 0)"},k.prototype.start=function(b){var c=(this.el.offsetTop,a.DomUtil.getChildIndex(this.el,this.el.nodeName.toLowerCase())),d=this.el.offsetHeight,e=this.el.cloneNode(!0),h=(this.scrollEl||this.el).parentNode;e.classList.add(f),this.el.parentNode.insertBefore(e,this.el),this.el.classList.add(g),h.parentNode.appendChild(this.el),this._currentDrag={elementHeight:d,startIndex:c,placeholder:e,scrollHeight:scroll,list:e.parentNode},this._moveElement(b)},k.prototype.drag=a.animationFrameThrottle(function(a){if(this._currentDrag){var b=0,c=a.gesture.center.pageY;if(this.scrollView){var d=this.scrollEl;b=this.scrollView.getValues().top;var e=d.offsetTop,f=e-c+this._currentDrag.elementHeight/2,g=c+this._currentDrag.elementHeight/2-e-d.offsetHeight;a.gesture.deltaY<0&&f>0&&b>0&&this.scrollView.scrollBy(null,-f),a.gesture.deltaY>0&&g>0&&bthis.dragThresholdY&&(this._isDragging=!0),this._isDragging&&(this._moveElement(a),this._currentDrag.currentY=b+c-this._currentDrag.placeholder.parentNode.offsetTop,this._reorderItems())}}),k.prototype._reorderItems=function(){var b=(this._currentDrag.placeholder,Array.prototype.slice.call(this._currentDrag.placeholder.parentNode.children)),c=b.indexOf(this._currentDrag.placeholder),d=b[Math.max(0,c-1)],e=b[Math.min(b.length,c+1)],f=this._currentDrag.currentY;return d&&fe.offsetTop+e.offsetHeight/2?(a.DomUtil.swapNodes(e,this._currentDrag.placeholder),c+1):void 0},k.prototype.end=function(b,c){if(!this._currentDrag)return void(c&&c());var d=this._currentDrag.placeholder,e=a.DomUtil.getChildIndex(d,d.nodeName.toLowerCase());this.el.classList.remove(g),this.el.style[a.CSS.TRANSFORM]="",d.parentNode.insertBefore(this.el,d),d.parentNode.removeChild(d),this.onReorder&&this.onReorder(this.el,this._currentDrag.startIndex,e),this._currentDrag=null,c&&c()},a.views.ListView=a.views.View.inherit({initialize:function(b){var c=this;b=a.extend({onReorder:function(){},virtualRemoveThreshold:-200,virtualAddThreshold:200},b),a.extend(this,b),!this.itemHeight&&this.listEl&&(this.itemHeight=this.listEl.children[0]&&parseInt(this.listEl.children[0].style.height,10)),this.onRefresh=b.onRefresh||function(){},this.onRefreshOpening=b.onRefreshOpening||function(){},this.onRefreshHolding=b.onRefreshHolding||function(){},window.ionic.onGesture("touch",function(a){c._handleTouch(a)},this.el),window.ionic.onGesture("release",function(a){c._handleEndDrag(a)},this.el),window.ionic.onGesture("drag",function(a){c._handleDrag(a)},this.el),this._initDrag()},stopRefreshing:function(){var a=this.el.querySelector(".list-refresher");a.style.height="0px"},didScroll:function(a){if(this.isVirtual){var b=this.itemHeight,c=(this.listEl.children.length,a.target.scrollHeight),d=this.el.parentNode.offsetHeight,e=(a.scrollTop,Math.max(0,a.scrollTop+this.virtualRemoveThreshold)),f=Math.min(c,Math.abs(a.scrollTop)+d+this.virtualAddThreshold),g=Math.floor((f-e)/b),h=parseInt(Math.abs(e/b),10),i=parseInt(Math.abs(f/b),10);this._virtualItemsToRemove=Array.prototype.slice.call(this.listEl.children,0,h);{Array.prototype.slice.call(this.listEl.children,h,h+g)}this.renderViewport&&this.renderViewport(e,f,h,i)}},didStopScrolling:function(){if(this.isVirtual)for(var a=0;a5)return this._dragOp=new j({el:this.el}),this._dragOp.start(b),void b.preventDefault()}else{var d=this._getItem(b.target);if(d)return this._dragOp=new k({el:d,scrollEl:this.scrollEl,scrollView:this.scrollView,onReorder:function(a,b,d){c.onReorder&&c.onReorder(a,b,d)}}),this._dragOp.start(b),void b.preventDefault()}},_handleEndDrag:function(a){var b=this;if(this._dragOp){clearTimeout(this._touchTimeout);for(var c=b.el.querySelectorAll(".item"),d=0,e=c.length;e>d;d++)c[d].classList.remove("active");this._dragOp.end(a,function(){b._initDrag()})}},_handleDrag:function(a){(Math.abs(a.gesture.deltaX)>10||Math.abs(a.gesture.deltaY)>10)&&clearTimeout(this._touchTimeout),clearTimeout(this._touchTimeout),this.isDragging||this._dragOp||this._startDrag(a),this._dragOp&&(a.gesture.srcEvent.preventDefault(),this._dragOp.drag(a))},_handleTouch:function(c){var d=this,e=a.DomUtil.getParentOrSelfWithClass(c.target,b);e&&(this._touchTimeout=setTimeout(function(){for(var a=d.el.querySelectorAll(".item"),b=0,c=a.length;c>b;b++)a[b].classList.remove("active");e.classList.add("active")},250))}})}(ionic),function(a){"use strict";a.views.Loading=a.views.View.inherit({initialize:function(a){this.el=a.el,this.maxWidth=a.maxWidth||200,this.showDelay=a.showDelay||0,this._loadingBox=this.el.querySelector(".loading")},show:function(){var a=this;if(this._loadingBox){var b=a._loadingBox,c=Math.min(a.maxWidth,Math.max(window.outerWidth-40,b.offsetWidth));b.style.width=c+"px",b.style.marginLeft=-b.offsetWidth/2+"px",b.style.marginTop=-b.offsetHeight/2+"px",this._showDelayTimeout=window.setTimeout(function(){a.el.classList.add("active")},a.showDelay)}},hide:function(){this.el.offsetWidth,window.clearTimeout(this._showDelayTimeout),this.el.classList.remove("active")}})}(ionic),function(a){"use strict";a.views.Modal=a.views.View.inherit({initialize:function(b){b=a.extend({focusFirstInput:!1,unfocusOnHide:!0,focusFirstDelay:600},b),a.extend(this,b),this.el=b.el},show:function(){var a=this;this.el.classList.add("active"),this.focusFirstInput&&window.setTimeout(function(){var b=a.el.querySelector("input, textarea");b&&b.focus&&b.focus()},this.focusFirstDelay)},hide:function(){if(this.el.classList.remove("active"),this.unfocusOnHide){var a=this.el.querySelectorAll("input, textarea");window.setTimeout(function(){for(var b=0;bb?-r:b>u?r:0,0))}a.continuous&&n.transitions&&(g(e(u-1),-r,0),g(e(u+1),r,0)),n.transitions||(t.style.left=u*-r+"px"),o.style.visibility="visible",a.slidesChanged&&a.slidesChanged()}function c(){a.continuous?f(u-1):u&&f(u-1)}function d(){a.continuous?f(u+1):uu?b:u)-h-1),r*d,0);b=e(b),g(u,r*d,c||v),g(b,0,c||v),a.continuous&&g(e(b-d),-(r*d),0)}else b=e(b),i(u*-r,b*-r,c||v);u=b,m(a.callback&&a.callback(u,p[u]))}}function g(a,b,c){h(a,b,c),q[a]=b}function h(a,b,c){var d=p[a],e=d&&d.style;e&&(e.webkitTransitionDuration=e.MozTransitionDuration=e.msTransitionDuration=e.OTransitionDuration=e.transitionDuration=c+"ms",e.webkitTransform="translate("+b+"px,0)translateZ(0)",e.msTransform=e.MozTransform=e.OTransform="translateX("+b+"px)")}function i(b,c,d){if(!d)return void(t.style.left=c+"px");var e=+new Date,f=setInterval(function(){var g=+new Date-e;return g>d?(t.style.left=c+"px",y&&j(),a.transitionEnd&&a.transitionEnd.call(event,u,p[u]),void clearInterval(f)):void(t.style.left=(c-b)*(Math.floor(g/d*100)/100)+b+"px")},4)}function j(){w=setTimeout(d,y)}function k(){y=a.auto||0,clearTimeout(w)}var l=function(){},m=function(a){setTimeout(a||l,0)},n={addEventListener:!!window.addEventListener,touch:"ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch,transitions:function(a){var b=["transitionProperty","WebkitTransition","MozTransition","OTransition","msTransition"];for(var c in b)if(void 0!==a.style[b[c]])return!0;return!1}(document.createElement("swipe"))},o=a.el;if(o){var p,q,r,s,t=o.children[0];a=a||{};var u=parseInt(a.startSlide,10)||0,v=a.speed||300;a.continuous=void 0!==a.continuous?a.continuous:!0;var w,x,y=a.auto||0,z={},A={},B={handleEvent:function(c){switch(("mousedown"==c.type||"mouseup"==c.type||"mousemove"==c.type)&&(c.touches=[{pageX:c.pageX,pageY:c.pageY}]),c.type){case"mousedown":this.start(c);break;case"touchstart":this.start(c);break;case"touchmove":this.move(c);break;case"mousemove":this.move(c);break;case"touchend":m(this.end(c));break;case"mouseup":m(this.end(c));break;case"webkitTransitionEnd":case"msTransitionEnd":case"oTransitionEnd":case"otransitionend":case"transitionend":m(this.transitionEnd(c));break;case"resize":m(b)}a.stopPropagation&&c.stopPropagation()},start:function(a){var b=a.touches[0];z={x:b.pageX,y:b.pageY,time:+new Date},x=void 0,A={},n.touch?(t.addEventListener("touchmove",this,!1),t.addEventListener("touchend",this,!1)):(t.addEventListener("mousemove",this,!1),t.addEventListener("mouseup",this,!1),document.addEventListener("mouseup",this,!1))},move:function(b){if(!(b.touches.length>1||b.scale&&1!==b.scale)){a.disableScroll&&b.preventDefault();var c=b.touches[0];A={x:c.pageX-z.x,y:c.pageY-z.y},"undefined"==typeof x&&(x=!!(x||Math.abs(A.x)0||u==p.length-1&&A.x<0?Math.abs(A.x)/r+1:1),h(u-1,A.x+q[u-1],0),h(u,A.x+q[u],0),h(u+1,A.x+q[u+1],0)))}},end:function(){var b=+new Date-z.time,c=Number(b)<250&&Math.abs(A.x)>20||Math.abs(A.x)>r/2,d=!u&&A.x>0||u==p.length-1&&A.x<0;a.continuous&&(d=!1);var f=A.x<0;x||(c&&!d?(f?(a.continuous?(g(e(u-1),-r,0),g(e(u+2),r,0)):g(u-1,-r,0),g(u,q[u]-r,v),g(e(u+1),q[e(u+1)]-r,v),u=e(u+1)):(a.continuous?(g(e(u+1),r,0),g(e(u-2),-r,0)):g(u+1,r,0),g(u,q[u]+r,v),g(e(u-1),q[e(u-1)]+r,v),u=e(u-1)),a.callback&&a.callback(u,p[u])):a.continuous?(g(e(u-1),-r,v),g(u,0,v),g(e(u+1),r,v)):(g(u-1,-r,v),g(u,0,v),g(u+1,r,v))),n.touch?(t.removeEventListener("touchmove",B,!1),t.removeEventListener("touchend",B,!1)):(t.removeEventListener("mousemove",B,!1),t.removeEventListener("mouseup",B,!1),document.removeEventListener("mouseup",B,!1))},transitionEnd:function(b){parseInt(b.target.getAttribute("data-index"),10)==u&&(y&&j(),a.transitionEnd&&a.transitionEnd.call(b,u,p[u]))}};this.setup=function(){b()},this.slide=function(a,b){k(),f(a,b)},this.prev=function(){k(),c()},this.next=function(){k(),d()},this.stop=function(){k()},this.getPos=function(){return u},this.getNumSlides=function(){return s},this.kill=function(){k(),t.style.width="",t.style.left="";for(var a=p.length;a--;){var b=p[a];b.style.width="",b.style.left="",n.transitions&&h(a,0,0)}n.addEventListener?(t.removeEventListener("touchstart",B,!1),t.removeEventListener("webkitTransitionEnd",B,!1),t.removeEventListener("msTransitionEnd",B,!1),t.removeEventListener("oTransitionEnd",B,!1),t.removeEventListener("otransitionend",B,!1),t.removeEventListener("transitionend",B,!1),window.removeEventListener("resize",B,!1)):window.onresize=null},this.load=function(){b(),y&&j(),n.addEventListener?(n.touch?t.addEventListener("touchstart",B,!1):t.addEventListener("mousedown",B,!1),n.transitions&&(t.addEventListener("webkitTransitionEnd",B,!1),t.addEventListener("msTransitionEnd",B,!1),t.addEventListener("oTransitionEnd",B,!1),t.addEventListener("otransitionend",B,!1),t.addEventListener("transitionend",B,!1)),window.addEventListener("resize",B,!1)):window.onresize=function(){b()}}}}})}(ionic),function(a){"use strict";a.views.TabBarItem=a.views.View.inherit({initialize:function(a){this.el=a,this._buildItem() },create:function(b){var c=document.createElement("a");if(c.className="tab-item",b.icon){var d=document.createElement("i");d.className=b.icon,c.appendChild(d)}if(b.badge){var e=document.createElement("i");e.className="badge",e.innerHTML=b.badge,c.appendChild(e),c.className="tab-item has-badge"}return c.appendChild(document.createTextNode(b.title)),new a.views.TabBarItem(c)},_buildItem:function(){for(var b,c=this,d=Array.prototype.slice.call(this.el.children),e=0,f=d.length;f>e;e++)b=d[e],"i"==b.tagName.toLowerCase()&&/icon/.test(b.className)&&(this.icon=b.className),"i"==b.tagName.toLowerCase()&&/badge/.test(b.className)&&(this.badge=b.textContent.trim());for(this.title="",e=0,f=this.el.childNodes.length;f>e;e++)b=this.el.childNodes[e],"#text"===b.nodeName&&(this.title+=b.nodeValue.trim());this._tapHandler=function(a){c.onTap&&c.onTap(a)},a.on("tap",this._tapHandler,this.el)},onTap:function(){},destroy:function(){a.off("tap",this._tapHandler,this.el)},getIcon:function(){return this.icon},getTitle:function(){return this.title},getBadge:function(){return this.badge},setSelected:function(a){this.isSelected=a,a?this.el.classList.add("active"):this.el.classList.remove("active")}}),a.views.TabBar=a.views.View.inherit({initialize:function(a){this.el=a.el,this.items=[],this._buildItems()},getItems:function(){return this.items},addItem:function(b){var c=a.views.TabBarItem.prototype.create(b);this.appendItemElement(c),this.items.push(c),this._bindEventsOnItem(c)},appendItemElement:function(a){this.el&&this.el.appendChild(a.el)},removeItem:function(a){var b=this.items[a];b&&(b.onTap=void 0,b.destroy())},_bindEventsOnItem:function(a){var b=this;this._itemTapHandler||(this._itemTapHandler=function(){b.trySelectItem(this)}),a.onTap=this._itemTapHandler},getSelectedItem:function(){return this.selectedItem},setSelectedItem:function(a){this.selectedItem=this.items[a];for(var b=0,c=this.items.length;c>b;b+=1)this.items[b].setSelected(!1);this.selectedItem&&this.selectedItem.setSelected(!0)},selectItem:function(a){for(var b=0,c=this.items.length;c>b;b+=1)if(this.items[b]==a)return void this.setSelectedItem(b)},trySelectItem:function(a){for(var b=0,c=this.items.length;c>b;b+=1)if(this.items[b]==a)return void(this.tryTabSelect&&this.tryTabSelect(b))},_buildItems:function(){for(var b,c=Array.prototype.slice.call(this.el.children),d=0,e=c.length;e>d;d+=1)b=new a.views.TabBarItem(c[d]),this.items[d]=b,this._bindEventsOnItem(b);this.items.length>0&&(this.selectedItem=this.items[0])},destroy:function(){for(var a=0,b=this.items.length;b>a;a+=1)this.items[a].destroy();this.items.length=0}})}(window.ionic),function(a){"use strict";a.views.Toggle=a.views.View.inherit({initialize:function(a){this.el=a.el,this.checkbox=a.checkbox,this.track=a.track,this.handle=a.handle,this.openPercent=-1},tap:function(){"disabled"!==this.el.getAttribute("disabled")&&this.val(!this.checkbox.checked)},drag:function(a){var b=this.track.offsetLeft+this.handle.offsetWidth/2,c=this.track.offsetLeft+this.track.offsetWidth-this.handle.offsetWidth/2;a.pageX>=c-4?this.val(!0):a.pageX<=b?this.val(!1):this.setOpenPercent(Math.round(100*(1-(c-a.pageX)/(c-b))))},setOpenPercent:function(b){if(this.openPercent<0||bthis.openPercent+3)if(this.openPercent=b,0===b)this.val(!1);else if(100===b)this.val(!0);else{var c=Math.round(b/100*this.track.offsetWidth-this.handle.offsetWidth);c=1>c?0:c,this.handle.style[a.CSS.TRANSFORM]="translate3d("+c+"px,0,0)"}},release:function(){this.val(this.openPercent>=50)},val:function(b){return(b===!0||b===!1)&&(""!==this.handle.style[a.CSS.TRANSFORM]&&(this.handle.style[a.CSS.TRANSFORM]=""),this.checkbox.checked=b,this.openPercent=b?100:0),this.checkbox.checked}})}(ionic),function(a){"use strict";a.controllers.ViewController=function(){this.initialize.apply(this,arguments)},a.controllers.ViewController.inherit=a.inherit,a.extend(a.controllers.ViewController.prototype,{initialize:function(){},destroy:function(){}})}(window.ionic),function(a){"use strict";a.controllers.NavController=a.controllers.ViewController.inherit({initialize:function(a){var b=this;this.navBar=a.navBar,this.content=a.content,this.controllers=a.controllers||[],this._updateNavBar(),this.navBar.shouldGoBack=function(){b.pop()}},getControllers:function(){return this.controllers},getTopController:function(){return this.controllers[this.controllers.length-1]},push:function(a){var b=this.controllers[this.controllers.length-1];this.controllers.push(a);var c=this.switchingController&&this.switchingController(a)||!0;if(c!==!1){b&&(b.isVisible=!1,b.visibilityChanged&&b.visibilityChanged("push"));var d=this.controllers[this.controllers.length-1];return d.isVisible=!0,d.visibilityChanged&&d.visibilityChanged(b?"push":"first"),this._updateNavBar(),a}},pop:function(){var a,b;if(!(this.controllers.length<2))return b=this.controllers.pop(),b&&(b.isVisible=!1,b.visibilityChanged&&b.visibilityChanged("pop")),a=this.controllers[this.controllers.length-1],a.isVisible=!0,a.visibilityChanged&&a.visibilityChanged("pop"),this._updateNavBar(),b},showNavBar:function(){this.navBar&&this.navBar.show()},hideNavBar:function(){this.navBar&&this.navBar.hide()},_updateNavBar:function(){this.getTopController()&&this.navBar&&(this.navBar.setTitle(this.getTopController().title),this.navBar.showBackButton(this.controllers.length>1?!0:!1))}})}(window.ionic),function(a){"use strict";a.controllers.SideMenuController=a.controllers.ViewController.inherit({initialize:function(a){var b=this;this.left=a.left,this.right=a.right,this.content=a.content,this.dragThresholdX=a.dragThresholdX||10,this._rightShowing=!1,this._leftShowing=!1,this._isDragging=!1,this.content&&(this.content.onDrag=function(a){b._handleDrag(a)},this.content.onEndDrag=function(a){b._endDrag(a)})},setContent:function(a){var b=this;this.content=a,this.content.onDrag=function(a){b._handleDrag(a)},this.content.endDrag=function(a){b._endDrag(a)}},toggleLeft:function(){this.content.enableAnimation();var a=this.getOpenAmount();this.openPercentage(a>0?0:100)},toggleRight:function(){this.content.enableAnimation();var a=this.getOpenAmount();this.openPercentage(0>a?0:-100)},close:function(){this.openPercentage(0)},getOpenAmount:function(){return this.content&&this.content.getTranslateX()||0},getOpenRatio:function(){var a=this.getOpenAmount();return a>=0?a/this.left.width:a/this.right.width},isOpen:function(){return 1==this.getOpenRatio()},getOpenPercentage:function(){return 100*this.getOpenRatio()},openPercentage:function(a){var b=a/100;if(this.left&&a>=0)this.openAmount(this.left.width*b);else if(this.right&&0>a){{this.right.width}this.openAmount(this.right.width*b)}},openAmount:function(a){var b=this.left&&this.left.width||0,c=this.right&&this.right.width||0;(!this.left||!this.left.isEnabled)&&a>0||(!this.right||!this.right.isEnabled)&&0>a||this._leftShowing&&a>b||this._rightShowing&&-c>a||(this.content.setTranslateX(a),a>=0?(this._leftShowing=!0,this._rightShowing=!1,this.right&&this.right.pushDown&&this.right.pushDown(),this.left&&this.left.bringUp&&this.left.bringUp()):(this._rightShowing=!0,this._leftShowing=!1,this.right&&this.right.bringUp&&this.right.bringUp(),this.left&&this.left.pushDown&&this.left.pushDown()))},snapToRest:function(a){this.content.enableAnimation(),this._isDragging=!1;var b=this.getOpenRatio();if(0!==b){var c=.3,d=a.gesture.velocityX,e=a.gesture.direction;this.openPercentage(b>0&&.5>b&&"right"==e&&c>d?0:b>.5&&"left"==e&&c>d?100:0>b&&b>-.5&&"left"==e&&c>d?0:.5>b&&"right"==e&&c>d?-100:"right"==e&&b>=0&&(b>=.5||d>c)?100:"left"==e&&0>=b&&(-.5>=b||d>c)?-100:0)}},_endDrag:function(a){this._isDragging&&this.snapToRest(a),this._startX=null,this._lastX=null,this._offsetX=null},_handleDrag:function(a){this._startX?this._lastX=a.gesture.touches[0].pageX:(this._startX=a.gesture.touches[0].pageX,this._lastX=this._startX),!this._isDragging&&Math.abs(this._lastX-this._startX)>this.dragThresholdX&&(this._startX=this._lastX,this._isDragging=!0,this.content.disableAnimation(),this._offsetX=this.getOpenAmount()),this._isDragging&&this.openAmount(this._offsetX+(this._lastX-this._startX))}})}(ionic),function(a){"use strict";a.controllers.TabBarController=a.controllers.ViewController.inherit({initialize:function(a){this.tabBar=a.tabBar,this._bindEvents(),this.controllers=[];for(var b=a.controllers||[],c=0;c=this.controllers.length)){var b=this.selectedController,c=this.selectedIndex;this.selectedController=this.controllers[a],this.selectedIndex=a,this._showController(a),this.tabBar.setSelectedItem(a),this.controllerChanged&&this.controllerChanged(b,c,this.selectedController,this.selectedIndex)}},_showController:function(a){for(var b,c=0,d=this.controllers.length;d>c;c++)b=this.controllers[c],b.isVisible=!1,b.visibilityChanged&&b.visibilityChanged();b=this.controllers[a],b.isVisible=!0,b.visibilityChanged&&b.visibilityChanged()},_clearSelected:function(){this.selectedController=null,this.selectedIndex=-1},getController:function(a){return this.controllers[a]},getControllers:function(){return this.controllers},getSelectedController:function(){return this.selectedController},getSelectedControllerIndex:function(){return this.selectedIndex},addController:function(a){this.controllers.push(a),this.tabBar.addItem({title:a.title,icon:a.icon,badge:a.badge}),this.selectedController||this.setSelectedController(0)},setControllers:function(a){this.controllers=a,this._clearSelected(),this.selectController(0)}})}(window.ionic);; /* AngularJS v1.2.12 (c) 2010-2014 Google, Inc. http://angularjs.org License: MIT */ (function(P,R,s){'use strict';function t(b){return function(){var a=arguments[0],c,a="["+(b?b+":":"")+a+"] http://errors.angularjs.org/1.2.12/"+(b?b+"/":"")+a;for(c=1;c").append(b).html();try{return 3===b[0].nodeType?x(c):c.match(/^(<[^>]+>)/)[1].replace(/^<([\w\-]+)/, function(a,b){return"<"+x(b)})}catch(d){return x(c)}}function Ub(b){try{return decodeURIComponent(b)}catch(a){}}function Vb(b){var a={},c,d;q((b||"").split("&"),function(b){b&&(c=b.split("="),d=Ub(c[0]),D(d)&&(b=D(c[1])?Ub(c[1]):!0,a[d]?L(a[d])?a[d].push(b):a[d]=[a[d],b]:a[d]=b))});return a}function Wb(b){var a=[];q(b,function(b,d){L(b)?q(b,function(b){a.push(va(d,!0)+(!0===b?"":"="+va(b,!0)))}):a.push(va(d,!0)+(!0===b?"":"="+va(b,!0)))});return a.length?a.join("&"):""}function sb(b){return va(b, !0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function va(b,a){return encodeURIComponent(b).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,a?"%20":"+")}function Sc(b,a){function c(a){a&&d.push(a)}var d=[b],e,g,f=["ng:app","ng-app","x-ng-app","data-ng-app"],h=/\sng[:\-]app(:\s*([\w\d_]+);?)?\s/;q(f,function(a){f[a]=!0;c(R.getElementById(a));a=a.replace(":","\\:");b.querySelectorAll&&(q(b.querySelectorAll("."+a),c),q(b.querySelectorAll("."+ a+"\\:"),c),q(b.querySelectorAll("["+a+"]"),c))});q(d,function(a){if(!e){var b=h.exec(" "+a.className+" ");b?(e=a,g=(b[2]||"").replace(/\s+/g,",")):q(a.attributes,function(b){!e&&f[b.name]&&(e=a,g=b.value)})}});e&&a(e,g?[g]:[])}function Xb(b,a){var c=function(){b=z(b);if(b.injector()){var c=b[0]===R?"document":fa(b);throw Na("btstrpd",c);}a=a||[];a.unshift(["$provide",function(a){a.value("$rootElement",b)}]);a.unshift("ng");c=Yb(a);c.invoke(["$rootScope","$rootElement","$compile","$injector","$animate", function(a,b,c,d,e){a.$apply(function(){b.data("$injector",d);c(b)(a)})}]);return c},d=/^NG_DEFER_BOOTSTRAP!/;if(P&&!d.test(P.name))return c();P.name=P.name.replace(d,"");Ba.resumeBootstrap=function(b){q(b,function(b){a.push(b)});c()}}function cb(b,a){a=a||"_";return b.replace(Tc,function(b,d){return(d?a:"")+b.toLowerCase()})}function tb(b,a,c){if(!b)throw Na("areq",a||"?",c||"required");return b}function Pa(b,a,c){c&&L(b)&&(b=b[b.length-1]);tb(M(b),a,"not a function, got "+(b&&"object"==typeof b? b.constructor.name||"Object":typeof b));return b}function wa(b,a){if("hasOwnProperty"===b)throw Na("badname",a);}function Zb(b,a,c){if(!a)return b;a=a.split(".");for(var d,e=b,g=a.length,f=0;f "+b;a.removeChild(a.firstChild);xb(this,a.childNodes);z(R.createDocumentFragment()).append(this)}else xb(this, b)}function yb(b){return b.cloneNode(!0)}function Da(b){$b(b);var a=0;for(b=b.childNodes||[];a=N?(c.preventDefault=null,c.stopPropagation=null,c.isDefaultPrevented=null):(delete c.preventDefault,delete c.stopPropagation,delete c.isDefaultPrevented)};c.elem=b;return c}function Ea(b){var a=typeof b,c;"object"==a&&null!==b?"function"==typeof(c=b.$$hashKey)?c=b.$$hashKey():c=== s&&(c=b.$$hashKey=Za()):c=b;return a+":"+c}function Sa(b){q(b,this.put,this)}function gc(b){var a,c;"function"==typeof b?(a=b.$inject)||(a=[],b.length&&(c=b.toString().replace(Zc,""),c=c.match($c),q(c[1].split(ad),function(b){b.replace(bd,function(b,c,d){a.push(d)})})),b.$inject=a):L(b)?(c=b.length-1,Pa(b[c],"fn"),a=b.slice(0,c)):Pa(b,"fn",!0);return a}function Yb(b){function a(a){return function(b,c){if(W(b))q(b,Ob(a));else return a(b,c)}}function c(a,b){wa(a,"service");if(M(b)||L(b))b=n.instantiate(b); if(!b.$get)throw Ta("pget",a);return l[a+h]=b}function d(a,b){return c(a,{$get:b})}function e(a){var b=[],c,d,g,h;q(a,function(a){if(!k.get(a)){k.put(a,!0);try{if(w(a))for(c=Ua(a),b=b.concat(e(c.requires)).concat(c._runBlocks),d=c._invokeQueue,g=0,h=d.length;g 4096 bytes)!"));else{if(m.cookie!==ba)for(ba=m.cookie,d=ba.split("; "),U={},g=0;gk&&this.remove(p.key),b},get:function(a){var b=l[a];if(b)return e(b),m[a]},remove:function(a){var b=l[a];b&&(b==n&&(n=b.p),b==p&&(p=b.n),g(b.n,b.p),delete l[a],delete m[a],f--)},removeAll:function(){m={};f=0;l={};n=p=null},destroy:function(){l=h=m=null;delete a[b]},info:function(){return y({},h,{size:f})}}}var a={};b.info=function(){var b={};q(a,function(a,e){b[e]=a.info()});return b};b.get=function(b){return a[b]}; return b}}function gd(){this.$get=["$cacheFactory",function(b){return b("templates")}]}function ic(b,a){var c={},d="Directive",e=/^\s*directive\:\s*([\d\w\-_]+)\s+(.*)$/,g=/(([\d\w\-_]+)(?:\:([^;]+))?;?)/,f=/^(on[a-z]+|formaction)$/;this.directive=function m(a,e){wa(a,"directive");w(a)?(tb(e,"directiveFactory"),c.hasOwnProperty(a)||(c[a]=[],b.factory(a+d,["$injector","$exceptionHandler",function(b,d){var e=[];q(c[a],function(c,g){try{var f=b.invoke(c);M(f)?f={compile:Y(f)}:!f.compile&&f.link&&(f.compile= Y(f.link));f.priority=f.priority||0;f.index=g;f.name=f.name||a;f.require=f.require||f.controller&&f.name;f.restrict=f.restrict||"A";e.push(f)}catch(m){d(m)}});return e}])),c[a].push(e)):q(a,Ob(m));return this};this.aHrefSanitizationWhitelist=function(b){return D(b)?(a.aHrefSanitizationWhitelist(b),this):a.aHrefSanitizationWhitelist()};this.imgSrcSanitizationWhitelist=function(b){return D(b)?(a.imgSrcSanitizationWhitelist(b),this):a.imgSrcSanitizationWhitelist()};this.$get=["$injector","$interpolate", "$exceptionHandler","$http","$templateCache","$parse","$controller","$rootScope","$document","$sce","$animate","$$sanitizeUri",function(a,b,l,n,p,r,F,A,H,v,Q,K){function C(a,b,c,d,e){a instanceof z||(a=z(a));q(a,function(b,c){3==b.nodeType&&b.nodeValue.match(/\S+/)&&(a[c]=z(b).wrap("").parent()[0])});var g=I(a,b,a,c,d,e);ka(a,"ng-scope");return function(b,c,d){tb(b,"scope");var e=c?Fa.clone.call(a):a;q(d,function(a,b){e.data("$"+b+"Controller",a)});d=0;for(var f=e.length;d arguments.length&&(b=a,a=s);u&&(c=aa);return p(a,b,c)}var J,C,v,I,ba,B,aa={},gb;J=c===g?d:Rb(d,new Db(z(g),d.$attr));C=J.$$element;if(K){var t=/^\s*([@=&])(\??)\s*(\w*)\s*$/;f=z(g);B=e.$new(!0);ga&&ga===K.$$originalDirective?f.data("$isolateScope",B):f.data("$isolateScopeNoTemplate",B);ka(f,"ng-isolate-scope");q(K.scope,function(a,c){var d=a.match(t)||[],g=d[3]||c,f="?"==d[2],d=d[1],m,l,n,p;B.$$isolateBindings[c]=d+g;switch(d){case "@":J.$observe(g,function(a){B[c]=a});J.$$observers[g].$$scope=e; J[g]&&(B[c]=b(J[g])(e));break;case "=":if(f&&!J[g])break;l=r(J[g]);p=l.literal?ta:function(a,b){return a===b};n=l.assign||function(){m=B[c]=l(e);throw ha("nonassign",J[g],K.name);};m=B[c]=l(e);B.$watch(function(){var a=l(e);p(a,B[c])||(p(a,m)?n(e,a=B[c]):B[c]=a);return m=a},null,l.literal);break;case "&":l=r(J[g]);B[c]=function(a){return l(e,a)};break;default:throw ha("iscp",K.name,c,a);}})}gb=p&&A;U&&q(U,function(a){var b={$scope:a===K||a.$$isolateScope?B:e,$element:C,$attrs:J,$transclude:gb},c; ba=a.controller;"@"==ba&&(ba=J[a.name]);c=F(ba,b);aa[a.name]=c;u||C.data("$"+a.name+"Controller",c);a.controllerAs&&(b.$scope[a.controllerAs]=c)});f=0;for(v=m.length;fG.priority)break;if(t=G.scope)I=I||G,G.templateUrl||(x("new/isolated scope",K,G,y),W(t)&&(K=G));ca=G.name;!G.templateUrl&&G.controller&&(t=G.controller,U=U||{},x("'"+ca+"' controller",U[ca],G,y),U[ca]=G);if(t=G.transclude)S=!0,G.$$tlb||(x("transclusion",p,G,y),p=G),"element"==t?(u= !0,v=G.priority,t=aa(c,Va,T),y=d.$$element=z(R.createComment(" "+ca+": "+d[ca]+" ")),c=y[0],hb(g,z(ua.call(t,0)),c),P=C(t,e,v,f&&f.name,{nonTlbTranscludeDirective:p})):(t=z(yb(c)).contents(),y.empty(),P=C(t,e));if(G.template)if(x("template",ga,G,y),ga=G,t=M(G.template)?G.template(y,d):G.template,t=V(t),G.replace){f=G;t=z("
"+Z(t)+"
").contents();c=t[0];if(1!=t.length||1!==c.nodeType)throw ha("tplrt",ca,"");hb(g,y,c);ma={$attr:{}};t=ba(c,[],ma);var X=a.splice(N+1,a.length-(N+1));K&&hc(t); a=a.concat(t).concat(X);D(d,ma);ma=a.length}else y.html(t);if(G.templateUrl)x("template",ga,G,y),ga=G,G.replace&&(f=G),H=E(a.splice(N,a.length-N),y,d,g,P,m,n,{controllerDirectives:U,newIsolateScopeDirective:K,templateDirective:ga,nonTlbTranscludeDirective:p}),ma=a.length;else if(G.compile)try{O=G.compile(y,d,P),M(O)?A(null,O,Va,T):O&&A(O.pre,O.post,Va,T)}catch(Y){l(Y,fa(y))}G.terminal&&(H.terminal=!0,v=Math.max(v,G.priority))}H.scope=I&&!0===I.scope;H.transclude=S&&P;return H}function hc(a){for(var b= 0,c=a.length;bp.priority)&&-1!=p.restrict.indexOf(g)&&(r&&(p=Qb(p,{$$start:r,$$end:n})),b.push(p),k=p)}catch(Q){l(Q)}}return k}function D(a,b){var c=b.$attr,d=a.$attr,e=a.$$element;q(a,function(d,e){"$"!=e.charAt(0)&&(b[e]&&(d+=("style"===e?";":" ")+b[e]),a.$set(e,d,!0,c[e]))});q(b,function(b,g){"class"==g?(ka(e, b),a["class"]=(a["class"]?a["class"]+" ":"")+b):"style"==g?(e.attr("style",e.attr("style")+";"+b),a.style=(a.style?a.style+";":"")+b):"$"==g.charAt(0)||a.hasOwnProperty(g)||(a[g]=b,d[g]=c[g])})}function E(a,b,c,d,e,g,f,k){var m=[],r,l,F=b[0],A=a.shift(),Q=y({},A,{templateUrl:null,transclude:null,replace:null,$$originalDirective:A}),C=M(A.templateUrl)?A.templateUrl(b,c):A.templateUrl;b.empty();n.get(v.getTrustedResourceUrl(C),{cache:p}).success(function(n){var p,H;n=V(n);if(A.replace){n=z("
"+ Z(n)+"
").contents();p=n[0];if(1!=n.length||1!==p.nodeType)throw ha("tplrt",A.name,C);n={$attr:{}};hb(d,b,p);var v=ba(p,[],n);W(A.scope)&&hc(v);a=v.concat(a);D(c,n)}else p=F,b.html(n);a.unshift(Q);r=ga(a,p,c,e,b,A,g,f,k);q(d,function(a,c){a==p&&(d[c]=b[0])});for(l=I(b[0].childNodes,e);m.length;){n=m.shift();H=m.shift();var K=m.shift(),B=m.shift(),v=b[0];if(H!==F){var aa=H.className,v=yb(p);hb(K,z(H),v);ka(z(v),aa)}H=r.transclude?U(n,r.transclude):B;r(l,n,v,d,H)}m=null}).error(function(a,b,c, d){throw ha("tpload",d.url);});return function(a,b,c,d,e){m?(m.push(b),m.push(c),m.push(d),m.push(e)):r(l,b,c,d,e)}}function u(a,b){var c=b.priority-a.priority;return 0!==c?c:a.name!==b.name?a.namea.status?b:n.reject(b)}var d={transformRequest:e.transformRequest,transformResponse:e.transformResponse},g=function(a){function b(a){var c; q(a,function(b,d){M(b)&&(c=b(),null!=c?a[d]=c:delete a[d])})}var c=e.headers,d=y({},a.headers),g,f,c=y({},c.common,c[x(a.method)]);b(c);b(d);a:for(g in c){a=x(g);for(f in d)if(x(f)===a)continue a;d[g]=c[g]}return d}(a);y(d,a);d.headers=g;d.method=Ha(d.method);(a=Eb(d.url)?b.cookies()[d.xsrfCookieName||e.xsrfCookieName]:s)&&(g[d.xsrfHeaderName||e.xsrfHeaderName]=a);var f=[function(a){g=a.headers;var b=nc(a.data,mc(g),a.transformRequest);u(a.data)&&q(g,function(a,b){"content-type"===x(b)&&delete g[b]}); u(a.withCredentials)&&!u(e.withCredentials)&&(a.withCredentials=e.withCredentials);return F(a,b,g).then(c,c)},s],k=n.when(d);for(q(v,function(a){(a.request||a.requestError)&&f.unshift(a.request,a.requestError);(a.response||a.responseError)&&f.push(a.response,a.responseError)});f.length;){a=f.shift();var h=f.shift(),k=k.then(a,h)}k.success=function(a){k.then(function(b){a(b.data,b.status,b.headers,d)});return k};k.error=function(a){k.then(null,function(b){a(b.data,b.status,b.headers,d)});return k}; return k}function F(b,c,g){function f(a,b,c){v&&(200<=a&&300>a?v.put(s,[a,b,lc(c)]):v.remove(s));m(b,a,c);d.$$phase||d.$apply()}function m(a,c,d){c=Math.max(c,0);(200<=c&&300>c?p.resolve:p.reject)({data:a,status:c,headers:mc(d),config:b})}function k(){var a=ab(r.pendingRequests,b);-1!==a&&r.pendingRequests.splice(a,1)}var p=n.defer(),F=p.promise,v,q,s=A(b.url,b.params);r.pendingRequests.push(b);F.then(k,k);(b.cache||e.cache)&&(!1!==b.cache&&"GET"==b.method)&&(v=W(b.cache)?b.cache:W(e.cache)?e.cache: H);if(v)if(q=v.get(s),D(q)){if(q.then)return q.then(k,k),q;L(q)?m(q[1],q[0],$(q[2])):m(q,200,{})}else v.put(s,F);u(q)&&a(b.method,s,c,f,g,b.timeout,b.withCredentials,b.responseType);return F}function A(a,b){if(!b)return a;var c=[];Oc(b,function(a,b){null===a||u(a)||(L(a)||(a=[a]),q(a,function(a){W(a)&&(a=pa(a));c.push(va(b)+"="+va(a))}))});return a+(-1==a.indexOf("?")?"?":"&")+c.join("&")}var H=c("$http"),v=[];q(g,function(a){v.unshift(w(a)?p.get(a):p.invoke(a))});q(f,function(a,b){var c=w(a)?p.get(a): p.invoke(a);v.splice(b,0,{response:function(a){return c(n.when(a))},responseError:function(a){return c(n.reject(a))}})});r.pendingRequests=[];(function(a){q(arguments,function(a){r[a]=function(b,c){return r(y(c||{},{method:a,url:b}))}})})("get","delete","head","jsonp");(function(a){q(arguments,function(a){r[a]=function(b,c,d){return r(y(d||{},{method:a,url:b,data:c}))}})})("post","put");r.defaults=e;return r}]}function md(b){if(8>=N&&(!b.match(/^(get|post|head|put|delete|options)$/i)||!P.XMLHttpRequest))return new P.ActiveXObject("Microsoft.XMLHTTP"); if(P.XMLHttpRequest)return new P.XMLHttpRequest;throw t("$httpBackend")("noxhr");}function nd(){this.$get=["$browser","$window","$document",function(b,a,c){return od(b,md,b.defer,a.angular.callbacks,c[0])}]}function od(b,a,c,d,e){function g(a,b){var c=e.createElement("script"),d=function(){c.onreadystatechange=c.onload=c.onerror=null;e.body.removeChild(c);b&&b()};c.type="text/javascript";c.src=a;N&&8>=N?c.onreadystatechange=function(){/loaded|complete/.test(c.readyState)&&d()}:c.onload=c.onerror= function(){d()};e.body.appendChild(c);return d}var f=-1;return function(e,m,k,l,n,p,r,F){function A(){v=f;K&&K();C&&C.abort()}function H(a,d,e,g){I&&c.cancel(I);K=C=null;d=0===d?e?200:404:d;a(1223==d?204:d,e,g);b.$$completeOutstandingRequest(E)}var v;b.$$incOutstandingRequestCount();m=m||b.url();if("jsonp"==x(e)){var Q="_"+(d.counter++).toString(36);d[Q]=function(a){d[Q].data=a};var K=g(m.replace("JSON_CALLBACK","angular.callbacks."+Q),function(){d[Q].data?H(l,200,d[Q].data):H(l,v||-2);d[Q]=Ba.noop})}else{var C= a(e);C.open(e,m,!0);q(n,function(a,b){D(a)&&C.setRequestHeader(b,a)});C.onreadystatechange=function(){if(C&&4==C.readyState){var a=null,b=null;v!==f&&(a=C.getAllResponseHeaders(),b="response"in C?C.response:C.responseText);H(l,v||C.status,b,a)}};r&&(C.withCredentials=!0);if(F)try{C.responseType=F}catch(s){if("json"!==F)throw s;}C.send(k||null)}if(0=h&&(n.resolve(r),l(p.$$intervalId),delete e[p.$$intervalId]);F||b.$apply()},f);e[p.$$intervalId]=n;return p}var e={};d.cancel=function(a){return a&&a.$$intervalId in e?(e[a.$$intervalId].reject("canceled"),clearInterval(a.$$intervalId),delete e[a.$$intervalId],!0):!1};return d}]}function rd(){this.$get=function(){return{id:"en-us",NUMBER_FORMATS:{DECIMAL_SEP:".",GROUP_SEP:",",PATTERNS:[{minInt:1,minFrac:0,maxFrac:3,posPre:"",posSuf:"",negPre:"-",negSuf:"",gSize:3,lgSize:3},{minInt:1,minFrac:2, maxFrac:2,posPre:"\u00a4",posSuf:"",negPre:"(\u00a4",negSuf:")",gSize:3,lgSize:3}],CURRENCY_SYM:"$"},DATETIME_FORMATS:{MONTH:"January February March April May June July August September October November December".split(" "),SHORTMONTH:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),DAY:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),SHORTDAY:"Sun Mon Tue Wed Thu Fri Sat".split(" "),AMPMS:["AM","PM"],medium:"MMM d, y h:mm:ss a","short":"M/d/yy h:mm a",fullDate:"EEEE, MMMM d, y", longDate:"MMMM d, y",mediumDate:"MMM d, y",shortDate:"M/d/yy",mediumTime:"h:mm:ss a",shortTime:"h:mm a"},pluralCat:function(b){return 1===b?"one":"other"}}}}function pc(b){b=b.split("/");for(var a=b.length;a--;)b[a]=sb(b[a]);return b.join("/")}function qc(b,a,c){b=xa(b,c);a.$$protocol=b.protocol;a.$$host=b.hostname;a.$$port=V(b.port)||sd[b.protocol]||null}function rc(b,a,c){var d="/"!==b.charAt(0);d&&(b="/"+b);b=xa(b,c);a.$$path=decodeURIComponent(d&&"/"===b.pathname.charAt(0)?b.pathname.substring(1): b.pathname);a.$$search=Vb(b.search);a.$$hash=decodeURIComponent(b.hash);a.$$path&&"/"!=a.$$path.charAt(0)&&(a.$$path="/"+a.$$path)}function na(b,a){if(0===a.indexOf(b))return a.substr(b.length)}function Wa(b){var a=b.indexOf("#");return-1==a?b:b.substr(0,a)}function Fb(b){return b.substr(0,Wa(b).lastIndexOf("/")+1)}function sc(b,a){this.$$html5=!0;a=a||"";var c=Fb(b);qc(b,this,b);this.$$parse=function(a){var e=na(c,a);if(!w(e))throw Gb("ipthprfx",a,c);rc(e,this,b);this.$$path||(this.$$path="/");this.$$compose()}; this.$$compose=function(){var a=Wb(this.$$search),b=this.$$hash?"#"+sb(this.$$hash):"";this.$$url=pc(this.$$path)+(a?"?"+a:"")+b;this.$$absUrl=c+this.$$url.substr(1)};this.$$rewrite=function(d){var e;if((e=na(b,d))!==s)return d=e,(e=na(a,e))!==s?c+(na("/",e)||e):b+d;if((e=na(c,d))!==s)return c+e;if(c==d+"/")return c}}function Hb(b,a){var c=Fb(b);qc(b,this,b);this.$$parse=function(d){var e=na(b,d)||na(c,d),e="#"==e.charAt(0)?na(a,e):this.$$html5?e:"";if(!w(e))throw Gb("ihshprfx",d,a);rc(e,this,b); d=this.$$path;var g=/^\/?.*?:(\/.*)/;0===e.indexOf(b)&&(e=e.replace(b,""));g.exec(e)||(d=(e=g.exec(d))?e[1]:d);this.$$path=d;this.$$compose()};this.$$compose=function(){var c=Wb(this.$$search),e=this.$$hash?"#"+sb(this.$$hash):"";this.$$url=pc(this.$$path)+(c?"?"+c:"")+e;this.$$absUrl=b+(this.$$url?a+this.$$url:"")};this.$$rewrite=function(a){if(Wa(b)==Wa(a))return a}}function tc(b,a){this.$$html5=!0;Hb.apply(this,arguments);var c=Fb(b);this.$$rewrite=function(d){var e;if(b==Wa(d))return d;if(e=na(c, d))return b+a+e;if(c===d+"/")return c}}function ib(b){return function(){return this[b]}}function uc(b,a){return function(c){if(u(c))return this[b];this[b]=a(c);this.$$compose();return this}}function td(){var b="",a=!1;this.hashPrefix=function(a){return D(a)?(b=a,this):b};this.html5Mode=function(b){return D(b)?(a=b,this):a};this.$get=["$rootScope","$browser","$sniffer","$rootElement",function(c,d,e,g){function f(a){c.$broadcast("$locationChangeSuccess",h.absUrl(),a)}var h,m=d.baseHref(),k=d.url(); a?(m=k.substring(0,k.indexOf("/",k.indexOf("//")+2))+(m||"/"),e=e.history?sc:tc):(m=Wa(k),e=Hb);h=new e(m,"#"+b);h.$$parse(h.$$rewrite(k));g.on("click",function(a){if(!a.ctrlKey&&!a.metaKey&&2!=a.which){for(var b=z(a.target);"a"!==x(b[0].nodeName);)if(b[0]===g[0]||!(b=b.parent())[0])return;var e=b.prop("href");W(e)&&"[object SVGAnimatedString]"===e.toString()&&(e=xa(e.animVal).href);var f=h.$$rewrite(e);e&&(!b.attr("target")&&f&&!a.isDefaultPrevented())&&(a.preventDefault(),f!=d.url()&&(h.$$parse(f), c.$apply(),P.angular["ff-684208-preventDefault"]=!0))}});h.absUrl()!=k&&d.url(h.absUrl(),!0);d.onUrlChange(function(a){h.absUrl()!=a&&(c.$evalAsync(function(){var b=h.absUrl();h.$$parse(a);c.$broadcast("$locationChangeStart",a,b).defaultPrevented?(h.$$parse(b),d.url(b)):f(b)}),c.$$phase||c.$digest())});var l=0;c.$watch(function(){var a=d.url(),b=h.$$replace;l&&a==h.absUrl()||(l++,c.$evalAsync(function(){c.$broadcast("$locationChangeStart",h.absUrl(),a).defaultPrevented?h.$$parse(a):(d.url(h.absUrl(), b),f(a))}));h.$$replace=!1;return l});return h}]}function ud(){var b=!0,a=this;this.debugEnabled=function(a){return D(a)?(b=a,this):b};this.$get=["$window",function(c){function d(a){a instanceof Error&&(a.stack?a=a.message&&-1===a.stack.indexOf(a.message)?"Error: "+a.message+"\n"+a.stack:a.stack:a.sourceURL&&(a=a.message+"\n"+a.sourceURL+":"+a.line));return a}function e(a){var b=c.console||{},e=b[a]||b.log||E;a=!1;try{a=!!e.apply}catch(m){}return a?function(){var a=[];q(arguments,function(b){a.push(d(b))}); return e.apply(b,a)}:function(a,b){e(a,null==b?"":b)}}return{log:e("log"),info:e("info"),warn:e("warn"),error:e("error"),debug:function(){var c=e("debug");return function(){b&&c.apply(a,arguments)}}()}}]}function da(b,a){if("constructor"===b)throw ya("isecfld",a);return b}function Xa(b,a){if(b){if(b.constructor===b)throw ya("isecfn",a);if(b.document&&b.location&&b.alert&&b.setInterval)throw ya("isecwindow",a);if(b.children&&(b.nodeName||b.on&&b.find))throw ya("isecdom",a);}return b}function jb(b, a,c,d,e){e=e||{};a=a.split(".");for(var g,f=0;1e?vc(d[0],d[1],d[2],d[3],d[4],c,a):function(b,g){var f=0,h;do h=vc(d[f++],d[f++],d[f++],d[f++],d[f++],c,a)(b,g),g=s,b=h;while(fa)for(b in f++,d)d.hasOwnProperty(b)&&!e.hasOwnProperty(b)&&(l--,delete d[b])}else d!== e&&(d=e,f++);return f},function(){b(e,d,c)})},$digest:function(){var d,f,g,h,k=this.$$asyncQueue,l=this.$$postDigestQueue,q,C,s=b,I,U=[],t,z,B;m("$digest");c=null;do{C=!1;for(I=this;k.length;){try{B=k.shift(),B.scope.$eval(B.expression)}catch(D){p.$$phase=null,e(D)}c=null}a:do{if(h=I.$$watchers)for(q=h.length;q--;)try{if(d=h[q])if((f=d.get(I))!==(g=d.last)&&!(d.eq?ta(f,g):"number"==typeof f&&"number"==typeof g&&isNaN(f)&&isNaN(g)))C=!0,c=d,d.last=d.eq?$(f):f,d.fn(f,g===n?f:g,I),5>s&&(t=4-s,U[t]|| (U[t]=[]),z=M(d.exp)?"fn: "+(d.exp.name||d.exp.toString()):d.exp,z+="; newVal: "+pa(f)+"; oldVal: "+pa(g),U[t].push(z));else if(d===c){C=!1;break a}}catch(y){p.$$phase=null,e(y)}if(!(h=I.$$childHead||I!==this&&I.$$nextSibling))for(;I!==this&&!(h=I.$$nextSibling);)I=I.$parent}while(I=h);if((C||k.length)&&!s--)throw p.$$phase=null,a("infdig",b,pa(U));}while(C||k.length);for(p.$$phase=null;l.length;)try{l.shift()()}catch(w){e(w)}},$destroy:function(){if(!this.$$destroyed){var a=this.$parent;this.$broadcast("$destroy"); this.$$destroyed=!0;this!==p&&(q(this.$$listenerCount,bb(null,l,this)),a.$$childHead==this&&(a.$$childHead=this.$$nextSibling),a.$$childTail==this&&(a.$$childTail=this.$$prevSibling),this.$$prevSibling&&(this.$$prevSibling.$$nextSibling=this.$$nextSibling),this.$$nextSibling&&(this.$$nextSibling.$$prevSibling=this.$$prevSibling),this.$parent=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null)}},$eval:function(a,b){return g(a)(this,b)},$evalAsync:function(a){p.$$phase||p.$$asyncQueue.length|| f.defer(function(){p.$$asyncQueue.length&&p.$digest()});this.$$asyncQueue.push({scope:this,expression:a})},$$postDigest:function(a){this.$$postDigestQueue.push(a)},$apply:function(a){try{return m("$apply"),this.$eval(a)}catch(b){e(b)}finally{p.$$phase=null;try{p.$digest()}catch(c){throw e(c),c;}}},$on:function(a,b){var c=this.$$listeners[a];c||(this.$$listeners[a]=c=[]);c.push(b);var d=this;do d.$$listenerCount[a]||(d.$$listenerCount[a]=0),d.$$listenerCount[a]++;while(d=d.$parent);var e=this;return function(){c[ab(c, b)]=null;l(e,1,a)}},$emit:function(a,b){var c=[],d,f=this,g=!1,h={name:a,targetScope:f,stopPropagation:function(){g=!0},preventDefault:function(){h.defaultPrevented=!0},defaultPrevented:!1},k=[h].concat(ua.call(arguments,1)),m,l;do{d=f.$$listeners[a]||c;h.currentScope=f;m=0;for(l=d.length;mc.msieDocumentMode)throw ra("iequirks");var e=$(ea);e.isEnabled=function(){return b};e.trustAs=d.trustAs;e.getTrusted=d.getTrusted;e.valueOf=d.valueOf;b||(e.trustAs=e.getTrusted=function(a,b){return b},e.valueOf=Aa);e.parseAs=function(b,c){var d=a(c);return d.literal&&d.constant?d:function(a,c){return e.getTrusted(b,d(a,c))}};var g=e.parseAs, f=e.getTrusted,h=e.trustAs;q(ea,function(a,b){var c=x(b);e[Qa("parse_as_"+c)]=function(b){return g(a,b)};e[Qa("get_trusted_"+c)]=function(b){return f(a,b)};e[Qa("trust_as_"+c)]=function(b){return h(a,b)}});return e}]}function Fd(){this.$get=["$window","$document",function(b,a){var c={},d=V((/android (\d+)/.exec(x((b.navigator||{}).userAgent))||[])[1]),e=/Boxee/i.test((b.navigator||{}).userAgent),g=a[0]||{},f=g.documentMode,h,m=/^(Moz|webkit|O|ms)(?=[A-Z])/,k=g.body&&g.body.style,l=!1,n=!1;if(k){for(var p in k)if(l= m.exec(p)){h=l[0];h=h.substr(0,1).toUpperCase()+h.substr(1);break}h||(h="WebkitOpacity"in k&&"webkit");l=!!("transition"in k||h+"Transition"in k);n=!!("animation"in k||h+"Animation"in k);!d||l&&n||(l=w(g.body.style.webkitTransition),n=w(g.body.style.webkitAnimation))}return{history:!(!b.history||!b.history.pushState||4>d||e),hashchange:"onhashchange"in b&&(!f||7b;b=Math.abs(b);var f=b+"",h="",m=[],k=!1;if(-1!==f.indexOf("e")){var l=f.match(/([\d\.]+)e(-?)(\d+)/);l&&"-"==l[2]&&l[3]>e+1?f="0":(h=f,k=!0)}if(k)0b)&&(h=b.toFixed(e));else{f=(f.split(Gc)[1]||"").length;u(e)&&(e=Math.min(Math.max(a.minFrac,f),a.maxFrac));f=Math.pow(10,e);b=Math.round(b*f)/f;b=(""+b).split(Gc);f=b[0];b=b[1]|| "";var l=0,n=a.lgSize,p=a.gSize;if(f.length>=n+p)for(l=f.length-n,k=0;kb&&(d="-",b=-b);for(b=""+b;b.length-c)e+=c;0===e&&-12==c&&(e=12);return Kb(e,a,d)}}function kb(b,a){return function(c,d){var e=c["get"+b](),g=Ha(a?"SHORT"+b:b);return d[g][e]}}function Cc(b){function a(a){var b;if(b=a.match(c)){a=new Date(0);var g=0,f=0,h=b[8]?a.setUTCFullYear:a.setFullYear,m=b[8]?a.setUTCHours:a.setHours;b[9]&&(g=V(b[9]+b[10]),f=V(b[9]+b[11]));h.call(a,V(b[1]),V(b[2])-1,V(b[3]));g=V(b[4]||0)-g;f=V(b[5]||0)-f;h=V(b[6]||0);b=Math.round(1E3*parseFloat("0."+(b[7]||0)));m.call(a,g,f,h,b)}return a}var c= /^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;return function(c,e){var g="",f=[],h,m;e=e||"mediumDate";e=b.DATETIME_FORMATS[e]||e;w(c)&&(c=Nd.test(c)?V(c):a(c));rb(c)&&(c=new Date(c));if(!Ka(c))return c;for(;e;)(m=Od.exec(e))?(f=f.concat(ua.call(m,1)),e=f.pop()):(f.push(e),e=null);q(f,function(a){h=Pd[a];g+=h?h(c,b.DATETIME_FORMATS):a.replace(/(^'|'$)/g,"").replace(/''/g,"'")});return g}}function Jd(){return function(b){return pa(b,!0)}}function Kd(){return function(b, a){if(!L(b)&&!w(b))return b;a=V(a);if(w(b))return a?0<=a?b.slice(0,a):b.slice(a,b.length):"";var c=[],d,e;a>b.length?a=b.length:a<-b.length&&(a=-b.length);0a||37<=a&&40>=a)||k()});if(e.hasEvent("paste"))a.on("paste cut",k)}a.on("change",h);d.$render=function(){a.val(d.$isEmpty(d.$viewValue)?"":d.$viewValue)};var l=c.ngPattern; l&&((e=l.match(/^\/(.*)\/([gim]*)$/))?(l=RegExp(e[1],e[2]),e=function(a){return oa(d,"pattern",d.$isEmpty(a)||l.test(a),a)}):e=function(c){var e=b.$eval(l);if(!e||!e.test)throw t("ngPattern")("noregexp",l,e,fa(a));return oa(d,"pattern",d.$isEmpty(c)||e.test(c),c)},d.$formatters.push(e),d.$parsers.push(e));if(c.ngMinlength){var n=V(c.ngMinlength);e=function(a){return oa(d,"minlength",d.$isEmpty(a)||a.length>=n,a)};d.$parsers.push(e);d.$formatters.push(e)}if(c.ngMaxlength){var p=V(c.ngMaxlength);e= function(a){return oa(d,"maxlength",d.$isEmpty(a)||a.length<=p,a)};d.$parsers.push(e);d.$formatters.push(e)}}function Lb(b,a){b="ngClass"+b;return function(){return{restrict:"AC",link:function(c,d,e){function g(b){if(!0===a||c.$index%2===a){var d=f(b||"");h?ta(b,h)||e.$updateClass(d,f(h)):e.$addClass(d)}h=$(b)}function f(a){if(L(a))return a.join(" ");if(W(a)){var b=[];q(a,function(a,c){a&&b.push(c)});return b.join(" ")}return a}var h;c.$watch(e[b],g,!0);e.$observe("class",function(a){g(c.$eval(e[b]))}); "ngClass"!==b&&c.$watch("$index",function(d,g){var h=d&1;if(h!==g&1){var n=f(c.$eval(e[b]));h===a?e.$addClass(n):e.$removeClass(n)}})}}}}var x=function(b){return w(b)?b.toLowerCase():b},Ha=function(b){return w(b)?b.toUpperCase():b},N,z,Ca,ua=[].slice,Qd=[].push,La=Object.prototype.toString,Na=t("ng"),Ba=P.angular||(P.angular={}),Ua,Ga,ia=["0","0","0"];N=V((/msie (\d+)/.exec(x(navigator.userAgent))||[])[1]);isNaN(N)&&(N=V((/trident\/.*; rv:(\d+)/.exec(x(navigator.userAgent))||[])[1]));E.$inject=[]; Aa.$inject=[];var Z=function(){return String.prototype.trim?function(b){return w(b)?b.trim():b}:function(b){return w(b)?b.replace(/^\s\s*/,"").replace(/\s\s*$/,""):b}}();Ga=9>N?function(b){b=b.nodeName?b:b[0];return b.scopeName&&"HTML"!=b.scopeName?Ha(b.scopeName+":"+b.nodeName):b.nodeName}:function(b){return b.nodeName?b.nodeName:b[0].nodeName};var Tc=/[A-Z]/g,Rd={full:"1.2.12",major:1,minor:2,dot:12,codeName:"cauliflower-eradication"},Ra=O.cache={},db=O.expando="ng-"+(new Date).getTime(),Xc=1,Ic= P.document.addEventListener?function(b,a,c){b.addEventListener(a,c,!1)}:function(b,a,c){b.attachEvent("on"+a,c)},zb=P.document.removeEventListener?function(b,a,c){b.removeEventListener(a,c,!1)}:function(b,a,c){b.detachEvent("on"+a,c)},Vc=/([\:\-\_]+(.))/g,Wc=/^moz([A-Z])/,wb=t("jqLite"),Fa=O.prototype={ready:function(b){function a(){c||(c=!0,b())}var c=!1;"complete"===R.readyState?setTimeout(a):(this.on("DOMContentLoaded",a),O(P).on("load",a))},toString:function(){var b=[];q(this,function(a){b.push(""+ a)});return"["+b.join(", ")+"]"},eq:function(b){return 0<=b?z(this[b]):z(this[this.length+b])},length:0,push:Qd,sort:[].sort,splice:[].splice},fb={};q("multiple selected checked disabled readOnly required open".split(" "),function(b){fb[x(b)]=b});var fc={};q("input select option textarea button form details".split(" "),function(b){fc[Ha(b)]=!0});q({data:bc,inheritedData:eb,scope:function(b){return z(b).data("$scope")||eb(b.parentNode||b,["$isolateScope","$scope"])},isolateScope:function(b){return z(b).data("$isolateScope")|| z(b).data("$isolateScopeNoTemplate")},controller:cc,injector:function(b){return eb(b,"$injector")},removeAttr:function(b,a){b.removeAttribute(a)},hasClass:Ab,css:function(b,a,c){a=Qa(a);if(D(c))b.style[a]=c;else{var d;8>=N&&(d=b.currentStyle&&b.currentStyle[a],""===d&&(d="auto"));d=d||b.style[a];8>=N&&(d=""===d?s:d);return d}},attr:function(b,a,c){var d=x(a);if(fb[d])if(D(c))c?(b[a]=!0,b.setAttribute(a,d)):(b[a]=!1,b.removeAttribute(d));else return b[a]||(b.attributes.getNamedItem(a)||E).specified? d:s;else if(D(c))b.setAttribute(a,c);else if(b.getAttribute)return b=b.getAttribute(a,2),null===b?s:b},prop:function(b,a,c){if(D(c))b[a]=c;else return b[a]},text:function(){function b(b,d){var e=a[b.nodeType];if(u(d))return e?b[e]:"";b[e]=d}var a=[];9>N?(a[1]="innerText",a[3]="nodeValue"):a[1]=a[3]="textContent";b.$dv="";return b}(),val:function(b,a){if(u(a)){if("SELECT"===Ga(b)&&b.multiple){var c=[];q(b.options,function(a){a.selected&&c.push(a.value||a.text)});return 0===c.length?null:c}return b.value}b.value= a},html:function(b,a){if(u(a))return b.innerHTML;for(var c=0,d=b.childNodes;c":function(a,c,d,e){return d(a,c)>e(a,c)},"<=":function(a,c,d,e){return d(a,c)<=e(a,c)},">=":function(a,c,d,e){return d(a, c)>=e(a,c)},"&&":function(a,c,d,e){return d(a,c)&&e(a,c)},"||":function(a,c,d,e){return d(a,c)||e(a,c)},"&":function(a,c,d,e){return d(a,c)&e(a,c)},"|":function(a,c,d,e){return e(a,c)(a,c,d(a,c))},"!":function(a,c,d){return!d(a,c)}},Vd={n:"\n",f:"\f",r:"\r",t:"\t",v:"\v","'":"'",'"':'"'},Jb=function(a){this.options=a};Jb.prototype={constructor:Jb,lex:function(a){this.text=a;this.index=0;this.ch=s;this.lastCh=":";this.tokens=[];var c;for(a=[];this.index=a},isWhitespace:function(a){return" "===a||"\r"===a||"\t"===a||"\n"===a||"\v"===a||"\u00a0"===a},isIdent:function(a){return"a"<=a&&"z">=a||"A"<=a&&"Z">=a||"_"===a||"$"===a},isExpOperator:function(a){return"-"===a||"+"===a||this.isNumber(a)},throwError:function(a,c,d){d=d||this.index;c=D(c)?"s "+c+"-"+this.index+" ["+this.text.substring(c,d)+ "]":" "+d;throw ya("lexerr",a,c,this.text);},readNumber:function(){for(var a="",c=this.index;this.index","<=",">="))a=this.binaryFn(a,c.fn,this.relational());return a},additive:function(){for(var a=this.multiplicative(),c;c=this.expect("+","-");)a=this.binaryFn(a,c.fn,this.multiplicative());return a},multiplicative:function(){for(var a=this.unary(),c;c=this.expect("*", "/","%");)a=this.binaryFn(a,c.fn,this.unary());return a},unary:function(){var a;return this.expect("+")?this.primary():(a=this.expect("-"))?this.binaryFn(Ya.ZERO,a.fn,this.unary()):(a=this.expect("!"))?this.unaryFn(a.fn,this.unary()):this.primary()},fieldAccess:function(a){var c=this,d=this.expect().text,e=wc(d,this.options,this.text);return y(function(c,d,h){return e(h||a(c,d))},{assign:function(e,f,h){return jb(a(e,h),d,f,c.text,c.options)}})},objectIndex:function(a){var c=this,d=this.expression(); this.consume("]");return y(function(e,g){var f=a(e,g),h=d(e,g),m;if(!f)return s;(f=Xa(f[h],c.text))&&(f.then&&c.options.unwrapPromises)&&(m=f,"$$v"in f||(m.$$v=s,m.then(function(a){m.$$v=a})),f=f.$$v);return f},{assign:function(e,g,f){var h=d(e,f);return Xa(a(e,f),c.text)[h]=g}})},functionCall:function(a,c){var d=[];if(")"!==this.peekToken().text){do d.push(this.expression());while(this.expect(","))}this.consume(")");var e=this;return function(g,f){for(var h=[],m=c?c(g,f):g,k=0;ka.getHours()?c.AMPMS[0]:c.AMPMS[1]},Z:function(a){a=-1*a.getTimezoneOffset();return a=(0<=a?"+":"")+(Kb(Math[0=N&&(c.href||c.name||c.$set("href",""),a.append(R.createComment("IE fix")));if(!c.href&&!c.xlinkHref&&!c.name)return function(a,c){var g="[object SVGAnimatedString]"===La.call(c.prop("href"))?"xlink:href":"href";c.on("click",function(a){c.attr(g)||a.preventDefault()})}}}), Mb={};q(fb,function(a,c){if("multiple"!=a){var d=la("ng-"+c);Mb[d]=function(){return{priority:100,link:function(a,g,f){a.$watch(f[d],function(a){f.$set(c,!!a)})}}}}});q(["src","srcset","href"],function(a){var c=la("ng-"+a);Mb[c]=function(){return{priority:99,link:function(d,e,g){g.$observe(c,function(c){c&&(g.$set(a,c),N&&e.prop(a,g[a]))})}}}});var nb={$addControl:E,$removeControl:E,$setValidity:E,$setDirty:E,$setPristine:E};Hc.$inject=["$element","$attrs","$scope"];var Jc=function(a){return["$timeout", function(c){return{name:"form",restrict:a?"EAC":"E",controller:Hc,compile:function(){return{pre:function(a,e,g,f){if(!g.action){var h=function(a){a.preventDefault?a.preventDefault():a.returnValue=!1};Ic(e[0],"submit",h);e.on("$destroy",function(){c(function(){zb(e[0],"submit",h)},0,!1)})}var m=e.parent().controller("form"),k=g.name||g.ngForm;k&&jb(a,k,f,k);if(m)e.on("$destroy",function(){m.$removeControl(f);k&&jb(a,k,s,k);y(f,nb)})}}}}}]},Xd=Jc(),Yd=Jc(!0),Zd=/^(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?$/, $d=/^[a-z0-9!#$%&'*+/=?^_`{|}~.-]+@[a-z0-9-]+(\.[a-z0-9-]+)*$/i,ae=/^\s*(\-|\+)?(\d+|(\d*(\.\d*)))\s*$/,Kc={text:pb,number:function(a,c,d,e,g,f){pb(a,c,d,e,g,f);e.$parsers.push(function(a){var c=e.$isEmpty(a);if(c||ae.test(a))return e.$setValidity("number",!0),""===a?null:c?a:parseFloat(a);e.$setValidity("number",!1);return s});e.$formatters.push(function(a){return e.$isEmpty(a)?"":""+a});d.min&&(a=function(a){var c=parseFloat(d.min);return oa(e,"min",e.$isEmpty(a)||a>=c,a)},e.$parsers.push(a),e.$formatters.push(a)); d.max&&(a=function(a){var c=parseFloat(d.max);return oa(e,"max",e.$isEmpty(a)||a<=c,a)},e.$parsers.push(a),e.$formatters.push(a));e.$formatters.push(function(a){return oa(e,"number",e.$isEmpty(a)||rb(a),a)})},url:function(a,c,d,e,g,f){pb(a,c,d,e,g,f);a=function(a){return oa(e,"url",e.$isEmpty(a)||Zd.test(a),a)};e.$formatters.push(a);e.$parsers.push(a)},email:function(a,c,d,e,g,f){pb(a,c,d,e,g,f);a=function(a){return oa(e,"email",e.$isEmpty(a)||$d.test(a),a)};e.$formatters.push(a);e.$parsers.push(a)}, radio:function(a,c,d,e){u(d.name)&&c.attr("name",Za());c.on("click",function(){c[0].checked&&a.$apply(function(){e.$setViewValue(d.value)})});e.$render=function(){c[0].checked=d.value==e.$viewValue};d.$observe("value",e.$render)},checkbox:function(a,c,d,e){var g=d.ngTrueValue,f=d.ngFalseValue;w(g)||(g=!0);w(f)||(f=!1);c.on("click",function(){a.$apply(function(){e.$setViewValue(c[0].checked)})});e.$render=function(){c[0].checked=e.$viewValue};e.$isEmpty=function(a){return a!==g};e.$formatters.push(function(a){return a=== g});e.$parsers.push(function(a){return a?g:f})},hidden:E,button:E,submit:E,reset:E},Lc=["$browser","$sniffer",function(a,c){return{restrict:"E",require:"?ngModel",link:function(d,e,g,f){f&&(Kc[x(g.type)]||Kc.text)(d,e,g,f,c,a)}}}],mb="ng-valid",lb="ng-invalid",Ia="ng-pristine",ob="ng-dirty",be=["$scope","$exceptionHandler","$attrs","$element","$parse",function(a,c,d,e,g){function f(a,c){c=c?"-"+cb(c,"-"):"";e.removeClass((a?lb:mb)+c).addClass((a?mb:lb)+c)}this.$modelValue=this.$viewValue=Number.NaN; this.$parsers=[];this.$formatters=[];this.$viewChangeListeners=[];this.$pristine=!0;this.$dirty=!1;this.$valid=!0;this.$invalid=!1;this.$name=d.name;var h=g(d.ngModel),m=h.assign;if(!m)throw t("ngModel")("nonassign",d.ngModel,fa(e));this.$render=E;this.$isEmpty=function(a){return u(a)||""===a||null===a||a!==a};var k=e.inheritedData("$formController")||nb,l=0,n=this.$error={};e.addClass(Ia);f(!0);this.$setValidity=function(a,c){n[a]!==!c&&(c?(n[a]&&l--,l||(f(!0),this.$valid=!0,this.$invalid=!1)):(f(!1), this.$invalid=!0,this.$valid=!1,l++),n[a]=!c,f(c,a),k.$setValidity(a,c,this))};this.$setPristine=function(){this.$dirty=!1;this.$pristine=!0;e.removeClass(ob).addClass(Ia)};this.$setViewValue=function(d){this.$viewValue=d;this.$pristine&&(this.$dirty=!0,this.$pristine=!1,e.removeClass(Ia).addClass(ob),k.$setDirty());q(this.$parsers,function(a){d=a(d)});this.$modelValue!==d&&(this.$modelValue=d,m(a,d),q(this.$viewChangeListeners,function(a){try{a()}catch(d){c(d)}}))};var p=this;a.$watch(function(){var c= h(a);if(p.$modelValue!==c){var d=p.$formatters,e=d.length;for(p.$modelValue=c;e--;)c=d[e](c);p.$viewValue!==c&&(p.$viewValue=c,p.$render())}return c})}],ce=function(){return{require:["ngModel","^?form"],controller:be,link:function(a,c,d,e){var g=e[0],f=e[1]||nb;f.$addControl(g);a.$on("$destroy",function(){f.$removeControl(g)})}}},de=Y({require:"ngModel",link:function(a,c,d,e){e.$viewChangeListeners.push(function(){a.$eval(d.ngChange)})}}),Mc=function(){return{require:"?ngModel",link:function(a,c, d,e){if(e){d.required=!0;var g=function(a){if(d.required&&e.$isEmpty(a))e.$setValidity("required",!1);else return e.$setValidity("required",!0),a};e.$formatters.push(g);e.$parsers.unshift(g);d.$observe("required",function(){g(e.$viewValue)})}}}},ee=function(){return{require:"ngModel",link:function(a,c,d,e){var g=(a=/\/(.*)\//.exec(d.ngList))&&RegExp(a[1])||d.ngList||",";e.$parsers.push(function(a){if(!u(a)){var c=[];a&&q(a.split(g),function(a){a&&c.push(Z(a))});return c}});e.$formatters.push(function(a){return L(a)? a.join(", "):s});e.$isEmpty=function(a){return!a||!a.length}}}},fe=/^(true|false|\d+)$/,ge=function(){return{priority:100,compile:function(a,c){return fe.test(c.ngValue)?function(a,c,g){g.$set("value",a.$eval(g.ngValue))}:function(a,c,g){a.$watch(g.ngValue,function(a){g.$set("value",a)})}}}},he=sa(function(a,c,d){c.addClass("ng-binding").data("$binding",d.ngBind);a.$watch(d.ngBind,function(a){c.text(a==s?"":a)})}),ie=["$interpolate",function(a){return function(c,d,e){c=a(d.attr(e.$attr.ngBindTemplate)); d.addClass("ng-binding").data("$binding",c);e.$observe("ngBindTemplate",function(a){d.text(a)})}}],je=["$sce","$parse",function(a,c){return function(d,e,g){e.addClass("ng-binding").data("$binding",g.ngBindHtml);var f=c(g.ngBindHtml);d.$watch(function(){return(f(d)||"").toString()},function(c){e.html(a.getTrustedHtml(f(d))||"")})}}],ke=Lb("",!0),le=Lb("Odd",0),me=Lb("Even",1),ne=sa({compile:function(a,c){c.$set("ngCloak",s);a.removeClass("ng-cloak")}}),oe=[function(){return{scope:!0,controller:"@", priority:500}}],Nc={};q("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "),function(a){var c=la("ng-"+a);Nc[c]=["$parse",function(d){return{compile:function(e,g){var f=d(g[c]);return function(c,d,e){d.on(x(a),function(a){c.$apply(function(){f(c,{$event:a})})})}}}}]});var pe=["$animate",function(a){return{transclude:"element",priority:600,terminal:!0,restrict:"A",$$tlb:!0,link:function(c,d,e,g,f){var h, m;c.$watch(e.ngIf,function(g){Oa(g)?m||(m=c.$new(),f(m,function(c){c[c.length++]=R.createComment(" end ngIf: "+e.ngIf+" ");h={clone:c};a.enter(c,d.parent(),d)})):(m&&(m.$destroy(),m=null),h&&(a.leave(ub(h.clone)),h=null))})}}}],qe=["$http","$templateCache","$anchorScroll","$animate","$sce",function(a,c,d,e,g){return{restrict:"ECA",priority:400,terminal:!0,transclude:"element",controller:Ba.noop,compile:function(f,h){var m=h.ngInclude||h.src,k=h.onload||"",l=h.autoscroll;return function(f,h,q,s,A){var t= 0,v,z,K=function(){v&&(v.$destroy(),v=null);z&&(e.leave(z),z=null)};f.$watch(g.parseAsResourceUrl(m),function(g){var m=function(){!D(l)||l&&!f.$eval(l)||d()},q=++t;g?(a.get(g,{cache:c}).success(function(a){if(q===t){var c=f.$new();s.template=a;a=A(c,function(a){K();e.enter(a,null,h,m)});v=c;z=a;v.$emit("$includeContentLoaded");f.$eval(k)}}).error(function(){q===t&&K()}),f.$emit("$includeContentRequested")):(K(),s.template=null)})}}}}],re=["$compile",function(a){return{restrict:"ECA",priority:-400, require:"ngInclude",link:function(c,d,e,g){d.html(g.template);a(d.contents())(c)}}}],se=sa({priority:450,compile:function(){return{pre:function(a,c,d){a.$eval(d.ngInit)}}}}),te=sa({terminal:!0,priority:1E3}),ue=["$locale","$interpolate",function(a,c){var d=/{}/g;return{restrict:"EA",link:function(e,g,f){var h=f.count,m=f.$attr.when&&g.attr(f.$attr.when),k=f.offset||0,l=e.$eval(m)||{},n={},p=c.startSymbol(),r=c.endSymbol(),s=/^when(Minus)?(.+)$/;q(f,function(a,c){s.test(c)&&(l[x(c.replace("when","").replace("Minus", "-"))]=g.attr(f.$attr[c]))});q(l,function(a,e){n[e]=c(a.replace(d,p+h+"-"+k+r))});e.$watch(function(){var c=parseFloat(e.$eval(h));if(isNaN(c))return"";c in l||(c=a.pluralCat(c-k));return n[c](e,g,!0)},function(a){g.text(a)})}}}],ve=["$parse","$animate",function(a,c){var d=t("ngRepeat");return{transclude:"element",priority:1E3,terminal:!0,$$tlb:!0,link:function(e,g,f,h,m){var k=f.ngRepeat,l=k.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+track\s+by\s+([\s\S]+?))?\s*$/),n,p,r,s,A,t,v={$id:Ea};if(!l)throw d("iexp", k);f=l[1];h=l[2];(l=l[3])?(n=a(l),p=function(a,c,d){t&&(v[t]=a);v[A]=c;v.$index=d;return n(e,v)}):(r=function(a,c){return Ea(c)},s=function(a){return a});l=f.match(/^(?:([\$\w]+)|\(([\$\w]+)\s*,\s*([\$\w]+)\))$/);if(!l)throw d("iidexp",f);A=l[3]||l[1];t=l[2];var D={};e.$watchCollection(h,function(a){var f,h,l=g[0],n,v={},y,B,w,u,S,E,x=[];if(qb(a))S=a,n=p||r;else{n=p||s;S=[];for(w in a)a.hasOwnProperty(w)&&"$"!=w.charAt(0)&&S.push(w);S.sort()}y=S.length;h=x.length=S.length;for(f=0;fx;)u.pop().element.remove()}for(;y.length> J;)y.pop()[0].element.remove()}var k;if(!(k=t.match(d)))throw Ee("iexp",t,fa(f));var l=c(k[2]||k[1]),m=k[4]||k[6],n=k[5],p=c(k[3]||""),q=c(k[2]?k[1]:m),z=c(k[7]),w=k[8]?c(k[8]):null,y=[[{element:f,label:""}]];A&&(a(A)(e),A.removeClass("ng-scope"),A.remove());f.empty();f.on("change",function(){e.$apply(function(){var a,c=z(e)||[],d={},h,k,l,p,t,v,u;if(r)for(k=[],p=0,v=y.length;p@charset "UTF-8";[ng\\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak,.ng-hide{display:none !important;}ng\\:form{display:block;}'); //# sourceMappingURL=angular.min.js.map ; /* AngularJS v1.2.12 (c) 2010-2014 Google, Inc. http://angularjs.org License: MIT */ (function(v,k,t){'use strict';k.module("ngAnimate",["ng"]).factory("$$animateReflow",["$window","$timeout",function(k,B){var d=k.requestAnimationFrame||k.webkitRequestAnimationFrame||function(d){return B(d,10,!1)},q=k.cancelAnimationFrame||k.webkitCancelAnimationFrame||function(d){return B.cancel(d)};return function(p){var k=d(p);return function(){q(k)}}}]).config(["$provide","$animateProvider",function(R,B){function d(d){for(var k=0;k=u&&a>=p&&h()}var f=b.data(n),g=d(b);if(-1!=g.className.indexOf(a)&&f){var l=f.timings,m=f.stagger,p=f.maxDuration,r=f.activeClassName,u=Math.max(l.transitionDelay, l.animationDelay)*x,w=Date.now(),v=T+" "+S,t=f.itemIndex,q="",s=[];if(0=c;d--)e.end&&e.end(f[d]);f.length=c}}var b,g,f=[],l=a;for(f.last=function(){return f[f.length-1]};a;){g=!0;if(f.last()&&x[f.last()])a=a.replace(RegExp("(.*)<\\s*\\/\\s*"+f.last()+"[^>]*>","i"),function(b,a){a=a.replace(H,"$1").replace(I,"$1");e.chars&&e.chars(r(a));return""}),c("",f.last());else{if(0===a.indexOf("\x3c!--"))b=a.indexOf("--",4),0<=b&&a.lastIndexOf("--\x3e",b)===b&&(e.comment&&e.comment(a.substring(4,b)),a=a.substring(b+3),g=!1);else if(y.test(a)){if(b=a.match(y))a= a.replace(b[0],""),g=!1}else if(J.test(a)){if(b=a.match(z))a=a.substring(b[0].length),b[0].replace(z,c),g=!1}else K.test(a)&&(b=a.match(A))&&(a=a.substring(b[0].length),b[0].replace(A,d),g=!1);g&&(b=a.indexOf("<"),g=0>b?a:a.substring(0,b),a=0>b?"":a.substring(b),e.chars&&e.chars(r(g)))}if(a==l)throw L("badparse",a);l=a}c()}function r(a){if(!a)return"";var e=M.exec(a);a=e[1];var d=e[3];if(e=e[2])n.innerHTML=e.replace(//g,">")}function s(a,e){var d=!1,c=h.bind(a,a.push);return{start:function(a,g,f){a=h.lowercase(a);!d&&x[a]&&(d=a);d||!0!==C[a]||(c("<"),c(a),h.forEach(g,function(d,f){var g=h.lowercase(f),k="img"===a&&"src"===g||"background"===g;!0!==O[g]||!0===D[g]&&!e(d,k)||(c(" "),c(f),c('="'),c(B(d)),c('"'))}),c(f?"/>":">"))},end:function(a){a=h.lowercase(a);d||!0!==C[a]||(c(""));a==d&&(d=!1)},chars:function(a){d|| c(B(a))}}}var L=h.$$minErr("$sanitize"),A=/^<\s*([\w:-]+)((?:\s+[\w:-]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)\s*>/,z=/^<\s*\/\s*([\w:-]+)[^>]*>/,G=/([\w:-]+)(?:\s*=\s*(?:(?:"((?:[^"])*)")|(?:'((?:[^'])*)')|([^>\s]+)))?/g,K=/^]*?)>/i,I=/]/,d=/^mailto:/;return function(c,b){function g(a){a&&m.push(E(a))}function f(a,c){m.push("');g(c);m.push("")}if(!c)return c;for(var l,k=c,m=[],n,p;l=k.match(e);)n=l[0],l[2]==l[3]&&(n="mailto:"+n),p=l.index,g(k.substr(0,p)),f(n,l[0].replace(d,"")),k=k.substring(p+l[0].length);g(k);return a(m.join(""))}}])})(window,window.angular); //# sourceMappingURL=angular-sanitize.min.js.map ; /** * State-based routing for AngularJS * @version v0.2.7 * @link http://angular-ui.github.com/ * @license MIT License, http://www.opensource.org/licenses/MIT */ "undefined"!=typeof module&&"undefined"!=typeof exports&&module.exports===exports&&(module.exports="ui.router"),function(a,b,c){"use strict";function d(a,b){return E(new(E(function(){},{prototype:a})),b)}function e(a){return D(arguments,function(b){b!==a&&D(b,function(b,c){a.hasOwnProperty(c)||(a[c]=b)})}),a}function f(a,b){var c=[];for(var d in a.path)if(""!==a.path[d]){if(!b.path[d])break;c.push(a.path[d])}return c}function g(a,b){if(Array.prototype.indexOf)return a.indexOf(b,Number(arguments[2])||0);var c=a.length>>>0,d=Number(arguments[2])||0;for(d=0>d?Math.ceil(d):Math.floor(d),0>d&&(d+=c);c>d;d++)if(d in a&&a[d]===b)return d;return-1}function h(a,b,c,d){var e,h=f(c,d),i={},j=[];for(var k in h)if(h[k].params&&h[k].params.length){e=h[k].params;for(var l in e)g(j,e[l])>=0||(j.push(e[l]),i[e[l]]=a[e[l]])}return E({},i,b)}function i(a,b){var c={};return D(a,function(a){var d=b[a];c[a]=null!=d?String(d):null}),c}function j(a,b,c){if(!c){c=[];for(var d in a)c.push(d)}for(var e=0;e "));if(o[c]=d,A(a))m.push(c,[function(){return b.get(a)}],h);else{var e=b.annotate(a);D(e,function(a){a!==c&&g.hasOwnProperty(a)&&k(g[a],a)}),m.push(c,a,e)}n.pop(),o[c]=f}}function l(a){return B(a)&&a.then&&a.$$promises}if(!B(g))throw new Error("'invocables' must be an object");var m=[],n=[],o={};return D(g,k),g=n=o=null,function(d,f,g){function h(){--s||(t||e(r,f.$$values),p.$$values=r,p.$$promises=!0,o.resolve(r))}function k(a){p.$$failure=a,o.reject(a)}function n(c,e,f){function i(a){l.reject(a),k(a)}function j(){if(!y(p.$$failure))try{l.resolve(b.invoke(e,g,r)),l.promise.then(function(a){r[c]=a,h()},i)}catch(a){i(a)}}var l=a.defer(),m=0;D(f,function(a){q.hasOwnProperty(a)&&!d.hasOwnProperty(a)&&(m++,q[a].then(function(b){r[a]=b,--m||j()},i))}),m||j(),q[c]=l.promise}if(l(d)&&g===c&&(g=f,f=d,d=null),d){if(!B(d))throw new Error("'locals' must be an object")}else d=i;if(f){if(!l(f))throw new Error("'parent' must be a promise returned by $resolve.resolve()")}else f=j;var o=a.defer(),p=o.promise,q=p.$$promises={},r=E({},d),s=1+m.length/3,t=!1;if(y(f.$$failure))return k(f.$$failure),p;f.$$values?(t=e(r,f.$$values),h()):(E(q,f.$$promises),f.then(h,k));for(var u=0,v=m.length;v>u;u+=3)d.hasOwnProperty(m[u])?h():n(m[u],m[u+1],m[u+2]);return p}},this.resolve=function(a,b,c,d){return this.study(a)(b,c,d)}}function m(a,b,c){this.fromConfig=function(a,b,c){return y(a.template)?this.fromString(a.template,b):y(a.templateUrl)?this.fromUrl(a.templateUrl,b):y(a.templateProvider)?this.fromProvider(a.templateProvider,b,c):null},this.fromString=function(a,b){return z(a)?a(b):a},this.fromUrl=function(c,d){return z(c)&&(c=c(d)),null==c?null:a.get(c,{cache:b}).then(function(a){return a.data})},this.fromProvider=function(a,b,d){return c.invoke(a,null,d||{params:b})}}function n(a){function b(b){if(!/^\w+(-+\w+)*$/.test(b))throw new Error("Invalid parameter name '"+b+"' in pattern '"+a+"'");if(f[b])throw new Error("Duplicate parameter name '"+b+"' in pattern '"+a+"'");f[b]=!0,j.push(b)}function c(a){return a.replace(/[\\\[\]\^$*+?.()|{}]/g,"\\$&")}var d,e=/([:*])(\w+)|\{(\w+)(?:\:((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g,f={},g="^",h=0,i=this.segments=[],j=this.params=[];this.source=a;for(var k,l,m;(d=e.exec(a))&&(k=d[2]||d[3],l=d[4]||("*"==d[1]?".*":"[^/]*"),m=a.substring(h,d.index),!(m.indexOf("?")>=0));)g+=c(m)+"("+l+")",b(k),i.push(m),h=e.lastIndex;m=a.substring(h);var n=m.indexOf("?");if(n>=0){var o=this.sourceSearch=m.substring(n);m=m.substring(0,n),this.sourcePath=a.substring(0,h+n),D(o.substring(1).split(/[&?]/),b)}else this.sourcePath=a,this.sourceSearch="";g+=c(m)+"$",i.push(m),this.regexp=new RegExp(g),this.prefix=i[0]}function o(){this.compile=function(a){return new n(a)},this.isMatcher=function(a){return B(a)&&z(a.exec)&&z(a.format)&&z(a.concat)},this.$get=function(){return this}}function p(a){function b(a){var b=/^\^((?:\\[^a-zA-Z0-9]|[^\\\[\]\^$*+?.()|{}]+)*)/.exec(a.source);return null!=b?b[1].replace(/\\(.)/g,"$1"):""}function c(a,b){return a.replace(/\$(\$|\d{1,2})/,function(a,c){return b["$"===c?0:Number(c)]})}function d(a,b,c){if(!c)return!1;var d=a.invoke(b,b,{$match:c});return y(d)?d:!0}var e=[],f=null;this.rule=function(a){if(!z(a))throw new Error("'rule' must be a function");return e.push(a),this},this.otherwise=function(a){if(A(a)){var b=a;a=function(){return b}}else if(!z(a))throw new Error("'rule' must be a function");return f=a,this},this.when=function(e,f){var g,h=A(f);if(A(e)&&(e=a.compile(e)),!h&&!z(f)&&!C(f))throw new Error("invalid 'handler' in when()");var i={matcher:function(b,c){return h&&(g=a.compile(c),c=["$match",function(a){return g.format(a)}]),E(function(a,e){return d(a,c,b.exec(e.path(),e.search()))},{prefix:A(b.prefix)?b.prefix:""})},regex:function(a,e){if(a.global||a.sticky)throw new Error("when() RegExp must not be global or sticky");return h&&(g=e,e=["$match",function(a){return c(g,a)}]),E(function(b,c){return d(b,e,a.exec(c.path()))},{prefix:b(a)})}},j={matcher:a.isMatcher(e),regex:e instanceof RegExp};for(var k in j)if(j[k])return this.rule(i[k](e,f));throw new Error("invalid 'what' in when()")},this.$get=["$location","$rootScope","$injector",function(a,b,c){function d(b){function d(b){var d=b(c,a);return d?(A(d)&&a.replace().url(d),!0):!1}if(!b||!b.defaultPrevented){var g,h=e.length;for(g=0;h>g;g++)if(d(e[g]))return;f&&d(f)}}return b.$on("$locationChangeSuccess",d),{sync:function(){d()}}}]}function q(a,e,f){function g(a){return 0===a.indexOf(".")||0===a.indexOf("^")}function l(a,b){var d=A(a),e=d?a:a.name,f=g(e);if(f){if(!b)throw new Error("No reference point given for path '"+e+"'");for(var h=e.split("."),i=0,j=h.length,k=b;j>i;i++)if(""!==h[i]||0!==i){if("^"!==h[i])break;if(!k.parent)throw new Error("Path '"+e+"' not valid for state '"+b.name+"'");k=k.parent}else k=b;h=h.slice(i).join("."),e=k.name+(k.name&&h?".":"")+h}var l=u[e];return!l||!d&&(d||l!==a&&l.self!==a)?c:l}function m(a,b){v[a]||(v[a]=[]),v[a].push(b)}function n(b){b=d(b,{self:b,resolve:b.resolve||{},toString:function(){return this.name}});var c=b.name;if(!A(c)||c.indexOf("@")>=0)throw new Error("State must have a valid name");if(u.hasOwnProperty(c))throw new Error("State '"+c+"'' is already defined");var e=-1!==c.indexOf(".")?c.substring(0,c.lastIndexOf(".")):A(b.parent)?b.parent:"";if(e&&!u[e])return m(e,b.self);for(var f in x)z(x[f])&&(b[f]=x[f](b,x.$delegates[f]));if(u[c]=b,!b[w]&&b.url&&a.when(b.url,["$match","$stateParams",function(a,c){t.$current.navigable==b&&j(a,c)||t.transitionTo(b,a,{location:!1})}]),v[c])for(var g=0;g=I;d--)g=u[d],g.self.onExit&&m.invoke(g.self.onExit,g.self,g.locals.globals),g.locals=null;for(d=I;d").html(a).contents();return r.enter(d,c),d}},"false":{remove:function(a){a.html("")},restore:function(a,b){b.append(a)},populate:function(a,b){return b.html(a),b.contents()}}}[a.toString()]};j.append(s);var u=j.parent().inheritedData("$uiView");p.indexOf("@")<0&&(p=p+"@"+(u?u.state.name:""));var v={name:p,state:null};j.data("$uiView",v);var w=function(){if(!h){h=!0;try{m(!0)}catch(a){throw h=!1,a}h=!1}};e.$on("$stateChangeSuccess",w),e.$on("$viewContentLoading",w),m(!1)}}};return i}function t(a){var b=a.replace(/\n/g," ").match(/^([^(]+?)\s*(\((.*)\))?$/);if(!b||4!==b.length)throw new Error("Invalid state ref '"+a+"'");return{state:b[1],paramExpr:b[3]||null}}function u(a){var b=a.parent().inheritedData("$uiView");return b&&b.state&&b.state.name?b.state:void 0}function v(a,b){return{restrict:"A",require:"?^uiSrefActive",link:function(c,d,e,f){var g=t(e.uiSref),h=null,i=u(d)||a.$current,j="FORM"===d[0].nodeName,k=j?"action":"href",l=!0,m=function(b){if(b&&(h=b),l){var c=a.href(g.state,h,{relative:i});if(!c)return l=!1,!1;d[0][k]=c,f&&f.$$setStateInfo(g.state,h)}};g.paramExpr&&(c.$watch(g.paramExpr,function(a){a!==h&&m(a)},!0),h=c.$eval(g.paramExpr)),m(),j||d.bind("click",function(d){var e=d.which||d.button;0!==e&&1!=e||d.ctrlKey||d.metaKey||d.shiftKey||(b(function(){c.$apply(function(){a.go(g.state,h,{relative:i})})}),d.preventDefault())})}}}function w(a,b,c){return{restrict:"A",controller:function(d,e,f){function g(){a.$current.self===i&&h()?e.addClass(l):e.removeClass(l)}function h(){return!k||j(k,b)}var i,k,l;l=c(f.uiSrefActive||"",!1)(d),this.$$setStateInfo=function(b,c){i=a.get(b,u(e)),k=c,g()},d.$on("$stateChangeSuccess",g)}}}function x(a,b){function e(a){this.locals=a.locals.globals,this.params=this.locals.$stateParams}function f(){this.locals=null,this.params=null}function g(c,g){if(null!=g.redirectTo){var h,j=g.redirectTo;if(A(j))h=j;else{if(!z(j))throw new Error("Invalid 'redirectTo' in when()");h=function(a,b){return j(a,b.path(),b.search())}}b.when(c,h)}else a.state(d(g,{parent:null,name:"route:"+encodeURIComponent(c),url:c,onEnter:e,onExit:f}));return i.push(g),this}function h(a,b,d){function e(a){return""!==a.name?a:c}var f={routes:i,params:d,current:c};return b.$on("$stateChangeStart",function(a,c,d,f){b.$broadcast("$routeChangeStart",e(c),e(f))}),b.$on("$stateChangeSuccess",function(a,c,d,g){f.current=e(c),b.$broadcast("$routeChangeSuccess",e(c),e(g)),F(d,f.params)}),b.$on("$stateChangeError",function(a,c,d,f,g,h){b.$broadcast("$routeChangeError",e(c),e(f),h)}),f}var i=[];e.$inject=["$$state"],this.when=g,this.$get=h,h.$inject=["$state","$rootScope","$routeParams"]}var y=b.isDefined,z=b.isFunction,A=b.isString,B=b.isObject,C=b.isArray,D=b.forEach,E=b.extend,F=b.copy;b.module("ui.router.util",["ng"]),b.module("ui.router.router",["ui.router.util"]),b.module("ui.router.state",["ui.router.router","ui.router.util"]),b.module("ui.router",["ui.router.state"]),b.module("ui.router.compat",["ui.router"]),l.$inject=["$q","$injector"],b.module("ui.router.util").service("$resolve",l),m.$inject=["$http","$templateCache","$injector"],b.module("ui.router.util").service("$templateFactory",m),n.prototype.concat=function(a){return new n(this.sourcePath+a+this.sourceSearch)},n.prototype.toString=function(){return this.source},n.prototype.exec=function(a,b){var c=this.regexp.exec(a);if(!c)return null;var d,e=this.params,f=e.length,g=this.segments.length-1,h={};if(g!==c.length-1)throw new Error("Unbalanced capture group in route '"+this.source+"'");for(d=0;g>d;d++)h[e[d]]=c[d+1];for(;f>d;d++)h[e[d]]=b[e[d]];return h},n.prototype.parameters=function(){return this.params},n.prototype.format=function(a){var b=this.segments,c=this.params;if(!a)return b.join("");var d,e,f,g=b.length-1,h=c.length,i=b[0];for(d=0;g>d;d++)f=a[c[d]],null!=f&&(i+=encodeURIComponent(f)),i+=b[d+1];for(;h>d;d++)f=a[c[d]],null!=f&&(i+=(e?"&":"?")+c[d]+"="+encodeURIComponent(f),e=!0);return i},b.module("ui.router.util").provider("$urlMatcherFactory",o),p.$inject=["$urlMatcherFactoryProvider"],b.module("ui.router.router").provider("$urlRouter",p),q.$inject=["$urlRouterProvider","$urlMatcherFactoryProvider","$locationProvider"],b.module("ui.router.state").value("$stateParams",{}).provider("$state",q),r.$inject=[],b.module("ui.router.state").provider("$view",r),s.$inject=["$state","$compile","$controller","$injector","$anchorScroll"],b.module("ui.router.state").directive("uiView",s),v.$inject=["$state","$timeout"],w.$inject=["$state","$stateParams","$interpolate"],b.module("ui.router.state").directive("uiSref",v).directive("uiSrefActive",w),x.$inject=["$stateProvider","$urlRouterProvider"],b.module("ui.router.compat").provider("$route",x).directive("ngView",s)}(window,window.angular); ; /*! * 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")})}})}])}();