ionic-rails-engine 0.9.17 → 0.9.26
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/README.md +1 -1
- data/app/assets/fonts/ionic/ionicons.eot +0 -0
- data/app/assets/fonts/ionic/ionicons.svg +527 -527
- data/app/assets/fonts/ionic/ionicons.ttf +0 -0
- data/app/assets/fonts/ionic/ionicons.woff +0 -0
- data/app/assets/javascripts/angular-ui/angular-ui-router.js +1769 -0
- data/app/assets/javascripts/angular-ui/angular-ui-router.min.js +7 -0
- data/app/assets/javascripts/ionic/ionic-angular.js +2289 -1168
- data/app/assets/javascripts/ionic/ionic-angular.min.js +5 -5
- data/app/assets/javascripts/ionic/ionic.bundle.js +35369 -0
- data/app/assets/javascripts/ionic/ionic.bundle.min.js +289 -0
- data/app/assets/javascripts/ionic/ionic.js +1049 -440
- data/app/assets/javascripts/ionic/ionic.min.js +6 -6
- data/app/assets/stylesheets/ionic/ionic.css.erb +819 -1289
- data/app/assets/stylesheets/ionic/ionic.min.css.erb +6 -6
- data/gem-public_cert.pem +11 -10
- data/lib/ionic-rails-engine/version.rb +1 -1
- metadata +17 -14
- metadata.gz.sig +0 -0
- data/app/assets/stylesheets/ionic/themes/ionic-ios7.css +0 -150
- data/app/assets/stylesheets/ionic/themes/ionic-ios7.min.css +0 -13
@@ -0,0 +1,289 @@
|
|
1
|
+
/*!
|
2
|
+
* ionic.bundle.js is a concatenation of:
|
3
|
+
* ionic.js, angular.js, angular-animate.js,
|
4
|
+
* angular-ui-router.js, and ionic-angular.js
|
5
|
+
*/
|
6
|
+
|
7
|
+
/*!
|
8
|
+
* Copyright 2014 Drifty Co.
|
9
|
+
* http://drifty.com/
|
10
|
+
*
|
11
|
+
* Ionic, v0.9.26
|
12
|
+
* A powerful HTML5 mobile app framework.
|
13
|
+
* http://ionicframework.com/
|
14
|
+
*
|
15
|
+
* By @maxlynch, @benjsperry, @adamdbradley <3
|
16
|
+
*
|
17
|
+
* Licensed under the MIT license. Please see LICENSE for more information.
|
18
|
+
*
|
19
|
+
*/
|
20
|
+
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)<epsilon)return g(d);if(i=h(d),Math.abs(i)<1e-6)break;d-=e/i}if(b=0,c=1,d=k,b>d)return g(b);if(d>c)return g(c);for(;c>b;){if(e=f(d),Math.abs(e-k)<epsilon)return g(d);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;d<b.length;d++)a.requestAnimationFrame(b[d]);b=[],document.removeEventListener("DOMContentLoaded",c)};document.addEventListener("DOMContentLoaded",c),window._rAF=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(a){window.setTimeout(a,16)}}(),a.DomUtil={requestAnimationFrame:function(a){window._rAF(a)},animationFrameThrottle:function(b){var c,d,e;return function(){c=arguments,e=this,d||(d=!0,a.requestAnimationFrame(function(){b.apply(e,c),d=!1}))}},getPositionInParent:function(a){return{left:a.offsetLeft,top:a.offsetTop}},ready:function(c){"complete"===document.readyState?a.requestAnimationFrame(c):b.push(c)},getTextBounds:function(a){if(document.createRange){var b=document.createRange();if(b.selectNodeContents(a),b.getBoundingClientRect){var c=b.getBoundingClientRect();if(c){var d=window.scrollX,e=window.scrollY;return{top:c.top+e,left:c.left+d,right:c.left+d+c.width,bottom:c.top+e+c.height,width:c.width,height:c.height}}}}return null},getChildIndex:function(a,b){if(b)for(var c,d=a.parentNode.children,e=0,f=0,g=d.length;g>e;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;d<c.length;d++)this.element.addEventListener(c[d],b,!1);return this},off:function(a,b){for(var c=a.split(" "),d=0;d<c.length;d++)this.element.removeEventListener(c[d],b,!1);return this},trigger:function(b,c){var d=a.Gestures.DOCUMENT.createEvent("Event");d.initEvent(b,!0,!0),d.gesture=c;var e=this.element;return a.Gestures.utils.hasParent(c.target,e)&&(e=c.target),e.dispatchEvent(d),this},enable:function(a){return this.enabled=a,this}};var c=null,d=!1,e=!1;a.Gestures.event={bindDom:function(a,b,c){for(var d=b.split(" "),e=0;e<d.length;e++)a.addEventListener(d[e],c,!1)},onTouch:function(b,f,g){var h=this;this.bindDom(b,a.Gestures.EVENT_TYPES[f],function(i){var j=i.type.toLowerCase();if(!j.match(/mouse/)||!e){j.match(/touch/)||j.match(/pointerdown/)||j.match(/mouse/)&&1===i.which?d=!0:j.match(/mouse/)&&1!==i.which&&(d=!1),j.match(/touch|pointer/)&&(e=!0);var k=0;d&&(a.Gestures.HAS_POINTEREVENTS&&f!=a.Gestures.EVENT_END?k=a.Gestures.PointerEvent.updatePointer(f,i):j.match(/touch/)?k=i.touches.length:e||(k=j.match(/up/)?0:1),k>0&&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.index<b.index?-1:a.index>b.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.timeStamp<c.options.doubletap_interval&&b.distance<c.options.doubletap_distance&&(c.trigger("doubletap",b),e=!0),(!e||c.options.tap_always)&&(a.Gestures.detection.current.name="tap",c.trigger(a.Gestures.detection.current.name,b))}}},a.Gestures.gestures.Swipe={name:"swipe",index:40,defaults:{swipe_max_touches:1,swipe_velocity:.7},handler:function(b,c){if(b.eventType==a.Gestures.EVENT_END){if(c.options.swipe_max_touches>0&&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.distance<c.options.drag_min_distance&&a.Gestures.detection.current.name!=this.name)return;if(a.Gestures.detection.current.name!=this.name&&(a.Gestures.detection.current.name=this.name,c.options.correct_for_drag_min_distance)){var d=Math.abs(c.options.drag_min_distance/b.distance);a.Gestures.detection.current.startEvent.center.pageX+=b.deltaX*d,a.Gestures.detection.current.startEvent.center.pageY+=b.deltaY*d,b=a.Gestures.detection.extendEventData(b)}(a.Gestures.detection.current.lastEvent.drag_locked_to_axis||c.options.drag_lock_to_axis&&c.options.drag_lock_min_distance<=b.distance)&&(b.drag_locked_to_axis=!0);var e=a.Gestures.detection.current.lastEvent.direction;b.drag_locked_to_axis&&e!==b.direction&&(b.direction=a.Gestures.utils.isVertical(e)?b.deltaY<0?a.Gestures.DIRECTION_UP:a.Gestures.DIRECTION_DOWN:b.deltaX<0?a.Gestures.DIRECTION_LEFT:a.Gestures.DIRECTION_RIGHT),this.triggered||(c.trigger(this.name+"start",b),this.triggered=!0),c.trigger(this.name,b),c.trigger(this.name+b.direction,b),(c.options.drag_block_vertical&&a.Gestures.utils.isVertical(b.direction)||c.options.drag_block_horizontal&&!a.Gestures.utils.isVertical(b.direction))&&b.preventDefault();break;case a.Gestures.EVENT_END:this.triggered&&c.trigger(this.name+"end",b),this.triggered=!1}}},a.Gestures.gestures.Transform={name:"transform",index:45,defaults:{transform_min_scale:.01,transform_min_rotation:1,transform_always_block:!1},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(!(b.touches.length<2))switch(c.options.transform_always_block&&b.preventDefault(),b.eventType){case a.Gestures.EVENT_START:this.triggered=!1;break;case a.Gestures.EVENT_MOVE:var d=Math.abs(1-b.scale),e=Math.abs(b.rotation);if(d<c.options.transform_min_scale&&e<c.options.transform_min_rotation)return;a.Gestures.detection.current.name=this.name,this.triggered||(c.trigger(this.name+"start",b),this.triggered=!0),c.trigger(this.name,b),e>c.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;b<f.length;b++)f[b]();f=[],a.trigger("platformready",{target:document}),document.removeEventListener("deviceready",c,!1)}a.Platform={isReady:!1,isFullScreen:!1,platforms:null,grade:null,ua:navigator.userAgent,ready:function(a){this.isReady?a():f.push(a)},detect:function(){var b,c=document.body.className;for(a.Platform._checkPlatforms(),b=0;b<this.platforms.length;b++)c+=" platform-"+this.platforms[b];c+=" grade-"+this.grade,document.body.className=c.trim()},device:function(){return window.device?window.device:(this.isCordova()&&console.error("device plugin required"),{})},_checkPlatforms:function(){this.platforms=[],this.grade="a",this.isCordova()&&this.platforms.push("cordova"),this.isIPad()&&this.platforms.push("ipad");var a=this.platform();if(a){this.platforms.push(a);var b=this.version();if(b){var c=b.toString();c.indexOf(".")>0?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<this.platforms.length;b++)if(this.platforms[b]===a)return!0;var c=this.platform();return c?c===a.toLowerCase():this.ua.toLowerCase().indexOf(a)>=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.x<c.x+o&&d.y>c.y-o&&d.y<c.y+o)return c}function g(a){var b=h(a);if(b.x&&b.y){var c=Date.now();l[c]={x:b.x,y:b.y,id:c},setTimeout(function(){delete l[c]},m)}}function h(a){var b=a.gesture?a.gesture:a;if(b){var c=b.touches&&b.touches.length?b.touches:[b],d=b.changedTouches&&b.changedTouches[0]||b.originalEvent&&b.originalEvent.changedTouches&&b.originalEvent.changedTouches[0]||c[0].originalEvent||c[0];if(d)return{x:d.clientX,y:d.clientY}}return{x:0,y:0}}function i(a){setTimeout(function(){var b=f(a);b&&delete l[b.id]},n)}function j(a){return a.stopPropagation(),a.preventDefault(),!1}function k(){var a=b.activeElement;!a||"INPUT"!==a.tagName&&"TEXTAREA"!==a.tagName&&"SELECT"!==a.tagName||setTimeout(function(){a.blur()},400)}c.CSS={},function(){for(var a=["webkitTransform","transform","-webkit-transform","webkit-transform","-moz-transform","moz-transform","MozTransform","mozTransform"],d=0;d<a.length;d++)if(void 0!==b.documentElement.style[a[d]]){c.CSS.TRANSFORM=a[d];break}}(),"classList"in b.documentElement||!Object.defineProperty||"undefined"==typeof HTMLElement||Object.defineProperty(HTMLElement.prototype,"classList",{get:function(){function a(a){return function(){var c,d=b.className.split(/\s+/);for(c=0;c<arguments.length;c++)a(d,d.indexOf(arguments[c]),arguments[c]);b.className=d.join(" ")}}var b=this;return{add:a(function(a,b,c){~b||a.push(c)}),remove:a(function(a,b){~b&&a.splice(b,1)}),toggle:a(function(a,b,c){~b?a.splice(b,1):a.push(c)}),contains:function(a){return!!~b.className.split(/\s+/).indexOf(a)},item:function(a){return b.className.split(/\s+/)[a]||null}}}}),c.tapElement=function(c,d){var e=c.control||c;if(!e.disabled){var i=h(d),l=b.createEvent("MouseEvents");return l.initMouseEvent("click",!0,!0,a,1,0,0,i.x,i.y,!1,!1,!1,!1,0,null),e.dispatchEvent(l),"INPUT"===e.tagName||"TEXTAREA"===e.tagName||"SELECT"===e.tagName?(e.focus(),d.preventDefault()):k(),f(d)||g(d),c.control?j(d):void 0}};var l={},m=1500,n=375,o=15;b.addEventListener("click",e,!0),c.on("tap",d,b),b.addEventListener("touchend",i,!1),b.addEventListener("mouseup",i,!1)}(this,document,ionic),function(a){var b=["0","0","0"];a.Utils={arrayMove:function(a,b,c){if(c>=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;c<b.length;c++){var d=b[c];if(d)for(var e in d)a[e]=d[e]}return a},nextUid:function(){for(var a,c=b.length;c;){if(c--,a=b[c].charCodeAt(0),57==a)return b[c]="A",b.join("");if(90!=a)return b[c]=String.fromCharCode(a+1),b.join("");b[c]="0"}return b.unshift("0"),b.join("")}},a.inherit=a.Utils.inherit,a.extend=a.Utils.extend,a.throttle=a.Utils.throttle,a.proxy=a.Utils.proxy,a.debounce=a.Utils.debounce}(window.ionic),function(a){function b(){function b(){function b(){c=e-window.innerHeight;var b=document.activeElement;b&&a.trigger("scrollChildIntoView",{target:b},!0)}d!==window.innerWidth?(d=window.innerWidth,e=window.innerHeight):e!==window.innerHeight&&window.innerHeight<e?(document.body.classList.add("hide-footer"),a.requestAnimationFrame(b)):document.body.classList.remove("hide-footer")}var c,d=window.innerWidth,e=window.innerHeight;window.addEventListener("resize",b)}a.Platform.ready(function(){a.Platform.is("android")&&b()})}(window.ionic),function(a){"use strict";a.views.View=function(){this.initialize.apply(this,arguments)},a.views.View.inherit=a.inherit,a.extend(a.views.View.prototype,{initialize:function(){}})}(window.ionic);var IS_INPUT_LIKE_REGEX=/input|textarea|select/i;!function(a){var b=Date.now||function(){return+new Date},c=60,d=1e3,e={},f=1;a.core?core.effect||(core.effect={}):a.core={effect:{}},core.effect.Animate={requestAnimationFrame:function(){var b=a.requestAnimationFrame||a.webkitRequestAnimationFrame||a.mozRequestAnimationFrame||a.oRequestAnimationFrame,c=!!b;if(b&&!/requestAnimationFrame\(\)\s*\{\s*\[native code\]\s*\}/i.test(b.toString())&&(c=!1),c)return function(a,c){b(a,c)};var d=60,e={},f=0,g=1,h=null,i=+new Date;return function(a){var b=g++;return e[b]=a,f++,null===h&&(h=setInterval(function(){var a=+new Date,b=e;e={},f=0;for(var c in b)b.hasOwnProperty(c)&&(b[c](a),i=a);a-i>2500&&(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;u<Math.min(t,4);u++)s(!0),o++;i&&(n=(r-l)/i,n>1&&(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);
|
21
|
+
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(c<b.__minDecelerationScrollLeft?h=b.__minDecelerationScrollLeft-c:c>b.__maxDecelerationScrollLeft&&(h=b.__maxDecelerationScrollLeft-c),d<b.__minDecelerationScrollTop?i=b.__minDecelerationScrollTop-d:d>b.__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;d<g.length;d++)e=g[d],e.tagName&&"h1"==e.tagName.toLowerCase()?j=!1:(f=null,3==e.nodeType?f=a.DomUtil.getTextBounds(e):1==e.nodeType&&(f=e.getBoundingClientRect()),f&&(j?i+=f.width:h+=f.width));var k=Math.max(h,i)+10;"center"==this.alignTitle?(k>10&&(c.style.left=k+"px",c.style.right=k+"px"),c.offsetWidth<c.scrollWidth&&i>0&&(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&&b<this.scrollView.getScrollMax().top&&this.scrollView.scrollBy(null,g)}!this._isDragging&&Math.abs(a.gesture.deltaY)>this.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&&f<d.offsetTop+d.offsetHeight/2?(a.DomUtil.swapNodes(this._currentDrag.placeholder,d),c-1):e&&f>e.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;a<this._virtualItemsToRemove.length;a++){{this._virtualItemsToRemove[a]}this.didHideItem&&this.didHideItem(a)}},_initDrag:function(){this._dragOp=null},_getItem:function(a){for(;a;){if(a.classList.contains(b))return a;a=a.parentNode}return null},_startDrag:function(b){var c=this;if(this._isDragging=!1,!a.DomUtil.getParentOrSelfWithClass(b.target,h)||"up"!=b.gesture.direction&&"down"!=b.gesture.direction){if(("left"==b.gesture.direction||"right"==b.gesture.direction)&&Math.abs(b.gesture.deltaX)>5)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;b<a.length;b++)a[b].blur&&a[b].blur()})}}})}(ionic),function(a){"use strict";a.views.NavBar=a.views.View.inherit({initialize:function(a){this.el=a.el,this._titleEl=this.el.querySelector(".title"),a.hidden&&this.hide()},hide:function(){this.el.classList.add("hidden")},show:function(){this.el.classList.remove("hidden")},shouldGoBack:function(){},setTitle:function(a){this._titleEl&&(this._titleEl.innerHTML=a)},showBackButton:function(a){var b=this;if(!this._currentBackButton){var c=document.createElement("a");c.className="button back",c.innerHTML="Back",this._currentBackButton=c,this._currentBackButton.onclick=function(){b.shouldGoBack&&b.shouldGoBack()}}a&&!this._currentBackButton.parentNode?this.el.insertBefore(this._currentBackButton,this.el.firstChild):!a&&this._currentBackButton.parentNode&&this._currentBackButton.parentNode.removeChild(this._currentBackButton)}})}(ionic),function(a){"use strict";a.views.Popup=a.views.View.inherit({initialize:function(a){this.el=a.el},setTitle:function(a){var b=el.querySelector(".popup-title");b&&(b.innerHTML=a)},alert:function(b){var c=this;a.requestAnimationFrame(function(){c.setTitle(b),c.el.classList.add("active")})},hide:function(){this.el.offsetWidth,this.el.classList.remove("active")}})}(ionic),function(a){"use strict";a.views.SideMenu=a.views.View.inherit({initialize:function(a){this.el=a.el,this.isEnabled=a.isEnabled||!0,this.setWidth(a.width)},getFullWidth:function(){return this.width},setWidth:function(a){this.width=a,this.el.style.width=a+"px"},setIsEnabled:function(a){this.isEnabled=a},bringUp:function(){"0"!==this.el.style.zIndex&&(this.el.style.zIndex="0")},pushDown:function(){"-1"!==this.el.style.zIndex&&(this.el.style.zIndex="-1")}}),a.views.SideMenuContent=a.views.View.inherit({initialize:function(b){a.extend(this,{animationClass:"menu-animated",onDrag:function(){},onEndDrag:function(){}},b),a.onGesture("drag",a.proxy(this._onDrag,this),this.el),a.onGesture("release",a.proxy(this._onEndDrag,this),this.el)},_onDrag:function(a){this.onDrag&&this.onDrag(a)},_onEndDrag:function(a){this.onEndDrag&&this.onEndDrag(a)},disableAnimation:function(){this.el.classList.remove(this.animationClass)},enableAnimation:function(){this.el.classList.add(this.animationClass)},getTranslateX:function(){return parseFloat(this.el.style[a.CSS.TRANSFORM].replace("translate3d(","").split(",")[0])},setTranslateX:a.animationFrameThrottle(function(b){this.el.style[a.CSS.TRANSFORM]="translate3d("+b+"px, 0, 0)"})})}(ionic),function(a){"use strict";a.views.Slider=a.views.View.inherit({initialize:function(a){function b(){p=t.children,s=p.length,p.length<2&&(a.continuous=!1),n.transitions&&a.continuous&&p.length<3&&(t.appendChild(p[0].cloneNode(!0)),t.appendChild(t.children[1].cloneNode(!0)),p=t.children),q=new Array(p.length),r=o.getBoundingClientRect().width||o.offsetWidth,t.style.width=p.length*r+"px";for(var b=p.length;b--;){var c=p[b];c.style.width=r+"px",c.setAttribute("data-index",b),n.transitions&&(c.style.left=b*-r+"px",g(b,u>b?-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):u<p.length-1&&f(u+1)}function e(a){return(p.length+a%p.length)%p.length}function f(b,c){if(u!=b){if(n.transitions){var d=Math.abs(u-b)/(u-b);if(a.continuous){var f=d;d=-q[e(b)]/r,d!==f&&(b=-d*p.length+b)}for(var h=Math.abs(u-b)-1;h--;)g(e((b>u?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)<Math.abs(A.y))),x||(b.preventDefault(),k(),a.continuous?(h(e(u-1),A.x+q[e(u-1)],0),h(u,A.x+q[u],0),h(e(u+1),A.x+q[e(u+1)],0)):(A.x=A.x/(!u&&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()
|
22
|
+
},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||b<this.openPercent-3||b>this.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<b.length;c++)this.addController(b[c]);this.controllerWillChange=a.controllerWillChange||function(){},this.controllerChanged=a.controllerChanged||function(){},this.setSelectedController(0)},_bindEvents:function(){var a=this;this.tabBar.tryTabSelect=function(b){a.setSelectedController(b)}},selectController:function(a){var b=!0;this.controllerWillChange&&this.controllerWillChange(this.controllers[a],a)===!1&&(b=!1),b&&this.setSelectedController(a)},setSelectedController:function(a){if(!(a>=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);;
|
23
|
+
/*
|
24
|
+
AngularJS v1.2.12
|
25
|
+
(c) 2010-2014 Google, Inc. http://angularjs.org
|
26
|
+
License: MIT
|
27
|
+
*/
|
28
|
+
(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<arguments.length;c++)a=a+(1==c?"?":"&")+"p"+(c-1)+"="+encodeURIComponent("function"==typeof arguments[c]?arguments[c].toString().replace(/ \{[\s\S]*$/,""):"undefined"==typeof arguments[c]?"undefined":"string"!=typeof arguments[c]?JSON.stringify(arguments[c]):arguments[c]);return Error(a)}}function qb(b){if(null==b||za(b))return!1;
|
29
|
+
var a=b.length;return 1===b.nodeType&&a?!0:w(b)||L(b)||0===a||"number"===typeof a&&0<a&&a-1 in b}function q(b,a,c){var d;if(b)if(M(b))for(d in b)"prototype"==d||("length"==d||"name"==d||b.hasOwnProperty&&!b.hasOwnProperty(d))||a.call(c,b[d],d);else if(b.forEach&&b.forEach!==q)b.forEach(a,c);else if(qb(b))for(d=0;d<b.length;d++)a.call(c,b[d],d);else for(d in b)b.hasOwnProperty(d)&&a.call(c,b[d],d);return b}function Nb(b){var a=[],c;for(c in b)b.hasOwnProperty(c)&&a.push(c);return a.sort()}function Oc(b,
|
30
|
+
a,c){for(var d=Nb(b),e=0;e<d.length;e++)a.call(c,b[d[e]],d[e]);return d}function Ob(b){return function(a,c){b(c,a)}}function Za(){for(var b=ia.length,a;b;){b--;a=ia[b].charCodeAt(0);if(57==a)return ia[b]="A",ia.join("");if(90==a)ia[b]="0";else return ia[b]=String.fromCharCode(a+1),ia.join("")}ia.unshift("0");return ia.join("")}function Pb(b,a){a?b.$$hashKey=a:delete b.$$hashKey}function y(b){var a=b.$$hashKey;q(arguments,function(a){a!==b&&q(a,function(a,c){b[c]=a})});Pb(b,a);return b}function V(b){return parseInt(b,
|
31
|
+
10)}function Qb(b,a){return y(new (y(function(){},{prototype:b})),a)}function E(){}function Aa(b){return b}function Y(b){return function(){return b}}function u(b){return"undefined"===typeof b}function D(b){return"undefined"!==typeof b}function W(b){return null!=b&&"object"===typeof b}function w(b){return"string"===typeof b}function rb(b){return"number"===typeof b}function Ka(b){return"[object Date]"===La.call(b)}function L(b){return"[object Array]"===La.call(b)}function M(b){return"function"===typeof b}
|
32
|
+
function $a(b){return"[object RegExp]"===La.call(b)}function za(b){return b&&b.document&&b.location&&b.alert&&b.setInterval}function Pc(b){return!(!b||!(b.nodeName||b.on&&b.find))}function Qc(b,a,c){var d=[];q(b,function(b,g,f){d.push(a.call(c,b,g,f))});return d}function ab(b,a){if(b.indexOf)return b.indexOf(a);for(var c=0;c<b.length;c++)if(a===b[c])return c;return-1}function Ma(b,a){var c=ab(b,a);0<=c&&b.splice(c,1);return a}function $(b,a){if(za(b)||b&&b.$evalAsync&&b.$watch)throw Na("cpws");if(a){if(b===
|
33
|
+
a)throw Na("cpi");if(L(b))for(var c=a.length=0;c<b.length;c++)a.push($(b[c]));else{c=a.$$hashKey;q(a,function(b,c){delete a[c]});for(var d in b)a[d]=$(b[d]);Pb(a,c)}}else(a=b)&&(L(b)?a=$(b,[]):Ka(b)?a=new Date(b.getTime()):$a(b)?a=RegExp(b.source):W(b)&&(a=$(b,{})));return a}function Rb(b,a){a=a||{};for(var c in b)!b.hasOwnProperty(c)||"$"===c.charAt(0)&&"$"===c.charAt(1)||(a[c]=b[c]);return a}function ta(b,a){if(b===a)return!0;if(null===b||null===a)return!1;if(b!==b&&a!==a)return!0;var c=typeof b,
|
34
|
+
d;if(c==typeof a&&"object"==c)if(L(b)){if(!L(a))return!1;if((c=b.length)==a.length){for(d=0;d<c;d++)if(!ta(b[d],a[d]))return!1;return!0}}else{if(Ka(b))return Ka(a)&&b.getTime()==a.getTime();if($a(b)&&$a(a))return b.toString()==a.toString();if(b&&b.$evalAsync&&b.$watch||a&&a.$evalAsync&&a.$watch||za(b)||za(a)||L(a))return!1;c={};for(d in b)if("$"!==d.charAt(0)&&!M(b[d])){if(!ta(b[d],a[d]))return!1;c[d]=!0}for(d in a)if(!c.hasOwnProperty(d)&&"$"!==d.charAt(0)&&a[d]!==s&&!M(a[d]))return!1;return!0}return!1}
|
35
|
+
function Sb(){return R.securityPolicy&&R.securityPolicy.isActive||R.querySelector&&!(!R.querySelector("[ng-csp]")&&!R.querySelector("[data-ng-csp]"))}function bb(b,a){var c=2<arguments.length?ua.call(arguments,2):[];return!M(a)||a instanceof RegExp?a:c.length?function(){return arguments.length?a.apply(b,c.concat(ua.call(arguments,0))):a.apply(b,c)}:function(){return arguments.length?a.apply(b,arguments):a.call(b)}}function Rc(b,a){var c=a;"string"===typeof b&&"$"===b.charAt(0)?c=s:za(a)?c="$WINDOW":
|
36
|
+
a&&R===a?c="$DOCUMENT":a&&(a.$evalAsync&&a.$watch)&&(c="$SCOPE");return c}function pa(b,a){return"undefined"===typeof b?s:JSON.stringify(b,Rc,a?" ":null)}function Tb(b){return w(b)?JSON.parse(b):b}function Oa(b){"function"===typeof b?b=!0:b&&0!==b.length?(b=x(""+b),b=!("f"==b||"0"==b||"false"==b||"no"==b||"n"==b||"[]"==b)):b=!1;return b}function fa(b){b=z(b).clone();try{b.empty()}catch(a){}var c=z("<div>").append(b).html();try{return 3===b[0].nodeType?x(c):c.match(/^(<[^>]+>)/)[1].replace(/^<([\w\-]+)/,
|
37
|
+
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,
|
38
|
+
!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("."+
|
39
|
+
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",
|
40
|
+
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?
|
41
|
+
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<g;f++)d=a[f],b&&(b=(e=b)[d]);return!c&&M(b)?bb(e,b):b}function ub(b){var a=b[0];b=b[b.length-1];if(a===b)return z(a);var c=[a];do{a=a.nextSibling;if(!a)break;c.push(a)}while(a!==b);return z(c)}function Uc(b){var a=t("$injector"),c=t("ng");b=b.angular||(b.angular={});b.$$minErr=b.$$minErr||t;return b.module||
|
42
|
+
(b.module=function(){var b={};return function(e,g,f){if("hasOwnProperty"===e)throw c("badname","module");g&&b.hasOwnProperty(e)&&(b[e]=null);return b[e]||(b[e]=function(){function b(a,d,e){return function(){c[e||"push"]([a,d,arguments]);return n}}if(!g)throw a("nomod",e);var c=[],d=[],l=b("$injector","invoke"),n={_invokeQueue:c,_runBlocks:d,requires:g,name:e,provider:b("$provide","provider"),factory:b("$provide","factory"),service:b("$provide","service"),value:b("$provide","value"),constant:b("$provide",
|
43
|
+
"constant","unshift"),animation:b("$animateProvider","register"),filter:b("$filterProvider","register"),controller:b("$controllerProvider","register"),directive:b("$compileProvider","directive"),config:l,run:function(a){d.push(a);return this}};f&&l(f);return n}())}}())}function Qa(b){return b.replace(Vc,function(a,b,d,e){return e?d.toUpperCase():d}).replace(Wc,"Moz$1")}function vb(b,a,c,d){function e(b){var e=c&&b?[this.filter(b)]:[this],m=a,k,l,n,p,r,F;if(!d||null!=b)for(;e.length;)for(k=e.shift(),
|
44
|
+
l=0,n=k.length;l<n;l++)for(p=z(k[l]),m?p.triggerHandler("$destroy"):m=!m,r=0,p=(F=p.children()).length;r<p;r++)e.push(Ca(F[r]));return g.apply(this,arguments)}var g=Ca.fn[b],g=g.$original||g;e.$original=g;Ca.fn[b]=e}function O(b){if(b instanceof O)return b;w(b)&&(b=Z(b));if(!(this instanceof O)){if(w(b)&&"<"!=b.charAt(0))throw wb("nosel");return new O(b)}if(w(b)){var a=R.createElement("div");a.innerHTML="<div> </div>"+b;a.removeChild(a.firstChild);xb(this,a.childNodes);z(R.createDocumentFragment()).append(this)}else xb(this,
|
45
|
+
b)}function yb(b){return b.cloneNode(!0)}function Da(b){$b(b);var a=0;for(b=b.childNodes||[];a<b.length;a++)Da(b[a])}function ac(b,a,c,d){if(D(d))throw wb("offargs");var e=ja(b,"events");ja(b,"handle")&&(u(a)?q(e,function(a,c){zb(b,c,a);delete e[c]}):q(a.split(" "),function(a){u(c)?(zb(b,a,e[a]),delete e[a]):Ma(e[a]||[],c)}))}function $b(b,a){var c=b[db],d=Ra[c];d&&(a?delete Ra[c].data[a]:(d.handle&&(d.events.$destroy&&d.handle({},"$destroy"),ac(b)),delete Ra[c],b[db]=s))}function ja(b,a,c){var d=
|
46
|
+
b[db],d=Ra[d||-1];if(D(c))d||(b[db]=d=++Xc,d=Ra[d]={}),d[a]=c;else return d&&d[a]}function bc(b,a,c){var d=ja(b,"data"),e=D(c),g=!e&&D(a),f=g&&!W(a);d||f||ja(b,"data",d={});if(e)d[a]=c;else if(g){if(f)return d&&d[a];y(d,a)}else return d}function Ab(b,a){return b.getAttribute?-1<(" "+(b.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").indexOf(" "+a+" "):!1}function Bb(b,a){a&&b.setAttribute&&q(a.split(" "),function(a){b.setAttribute("class",Z((" "+(b.getAttribute("class")||"")+" ").replace(/[\n\t]/g,
|
47
|
+
" ").replace(" "+Z(a)+" "," ")))})}function Cb(b,a){if(a&&b.setAttribute){var c=(" "+(b.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ");q(a.split(" "),function(a){a=Z(a);-1===c.indexOf(" "+a+" ")&&(c+=a+" ")});b.setAttribute("class",Z(c))}}function xb(b,a){if(a){a=a.nodeName||!D(a.length)||za(a)?[a]:a;for(var c=0;c<a.length;c++)b.push(a[c])}}function cc(b,a){return eb(b,"$"+(a||"ngController")+"Controller")}function eb(b,a,c){b=z(b);9==b[0].nodeType&&(b=b.find("html"));for(a=L(a)?a:[a];b.length;){for(var d=
|
48
|
+
0,e=a.length;d<e;d++)if((c=b.data(a[d]))!==s)return c;b=b.parent()}}function dc(b){for(var a=0,c=b.childNodes;a<c.length;a++)Da(c[a]);for(;b.firstChild;)b.removeChild(b.firstChild)}function ec(b,a){var c=fb[a.toLowerCase()];return c&&fc[b.nodeName]&&c}function Yc(b,a){var c=function(c,e){c.preventDefault||(c.preventDefault=function(){c.returnValue=!1});c.stopPropagation||(c.stopPropagation=function(){c.cancelBubble=!0});c.target||(c.target=c.srcElement||R);if(u(c.defaultPrevented)){var g=c.preventDefault;
|
49
|
+
c.preventDefault=function(){c.defaultPrevented=!0;g.call(c)};c.defaultPrevented=!1}c.isDefaultPrevented=function(){return c.defaultPrevented||!1===c.returnValue};var f=Rb(a[e||c.type]||[]);q(f,function(a){a.call(b,c)});8>=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===
|
50
|
+
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);
|
51
|
+
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<h;g++){var f=d[g],m=n.get(f[0]);m[f[1]].apply(m,f[2])}else M(a)?b.push(n.invoke(a)):L(a)?b.push(n.invoke(a)):Pa(a,"module")}catch(r){throw L(a)&&(a=a[a.length-1]),r.message&&(r.stack&&-1==r.stack.indexOf(r.message))&&(r=r.message+"\n"+r.stack),
|
52
|
+
Ta("modulerr",a,r.stack||r.message||r);}}});return b}function g(a,b){function c(d){if(a.hasOwnProperty(d)){if(a[d]===f)throw Ta("cdep",m.join(" <- "));return a[d]}try{return m.unshift(d),a[d]=f,a[d]=b(d)}catch(e){throw a[d]===f&&delete a[d],e;}finally{m.shift()}}function d(a,b,e){var g=[],h=gc(a),f,m,k;m=0;for(f=h.length;m<f;m++){k=h[m];if("string"!==typeof k)throw Ta("itkn",k);g.push(e&&e.hasOwnProperty(k)?e[k]:c(k))}a.$inject||(a=a[f]);return a.apply(b,g)}return{invoke:d,instantiate:function(a,
|
53
|
+
b){var c=function(){},e;c.prototype=(L(a)?a[a.length-1]:a).prototype;c=new c;e=d(a,c,b);return W(e)||M(e)?e:c},get:c,annotate:gc,has:function(b){return l.hasOwnProperty(b+h)||a.hasOwnProperty(b)}}}var f={},h="Provider",m=[],k=new Sa,l={$provide:{provider:a(c),factory:a(d),service:a(function(a,b){return d(a,["$injector",function(a){return a.instantiate(b)}])}),value:a(function(a,b){return d(a,Y(b))}),constant:a(function(a,b){wa(a,"constant");l[a]=b;p[a]=b}),decorator:function(a,b){var c=n.get(a+h),
|
54
|
+
d=c.$get;c.$get=function(){var a=r.invoke(d,c);return r.invoke(b,null,{$delegate:a})}}}},n=l.$injector=g(l,function(){throw Ta("unpr",m.join(" <- "));}),p={},r=p.$injector=g(p,function(a){a=n.get(a+h);return r.invoke(a.$get,a)});q(e(b),function(a){r.invoke(a||E)});return r}function cd(){var b=!0;this.disableAutoScrolling=function(){b=!1};this.$get=["$window","$location","$rootScope",function(a,c,d){function e(a){var b=null;q(a,function(a){b||"a"!==x(a.nodeName)||(b=a)});return b}function g(){var b=
|
55
|
+
c.hash(),d;b?(d=f.getElementById(b))?d.scrollIntoView():(d=e(f.getElementsByName(b)))?d.scrollIntoView():"top"===b&&a.scrollTo(0,0):a.scrollTo(0,0)}var f=a.document;b&&d.$watch(function(){return c.hash()},function(){d.$evalAsync(g)});return g}]}function dd(b,a,c,d){function e(a){try{a.apply(null,ua.call(arguments,1))}finally{if(F--,0===F)for(;A.length;)try{A.pop()()}catch(b){c.error(b)}}}function g(a,b){(function S(){q(H,function(a){a()});v=b(S,a)})()}function f(){C=null;Q!=h.url()&&(Q=h.url(),q(ka,
|
56
|
+
function(a){a(h.url())}))}var h=this,m=a[0],k=b.location,l=b.history,n=b.setTimeout,p=b.clearTimeout,r={};h.isMock=!1;var F=0,A=[];h.$$completeOutstandingRequest=e;h.$$incOutstandingRequestCount=function(){F++};h.notifyWhenNoOutstandingRequests=function(a){q(H,function(a){a()});0===F?a():A.push(a)};var H=[],v;h.addPollFn=function(a){u(v)&&g(100,n);H.push(a);return a};var Q=k.href,K=a.find("base"),C=null;h.url=function(a,c){k!==b.location&&(k=b.location);l!==b.history&&(l=b.history);if(a){if(Q!=a)return Q=
|
57
|
+
a,d.history?c?l.replaceState(null,"",a):(l.pushState(null,"",a),K.attr("href",K.attr("href"))):(C=a,c?k.replace(a):k.href=a),h}else return C||k.href.replace(/%27/g,"'")};var ka=[],I=!1;h.onUrlChange=function(a){if(!I){if(d.history)z(b).on("popstate",f);if(d.hashchange)z(b).on("hashchange",f);else h.addPollFn(f);I=!0}ka.push(a);return a};h.baseHref=function(){var a=K.attr("href");return a?a.replace(/^(https?\:)?\/\/[^\/]*/,""):""};var U={},ba="",aa=h.baseHref();h.cookies=function(a,b){var d,e,g,h;
|
58
|
+
if(a)b===s?m.cookie=escape(a)+"=;path="+aa+";expires=Thu, 01 Jan 1970 00:00:00 GMT":w(b)&&(d=(m.cookie=escape(a)+"="+escape(b)+";path="+aa).length+1,4096<d&&c.warn("Cookie '"+a+"' possibly not set or overflowed because it was too large ("+d+" > 4096 bytes)!"));else{if(m.cookie!==ba)for(ba=m.cookie,d=ba.split("; "),U={},g=0;g<d.length;g++)e=d[g],h=e.indexOf("="),0<h&&(a=unescape(e.substring(0,h)),U[a]===s&&(U[a]=unescape(e.substring(h+1))));return U}};h.defer=function(a,b){var c;F++;c=n(function(){delete r[c];
|
59
|
+
e(a)},b||0);r[c]=!0;return c};h.defer.cancel=function(a){return r[a]?(delete r[a],p(a),e(E),!0):!1}}function ed(){this.$get=["$window","$log","$sniffer","$document",function(b,a,c,d){return new dd(b,d,a,c)}]}function fd(){this.$get=function(){function b(b,d){function e(a){a!=n&&(p?p==a&&(p=a.n):p=a,g(a.n,a.p),g(a,n),n=a,n.n=null)}function g(a,b){a!=b&&(a&&(a.p=b),b&&(b.n=a))}if(b in a)throw t("$cacheFactory")("iid",b);var f=0,h=y({},d,{id:b}),m={},k=d&&d.capacity||Number.MAX_VALUE,l={},n=null,p=null;
|
60
|
+
return a[b]={put:function(a,b){var c=l[a]||(l[a]={key:a});e(c);if(!u(b))return a in m||f++,m[a]=b,f>k&&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]};
|
61
|
+
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=
|
62
|
+
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",
|
63
|
+
"$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("<span></span>").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<f;d++){var m=
|
64
|
+
e[d].nodeType;1!==m&&9!==m||e.eq(d).data("$scope",b)}c&&c(e,b);g&&g(b,e,e);return e}}function ka(a,b){try{a.addClass(b)}catch(c){}}function I(a,b,c,d,e,g){function f(a,c,d,e){var g,k,r,l,n,p,J;g=c.length;var F=Array(g);for(n=0;n<g;n++)F[n]=c[n];J=n=0;for(p=m.length;n<p;J++)k=F[J],c=m[n++],g=m[n++],r=z(k),c?(c.scope?(l=a.$new(),r.data("$scope",l)):l=a,(r=c.transclude)||!e&&b?c(g,l,k,d,U(a,r||b)):c(g,l,k,d,e)):g&&g(a,k.childNodes,s,e)}for(var m=[],k,r,l,n,p=0;p<a.length;p++)k=new Db,r=ba(a[p],[],k,
|
65
|
+
0===p?d:s,e),(g=r.length?ga(r,a[p],k,b,c,null,[],[],g):null)&&g.scope&&ka(z(a[p]),"ng-scope"),k=g&&g.terminal||!(l=a[p].childNodes)||!l.length?null:I(l,g?g.transclude:b),m.push(g,k),n=n||g||k,g=null;return n?f:null}function U(a,b){return function(c,d,e){var g=!1;c||(c=a.$new(),g=c.$$transcluded=!0);d=b(c,d,e);if(g)d.on("$destroy",bb(c,c.$destroy));return d}}function ba(a,b,c,d,f){var m=c.$attr,k;switch(a.nodeType){case 1:S(b,la(Ga(a).toLowerCase()),"E",d,f);var r,l,n;k=a.attributes;for(var p=0,F=
|
66
|
+
k&&k.length;p<F;p++){var A=!1,Q=!1;r=k[p];if(!N||8<=N||r.specified){l=r.name;n=la(l);T.test(n)&&(l=cb(n.substr(6),"-"));var C=n.replace(/(Start|End)$/,"");n===C+"Start"&&(A=l,Q=l.substr(0,l.length-5)+"end",l=l.substr(0,l.length-6));n=la(l.toLowerCase());m[n]=l;c[n]=r=Z(r.value);ec(a,n)&&(c[n]=!0);O(a,b,r,n);S(b,n,"A",d,f,A,Q)}}a=a.className;if(w(a)&&""!==a)for(;k=g.exec(a);)n=la(k[2]),S(b,n,"C",d,f)&&(c[n]=Z(k[3])),a=a.substr(k.index+k[0].length);break;case 3:t(b,a.nodeValue);break;case 8:try{if(k=
|
67
|
+
e.exec(a.nodeValue))n=la(k[1]),S(b,n,"M",d,f)&&(c[n]=Z(k[2]))}catch(H){}}b.sort(u);return b}function aa(a,b,c){var d=[],e=0;if(b&&a.hasAttribute&&a.hasAttribute(b)){do{if(!a)throw ha("uterdir",b,c);1==a.nodeType&&(a.hasAttribute(b)&&e++,a.hasAttribute(c)&&e--);d.push(a);a=a.nextSibling}while(0<e)}else d.push(a);return z(d)}function B(a,b,c){return function(d,e,g,f,k){e=aa(e[0],b,c);return a(d,e,g,f,k)}}function ga(a,c,d,e,g,f,m,n,p){function A(a,b,c,d){if(a){c&&(a=B(a,c,d));a.require=G.require;if(K===
|
68
|
+
G||G.$$isolateScope)a=jc(a,{isolateScope:!0});m.push(a)}if(b){c&&(b=B(b,c,d));b.require=G.require;if(K===G||G.$$isolateScope)b=jc(b,{isolateScope:!0});n.push(b)}}function Q(a,b,c){var d,e="data",g=!1;if(w(a)){for(;"^"==(d=a.charAt(0))||"?"==d;)a=a.substr(1),"^"==d&&(e="inheritedData"),g=g||"?"==d;d=null;c&&"data"===e&&(d=c[a]);d=d||b[e]("$"+a+"Controller");if(!d&&!g)throw ha("ctreq",a,ca);}else L(a)&&(d=[],q(a,function(a){d.push(Q(a,b,c))}));return d}function H(a,e,g,f,p){function A(a,b){var c;2>
|
69
|
+
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;
|
70
|
+
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;
|
71
|
+
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;f<v;f++)try{I=m[f],I(I.isolateScope?B:e,C,J,I.require&&Q(I.require,C,aa),gb)}catch(S){l(S,fa(C))}f=e;K&&(K.template||null===K.templateUrl)&&(f=B);a&&a(f,g.childNodes,s,p);for(f=n.length-1;0<=f;f--)try{I=n[f],I(I.isolateScope?B:e,C,J,I.require&&Q(I.require,C,aa),gb)}catch(G){l(G,fa(C))}}p=p||{};var v=-Number.MAX_VALUE,I,U=p.controllerDirectives,
|
72
|
+
K=p.newIsolateScopeDirective,ga=p.templateDirective;p=p.nonTlbTranscludeDirective;for(var S=!1,u=!1,y=d.$$element=z(c),G,ca,t,P=e,O,N=0,ma=a.length;N<ma;N++){G=a[N];var Va=G.$$start,T=G.$$end;Va&&(y=aa(c,Va,T));t=s;if(v>G.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=
|
73
|
+
!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("<div>"+Z(t)+"</div>").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);
|
74
|
+
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=
|
75
|
+
0,c=a.length;b<c;b++)a[b]=Qb(a[b],{$$isolateScope:!0})}function S(b,e,g,f,k,r,n){if(e===k)return null;k=null;if(c.hasOwnProperty(e)){var p;e=a.get(e+d);for(var F=0,A=e.length;F<A;F++)try{p=e[F],(f===s||f>p.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,
|
76
|
+
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("<div>"+
|
77
|
+
Z(n)+"</div>").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,
|
78
|
+
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.name<b.name?-1:1:a.index-b.index}function x(a,b,c,d){if(b)throw ha("multidir",b.name,c.name,a,fa(d));}function t(a,c){var d=b(c,!0);d&&a.push({priority:0,compile:Y(function(a,b){var c=b.parent(),e=c.data("$binding")||[];e.push(d);ka(c.data("$binding",e),"ng-binding");a.$watch(d,function(a){b[0].nodeValue=a})})})}
|
79
|
+
function P(a,b){if("srcdoc"==b)return v.HTML;var c=Ga(a);if("xlinkHref"==b||"FORM"==c&&"action"==b||"IMG"!=c&&("src"==b||"ngSrc"==b))return v.RESOURCE_URL}function O(a,c,d,e){var g=b(d,!0);if(g){if("multiple"===e&&"SELECT"===Ga(a))throw ha("selmulti",fa(a));c.push({priority:100,compile:function(){return{pre:function(c,d,m){d=m.$$observers||(m.$$observers={});if(f.test(e))throw ha("nodomevents");if(g=b(m[e],!0,P(a,e)))m[e]=g(c),(d[e]||(d[e]=[])).$$inter=!0,(m.$$observers&&m.$$observers[e].$$scope||
|
80
|
+
c).$watch(g,function(a,b){"class"===e&&a!=b?m.$updateClass(a,b):m.$set(e,a)})}}}})}}function hb(a,b,c){var d=b[0],e=b.length,g=d.parentNode,f,m;if(a)for(f=0,m=a.length;f<m;f++)if(a[f]==d){a[f++]=c;m=f+e-1;for(var k=a.length;f<k;f++,m++)m<k?a[f]=a[m]:delete a[f];a.length-=e-1;break}g&&g.replaceChild(c,d);a=R.createDocumentFragment();a.appendChild(d);c[z.expando]=d[z.expando];d=1;for(e=b.length;d<e;d++)g=b[d],z(g).remove(),a.appendChild(g),delete b[d];b[0]=c;b.length=1}function jc(a,b){return y(function(){return a.apply(null,
|
81
|
+
arguments)},a,b)}var Db=function(a,b){this.$$element=a;this.$attr=b||{}};Db.prototype={$normalize:la,$addClass:function(a){a&&0<a.length&&Q.addClass(this.$$element,a)},$removeClass:function(a){a&&0<a.length&&Q.removeClass(this.$$element,a)},$updateClass:function(a,b){this.$removeClass(kc(b,a));this.$addClass(kc(a,b))},$set:function(a,b,c,d){var e=ec(this.$$element[0],a);e&&(this.$$element.prop(a,b),d=e);this[a]=b;d?this.$attr[a]=d:(d=this.$attr[a])||(this.$attr[a]=d=cb(a,"-"));e=Ga(this.$$element);
|
82
|
+
if("A"===e&&"href"===a||"IMG"===e&&"src"===a)this[a]=b=K(b,"src"===a);!1!==c&&(null===b||b===s?this.$$element.removeAttr(d):this.$$element.attr(d,b));(c=this.$$observers)&&q(c[a],function(a){try{a(b)}catch(c){l(c)}})},$observe:function(a,b){var c=this,d=c.$$observers||(c.$$observers={}),e=d[a]||(d[a]=[]);e.push(b);A.$evalAsync(function(){e.$$inter||b(c[a])});return b}};var ca=b.startSymbol(),ma=b.endSymbol(),V="{{"==ca||"}}"==ma?Aa:function(a){return a.replace(/\{\{/g,ca).replace(/}}/g,ma)},T=/^ngAttr[A-Z]/;
|
83
|
+
return C}]}function la(b){return Qa(b.replace(hd,""))}function kc(b,a){var c="",d=b.split(/\s+/),e=a.split(/\s+/),g=0;a:for(;g<d.length;g++){for(var f=d[g],h=0;h<e.length;h++)if(f==e[h])continue a;c+=(0<c.length?" ":"")+f}return c}function id(){var b={},a=/^(\S+)(\s+as\s+(\w+))?$/;this.register=function(a,d){wa(a,"controller");W(a)?y(b,a):b[a]=d};this.$get=["$injector","$window",function(c,d){return function(e,g){var f,h,m;w(e)&&(f=e.match(a),h=f[1],m=f[3],e=b.hasOwnProperty(h)?b[h]:Zb(g.$scope,h,
|
84
|
+
!0)||Zb(d,h,!0),Pa(e,h,!0));f=c.instantiate(e,g);if(m){if(!g||"object"!=typeof g.$scope)throw t("$controller")("noscp",h||e.name,m);g.$scope[m]=f}return f}}]}function jd(){this.$get=["$window",function(b){return z(b.document)}]}function kd(){this.$get=["$log",function(b){return function(a,c){b.error.apply(b,arguments)}}]}function lc(b){var a={},c,d,e;if(!b)return a;q(b.split("\n"),function(b){e=b.indexOf(":");c=x(Z(b.substr(0,e)));d=Z(b.substr(e+1));c&&(a[c]=a[c]?a[c]+(", "+d):d)});return a}function mc(b){var a=
|
85
|
+
W(b)?b:s;return function(c){a||(a=lc(b));return c?a[x(c)]||null:a}}function nc(b,a,c){if(M(c))return c(b,a);q(c,function(c){b=c(b,a)});return b}function ld(){var b=/^\s*(\[|\{[^\{])/,a=/[\}\]]\s*$/,c=/^\)\]\}',?\n/,d={"Content-Type":"application/json;charset=utf-8"},e=this.defaults={transformResponse:[function(d){w(d)&&(d=d.replace(c,""),b.test(d)&&a.test(d)&&(d=Tb(d)));return d}],transformRequest:[function(a){return W(a)&&"[object File]"!==La.call(a)?pa(a):a}],headers:{common:{Accept:"application/json, text/plain, */*"},
|
86
|
+
post:$(d),put:$(d),patch:$(d)},xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN"},g=this.interceptors=[],f=this.responseInterceptors=[];this.$get=["$httpBackend","$browser","$cacheFactory","$rootScope","$q","$injector",function(a,b,c,d,n,p){function r(a){function c(a){var b=y({},a,{data:nc(a.data,a.headers,d.transformResponse)});return 200<=a.status&&300>a.status?b:n.reject(b)}var d={transformRequest:e.transformRequest,transformResponse:e.transformResponse},g=function(a){function b(a){var c;
|
87
|
+
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]});
|
88
|
+
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};
|
89
|
+
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:
|
90
|
+
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):
|
91
|
+
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");
|
92
|
+
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=
|
93
|
+
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=
|
94
|
+
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<p)var I=c(A,p);else p&&p.then&&p.then(A)}}function pd(){var b="{{",a="}}";this.startSymbol=function(a){return a?(b=a,this):b};this.endSymbol=function(b){return b?
|
95
|
+
(a=b,this):a};this.$get=["$parse","$exceptionHandler","$sce",function(c,d,e){function g(g,k,l){for(var n,p,r=0,F=[],A=g.length,H=!1,v=[];r<A;)-1!=(n=g.indexOf(b,r))&&-1!=(p=g.indexOf(a,n+f))?(r!=n&&F.push(g.substring(r,n)),F.push(r=c(H=g.substring(n+f,p))),r.exp=H,r=p+h,H=!0):(r!=A&&F.push(g.substring(r)),r=A);(A=F.length)||(F.push(""),A=1);if(l&&1<F.length)throw oc("noconcat",g);if(!k||H)return v.length=A,r=function(a){try{for(var b=0,c=A,f;b<c;b++)"function"==typeof(f=F[b])&&(f=f(a),f=l?e.getTrusted(l,
|
96
|
+
f):e.valueOf(f),null===f||u(f)?f="":"string"!=typeof f&&(f=pa(f))),v[b]=f;return v.join("")}catch(k){a=oc("interr",g,k.toString()),d(a)}},r.exp=g,r.parts=F,r}var f=b.length,h=a.length;g.startSymbol=function(){return b};g.endSymbol=function(){return a};return g}]}function qd(){this.$get=["$rootScope","$window","$q",function(b,a,c){function d(d,f,h,m){var k=a.setInterval,l=a.clearInterval,n=c.defer(),p=n.promise,r=0,F=D(m)&&!m;h=D(h)?h:0;p.then(null,null,d);p.$$intervalId=k(function(){n.notify(r++);
|
97
|
+
0<h&&r>=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,
|
98
|
+
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",
|
99
|
+
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):
|
100
|
+
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()};
|
101
|
+
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);
|
102
|
+
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,
|
103
|
+
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();
|
104
|
+
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),
|
105
|
+
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(),
|
106
|
+
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))});
|
107
|
+
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,
|
108
|
+
a,c,d,e){e=e||{};a=a.split(".");for(var g,f=0;1<a.length;f++){g=da(a.shift(),d);var h=b[g];h||(h={},b[g]=h);b=h;b.then&&e.unwrapPromises&&(qa(d),"$$v"in b||function(a){a.then(function(b){a.$$v=b})}(b),b.$$v===s&&(b.$$v={}),b=b.$$v)}g=da(a.shift(),d);return b[g]=c}function vc(b,a,c,d,e,g,f){da(b,g);da(a,g);da(c,g);da(d,g);da(e,g);return f.unwrapPromises?function(f,m){var k=m&&m.hasOwnProperty(b)?m:f,l;if(null==k)return k;(k=k[b])&&k.then&&(qa(g),"$$v"in k||(l=k,l.$$v=s,l.then(function(a){l.$$v=a})),
|
109
|
+
k=k.$$v);if(!a)return k;if(null==k)return s;(k=k[a])&&k.then&&(qa(g),"$$v"in k||(l=k,l.$$v=s,l.then(function(a){l.$$v=a})),k=k.$$v);if(!c)return k;if(null==k)return s;(k=k[c])&&k.then&&(qa(g),"$$v"in k||(l=k,l.$$v=s,l.then(function(a){l.$$v=a})),k=k.$$v);if(!d)return k;if(null==k)return s;(k=k[d])&&k.then&&(qa(g),"$$v"in k||(l=k,l.$$v=s,l.then(function(a){l.$$v=a})),k=k.$$v);if(!e)return k;if(null==k)return s;(k=k[e])&&k.then&&(qa(g),"$$v"in k||(l=k,l.$$v=s,l.then(function(a){l.$$v=a})),k=k.$$v);
|
110
|
+
return k}:function(g,f){var k=f&&f.hasOwnProperty(b)?f:g;if(null==k)return k;k=k[b];if(!a)return k;if(null==k)return s;k=k[a];if(!c)return k;if(null==k)return s;k=k[c];if(!d)return k;if(null==k)return s;k=k[d];return e?null==k?s:k=k[e]:k}}function vd(b,a){da(b,a);return function(a,d){return null==a?s:(d&&d.hasOwnProperty(b)?d:a)[b]}}function wd(b,a,c){da(b,c);da(a,c);return function(c,e){if(null==c)return s;c=(e&&e.hasOwnProperty(b)?e:c)[b];return null==c?s:c[a]}}function wc(b,a,c){if(Ib.hasOwnProperty(b))return Ib[b];
|
111
|
+
var d=b.split("."),e=d.length,g;if(a.unwrapPromises||1!==e)if(a.unwrapPromises||2!==e)if(a.csp)g=6>e?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(f<e);return h};else{var f="var p;\n";q(d,function(b,d){da(b,c);f+="if(s == null) return undefined;\ns="+(d?"s":'((k&&k.hasOwnProperty("'+b+'"))?k:s)')+'["'+b+'"];\n'+(a.unwrapPromises?'if (s && s.then) {\n pw("'+c.replace(/(["\r\n])/g,"\\$1")+'");\n if (!("$$v" in s)) {\n p=s;\n p.$$v = undefined;\n p.then(function(v) {p.$$v=v;});\n}\n s=s.$$v\n}\n':
|
112
|
+
"")});var f=f+"return s;",h=new Function("s","k","pw",f);h.toString=Y(f);g=a.unwrapPromises?function(a,b){return h(a,b,qa)}:h}else g=wd(d[0],d[1],c);else g=vd(d[0],c);"hasOwnProperty"!==b&&(Ib[b]=g);return g}function xd(){var b={},a={csp:!1,unwrapPromises:!1,logPromiseWarnings:!0};this.unwrapPromises=function(b){return D(b)?(a.unwrapPromises=!!b,this):a.unwrapPromises};this.logPromiseWarnings=function(b){return D(b)?(a.logPromiseWarnings=b,this):a.logPromiseWarnings};this.$get=["$filter","$sniffer",
|
113
|
+
"$log",function(c,d,e){a.csp=d.csp;qa=function(b){a.logPromiseWarnings&&!xc.hasOwnProperty(b)&&(xc[b]=!0,e.warn("[$parse] Promise found in the expression `"+b+"`. Automatic unwrapping of promises in Angular expressions is deprecated."))};return function(d){var e;switch(typeof d){case "string":if(b.hasOwnProperty(d))return b[d];e=new Jb(a);e=(new Ya(e,c,a)).parse(d,!1);"hasOwnProperty"!==d&&(b[d]=e);return e;case "function":return d;default:return E}}}]}function yd(){this.$get=["$rootScope","$exceptionHandler",
|
114
|
+
function(b,a){return zd(function(a){b.$evalAsync(a)},a)}]}function zd(b,a){function c(a){return a}function d(a){return f(a)}var e=function(){var f=[],k,l;return l={resolve:function(a){if(f){var c=f;f=s;k=g(a);c.length&&b(function(){for(var a,b=0,d=c.length;b<d;b++)a=c[b],k.then(a[0],a[1],a[2])})}},reject:function(a){l.resolve(h(a))},notify:function(a){if(f){var c=f;f.length&&b(function(){for(var b,d=0,e=c.length;d<e;d++)b=c[d],b[2](a)})}},promise:{then:function(b,g,h){var l=e(),A=function(d){try{l.resolve((M(b)?
|
115
|
+
b:c)(d))}catch(e){l.reject(e),a(e)}},H=function(b){try{l.resolve((M(g)?g:d)(b))}catch(c){l.reject(c),a(c)}},v=function(b){try{l.notify((M(h)?h:c)(b))}catch(d){a(d)}};f?f.push([A,H,v]):k.then(A,H,v);return l.promise},"catch":function(a){return this.then(null,a)},"finally":function(a){function b(a,c){var d=e();c?d.resolve(a):d.reject(a);return d.promise}function d(e,g){var f=null;try{f=(a||c)()}catch(k){return b(k,!1)}return f&&M(f.then)?f.then(function(){return b(e,g)},function(a){return b(a,!1)}):
|
116
|
+
b(e,g)}return this.then(function(a){return d(a,!0)},function(a){return d(a,!1)})}}}},g=function(a){return a&&M(a.then)?a:{then:function(c){var d=e();b(function(){d.resolve(c(a))});return d.promise}}},f=function(a){var b=e();b.reject(a);return b.promise},h=function(c){return{then:function(g,f){var h=e();b(function(){try{h.resolve((M(f)?f:d)(c))}catch(b){h.reject(b),a(b)}});return h.promise}}};return{defer:e,reject:f,when:function(h,k,l,n){var p=e(),r,F=function(b){try{return(M(k)?k:c)(b)}catch(d){return a(d),
|
117
|
+
f(d)}},A=function(b){try{return(M(l)?l:d)(b)}catch(c){return a(c),f(c)}},q=function(b){try{return(M(n)?n:c)(b)}catch(d){a(d)}};b(function(){g(h).then(function(a){r||(r=!0,p.resolve(g(a).then(F,A,q)))},function(a){r||(r=!0,p.resolve(A(a)))},function(a){r||p.notify(q(a))})});return p.promise},all:function(a){var b=e(),c=0,d=L(a)?[]:{};q(a,function(a,e){c++;g(a).then(function(a){d.hasOwnProperty(e)||(d[e]=a,--c||b.resolve(d))},function(a){d.hasOwnProperty(e)||b.reject(a)})});0===c&&b.resolve(d);return b.promise}}}
|
118
|
+
function Ad(){var b=10,a=t("$rootScope"),c=null;this.digestTtl=function(a){arguments.length&&(b=a);return b};this.$get=["$injector","$exceptionHandler","$parse","$browser",function(d,e,g,f){function h(){this.$id=Za();this.$$phase=this.$parent=this.$$watchers=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null;this["this"]=this.$root=this;this.$$destroyed=!1;this.$$asyncQueue=[];this.$$postDigestQueue=[];this.$$listeners={};this.$$listenerCount={};this.$$isolateBindings={}}
|
119
|
+
function m(b){if(p.$$phase)throw a("inprog",p.$$phase);p.$$phase=b}function k(a,b){var c=g(a);Pa(c,b);return c}function l(a,b,c){do a.$$listenerCount[c]-=b,0===a.$$listenerCount[c]&&delete a.$$listenerCount[c];while(a=a.$parent)}function n(){}h.prototype={constructor:h,$new:function(a){a?(a=new h,a.$root=this.$root,a.$$asyncQueue=this.$$asyncQueue,a.$$postDigestQueue=this.$$postDigestQueue):(a=function(){},a.prototype=this,a=new a,a.$id=Za());a["this"]=a;a.$$listeners={};a.$$listenerCount={};a.$parent=
|
120
|
+
this;a.$$watchers=a.$$nextSibling=a.$$childHead=a.$$childTail=null;a.$$prevSibling=this.$$childTail;this.$$childHead?this.$$childTail=this.$$childTail.$$nextSibling=a:this.$$childHead=this.$$childTail=a;return a},$watch:function(a,b,d){var e=k(a,"watch"),g=this.$$watchers,f={fn:b,last:n,get:e,exp:a,eq:!!d};c=null;if(!M(b)){var h=k(b||E,"listener");f.fn=function(a,b,c){h(c)}}if("string"==typeof a&&e.constant){var m=f.fn;f.fn=function(a,b,c){m.call(this,a,b,c);Ma(g,f)}}g||(g=this.$$watchers=[]);g.unshift(f);
|
121
|
+
return function(){Ma(g,f);c=null}},$watchCollection:function(a,b){var c=this,d,e,f=0,h=g(a),k=[],m={},l=0;return this.$watch(function(){e=h(c);var a,b;if(W(e))if(qb(e))for(d!==k&&(d=k,l=d.length=0,f++),a=e.length,l!==a&&(f++,d.length=l=a),b=0;b<a;b++)d[b]!==e[b]&&(f++,d[b]=e[b]);else{d!==m&&(d=m={},l=0,f++);a=0;for(b in e)e.hasOwnProperty(b)&&(a++,d.hasOwnProperty(b)?d[b]!==e[b]&&(f++,d[b]=e[b]):(l++,d[b]=e[b],f++));if(l>a)for(b in f++,d)d.hasOwnProperty(b)&&!e.hasOwnProperty(b)&&(l--,delete d[b])}else d!==
|
122
|
+
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]||
|
123
|
+
(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");
|
124
|
+
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||
|
125
|
+
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,
|
126
|
+
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;m<l;m++)if(d[m])try{d[m].apply(null,k)}catch(p){e(p)}else d.splice(m,1),m--,l--;if(g)break;f=f.$parent}while(f);return h},$broadcast:function(a,b){for(var c=this,d=this,f={name:a,targetScope:this,preventDefault:function(){f.defaultPrevented=
|
127
|
+
!0},defaultPrevented:!1},g=[f].concat(ua.call(arguments,1)),h,k;c=d;){f.currentScope=c;d=c.$$listeners[a]||[];h=0;for(k=d.length;h<k;h++)if(d[h])try{d[h].apply(null,g)}catch(m){e(m)}else d.splice(h,1),h--,k--;if(!(d=c.$$listenerCount[a]&&c.$$childHead||c!==this&&c.$$nextSibling))for(;c!==this&&!(d=c.$$nextSibling);)c=c.$parent}return f}};var p=new h;return p}]}function Bd(){var b=/^\s*(https?|ftp|mailto|tel|file):/,a=/^\s*(https?|ftp|file):|data:image\//;this.aHrefSanitizationWhitelist=function(a){return D(a)?
|
128
|
+
(b=a,this):b};this.imgSrcSanitizationWhitelist=function(b){return D(b)?(a=b,this):a};this.$get=function(){return function(c,d){var e=d?a:b,g;if(!N||8<=N)if(g=xa(c).href,""!==g&&!g.match(e))return"unsafe:"+g;return c}}}function Cd(b){if("self"===b)return b;if(w(b)){if(-1<b.indexOf("***"))throw ra("iwcard",b);b=b.replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08").replace("\\*\\*",".*").replace("\\*","[^:/.?&;]*");return RegExp("^"+b+"$")}if($a(b))return RegExp("^"+b.source+"$");
|
129
|
+
throw ra("imatcher");}function yc(b){var a=[];D(b)&&q(b,function(b){a.push(Cd(b))});return a}function Dd(){this.SCE_CONTEXTS=ea;var b=["self"],a=[];this.resourceUrlWhitelist=function(a){arguments.length&&(b=yc(a));return b};this.resourceUrlBlacklist=function(b){arguments.length&&(a=yc(b));return a};this.$get=["$injector",function(c){function d(a){var b=function(a){this.$$unwrapTrustedValue=function(){return a}};a&&(b.prototype=new a);b.prototype.valueOf=function(){return this.$$unwrapTrustedValue()};
|
130
|
+
b.prototype.toString=function(){return this.$$unwrapTrustedValue().toString()};return b}var e=function(a){throw ra("unsafe");};c.has("$sanitize")&&(e=c.get("$sanitize"));var g=d(),f={};f[ea.HTML]=d(g);f[ea.CSS]=d(g);f[ea.URL]=d(g);f[ea.JS]=d(g);f[ea.RESOURCE_URL]=d(f[ea.URL]);return{trustAs:function(a,b){var c=f.hasOwnProperty(a)?f[a]:null;if(!c)throw ra("icontext",a,b);if(null===b||b===s||""===b)return b;if("string"!==typeof b)throw ra("itype",a);return new c(b)},getTrusted:function(c,d){if(null===
|
131
|
+
d||d===s||""===d)return d;var g=f.hasOwnProperty(c)?f[c]:null;if(g&&d instanceof g)return d.$$unwrapTrustedValue();if(c===ea.RESOURCE_URL){var g=xa(d.toString()),l,n,p=!1;l=0;for(n=b.length;l<n;l++)if("self"===b[l]?Eb(g):b[l].exec(g.href)){p=!0;break}if(p)for(l=0,n=a.length;l<n;l++)if("self"===a[l]?Eb(g):a[l].exec(g.href)){p=!1;break}if(p)return d;throw ra("insecurl",d.toString());}if(c===ea.HTML)return e(d);throw ra("unsafe");},valueOf:function(a){return a instanceof g?a.$$unwrapTrustedValue():a}}}]}
|
132
|
+
function Ed(){var b=!0;this.enabled=function(a){arguments.length&&(b=!!a);return b};this.$get=["$parse","$sniffer","$sceDelegate",function(a,c,d){if(b&&c.msie&&8>c.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,
|
133
|
+
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=
|
134
|
+
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||7<f),hasEvent:function(a){if("input"==a&&9==N)return!1;if(u(c[a])){var b=g.createElement("div");c[a]="on"+a in b}return c[a]},csp:Sb(),vendorPrefix:h,
|
135
|
+
transitions:l,animations:n,android:d,msie:N,msieDocumentMode:f}}]}function Gd(){this.$get=["$rootScope","$browser","$q","$exceptionHandler",function(b,a,c,d){function e(e,h,m){var k=c.defer(),l=k.promise,n=D(m)&&!m;h=a.defer(function(){try{k.resolve(e())}catch(a){k.reject(a),d(a)}finally{delete g[l.$$timeoutId]}n||b.$apply()},h);l.$$timeoutId=h;g[h]=k;return l}var g={};e.cancel=function(b){return b&&b.$$timeoutId in g?(g[b.$$timeoutId].reject("canceled"),delete g[b.$$timeoutId],a.defer.cancel(b.$$timeoutId)):
|
136
|
+
!1};return e}]}function xa(b,a){var c=b;N&&(T.setAttribute("href",c),c=T.href);T.setAttribute("href",c);return{href:T.href,protocol:T.protocol?T.protocol.replace(/:$/,""):"",host:T.host,search:T.search?T.search.replace(/^\?/,""):"",hash:T.hash?T.hash.replace(/^#/,""):"",hostname:T.hostname,port:T.port,pathname:"/"===T.pathname.charAt(0)?T.pathname:"/"+T.pathname}}function Eb(b){b=w(b)?xa(b):b;return b.protocol===zc.protocol&&b.host===zc.host}function Hd(){this.$get=Y(P)}function Ac(b){function a(d,
|
137
|
+
e){if(W(d)){var g={};q(d,function(b,c){g[c]=a(c,b)});return g}return b.factory(d+c,e)}var c="Filter";this.register=a;this.$get=["$injector",function(a){return function(b){return a.get(b+c)}}];a("currency",Bc);a("date",Cc);a("filter",Id);a("json",Jd);a("limitTo",Kd);a("lowercase",Ld);a("number",Dc);a("orderBy",Ec);a("uppercase",Md)}function Id(){return function(b,a,c){if(!L(b))return b;var d=typeof c,e=[];e.check=function(a){for(var b=0;b<e.length;b++)if(!e[b](a))return!1;return!0};"function"!==d&&
|
138
|
+
(c="boolean"===d&&c?function(a,b){return Ba.equals(a,b)}:function(a,b){b=(""+b).toLowerCase();return-1<(""+a).toLowerCase().indexOf(b)});var g=function(a,b){if("string"==typeof b&&"!"===b.charAt(0))return!g(a,b.substr(1));switch(typeof a){case "boolean":case "number":case "string":return c(a,b);case "object":switch(typeof b){case "object":return c(a,b);default:for(var d in a)if("$"!==d.charAt(0)&&g(a[d],b))return!0}return!1;case "array":for(d=0;d<a.length;d++)if(g(a[d],b))return!0;return!1;default:return!1}};
|
139
|
+
switch(typeof a){case "boolean":case "number":case "string":a={$:a};case "object":for(var f in a)(function(b){"undefined"!=typeof a[b]&&e.push(function(c){return g("$"==b?c:c&&c[b],a[b])})})(f);break;case "function":e.push(a);break;default:return b}d=[];for(f=0;f<b.length;f++){var h=b[f];e.check(h)&&d.push(h)}return d}}function Bc(b){var a=b.NUMBER_FORMATS;return function(b,d){u(d)&&(d=a.CURRENCY_SYM);return Fc(b,a.PATTERNS[1],a.GROUP_SEP,a.DECIMAL_SEP,2).replace(/\u00A4/g,d)}}function Dc(b){var a=
|
140
|
+
b.NUMBER_FORMATS;return function(b,d){return Fc(b,a.PATTERNS[0],a.GROUP_SEP,a.DECIMAL_SEP,d)}}function Fc(b,a,c,d,e){if(isNaN(b)||!isFinite(b))return"";var g=0>b;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)0<e&&(-1<b&&1>b)&&(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]||
|
141
|
+
"";var l=0,n=a.lgSize,p=a.gSize;if(f.length>=n+p)for(l=f.length-n,k=0;k<l;k++)0===(l-k)%p&&0!==k&&(h+=c),h+=f.charAt(k);for(k=l;k<f.length;k++)0===(f.length-k)%n&&0!==k&&(h+=c),h+=f.charAt(k);for(;b.length<e;)b+="0";e&&"0"!==e&&(h+=d+b.substr(0,e))}m.push(g?a.negPre:a.posPre);m.push(h);m.push(g?a.negSuf:a.posSuf);return m.join("")}function Kb(b,a,c){var d="";0>b&&(d="-",b=-b);for(b=""+b;b.length<a;)b="0"+b;c&&(b=b.substr(b.length-a));return d+b}function X(b,a,c,d){c=c||0;return function(e){e=e["get"+
|
142
|
+
b]();if(0<c||e>-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=
|
143
|
+
/^(\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,
|
144
|
+
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);0<a?(d=0,e=a):(d=b.length+a,e=b.length);for(;d<e;d++)c.push(b[d]);return c}}function Ec(b){return function(a,c,d){function e(a,b){return Oa(b)?function(b,c){return a(c,b)}:a}if(!L(a)||!c)return a;c=L(c)?c:[c];c=Qc(c,function(a){var c=!1,d=a||Aa;if(w(a)){if("+"==a.charAt(0)||"-"==a.charAt(0))c="-"==a.charAt(0),a=a.substring(1);d=b(a)}return e(function(a,
|
145
|
+
b){var c;c=d(a);var e=d(b),f=typeof c,g=typeof e;f==g?("string"==f&&(c=c.toLowerCase(),e=e.toLowerCase()),c=c===e?0:c<e?-1:1):c=f<g?-1:1;return c},c)});for(var g=[],f=0;f<a.length;f++)g.push(a[f]);return g.sort(e(function(a,b){for(var d=0;d<c.length;d++){var e=c[d](a,b);if(0!==e)return e}return 0},d))}}function sa(b){M(b)&&(b={link:b});b.restrict=b.restrict||"AC";return Y(b)}function Hc(b,a){function c(a,c){c=c?"-"+cb(c,"-"):"";b.removeClass((a?lb:mb)+c).addClass((a?mb:lb)+c)}var d=this,e=b.parent().controller("form")||
|
146
|
+
nb,g=0,f=d.$error={},h=[];d.$name=a.name||a.ngForm;d.$dirty=!1;d.$pristine=!0;d.$valid=!0;d.$invalid=!1;e.$addControl(d);b.addClass(Ia);c(!0);d.$addControl=function(a){wa(a.$name,"input");h.push(a);a.$name&&(d[a.$name]=a)};d.$removeControl=function(a){a.$name&&d[a.$name]===a&&delete d[a.$name];q(f,function(b,c){d.$setValidity(c,!0,a)});Ma(h,a)};d.$setValidity=function(a,b,h){var n=f[a];if(b)n&&(Ma(n,h),n.length||(g--,g||(c(b),d.$valid=!0,d.$invalid=!1),f[a]=!1,c(!0,a),e.$setValidity(a,!0,d)));else{g||
|
147
|
+
c(b);if(n){if(-1!=ab(n,h))return}else f[a]=n=[],g++,c(!1,a),e.$setValidity(a,!1,d);n.push(h);d.$valid=!1;d.$invalid=!0}};d.$setDirty=function(){b.removeClass(Ia).addClass(ob);d.$dirty=!0;d.$pristine=!1;e.$setDirty()};d.$setPristine=function(){b.removeClass(ob).addClass(Ia);d.$dirty=!1;d.$pristine=!0;q(h,function(a){a.$setPristine()})}}function oa(b,a,c,d){b.$setValidity(a,c);return c?d:s}function pb(b,a,c,d,e,g){if(!e.android){var f=!1;a.on("compositionstart",function(a){f=!0});a.on("compositionend",
|
148
|
+
function(){f=!1})}var h=function(){if(!f){var e=a.val();Oa(c.ngTrim||"T")&&(e=Z(e));d.$viewValue!==e&&(b.$$phase?d.$setViewValue(e):b.$apply(function(){d.$setViewValue(e)}))}};if(e.hasEvent("input"))a.on("input",h);else{var m,k=function(){m||(m=g.defer(function(){h();m=null}))};a.on("keydown",function(a){a=a.keyCode;91===a||(15<a&&19>a||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;
|
149
|
+
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=
|
150
|
+
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]))});
|
151
|
+
"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=[];
|
152
|
+
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=
|
153
|
+
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(""+
|
154
|
+
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")||
|
155
|
+
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?
|
156
|
+
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=
|
157
|
+
a},html:function(b,a){if(u(a))return b.innerHTML;for(var c=0,d=b.childNodes;c<d.length;c++)Da(d[c]);b.innerHTML=a},empty:dc},function(b,a){O.prototype[a]=function(a,d){var e,g;if(b!==dc&&(2==b.length&&b!==Ab&&b!==cc?a:d)===s){if(W(a)){for(e=0;e<this.length;e++)if(b===bc)b(this[e],a);else for(g in a)b(this[e],g,a[g]);return this}e=b.$dv;g=e===s?Math.min(this.length,1):this.length;for(var f=0;f<g;f++){var h=b(this[f],a,d);e=e?e+h:h}return e}for(e=0;e<this.length;e++)b(this[e],a,d);return this}});q({removeData:$b,
|
158
|
+
dealoc:Da,on:function a(c,d,e,g){if(D(g))throw wb("onargs");var f=ja(c,"events"),h=ja(c,"handle");f||ja(c,"events",f={});h||ja(c,"handle",h=Yc(c,f));q(d.split(" "),function(d){var g=f[d];if(!g){if("mouseenter"==d||"mouseleave"==d){var l=R.body.contains||R.body.compareDocumentPosition?function(a,c){var d=9===a.nodeType?a.documentElement:a,e=c&&c.parentNode;return a===e||!!(e&&1===e.nodeType&&(d.contains?d.contains(e):a.compareDocumentPosition&&a.compareDocumentPosition(e)&16))}:function(a,c){if(c)for(;c=
|
159
|
+
c.parentNode;)if(c===a)return!0;return!1};f[d]=[];a(c,{mouseleave:"mouseout",mouseenter:"mouseover"}[d],function(a){var c=a.relatedTarget;c&&(c===this||l(this,c))||h(a,d)})}else Ic(c,d,h),f[d]=[];g=f[d]}g.push(e)})},off:ac,one:function(a,c,d){a=z(a);a.on(c,function g(){a.off(c,d);a.off(c,g)});a.on(c,d)},replaceWith:function(a,c){var d,e=a.parentNode;Da(a);q(new O(c),function(c){d?e.insertBefore(c,d.nextSibling):e.replaceChild(c,a);d=c})},children:function(a){var c=[];q(a.childNodes,function(a){1===
|
160
|
+
a.nodeType&&c.push(a)});return c},contents:function(a){return a.childNodes||[]},append:function(a,c){q(new O(c),function(c){1!==a.nodeType&&11!==a.nodeType||a.appendChild(c)})},prepend:function(a,c){if(1===a.nodeType){var d=a.firstChild;q(new O(c),function(c){a.insertBefore(c,d)})}},wrap:function(a,c){c=z(c)[0];var d=a.parentNode;d&&d.replaceChild(c,a);c.appendChild(a)},remove:function(a){Da(a);var c=a.parentNode;c&&c.removeChild(a)},after:function(a,c){var d=a,e=a.parentNode;q(new O(c),function(a){e.insertBefore(a,
|
161
|
+
d.nextSibling);d=a})},addClass:Cb,removeClass:Bb,toggleClass:function(a,c,d){u(d)&&(d=!Ab(a,c));(d?Cb:Bb)(a,c)},parent:function(a){return(a=a.parentNode)&&11!==a.nodeType?a:null},next:function(a){if(a.nextElementSibling)return a.nextElementSibling;for(a=a.nextSibling;null!=a&&1!==a.nodeType;)a=a.nextSibling;return a},find:function(a,c){return a.getElementsByTagName?a.getElementsByTagName(c):[]},clone:yb,triggerHandler:function(a,c,d){c=(ja(a,"events")||{})[c];d=d||[];var e=[{preventDefault:E,stopPropagation:E}];
|
162
|
+
q(c,function(c){c.apply(a,e.concat(d))})}},function(a,c){O.prototype[c]=function(c,e,g){for(var f,h=0;h<this.length;h++)u(f)?(f=a(this[h],c,e,g),D(f)&&(f=z(f))):xb(f,a(this[h],c,e,g));return D(f)?f:this};O.prototype.bind=O.prototype.on;O.prototype.unbind=O.prototype.off});Sa.prototype={put:function(a,c){this[Ea(a)]=c},get:function(a){return this[Ea(a)]},remove:function(a){var c=this[a=Ea(a)];delete this[a];return c}};var $c=/^function\s*[^\(]*\(\s*([^\)]*)\)/m,ad=/,/,bd=/^\s*(_?)(\S+?)\1\s*$/,Zc=
|
163
|
+
/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg,Ta=t("$injector"),Sd=t("$animate"),Td=["$provide",function(a){this.$$selectors={};this.register=function(c,d){var e=c+"-animation";if(c&&"."!=c.charAt(0))throw Sd("notcsel",c);this.$$selectors[c.substr(1)]=e;a.factory(e,d)};this.classNameFilter=function(a){1===arguments.length&&(this.$$classNameFilter=a instanceof RegExp?a:null);return this.$$classNameFilter};this.$get=["$timeout",function(a){return{enter:function(d,e,g,f){g?g.after(d):(e&&e[0]||(e=g.parent()),e.append(d));
|
164
|
+
f&&a(f,0,!1)},leave:function(d,e){d.remove();e&&a(e,0,!1)},move:function(a,c,g,f){this.enter(a,c,g,f)},addClass:function(d,e,g){e=w(e)?e:L(e)?e.join(" "):"";q(d,function(a){Cb(a,e)});g&&a(g,0,!1)},removeClass:function(d,e,g){e=w(e)?e:L(e)?e.join(" "):"";q(d,function(a){Bb(a,e)});g&&a(g,0,!1)},enabled:E}}]}],ha=t("$compile");ic.$inject=["$provide","$$sanitizeUriProvider"];var hd=/^(x[\:\-_]|data[\:\-_])/i,oc=t("$interpolate"),Ud=/^([^\?#]*)(\?([^#]*))?(#(.*))?$/,sd={http:80,https:443,ftp:21},Gb=t("$location");
|
165
|
+
tc.prototype=Hb.prototype=sc.prototype={$$html5:!1,$$replace:!1,absUrl:ib("$$absUrl"),url:function(a,c){if(u(a))return this.$$url;var d=Ud.exec(a);d[1]&&this.path(decodeURIComponent(d[1]));(d[2]||d[1])&&this.search(d[3]||"");this.hash(d[5]||"",c);return this},protocol:ib("$$protocol"),host:ib("$$host"),port:ib("$$port"),path:uc("$$path",function(a){return"/"==a.charAt(0)?a:"/"+a}),search:function(a,c){switch(arguments.length){case 0:return this.$$search;case 1:if(w(a))this.$$search=Vb(a);else if(W(a))this.$$search=
|
166
|
+
a;else throw Gb("isrcharg");break;default:u(c)||null===c?delete this.$$search[a]:this.$$search[a]=c}this.$$compose();return this},hash:uc("$$hash",Aa),replace:function(){this.$$replace=!0;return this}};var ya=t("$parse"),xc={},qa,Ja={"null":function(){return null},"true":function(){return!0},"false":function(){return!1},undefined:E,"+":function(a,c,d,e){d=d(a,c);e=e(a,c);return D(d)?D(e)?d+e:d:D(e)?e:s},"-":function(a,c,d,e){d=d(a,c);e=e(a,c);return(D(d)?d:0)-(D(e)?e:0)},"*":function(a,c,d,e){return d(a,
|
167
|
+
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)},"=":E,"===":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 d(a,c)<=e(a,c)},">=":function(a,c,d,e){return d(a,
|
168
|
+
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<this.text.length;){this.ch=this.text.charAt(this.index);
|
169
|
+
if(this.is("\"'"))this.readString(this.ch);else if(this.isNumber(this.ch)||this.is(".")&&this.isNumber(this.peek()))this.readNumber();else if(this.isIdent(this.ch))this.readIdent(),this.was("{,")&&("{"===a[0]&&(c=this.tokens[this.tokens.length-1]))&&(c.json=-1===c.text.indexOf("."));else if(this.is("(){}[].,;:?"))this.tokens.push({index:this.index,text:this.ch,json:this.was(":[,")&&this.is("{[")||this.is("}]:,")}),this.is("{[")&&a.unshift(this.ch),this.is("}]")&&a.shift(),this.index++;else if(this.isWhitespace(this.ch)){this.index++;
|
170
|
+
continue}else{var d=this.ch+this.peek(),e=d+this.peek(2),g=Ja[this.ch],f=Ja[d],h=Ja[e];h?(this.tokens.push({index:this.index,text:e,fn:h}),this.index+=3):f?(this.tokens.push({index:this.index,text:d,fn:f}),this.index+=2):g?(this.tokens.push({index:this.index,text:this.ch,fn:g,json:this.was("[,:")&&this.is("+-")}),this.index+=1):this.throwError("Unexpected next character ",this.index,this.index+1)}this.lastCh=this.ch}return this.tokens},is:function(a){return-1!==a.indexOf(this.ch)},was:function(a){return-1!==
|
171
|
+
a.indexOf(this.lastCh)},peek:function(a){a=a||1;return this.index+a<this.text.length?this.text.charAt(this.index+a):!1},isNumber:function(a){return"0"<=a&&"9">=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)+
|
172
|
+
"]":" "+d;throw ya("lexerr",a,c,this.text);},readNumber:function(){for(var a="",c=this.index;this.index<this.text.length;){var d=x(this.text.charAt(this.index));if("."==d||this.isNumber(d))a+=d;else{var e=this.peek();if("e"==d&&this.isExpOperator(e))a+=d;else if(this.isExpOperator(d)&&e&&this.isNumber(e)&&"e"==a.charAt(a.length-1))a+=d;else if(!this.isExpOperator(d)||e&&this.isNumber(e)||"e"!=a.charAt(a.length-1))break;else this.throwError("Invalid exponent")}this.index++}a*=1;this.tokens.push({index:c,
|
173
|
+
text:a,json:!0,fn:function(){return a}})},readIdent:function(){for(var a=this,c="",d=this.index,e,g,f,h;this.index<this.text.length;){h=this.text.charAt(this.index);if("."===h||this.isIdent(h)||this.isNumber(h))"."===h&&(e=this.index),c+=h;else break;this.index++}if(e)for(g=this.index;g<this.text.length;){h=this.text.charAt(g);if("("===h){f=c.substr(e-d+1);c=c.substr(0,e-d);this.index=g;break}if(this.isWhitespace(h))g++;else break}d={index:d,text:c};if(Ja.hasOwnProperty(c))d.fn=Ja[c],d.json=Ja[c];
|
174
|
+
else{var m=wc(c,this.options,this.text);d.fn=y(function(a,c){return m(a,c)},{assign:function(d,e){return jb(d,c,e,a.text,a.options)}})}this.tokens.push(d);f&&(this.tokens.push({index:e,text:".",json:!1}),this.tokens.push({index:e+1,text:f,json:!1}))},readString:function(a){var c=this.index;this.index++;for(var d="",e=a,g=!1;this.index<this.text.length;){var f=this.text.charAt(this.index),e=e+f;if(g)"u"===f?(f=this.text.substring(this.index+1,this.index+5),f.match(/[\da-f]{4}/i)||this.throwError("Invalid unicode escape [\\u"+
|
175
|
+
f+"]"),this.index+=4,d+=String.fromCharCode(parseInt(f,16))):d=(g=Vd[f])?d+g:d+f,g=!1;else if("\\"===f)g=!0;else{if(f===a){this.index++;this.tokens.push({index:c,text:e,string:d,json:!0,fn:function(){return d}});return}d+=f}this.index++}this.throwError("Unterminated quote",c)}};var Ya=function(a,c,d){this.lexer=a;this.$filter=c;this.options=d};Ya.ZERO=function(){return 0};Ya.prototype={constructor:Ya,parse:function(a,c){this.text=a;this.json=c;this.tokens=this.lexer.lex(a);c&&(this.assignment=this.logicalOR,
|
176
|
+
this.functionCall=this.fieldAccess=this.objectIndex=this.filterChain=function(){this.throwError("is not valid json",{text:a,index:0})});var d=c?this.primary():this.statements();0!==this.tokens.length&&this.throwError("is an unexpected token",this.tokens[0]);d.literal=!!d.literal;d.constant=!!d.constant;return d},primary:function(){var a;if(this.expect("("))a=this.filterChain(),this.consume(")");else if(this.expect("["))a=this.arrayDeclaration();else if(this.expect("{"))a=this.object();else{var c=
|
177
|
+
this.expect();(a=c.fn)||this.throwError("not a primary expression",c);c.json&&(a.constant=!0,a.literal=!0)}for(var d;c=this.expect("(","[",".");)"("===c.text?(a=this.functionCall(a,d),d=null):"["===c.text?(d=a,a=this.objectIndex(a)):"."===c.text?(d=a,a=this.fieldAccess(a)):this.throwError("IMPOSSIBLE");return a},throwError:function(a,c){throw ya("syntax",c.text,a,c.index+1,this.text,this.text.substring(c.index));},peekToken:function(){if(0===this.tokens.length)throw ya("ueoe",this.text);return this.tokens[0]},
|
178
|
+
peek:function(a,c,d,e){if(0<this.tokens.length){var g=this.tokens[0],f=g.text;if(f===a||f===c||f===d||f===e||!(a||c||d||e))return g}return!1},expect:function(a,c,d,e){return(a=this.peek(a,c,d,e))?(this.json&&!a.json&&this.throwError("is not valid json",a),this.tokens.shift(),a):!1},consume:function(a){this.expect(a)||this.throwError("is unexpected, expecting ["+a+"]",this.peek())},unaryFn:function(a,c){return y(function(d,e){return a(d,e,c)},{constant:c.constant})},ternaryFn:function(a,c,d){return y(function(e,
|
179
|
+
g){return a(e,g)?c(e,g):d(e,g)},{constant:a.constant&&c.constant&&d.constant})},binaryFn:function(a,c,d){return y(function(e,g){return c(e,g,a,d)},{constant:a.constant&&d.constant})},statements:function(){for(var a=[];;)if(0<this.tokens.length&&!this.peek("}",")",";","]")&&a.push(this.filterChain()),!this.expect(";"))return 1===a.length?a[0]:function(c,d){for(var e,g=0;g<a.length;g++){var f=a[g];f&&(e=f(c,d))}return e}},filterChain:function(){for(var a=this.expression(),c;;)if(c=this.expect("|"))a=
|
180
|
+
this.binaryFn(a,c.fn,this.filter());else return a},filter:function(){for(var a=this.expect(),c=this.$filter(a.text),d=[];;)if(a=this.expect(":"))d.push(this.expression());else{var e=function(a,e,h){h=[h];for(var m=0;m<d.length;m++)h.push(d[m](a,e));return c.apply(a,h)};return function(){return e}}},expression:function(){return this.assignment()},assignment:function(){var a=this.ternary(),c,d;return(d=this.expect("="))?(a.assign||this.throwError("implies assignment but ["+this.text.substring(0,d.index)+
|
181
|
+
"] can not be assigned to",d),c=this.ternary(),function(d,g){return a.assign(d,c(d,g),g)}):a},ternary:function(){var a=this.logicalOR(),c,d;if(this.expect("?")){c=this.ternary();if(d=this.expect(":"))return this.ternaryFn(a,c,this.ternary());this.throwError("expected :",d)}else return a},logicalOR:function(){for(var a=this.logicalAND(),c;;)if(c=this.expect("||"))a=this.binaryFn(a,c.fn,this.logicalAND());else return a},logicalAND:function(){var a=this.equality(),c;if(c=this.expect("&&"))a=this.binaryFn(a,
|
182
|
+
c.fn,this.logicalAND());return a},equality:function(){var a=this.relational(),c;if(c=this.expect("==","!=","===","!=="))a=this.binaryFn(a,c.fn,this.equality());return a},relational:function(){var a=this.additive(),c;if(c=this.expect("<",">","<=",">="))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("*",
|
183
|
+
"/","%");)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();
|
184
|
+
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;k<d.length;k++)h.push(d[k](g,
|
185
|
+
f));k=a(g,f,m)||E;Xa(m,e.text);Xa(k,e.text);h=k.apply?k.apply(m,h):k(h[0],h[1],h[2],h[3],h[4]);return Xa(h,e.text)}},arrayDeclaration:function(){var a=[],c=!0;if("]"!==this.peekToken().text){do{var d=this.expression();a.push(d);d.constant||(c=!1)}while(this.expect(","))}this.consume("]");return y(function(c,d){for(var f=[],h=0;h<a.length;h++)f.push(a[h](c,d));return f},{literal:!0,constant:c})},object:function(){var a=[],c=!0;if("}"!==this.peekToken().text){do{var d=this.expect(),d=d.string||d.text;
|
186
|
+
this.consume(":");var e=this.expression();a.push({key:d,value:e});e.constant||(c=!1)}while(this.expect(","))}this.consume("}");return y(function(c,d){for(var e={},m=0;m<a.length;m++){var k=a[m];e[k.key]=k.value(c,d)}return e},{literal:!0,constant:c})}};var Ib={},ra=t("$sce"),ea={HTML:"html",CSS:"css",URL:"url",RESOURCE_URL:"resourceUrl",JS:"js"},T=R.createElement("a"),zc=xa(P.location.href,!0);Ac.$inject=["$provide"];Bc.$inject=["$locale"];Dc.$inject=["$locale"];var Gc=".",Pd={yyyy:X("FullYear",4),
|
187
|
+
yy:X("FullYear",2,0,!0),y:X("FullYear",1),MMMM:kb("Month"),MMM:kb("Month",!0),MM:X("Month",2,1),M:X("Month",1,1),dd:X("Date",2),d:X("Date",1),HH:X("Hours",2),H:X("Hours",1),hh:X("Hours",2,-12),h:X("Hours",1,-12),mm:X("Minutes",2),m:X("Minutes",1),ss:X("Seconds",2),s:X("Seconds",1),sss:X("Milliseconds",3),EEEE:kb("Day"),EEE:kb("Day",!0),a:function(a,c){return 12>a.getHours()?c.AMPMS[0]:c.AMPMS[1]},Z:function(a){a=-1*a.getTimezoneOffset();return a=(0<=a?"+":"")+(Kb(Math[0<a?"floor":"ceil"](a/60),2)+
|
188
|
+
Kb(Math.abs(a%60),2))}},Od=/((?:[^yMdHhmsaZE']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z))(.*)/,Nd=/^\-?\d+$/;Cc.$inject=["$locale"];var Ld=Y(x),Md=Y(Ha);Ec.$inject=["$parse"];var Wd=Y({restrict:"E",compile:function(a,c){8>=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()})}}}),
|
189
|
+
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",
|
190
|
+
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#!:.?+=&%@!\-\/]))?$/,
|
191
|
+
$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));
|
192
|
+
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)},
|
193
|
+
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===
|
194
|
+
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;
|
195
|
+
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),
|
196
|
+
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=
|
197
|
+
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,
|
198
|
+
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)?
|
199
|
+
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));
|
200
|
+
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:"@",
|
201
|
+
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,
|
202
|
+
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=
|
203
|
+
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,
|
204
|
+
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",
|
205
|
+
"-"))]=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",
|
206
|
+
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;f<h;f++)if(w=a===
|
207
|
+
S?f:S[f],u=a[w],u=n(w,u,f),wa(u,"`track by` id"),D.hasOwnProperty(u))E=D[u],delete D[u],v[u]=E,x[f]=E;else{if(v.hasOwnProperty(u))throw q(x,function(a){a&&a.scope&&(D[a.id]=a)}),d("dupes",k,u);x[f]={id:u};v[u]=!1}for(w in D)D.hasOwnProperty(w)&&(E=D[w],f=ub(E.clone),c.leave(f),q(f,function(a){a.$$NG_REMOVED=!0}),E.scope.$destroy());f=0;for(h=S.length;f<h;f++){w=a===S?f:S[f];u=a[w];E=x[f];x[f-1]&&(l=x[f-1].clone[x[f-1].clone.length-1]);if(E.scope){B=E.scope;n=l;do n=n.nextSibling;while(n&&n.$$NG_REMOVED);
|
208
|
+
E.clone[0]!=n&&c.move(ub(E.clone),null,z(l));l=E.clone[E.clone.length-1]}else B=e.$new();B[A]=u;t&&(B[t]=w);B.$index=f;B.$first=0===f;B.$last=f===y-1;B.$middle=!(B.$first||B.$last);B.$odd=!(B.$even=0===(f&1));E.scope||m(B,function(a){a[a.length++]=R.createComment(" end ngRepeat: "+k+" ");c.enter(a,null,z(l));l=a;E.scope=B;E.clone=a;v[E.id]=E})}D=v})}}}],we=["$animate",function(a){return function(c,d,e){c.$watch(e.ngShow,function(c){a[Oa(c)?"removeClass":"addClass"](d,"ng-hide")})}}],xe=["$animate",
|
209
|
+
function(a){return function(c,d,e){c.$watch(e.ngHide,function(c){a[Oa(c)?"addClass":"removeClass"](d,"ng-hide")})}}],ye=sa(function(a,c,d){a.$watch(d.ngStyle,function(a,d){d&&a!==d&&q(d,function(a,d){c.css(d,"")});a&&c.css(a)},!0)}),ze=["$animate",function(a){return{restrict:"EA",require:"ngSwitch",controller:["$scope",function(){this.cases={}}],link:function(c,d,e,g){var f,h,m=[];c.$watch(e.ngSwitch||e.on,function(d){for(var l=0,n=m.length;l<n;l++)m[l].$destroy(),a.leave(h[l]);h=[];m=[];if(f=g.cases["!"+
|
210
|
+
d]||g.cases["?"])c.$eval(e.change),q(f,function(d){var e=c.$new();m.push(e);d.transclude(e,function(c){var e=d.element;h.push(c);a.enter(c,e.parent(),e)})})})}}}],Ae=sa({transclude:"element",priority:800,require:"^ngSwitch",link:function(a,c,d,e,g){e.cases["!"+d.ngSwitchWhen]=e.cases["!"+d.ngSwitchWhen]||[];e.cases["!"+d.ngSwitchWhen].push({transclude:g,element:c})}}),Be=sa({transclude:"element",priority:800,require:"^ngSwitch",link:function(a,c,d,e,g){e.cases["?"]=e.cases["?"]||[];e.cases["?"].push({transclude:g,
|
211
|
+
element:c})}}),Ce=sa({controller:["$element","$transclude",function(a,c){if(!c)throw t("ngTransclude")("orphan",fa(a));this.$transclude=c}],link:function(a,c,d,e){e.$transclude(function(a){c.empty();c.append(a)})}}),De=["$templateCache",function(a){return{restrict:"E",terminal:!0,compile:function(c,d){"text/ng-template"==d.type&&a.put(d.id,c[0].text)}}}],Ee=t("ngOptions"),Fe=Y({terminal:!0}),Ge=["$compile","$parse",function(a,c){var d=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+group\s+by\s+([\s\S]+?))?\s+for\s+(?:([\$\w][\$\w]*)|(?:\(\s*([\$\w][\$\w]*)\s*,\s*([\$\w][\$\w]*)\s*\)))\s+in\s+([\s\S]+?)(?:\s+track\s+by\s+([\s\S]+?))?$/,
|
212
|
+
e={$setViewValue:E};return{restrict:"E",require:["select","?ngModel"],controller:["$element","$scope","$attrs",function(a,c,d){var m=this,k={},l=e,n;m.databound=d.ngModel;m.init=function(a,c,d){l=a;n=d};m.addOption=function(c){wa(c,'"option value"');k[c]=!0;l.$viewValue==c&&(a.val(c),n.parent()&&n.remove())};m.removeOption=function(a){this.hasOption(a)&&(delete k[a],l.$viewValue==a&&this.renderUnknownOption(a))};m.renderUnknownOption=function(c){c="? "+Ea(c)+" ?";n.val(c);a.prepend(n);a.val(c);n.prop("selected",
|
213
|
+
!0)};m.hasOption=function(a){return k.hasOwnProperty(a)};c.$on("$destroy",function(){m.renderUnknownOption=E})}],link:function(e,f,h,m){function k(a,c,d,e){d.$render=function(){var a=d.$viewValue;e.hasOption(a)?(y.parent()&&y.remove(),c.val(a),""===a&&w.prop("selected",!0)):u(a)&&w?c.val(""):e.renderUnknownOption(a)};c.on("change",function(){a.$apply(function(){y.parent()&&y.remove();d.$setViewValue(c.val())})})}function l(a,c,d){var e;d.$render=function(){var a=new Sa(d.$viewValue);q(c.find("option"),
|
214
|
+
function(c){c.selected=D(a.get(c.value))})};a.$watch(function(){ta(e,d.$viewValue)||(e=$(d.$viewValue),d.$render())});c.on("change",function(){a.$apply(function(){var a=[];q(c.find("option"),function(c){c.selected&&a.push(c.value)});d.$setViewValue(a)})})}function n(e,f,g){function h(){var a={"":[]},c=[""],d,k,s,t,u;t=g.$modelValue;u=z(e)||[];var C=n?Nb(u):u,F,J,x;J={};s=!1;var B,H;if(r)if(w&&L(t))for(s=new Sa([]),x=0;x<t.length;x++)J[m]=t[x],s.put(w(e,J),t[x]);else s=new Sa(t);for(x=0;F=C.length,
|
215
|
+
x<F;x++){k=x;if(n){k=C[x];if("$"===k.charAt(0))continue;J[n]=k}J[m]=u[k];d=p(e,J)||"";(k=a[d])||(k=a[d]=[],c.push(d));r?d=D(s.remove(w?w(e,J):q(e,J))):(w?(d={},d[m]=t,d=w(e,d)===w(e,J)):d=t===q(e,J),s=s||d);B=l(e,J);B=D(B)?B:"";k.push({id:w?w(e,J):n?C[x]:x,label:B,selected:d})}r||(A||null===t?a[""].unshift({id:"",label:"",selected:!s}):s||a[""].unshift({id:"?",label:"",selected:!0}));J=0;for(C=c.length;J<C;J++){d=c[J];k=a[d];y.length<=J?(t={element:E.clone().attr("label",d),label:k.label},u=[t],y.push(u),
|
216
|
+
f.append(t.element)):(u=y[J],t=u[0],t.label!=d&&t.element.attr("label",t.label=d));B=null;x=0;for(F=k.length;x<F;x++)s=k[x],(d=u[x+1])?(B=d.element,d.label!==s.label&&B.text(d.label=s.label),d.id!==s.id&&B.val(d.id=s.id),B[0].selected!==s.selected&&B.prop("selected",d.selected=s.selected)):(""===s.id&&A?H=A:(H=v.clone()).val(s.id).attr("selected",s.selected).text(s.label),u.push({element:H,label:s.label,id:s.id,selected:s.selected}),B?B.after(H):t.element.append(H),B=H);for(x++;u.length>x;)u.pop().element.remove()}for(;y.length>
|
217
|
+
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<v;p++)for(a=y[p],l=1,t=a.length;l<t;l++){if((h=a[l].element)[0].selected){h=h.val();n&&(d[n]=h);if(w)for(u=0;u<c.length&&
|
218
|
+
(d[m]=c[u],w(e,d)!=h);u++);else d[m]=c[h];k.push(q(e,d))}}else if(h=f.val(),"?"==h)k=s;else if(""===h)k=null;else if(w)for(u=0;u<c.length;u++){if(d[m]=c[u],w(e,d)==h){k=q(e,d);break}}else d[m]=c[h],n&&(d[n]=h),k=q(e,d);g.$setViewValue(k)})});g.$render=h;e.$watch(h)}if(m[1]){var p=m[0];m=m[1];var r=h.multiple,t=h.ngOptions,A=!1,w,v=z(R.createElement("option")),E=z(R.createElement("optgroup")),y=v.clone();h=0;for(var C=f.children(),x=C.length;h<x;h++)if(""===C[h].value){w=A=C.eq(h);break}p.init(m,A,
|
219
|
+
y);r&&(m.$isEmpty=function(a){return!a||0===a.length});t?n(e,f,m):r?l(e,f,m):k(e,f,m,p)}}}}],He=["$interpolate",function(a){var c={addOption:E,removeOption:E};return{restrict:"E",priority:100,compile:function(d,e){if(u(e.value)){var g=a(d.text(),!0);g||e.$set("value",d.text())}return function(a,d,e){var k=d.parent(),l=k.data("$selectController")||k.parent().data("$selectController");l&&l.databound?d.prop("selected",!1):l=c;g?a.$watch(g,function(a,c){e.$set("value",a);a!==c&&l.removeOption(c);l.addOption(a)}):
|
220
|
+
l.addOption(e.value);d.on("$destroy",function(){l.removeOption(e.value)})}}}}],Ie=Y({restrict:"E",terminal:!0});(Ca=P.jQuery)?(z=Ca,y(Ca.fn,{scope:Fa.scope,isolateScope:Fa.isolateScope,controller:Fa.controller,injector:Fa.injector,inheritedData:Fa.inheritedData}),vb("remove",!0,!0,!1),vb("empty",!1,!1,!1),vb("html",!1,!1,!0)):z=O;Ba.element=z;(function(a){y(a,{bootstrap:Xb,copy:$,extend:y,equals:ta,element:z,forEach:q,injector:Yb,noop:E,bind:bb,toJson:pa,fromJson:Tb,identity:Aa,isUndefined:u,isDefined:D,
|
221
|
+
isString:w,isFunction:M,isObject:W,isNumber:rb,isElement:Pc,isArray:L,version:Rd,isDate:Ka,lowercase:x,uppercase:Ha,callbacks:{counter:0},$$minErr:t,$$csp:Sb});Ua=Uc(P);try{Ua("ngLocale")}catch(c){Ua("ngLocale",[]).provider("$locale",rd)}Ua("ng",["ngLocale"],["$provide",function(a){a.provider({$$sanitizeUri:Bd});a.provider("$compile",ic).directive({a:Wd,input:Lc,textarea:Lc,form:Xd,script:De,select:Ge,style:Ie,option:He,ngBind:he,ngBindHtml:je,ngBindTemplate:ie,ngClass:ke,ngClassEven:me,ngClassOdd:le,
|
222
|
+
ngCloak:ne,ngController:oe,ngForm:Yd,ngHide:xe,ngIf:pe,ngInclude:qe,ngInit:se,ngNonBindable:te,ngPluralize:ue,ngRepeat:ve,ngShow:we,ngStyle:ye,ngSwitch:ze,ngSwitchWhen:Ae,ngSwitchDefault:Be,ngOptions:Fe,ngTransclude:Ce,ngModel:ce,ngList:ee,ngChange:de,required:Mc,ngRequired:Mc,ngValue:ge}).directive({ngInclude:re}).directive(Mb).directive(Nc);a.provider({$anchorScroll:cd,$animate:Td,$browser:ed,$cacheFactory:fd,$controller:id,$document:jd,$exceptionHandler:kd,$filter:Ac,$interpolate:pd,$interval:qd,
|
223
|
+
$http:ld,$httpBackend:nd,$location:td,$log:ud,$parse:xd,$rootScope:Ad,$q:yd,$sce:Ed,$sceDelegate:Dd,$sniffer:Fd,$templateCache:gd,$timeout:Gd,$window:Hd})}])})(Ba);z(R).ready(function(){Sc(R,Xb)})})(window,document);!angular.$$csp()&&angular.element(document).find("head").prepend('<style type="text/css">@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;}</style>');
|
224
|
+
//# sourceMappingURL=angular.min.js.map
|
225
|
+
;
|
226
|
+
/*
|
227
|
+
AngularJS v1.2.12
|
228
|
+
(c) 2010-2014 Google, Inc. http://angularjs.org
|
229
|
+
License: MIT
|
230
|
+
*/
|
231
|
+
(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<d.length;k++){var p=d[k];if(p.nodeType==X)return p}}var q=k.noop,
|
232
|
+
p=k.forEach,$=B.$$selectors,X=1,l="$$ngAnimateState",K="ng-animate",m={running:!0};R.decorator("$animate",["$delegate","$injector","$sniffer","$rootElement","$timeout","$rootScope","$document",function(C,v,t,H,y,w,N){function I(a){if(a){var g=[],e={};a=a.substr(1).split(".");(t.transitions||t.animations)&&a.push("");for(var c=0;c<a.length;c++){var f=a[c],d=$[f];d&&!e[f]&&(g.push(v.get(d)),e[f]=!0)}return g}}function r(a,g,e,c,f,k,m){function t(a){n();if(!0===a)z();else{if(a=e.data(l))a.done=z,e.data(l,
|
233
|
+
a);C(D,"after",z)}}function C(c,d,f){"after"==d?r():E();var k=d+"End";p(c,function(b,aa){var h=function(){a:{var b=d+"Complete",a=c[aa];a[b]=!0;(a[k]||q)();for(a=0;a<c.length;a++)if(!c[a][b])break a;f()}};"before"!=d||"enter"!=a&&"move"!=a?b[d]?b[k]=u?b[d](e,g,h):b[d](e,h):h():h()})}function w(c){e.triggerHandler("$animate:"+c,{event:a,className:g})}function E(){y(function(){w("before")},0,!1)}function r(){y(function(){w("after")},0,!1)}function v(){y(function(){w("close");m&&m()},0,!1)}function n(){n.hasBeenRun||
|
234
|
+
(n.hasBeenRun=!0,k())}function z(){if(!z.hasBeenRun){z.hasBeenRun=!0;var a=e.data(l);a&&(u?A(e):(a.closeAnimationTimeout=y(function(){A(e)},0,!1),e.data(l,a)));v()}}var s,x,G=d(e);G&&(s=G.className,x=s+" "+g);if(G&&L(x)){x=(" "+x).replace(/\s+/g,".");c||(c=f?f.parent():e.parent());x=I(x);var u="addClass"==a||"removeClass"==a;f=e.data(l)||{};if(ba(e,c)||0===x.length)n(),E(),r(),z();else{var D=[];u&&(f.disabled||f.running&&f.structural)||p(x,function(c){if(!c.allowCancel||c.allowCancel(e,a,g)){var d=
|
235
|
+
c[a];"leave"==a?(c=d,d=null):c=c["before"+a.charAt(0).toUpperCase()+a.substr(1)];D.push({before:c,after:d})}});0===D.length?(n(),E(),r(),v()):(c=" "+s+" ",f.running&&(y.cancel(f.closeAnimationTimeout),A(e),J(f.animations),x=(s=u&&!f.structural)&&f.className==g&&a!=f.event,f.beforeComplete||x?(f.done||q)(!0):s&&(c="removeClass"==f.event?c.replace(" "+f.className+" "," "):c+f.className+" ")),s=" "+g+" ","addClass"==a&&0<=c.indexOf(s)||"removeClass"==a&&-1==c.indexOf(s)?(n(),E(),r(),v()):(e.addClass(K),
|
236
|
+
e.data(l,{running:!0,event:a,className:g,structural:!u,animations:D,done:t}),C(D,"before",t)))}}else n(),E(),r(),z()}function Q(a){a=d(a);p(a.querySelectorAll("."+K),function(a){a=k.element(a);var e=a.data(l);e&&(J(e.animations),A(a))})}function J(a){p(a,function(a){a.beforeComplete||(a.beforeEnd||q)(!0);a.afterComplete||(a.afterEnd||q)(!0)})}function A(a){d(a)==d(H)?m.disabled||(m.running=!1,m.structural=!1):(a.removeClass(K),a.removeData(l))}function ba(a,g){if(m.disabled)return!0;if(d(a)==d(H))return m.disabled||
|
237
|
+
m.running;do{if(0===g.length)break;var e=d(g)==d(H),c=e?m:g.data(l),c=c&&(!!c.disabled||!!c.running);if(e||c)return c;if(e)break}while(g=g.parent());return!0}H.data(l,m);w.$$postDigest(function(){w.$$postDigest(function(){m.running=!1})});var M=B.classNameFilter(),L=M?function(a){return M.test(a)}:function(){return!0};return{enter:function(a,d,e,c){this.enabled(!1,a);C.enter(a,d,e);w.$$postDigest(function(){r("enter","ng-enter",a,d,e,q,c)})},leave:function(a,d){Q(a);this.enabled(!1,a);w.$$postDigest(function(){r("leave",
|
238
|
+
"ng-leave",a,null,null,function(){C.leave(a)},d)})},move:function(a,d,e,c){Q(a);this.enabled(!1,a);C.move(a,d,e);w.$$postDigest(function(){r("move","ng-move",a,d,e,q,c)})},addClass:function(a,d,e){r("addClass",d,a,null,null,function(){C.addClass(a,d)},e)},removeClass:function(a,d,e){r("removeClass",d,a,null,null,function(){C.removeClass(a,d)},e)},enabled:function(a,d){switch(arguments.length){case 2:if(a)A(d);else{var e=d.data(l)||{};e.disabled=!0;d.data(l,e)}break;case 1:m.disabled=!a;break;default:a=
|
239
|
+
!m.disabled}return!!a}}}]);B.register("",["$window","$sniffer","$timeout","$$animateReflow",function(m,l,B,H){function y(b,a){O&&O();U.push(a);var h=d(b);b=k.element(h);V.push(b);var h=b.data(n),c=h.stagger,c=h.itemIndex*(Math.max(c.animationDelay,c.transitionDelay)||0);P=Math.max(P,(c+(h.maxDelay+h.maxDuration)*s)*x);h.animationCount=G;O=H(function(){p(U,function(b){b()});var b=[],a=G;p(V,function(a){b.push(a)});B(function(){w(b,a);b=null},P,!1);U=[];V=[];O=null;u={};P=0;G++})}function w(b,a){p(b,
|
240
|
+
function(b){(b=b.data(n))&&b.animationCount==a&&(b.closeAnimationFn||q)()})}function N(b,a){var h=a?u[a]:null;if(!h){var d=0,c=0,e=0,k=0,g,n,l,r;p(b,function(b){if(b.nodeType==X){b=m.getComputedStyle(b)||{};l=b[f+Y];d=Math.max(I(l),d);r=b[f+W];g=b[f+E];c=Math.max(I(g),c);n=b[F+E];k=Math.max(I(n),k);var a=I(b[F+Y]);0<a&&(a*=parseInt(b[F+R],10)||1);e=Math.max(a,e)}});h={total:0,transitionPropertyStyle:r,transitionDurationStyle:l,transitionDelayStyle:g,transitionDelay:c,transitionDuration:d,animationDelayStyle:n,
|
241
|
+
animationDelay:k,animationDuration:e};a&&(u[a]=h)}return h}function I(b){var a=0;b=k.isString(b)?b.split(/\s*,\s*/):[];p(b,function(b){a=Math.max(parseFloat(b)||0,a)});return a}function r(b){var a=b.parent(),h=a.data(Z);h||(a.data(Z,++D),h=D);return h+"-"+d(b).className}function Q(b,a,h){var c=r(b),e=c+" "+a,k={},g=u[e]?++u[e].total:0;if(0<g){var l=a+"-stagger",k=c+" "+l;(c=!u[k])&&b.addClass(l);k=N(b,k);c&&b.removeClass(l)}h=h||function(b){return b()};b.addClass(a);h=h(function(){return N(b,e)});
|
242
|
+
l=Math.max(h.transitionDelay,h.animationDelay);c=Math.max(h.transitionDuration,h.animationDuration);if(0===c)return b.removeClass(a),!1;var m="";0<h.transitionDuration?d(b).style[f+W]="none":d(b).style[F]="none 0s";p(a.split(" "),function(b,a){m+=(0<a?" ":"")+b+"-active"});b.data(n,{className:a,activeClassName:m,maxDuration:c,maxDelay:l,classes:a+" "+m,timings:h,stagger:k,itemIndex:g});return!0}function J(b){var a=f+W;b=d(b);b.style[a]&&0<b.style[a].length&&(b.style[a]="")}function A(b){var a=F;b=
|
243
|
+
d(b);b.style[a]&&0<b.style[a].length&&(b.style[a]="")}function K(b,a,h){function e(c){b.off(v,k);b.removeClass(r);c=b;c.removeClass(a);c.removeData(n);c=d(b);for(var h in s)c.style.removeProperty(s[h])}function k(b){b.stopPropagation();var a=b.originalEvent||b;b=a.$manualTimeStamp||a.timeStamp||Date.now();a=parseFloat(a.elapsedTime.toFixed(z));Math.max(b-w,0)>=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,
|
244
|
+
l.animationDelay)*x,w=Date.now(),v=T+" "+S,t=f.itemIndex,q="",s=[];if(0<l.transitionDuration){var y=l.transitionPropertyStyle;-1==y.indexOf("all")&&(q+=c+"transition-property: "+y+";",q+=c+"transition-duration: "+l.transitionDurationStyle+";",s.push(c+"transition-property"),s.push(c+"transition-duration"))}0<t&&(0<m.transitionDelay&&0===m.transitionDuration&&(q+=c+"transition-delay: "+M(l.transitionDelayStyle,m.transitionDelay,t)+"; ",s.push(c+"transition-delay")),0<m.animationDelay&&0===m.animationDuration&&
|
245
|
+
(q+=c+"animation-delay: "+M(l.animationDelayStyle,m.animationDelay,t)+"; ",s.push(c+"animation-delay")));0<s.length&&(l=g.getAttribute("style")||"",g.setAttribute("style",l+" "+q));b.on(v,k);b.addClass(r);f.closeAnimationFn=function(){e();h()};return e}h()}function M(b,a,c){var d="";p(b.split(","),function(b,e){d+=(0<e?",":"")+(c*a+parseInt(b,10))+"s"});return d}function L(b,a,c){if(Q(b,a,c))return function(c){c&&(b.removeClass(a),b.removeData(n))}}function a(a,c,d){if(a.data(n))return K(a,c,d);a.removeClass(c);
|
246
|
+
a.removeData(n);d()}function g(b,c,d){var e=L(b,c);if(e){var f=e;y(b,function(){J(b);A(b);f=a(b,c,d)});return function(a){(f||q)(a)}}d()}function e(a,c){var d="";a=k.isArray(a)?a:a.split(/\s+/);p(a,function(a,b){a&&0<a.length&&(d+=(0<b?" ":"")+a+c)});return d}var c="",f,S,F,T;v.ontransitionend===t&&v.onwebkittransitionend!==t?(c="-webkit-",f="WebkitTransition",S="webkitTransitionEnd transitionend"):(f="transition",S="transitionend");v.onanimationend===t&&v.onwebkitanimationend!==t?(c="-webkit-",F=
|
247
|
+
"WebkitAnimation",T="webkitAnimationEnd animationend"):(F="animation",T="animationend");var Y="Duration",W="Property",E="Delay",R="IterationCount",Z="$$ngAnimateKey",n="$$ngAnimateCSS3Data",z=3,s=1.5,x=1E3,G=0,u={},D=0,U=[],V=[],O,P=0;return{allowCancel:function(a,c,h){var f=(a.data(n)||{}).classes;if(!f||0<=["enter","leave","move"].indexOf(c))return!0;var l=a.parent(),g=k.element(d(a).cloneNode());g.attr("style","position:absolute; top:-9999px; left:-9999px");g.removeAttr("id");g.empty();p(f.split(" "),
|
248
|
+
function(a){g.removeClass(a)});g.addClass(e(h,"addClass"==c?"-add":"-remove"));l.append(g);a=N(g);g.remove();return 0<Math.max(a.transitionDuration,a.animationDuration)},enter:function(a,c){return g(a,"ng-enter",c)},leave:function(a,c){return g(a,"ng-leave",c)},move:function(a,c){return g(a,"ng-move",c)},beforeAddClass:function(a,c,d){var f=L(a,e(c,"-add"),function(d){a.addClass(c);d=d();a.removeClass(c);return d});if(f)return y(a,function(){J(a);A(a);d()}),f;d()},addClass:function(b,c,d){return a(b,
|
249
|
+
e(c,"-add"),d)},beforeRemoveClass:function(a,c,d){var f=L(a,e(c,"-remove"),function(d){var e=a.attr("class");a.removeClass(c);d=d();a.attr("class",e);return d});if(f)return y(a,function(){J(a);A(a);d()}),f;d()},removeClass:function(b,c,d){return a(b,e(c,"-remove"),d)}}}])}])})(window,window.angular);
|
250
|
+
//# sourceMappingURL=angular-animate.min.js.map
|
251
|
+
;
|
252
|
+
/*
|
253
|
+
AngularJS v1.2.12
|
254
|
+
(c) 2010-2014 Google, Inc. http://angularjs.org
|
255
|
+
License: MIT
|
256
|
+
*/
|
257
|
+
(function(p,h,q){'use strict';function E(a){var e=[];s(e,h.noop).chars(a);return e.join("")}function k(a){var e={};a=a.split(",");var d;for(d=0;d<a.length;d++)e[a[d]]=!0;return e}function F(a,e){function d(a,b,d,g){b=h.lowercase(b);if(t[b])for(;f.last()&&u[f.last()];)c("",f.last());v[b]&&f.last()==b&&c("",b);(g=w[b]||!!g)||f.push(b);var l={};d.replace(G,function(a,b,e,c,d){l[b]=r(e||c||d||"")});e.start&&e.start(b,l,g)}function c(a,b){var c=0,d;if(b=h.lowercase(b))for(c=f.length-1;0<=c&&f[c]!=b;c--);
|
258
|
+
if(0<=c){for(d=f.length-1;d>=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=
|
259
|
+
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,"<"),e="textContent"in n?n.textContent:n.innerText;return a+e+d}function B(a){return a.replace(/&/g,
|
260
|
+
"&").replace(N,function(a){return"&#"+a.charCodeAt(0)+";"}).replace(/</g,"<").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("</"),c(a),c(">"));a==d&&(d=!1)},chars:function(a){d||
|
261
|
+
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=/^</,J=/^<\s*\//,H=/\x3c!--(.*?)--\x3e/g,y=/<!DOCTYPE([^>]*?)>/i,I=/<!\[CDATA\[(.*?)]]\x3e/g,N=/([^\#-~| |!])/g,w=k("area,br,col,hr,img,wbr");p=k("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr");q=k("rp,rt");var v=h.extend({},q,p),t=h.extend({},p,k("address,article,aside,blockquote,caption,center,del,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,map,menu,nav,ol,pre,script,section,table,ul")),
|
262
|
+
u=h.extend({},q,k("a,abbr,acronym,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,q,ruby,rp,rt,s,samp,small,span,strike,strong,sub,sup,time,tt,u,var")),x=k("script,style"),C=h.extend({},w,t,u,v),D=k("background,cite,href,longdesc,src,usemap"),O=h.extend({},D,k("abbr,align,alt,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,coords,dir,face,headers,height,hreflang,hspace,ismap,lang,language,nohref,nowrap,rel,rev,rows,rowspan,rules,scope,scrolling,shape,size,span,start,summary,target,title,type,valign,value,vspace,width")),
|
263
|
+
n=document.createElement("pre"),M=/^(\s*)([\s\S]*?)(\s*)$/;h.module("ngSanitize",[]).provider("$sanitize",function(){this.$get=["$$sanitizeUri",function(a){return function(e){var d=[];F(e,s(d,function(c,b){return!/^unsafe/.test(a(c,b))}));return d.join("")}}]});h.module("ngSanitize").filter("linky",["$sanitize",function(a){var e=/((ftp|https?):\/\/|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s.;,(){}<>]/,d=/^mailto:/;return function(c,b){function g(a){a&&m.push(E(a))}function f(a,c){m.push("<a ");h.isDefined(b)&&
|
264
|
+
(m.push('target="'),m.push(b),m.push('" '));m.push('href="');m.push(a);m.push('">');g(c);m.push("</a>")}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);
|
265
|
+
//# sourceMappingURL=angular-sanitize.min.js.map
|
266
|
+
;
|
267
|
+
/**
|
268
|
+
* State-based routing for AngularJS
|
269
|
+
* @version v0.2.7
|
270
|
+
* @link http://angular-ui.github.com/
|
271
|
+
* @license MIT License, http://www.opensource.org/licenses/MIT
|
272
|
+
*/
|
273
|
+
"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<c.length;e++){var f=c[e];if(a[f]!=b[f])return!1}return!0}function k(a,b){var c={};return D(a,function(a){c[a]=b[a]}),c}function l(a,b){var d=1,f=2,g={},h=[],i=g,j=E(a.when(g),{$$promises:g,$$values:g});this.study=function(g){function k(a,c){if(o[c]!==f){if(n.push(c),o[c]===d)throw n.splice(0,n.indexOf(c)),new Error("Cyclic dependency: "+n.join(" -> "));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<v[c].length;g++)n(v[c][g]);return b}function o(a,b){return A(a)&&!y(b)?x[a]:z(b)&&A(a)?(x[a]&&!x.$delegates[a]&&(x.$delegates[a]=x[a]),x[a]=b,this):this}function p(a,b){return B(a)?b=a:b.name=a,n(b),this}function q(a,e,g,m,n,o,p){function q(){p.url()!==H&&(p.url(H),p.replace())}function v(a,c,d,f,h){var i=d?c:k(a.params,c),j={$stateParams:i};h.resolve=n.resolve(a.resolve,j,h.resolve,a);var l=[h.resolve.then(function(a){h.globals=a})];return f&&l.push(f),D(a.views,function(c,d){var e=c.resolve&&c.resolve!==a.resolve?c.resolve:{};e.$template=[function(){return g.load(d,{view:c,locals:j,params:i,notify:!1})||""}],l.push(n.resolve(e,j,h.resolve,a).then(function(f){if(z(c.controllerProvider)||C(c.controllerProvider)){var g=b.extend({},e,j);f.$$controller=m.invoke(c.controllerProvider,null,g)}else f.$$controller=c.controller;f.$$state=a,h[d]=f}))}),e.all(l).then(function(){return h})}var x=e.reject(new Error("transition superseded")),A=e.reject(new Error("transition prevented")),B=e.reject(new Error("transition aborted")),G=e.reject(new Error("transition failed")),H=p.url();return s.locals={resolve:null,globals:{$stateParams:{}}},t={params:{},current:s.self,$current:s,transition:null},t.reload=function(){t.transitionTo(t.current,o,{reload:!0,inherit:!1,notify:!1})},t.go=function(a,b,c){return this.transitionTo(a,b,E({inherit:!0,relative:t.$current},c))},t.transitionTo=function(b,c,f){c=c||{},f=E({location:!0,inherit:!1,relative:null,notify:!0,reload:!1,$retry:!1},f||{});var g,k=t.$current,n=t.params,u=k.path,z=l(b,f.relative);if(!y(z)){var C={to:b,toParams:c,options:f};if(g=a.$broadcast("$stateNotFound",C,k.self,n),g.defaultPrevented)return q(),B;if(g.retry){if(f.$retry)return q(),G;var D=t.transition=e.when(g.retry);return D.then(function(){return D!==t.transition?x:(C.options.$retry=!0,t.transitionTo(C.to,C.toParams,C.options))},function(){return B}),q(),D}if(b=C.to,c=C.toParams,f=C.options,z=l(b,f.relative),!y(z)){if(f.relative)throw new Error("Could not resolve '"+b+"' from state '"+f.relative+"'");throw new Error("No such state '"+b+"'")}}if(z[w])throw new Error("Cannot transition to abstract state '"+b+"'");f.inherit&&(c=h(o,c||{},t.$current,z)),b=z;var I,J,K=b.path,L=s.locals,M=[];for(I=0,J=K[I];J&&J===u[I]&&j(c,n,J.ownParams)&&!f.reload;I++,J=K[I])L=M[I]=J.locals;if(r(b,k,L,f))return b.self.reloadOnSearch!==!1&&q(),t.transition=null,e.when(t.current);if(c=i(b.params,c||{}),f.notify&&(g=a.$broadcast("$stateChangeStart",b.self,c,k.self,n),g.defaultPrevented))return q(),A;for(var N=e.when(L),O=I;O<K.length;O++,J=K[O])L=M[O]=d(L),N=v(J,c,J===b,N,L);var P=t.transition=N.then(function(){var d,e,g;if(t.transition!==P)return x;for(d=u.length-1;d>=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<K.length;d++)e=K[d],e.locals=M[d],e.self.onEnter&&m.invoke(e.self.onEnter,e.self,e.locals.globals);if(t.transition!==P)return x;t.$current=b,t.current=b.self,t.params=c,F(t.params,o),t.transition=null;var h=b.navigable;return f.location&&h&&(p.url(h.url.format(h.locals.globals.$stateParams)),"replace"===f.location&&p.replace()),f.notify&&a.$broadcast("$stateChangeSuccess",b.self,c,k.self,n),H=p.url(),t.current},function(d){return t.transition!==P?x:(t.transition=null,a.$broadcast("$stateChangeError",b.self,c,k.self,n,d),q(),e.reject(d))});return P},t.is=function(a,d){var e=l(a);return y(e)?t.$current!==e?!1:y(d)?b.equals(o,d):!0:c},t.includes=function(a,d){var e=l(a);if(!y(e))return c;if(!y(t.$current.includes[e.name]))return!1;var f=!0;return b.forEach(d,function(a,b){y(o[b])&&o[b]===a||(f=!1)}),f},t.href=function(a,b,c){c=E({lossy:!0,inherit:!1,absolute:!1,relative:t.$current},c||{});var d=l(a,c.relative);if(!y(d))return null;b=h(o,b||{},t.$current,d);var e=d&&c.lossy?d.navigable:d,g=e&&e.url?e.url.format(i(d.params,b||{})):null;return!f.html5Mode()&&g&&(g="#"+f.hashPrefix()+g),c.absolute&&g&&(g=p.protocol()+"://"+p.host()+(80==p.port()||443==p.port()?"":":"+p.port())+(!f.html5Mode()&&g?"/":"")+g),g},t.get=function(a,b){if(!y(a)){var c=[];return D(u,function(a){c.push(a.self)}),c}var d=l(a,b);return d&&d.self?d.self:null},t}function r(a,b,c,d){return a!==b||(c!==b.locals||d.reload)&&a.self.reloadOnSearch!==!1?void 0:!0}var s,t,u={},v={},w="abstract",x={parent:function(a){if(y(a.parent)&&a.parent)return l(a.parent);var b=/^(.+)\.[^.]+$/.exec(a.name);return b?l(b[1]):s},data:function(a){return a.parent&&a.parent.data&&(a.data=a.self.data=E({},a.parent.data,a.data)),a.data},url:function(a){var b=a.url;if(A(b))return"^"==b.charAt(0)?e.compile(b.substring(1)):(a.parent.navigable||s).url.concat(b);if(e.isMatcher(b)||null==b)return b;throw new Error("Invalid url '"+b+"' in state '"+a+"'")},navigable:function(a){return a.url?a:a.parent?a.parent.navigable:null},params:function(a){if(!a.params)return a.url?a.url.parameters():a.parent.params;if(!C(a.params))throw new Error("Invalid params in state '"+a+"'");if(a.url)throw new Error("Both params and url specicified in state '"+a+"'");return a.params},views:function(a){var b={};return D(y(a.views)?a.views:{"":a},function(c,d){d.indexOf("@")<0&&(d+="@"+a.parent.name),b[d]=c}),b},ownParams:function(a){if(!a.parent)return a.params;var b={};D(a.params,function(a){b[a]=!0}),D(a.parent.params,function(c){if(!b[c])throw new Error("Missing required parameter '"+c+"' in state '"+a.name+"'");b[c]=!1});var c=[];return D(b,function(a,b){a&&c.push(b)}),c},path:function(a){return a.parent?a.parent.path.concat(a):[]},includes:function(a){var b=a.parent?E({},a.parent.includes):{};return b[a.name]=!0,b},$delegates:{}};s=n({name:"",url:"^",views:null,"abstract":!0}),s.navigable=null,this.decorator=o,this.state=p,this.$get=q,q.$inject=["$rootScope","$q","$view","$injector","$resolve","$stateParams","$location","$urlRouter"]}function r(){function a(a,b){return{load:function(c,d){var e,f={template:null,controller:null,view:null,locals:null,notify:!0,async:!0,params:{}};return d=E(f,d),d.view&&(e=b.fromConfig(d.view,d.params,d.locals)),e&&d.notify&&a.$broadcast("$viewContentLoading",d),e}}}this.$get=a,a.$inject=["$rootScope","$templateFactory"]}function s(a,c,d,e,f){var g=e.has("$animator")?e.get("$animator"):!1,h=!1,i={restrict:"ECA",terminal:!0,priority:1e3,transclude:!0,compile:function(e,j,k){return function(e,j,l){function m(b){var g=a.$current&&a.$current.locals[p];if(g!==o){var h=t(r&&b);if(h.remove(j),n&&(n.$destroy(),n=null),!g)return o=null,v.state=null,h.restore(s,j);o=g,v.state=g.$$state;var i=c(h.populate(g.$template,j));if(n=e.$new(),g.$$controller){g.$scope=n;var k=d(g.$$controller,g);j.children().data("$ngControllerController",k)}i(n),n.$emit("$viewContentLoaded"),q&&n.$eval(q),f()}}var n,o,p=l[i.name]||l.name||"",q=l.onload||"",r=g&&g(e,l),s=k(e),t=function(a){return{"true":{remove:function(a){r.leave(a.contents(),a)},restore:function(a,b){r.enter(a,b)},populate:function(a,c){var d=b.element("<div></div>").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);
|
274
|
+
;
|
275
|
+
/*!
|
276
|
+
* Copyright 2014 Drifty Co.
|
277
|
+
* http://drifty.com/
|
278
|
+
*
|
279
|
+
* Ionic, v0.9.26
|
280
|
+
* A powerful HTML5 mobile app framework.
|
281
|
+
* http://ionicframework.com/
|
282
|
+
*
|
283
|
+
* By @maxlynch, @benjsperry, @adamdbradley <3
|
284
|
+
*
|
285
|
+
* Licensed under the MIT license. Please see LICENSE for more information.
|
286
|
+
*
|
287
|
+
*/
|
288
|
+
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<this.length;b++)if(e=this[b],e.setAttribute)if(a.indexOf(" ")<0)e.classList.add(a);else{for(g=(" "+(e.getAttribute("class")||"")+" ").replace(/[\n\t]/g," "),f=a.split(" "),c=0;c<f.length;c++)d=f[c].trim(),-1===g.indexOf(" "+d+" ")&&(g+=d+" ");e.setAttribute("class",g.trim())}return this},angular.element.prototype.removeClass=function(a){var b,c,d,e,f;if(a)for(b=0;b<this.length;b++)if(f=this[b],f.getAttribute)if(a.indexOf(" ")<0)f.classList.remove(a);else for(d=a.split(" "),c=0;c<d.length;c++)e=d[c],f.setAttribute("class",(" "+(f.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").replace(" "+e.trim()+" "," ").trim());return this},angular.module("ionic.decorator.location",[]).config(["$provide",function(a){a.decorator("$location",["$delegate","$timeout",$LocationDecorator])}]),function(){"use strict";angular.module("ionic.ui.service.scrollDelegate",[]).factory("$ionicScrollDelegate",["$rootScope","$timeout","$q","$anchorScroll","$location","$document",function(a,b,c,d,e){return{scrollTop:function(b){a.$broadcast("scroll.scrollTop",b)},scrollBottom:function(b){a.$broadcast("scroll.scrollBottom",b)},scrollTo:function(b,c,d){a.$broadcast("scroll.scrollTo",b,c,d)},resize:function(){a.$broadcast("scroll.resize")},anchorScroll:function(b){a.$broadcast("scroll.anchorScroll",b)},tapScrollToTop:function(a,b){var c=this;angular.isDefined(b)||(b=!0),ionic.on("tap",function(d){var e=d.target;if(!ionic.DomUtil.getParentOrSelfWithClass(e,"button")){var f=a[0],g=f.getBoundingClientRect();ionic.DomUtil.rectContains(d.gesture.touches[0].pageX,d.gesture.touches[0].pageY,g.left,g.top,g.left+g.width,g.top+20)&&c.scrollTop(b)}},a[0])},finishRefreshing:function(a){a.$broadcast("scroll.refreshComplete")},getScrollView:function(a){return a.scrollView},register:function(a,c,d){function f(){return b(function(){d.resize()})}var g=c[0];c.on("scroll",function(b){var c=(b.originalEvent||b).detail||{};a.$onScroll&&a.$onScroll({event:b,scrollTop:c.scrollTop||0,scrollLeft:c.scrollLeft||0})}),a.$parent.$on("scroll.resize",f),a.$parent.$on("scroll.refreshComplete",function(){d.finishPullToRefresh()}),a.$parent.$on("scroll.anchorScroll",function(a,b){f().then(function(){var a,c=e.hash();if(c&&(a=document.getElementById(c))){var f=ionic.DomUtil.getPositionInParent(a,g);d.scrollTo(f.left,f.top,!!b)}else d.scrollTo(0,0,!!b)})}),a.$parent.$on("scroll.scrollTo",function(a,b,c,e){f().then(function(){d.scrollTo(b,c,!!e)})}),a.$parent.$on("scroll.scrollTop",function(a,b){f().then(function(){d.scrollTo(0,0,!!b)})}),a.$parent.$on("scroll.scrollBottom",function(a,b){f().then(function(){var a=d;if(a){var c=a.getScrollMax();a.scrollTo(c.left,c.top,!!b)}})})}}}])}(ionic),function(){"use strict";angular.module("ionic.ui.service.sideMenuDelegate",[]).factory("$ionicSideMenuDelegate",["$rootScope","$timeout","$q",function(){return{getSideMenuController:function(a){return a.sideMenuController},close:function(a){a.sideMenuController&&a.sideMenuController.close()},toggleLeft:function(a){a.sideMenuController&&a.sideMenuController.toggleLeft()},toggleRight:function(a){a.sideMenuController&&a.sideMenuController.toggleRight()},openLeft:function(a){a.sideMenuController&&a.sideMenuController.openPercentage(100)},openRight:function(a){a.sideMenuController&&a.sideMenuController.openPercentage(-100)}}}])}(),function(){"use strict";angular.module("ionic.ui.service.slideBoxDelegate",[]).factory("$ionicSlideBoxDelegate",["$rootScope","$timeout",function(a,b){return{update:function(){a.$broadcast("slideBox.update")},register:function(a){a.$parent.$on("slideBox.update",function(c){c.defaultPrevented||(b(function(){a.$parent.slideBox.setup()}),c.preventDefault())})}}}])}(ionic),angular.module("ionic.service.actionSheet",["ionic.service.templateLoad","ionic.service.platform","ionic.ui.actionSheet","ngAnimate"]).factory("$ionicActionSheet",["$rootScope","$document","$compile","$animate","$timeout","$ionicTemplateLoader","$ionicPlatform",function(a,b,c,d,e,f,g){return{show:function(e){var f=a.$new(!0);angular.extend(f,e);var h=c('<ion-action-sheet buttons="buttons"></ion-action-sheet>')(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("<ion-loading>"+d.content+"</ion-loading>")(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("<popup>"+opts.content+"</popup>")(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<f.stack.length){var g=f.stack[f.cursor];return g.go(e)}!e.url&&e.uiSref&&(e.url=b.href(e.uiSref)),e.url&&(0===e.url.indexOf("#")&&(e.url=e.url.replace("#","")),e.url!==c.url()&&c.url(e.url))}}),a.$on("viewState.viewEnter",function(a,b){b&&b.title&&(d[0].title=b.title)}),f.onHardwareBackButton(g)}]).factory("$ionicViewService",["$rootScope","$state","$location","$window","$injector",function(a,b,c,d,e){function f(){return ionic.Utils.nextUid()}var g=e.has("$animate")?e.get("$animate"):!1,h=function(){};return h.prototype.initialize=function(a){if(a){for(var b in a)this[b]=a[b];return this}return null},h.prototype.go=function(){return this.stateName?b.go(this.stateName,this.stateParams):this.url&&this.url!==c.url()?a.$viewHistory.backView===this?d.history.go(-1):a.$viewHistory.forwardView===this?d.history.go(1):void c.url(this.url):null},h.prototype.destory=function(){this.scope&&(this.scope.destory&&this.scope.destory(),this.scope=null)},{register:function(b,d){var e=a.$viewHistory,g=this.getCurrentStateId(),h=this._getHistory(b),i=e.currentView,j=e.backView,k=e.forwardView,l={viewId:null,navAction:null,navDirection:null,historyId:h.historyId};if(d&&!this.isTagNameRegistrable(d))return l.navAction="disabledByTagName",l;if(i&&i.stateId===g&&i.historyId===h.historyId)return l.navAction="noChange",l;if(e.forcedNav)ionic.Utils.extend(l,e.forcedNav),a.$viewHistory.forcedNav=null;else if(j&&j.stateId===g)l.viewId=j.viewId,l.navAction="moveBack",i.scrollValues={},j.historyId===i.historyId&&(l.navDirection="back");else if(k&&k.stateId===g){l.viewId=k.viewId,l.navAction="moveForward",k.historyId===i.historyId&&(l.navDirection="forward");var m=this._getParentHistoryObj(b);k.historyId&&m.scope&&(m.scope.$historyId=k.historyId,l.historyId=k.historyId)}else if(i&&i.historyId!==h.historyId&&h.cursor>-1&&h.stack.length>0&&h.cursor<h.stack.length&&h.stack[h.cursor].stateId===g)l.viewId=h.stack[h.cursor].viewId,l.navAction="moveBack";else{if(l.viewId=f(g),i){if(i.forwardViewId=l.viewId,h.historyId===i.historyId&&(l.navDirection="forward"),l.navAction="newView",k&&i.stateId!==k.stateId){var n=this._getView(k.historyId);if(n)for(var o=n.stack.length-1;o>=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<b.length;c++)if(1===b[c].nodeType)for(d=0;d<e.length;d++)if(b[c].tagName===e[d])return!1;return!0},clearHistory:function(){var b,c=a.$viewHistory.histories,d=a.$viewHistory.currentView;for(b in c)c[b].stack&&(c[b].stack=[],c[b].cursor=-1),d.historyId===b?(d.backViewId=null,d.forwardViewId=null,c[b].stack.push(d)):c[b].destroy&&c[b].destroy();this.setNavViews(d.viewId)}}}]),angular.module("ionic.ui.navAnimation",[]).directive("ionNavAnimation",function(){return{restrict:"A",require:"^?ionNavView",link:function(a,b,c,d){d&&ionic.on("tap",function(){d.setNextAnimation(c.ionNavAnimation)},b[0])}}}),function(){"use strict";angular.module("ionic.ui.actionSheet",[]).directive("ionActionSheet",["$document",function(a){return{restrict:"E",scope:!0,replace:!0,link:function(b,c){var d=function(a){27==a.which&&(b.cancel(),b.$apply())},e=function(a){a.target==c[0]&&(b.cancel(),b.$apply())};b.$on("$destroy",function(){c.remove(),a.unbind("keyup",d)}),a.bind("keyup",d),c.bind("click",e)},template:'<div class="action-sheet-backdrop"><div class="action-sheet-wrapper action-sheet-up"><div class="action-sheet"><div class="action-sheet-group"><div class="action-sheet-title" ng-if="titleText">{{titleText}}</div><button class="button" ng-click="buttonClicked($index)" ng-repeat="button in buttons">{{button.text}}</button></div><div class="action-sheet-group" ng-if="destructiveText"><button class="button destructive" ng-click="destructiveButtonClicked()">{{destructiveText}}</button></div><div class="action-sheet-group" ng-if="cancelText"><button class="button" ng-click="cancel()">{{cancelText}}</button></div></div></div></div>'}}])}(),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:'<header class="bar bar-header"> <div class="buttons"> <button ng-repeat="button in leftButtons" class="button no-animation" ng-class="button.type" ng-click="button.tap($event, $index)" ng-bind-html="button.content"> </button> </div> <h1 class="title" ng-bind-html="title"></h1> <div class="buttons"> <button ng-repeat="button in rightButtons" class="button no-animation" ng-class="button.type" ng-click="button.tap($event, $index)" ng-bind-html="button.content"> </button> </div> </header>',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:'<footer class="bar bar-footer" ng-transclude> </footer>',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:'<div class="item item-checkbox disable-pointer-events"><label class="checkbox enable-pointer-events"><input type="checkbox" ng-model="ngModel" ng-value="ngValue" ng-change="ngChange()"></label><div class="item-content" ng-transclude></div></div>',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:'<div class="scroll-content"><div class="scroll"></div></div>',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:'<div class="scroll-refresher"><div class="ionic-refresher-content"><i class="icon ion-arrow-down-c icon-pulling"></i><i class="icon ion-loading-d icon-refreshing"></i></div></div>',scope:!0}}).directive("ionScrollRefresher",function(){return{restrict:"E",replace:!0,transclude:!0,template:'<div class="scroll-refresher"><div class="scroll-refresher-content" ng-transclude></div></div>'}}).directive("ionInfiniteScroll",["$ionicBind",function(a){return{restrict:"E",require:"^?$ionicScroll",template:'<div class="scroll-infinite"><div class="scroll-infinite-content"><i class="icon ion-loading-d icon-refreshing"></i></div></div>',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:'<div class="item item-complex"> <div class="item-edit" ng-if="deleteClick !== undefined"> <button class="button button-icon icon" ng-class="deleteIconClass" ng-click="deleteClick()" ion-stop-event="click"></button> </div> <a class="item-content" ng-href="{{ href }}" ng-transclude></a> <div class="item-drag" ng-if="reorderIconClass !== undefined"> <button data-ionic-action="reorder" class="button button-icon icon" ng-class="reorderIconClass"></button> </div> <div class="item-options" ng-if="itemOptionButtons"> <button ng-click="b.onTap(item, b)" ion-stop-event="click" class="button" ng-class="b.type" ng-repeat="b in itemOptionButtons" ng-bind="b.text"></button> </div> </div>',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:"<div class=\"list\" ng-class=\"{'list-editing': showDelete, 'list-reordering': showReorder}\" ng-transclude></div>",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:'<div class="loading-backdrop" ng-class="{enabled: showBackdrop}"><div class="loading" ng-transclude></div></div>'}})}(),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:'<label class="item item-radio"><input type="radio" name="radio-group" ng-model="ngModel" ng-value="ngValue" ng-change="ngChange()"><div class="item-content disable-pointer-events" ng-transclude></div><i class="radio-icon disable-pointer-events icon ion-checkmark"></i></label>',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:'<div class="button-bar button-bar-inline" ng-transclude></div>',controller:["$scope","$element",function(a,b){this.select=function(a){for(var c,d=b.children(),e=0;e<d.length;e++)c=d[e],c!=a[0]&&c.classList.remove("active")}}],link:function(a,b,c,d){d&&(d.$render=function(){for(var c=b.children(),e=0;e<c.length;e++)c[e].classList.remove("active");a.$parent.$broadcast("radioButton.select",d.$viewValue)})}}}).directive("ionButtonRadio",function(){return{restrict:"CA",require:["?^ngModel","?^ionRadioButtons"],link:function(b,c,d,e){var f=e[0],g=e[1];if(f&&g){var h=function(){c.addClass("active"),f.$setViewValue(b.$eval(d.ngValue)),g.select(c)},i=function(){h()};b.$on("radioButton.select",function(a,e){e==b.$eval(d.ngValue)&&c.addClass("active")}),a.on("tap",i,c[0]),b.$on("$destroy",function(){a.off("tap",i)})}}}})}(window.ionic),function(){"use strict";angular.module("ionic.ui.scroll",[]).directive("ionScroll",["$parse","$timeout","$controller",function(a,b,c){return{restrict:"E",replace:!0,template:'<div class="scroll-view"><div class="scroll" ng-transclude></div></div>',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:'<div class="view" ng-transclude></div>'}}).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:'<div class="menu menu-{{side}}"></div>',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;
|
289
|
+
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:'<div class="slider"> <div class="slider-slides" ng-transclude> </div> </div>',link:function(a,c){if(a.$eval(a.showPager)!==!1){var d=a.$new(),e=angular.element("<ion-pager></ion-pager>");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:'<div class="slider-pager"><span class="slider-pager-page" ng-repeat="slide in numSlides() track by $index" ng-class="{active: $index == currentSlide}"><i class="icon ion-record"></i></span></div>',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:'<div class="view {{$animation}}"><div class="tabs {{$tabsStyle}} {{$tabsType}}"></div></div>',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("<ion-tab-nav"+f("title",g.title)+f("icon",g.icon)+f("icon-on",g.iconOn)+f("icon-off",g.iconOff)+f("badge",g.badge)+f("badge-style",g.badgeStyle)+"></ion-tab-nav>"),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:'<a ng-class="{active: isTabActive(), \'has-badge\':badge}" ng-click="selectTab($event)" class="tab-item"><span class="badge {{badgeStyle}}" ng-if="badge">{{badge}}</span><i class="icon {{getIconOn()}}" ng-if="getIconOn() && isTabActive()"></i><i class="icon {{getIconOff()}}" ng-if="getIconOff() && !isTabActive()"></i><span class="tab-title" ng-bind-html="title"></span></a>',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:'<div class="item item-toggle disable-pointer-events"><div ng-transclude></div><label class="toggle enable-pointer-events"><input type="checkbox" ng-model="ngModel" ng-value="ngValue" ng-change="ngChange()" ng-disabled="ngDisabled"><div class="track disable-pointer-events"><div class="handle"></div></div></label></div>',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:'<header class="bar bar-header nav-bar{{navBarClass()}}"><ion-nav-back-button ng-if="(backType || backLabel || backIcon)" type="backType" label="backLabel" icon="backIcon" class="hide" ng-class="{\'hide\': !backButtonEnabled}"></ion-nav-back-button><div class="buttons left-buttons"> <button ng-click="button.tap($event)" ng-repeat="button in leftButtons" class="button no-animation {{button.type}}" ng-bind-html="button.content"></button></div><h1 ng-bind-html="title" class="title"></h1><div class="buttons right-buttons"> <button ng-click="button.tap($event)" ng-repeat="button in rightButtons" class="button no-animation {{button.type}}" ng-bind-html="button.content"></button></div></header>',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('<h1 ng-bind-html="oldTitle" class="title"></h1>')(a),angular.element(h[0]).replaceWith(e)),f=d('<h1 class="title invisible" ng-bind-html="title"></h1>')(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<h.length;a++)h[a]()})}}}}]).directive("ionNavBarTitle",function(){return{restrict:"A",require:"^ionNavBar",link:function(a,b){a.headerBarView&&a.headerBarView.align(),b.on("$animate:close",function(){a.headerBarView&&a.headerBarView.align()})}}}).directive("ionAsyncVisible",function(){return function(a,b){ionic.requestAnimationFrame(function(){b[0].classList.remove("invisible")})}}).directive("ionView",["$ionicViewService","$rootScope","$animate",function(a,b){return{restrict:"EA",priority:1e3,scope:{leftButtons:"=",rightButtons:"=",title:"=",icon:"@",iconOn:"@",iconOff:"@",type:"@",alignTitle:"@",hideBackButton:"@",hideNavBar:"@",animation:"@"},compile:function(a){return a.addClass("pane"),a[0].removeAttribute("title"),function(a){b.$broadcast("viewState.viewEnter",{title:a.title,navDirection:a.$navDirection||a.$parent.$navDirection}),a.hideBackButton=a.$eval(a.hideBackButton),a.hideBackButton&&b.$broadcast("viewState.showBackButton",!1),b.$broadcast("viewState.showNavBar","true"!==a.hideNavBar),a.$watch("leftButtons",function(){a.$emit("viewState.leftButtonsChanged",a.leftButtons)}),a.$watch("rightButtons",function(){a.$emit("viewState.rightButtonsChanged",a.rightButtons)}),a.$watch("title",function(){a.$emit("viewState.titleUpdated",a)})}}}}]).directive("ionNavBackButton",["$ionicViewService","$rootScope",function(a){function b(b){var c=a.getBackView();return c&&c.go(),b.alreadyHandled=!0,!1}return{restrict:"E",scope:{type:"=",label:"=",icon:"="},replace:!0,template:'<button ng-click="goBack($event)" class="button back-button {{type}} {{(icon && !label) ? \'icon \' + icon : \'\'}}"><i ng-if="icon && label" class="icon {{icon}}"></i> {{label}}</button>',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("<div></div>").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")})}})}])}();
|
@@ -1,23 +1,26 @@
|
|
1
1
|
/*!
|
2
|
-
* Copyright
|
2
|
+
* Copyright 2014 Drifty Co.
|
3
3
|
* http://drifty.com/
|
4
4
|
*
|
5
|
-
* Ionic, v0.9.
|
5
|
+
* Ionic, v0.9.26
|
6
6
|
* A powerful HTML5 mobile app framework.
|
7
7
|
* http://ionicframework.com/
|
8
8
|
*
|
9
|
-
* By @maxlynch, @
|
9
|
+
* By @maxlynch, @benjsperry, @adamdbradley <3
|
10
10
|
*
|
11
11
|
* Licensed under the MIT license. Please see LICENSE for more information.
|
12
12
|
*
|
13
|
-
|
13
|
+
*/
|
14
|
+
;
|
14
15
|
|
15
|
-
// Create namespaces
|
16
|
+
// Create namespaces
|
17
|
+
//
|
16
18
|
window.ionic = {
|
17
19
|
controllers: {},
|
18
20
|
views: {},
|
19
|
-
version: '0.9.
|
20
|
-
}
|
21
|
+
version: '0.9.26'
|
22
|
+
};
|
23
|
+
;
|
21
24
|
(function(ionic) {
|
22
25
|
|
23
26
|
var bezierCoord = function (x,y) {
|
@@ -133,25 +136,102 @@ window.ionic = {
|
|
133
136
|
})(ionic);
|
134
137
|
;
|
135
138
|
(function(ionic) {
|
139
|
+
|
140
|
+
var readyCallbacks = [],
|
141
|
+
domReady = function() {
|
142
|
+
for(var x=0; x<readyCallbacks.length; x++) {
|
143
|
+
ionic.requestAnimationFrame(readyCallbacks[x]);
|
144
|
+
}
|
145
|
+
readyCallbacks = [];
|
146
|
+
document.removeEventListener('DOMContentLoaded', domReady);
|
147
|
+
};
|
148
|
+
document.addEventListener('DOMContentLoaded', domReady);
|
149
|
+
|
150
|
+
// From the man himself, Mr. Paul Irish.
|
151
|
+
// The requestAnimationFrame polyfill
|
152
|
+
// Put it on window just to preserve its context
|
153
|
+
// without having to use .call
|
154
|
+
window._rAF = (function(){
|
155
|
+
return window.requestAnimationFrame ||
|
156
|
+
window.webkitRequestAnimationFrame ||
|
157
|
+
window.mozRequestAnimationFrame ||
|
158
|
+
function( callback ){
|
159
|
+
window.setTimeout(callback, 16);
|
160
|
+
};
|
161
|
+
})();
|
162
|
+
|
136
163
|
ionic.DomUtil = {
|
164
|
+
//Call with proper context
|
165
|
+
requestAnimationFrame: function(cb) {
|
166
|
+
window._rAF(cb);
|
167
|
+
},
|
168
|
+
|
169
|
+
/*
|
170
|
+
* When given a callback, if that callback is called 100 times between
|
171
|
+
* animation frames, Throttle will make it only call the last of 100tha call
|
172
|
+
*
|
173
|
+
* It returns a function, which will then call the passed in callback. The
|
174
|
+
* passed in callback will receive the context the returned function is called with.
|
175
|
+
*
|
176
|
+
* @example
|
177
|
+
* this.setTranslateX = ionic.animationFrameThrottle(function(x) {
|
178
|
+
* this.el.style[ionic.CSS.TRANSFORM] = 'translate3d(' + x + 'px, 0, 0)';
|
179
|
+
* })
|
180
|
+
*/
|
181
|
+
animationFrameThrottle: function(cb) {
|
182
|
+
var args, isQueued, context;
|
183
|
+
return function() {
|
184
|
+
args = arguments;
|
185
|
+
context = this;
|
186
|
+
if (!isQueued) {
|
187
|
+
isQueued = true;
|
188
|
+
ionic.requestAnimationFrame(function() {
|
189
|
+
cb.apply(context, args);
|
190
|
+
isQueued = false;
|
191
|
+
});
|
192
|
+
}
|
193
|
+
};
|
194
|
+
},
|
195
|
+
|
196
|
+
/*
|
197
|
+
* Find an element's offset, then add it to the offset of the parent
|
198
|
+
* until we are at the direct child of parentEl
|
199
|
+
* use-case: find scroll offset of any element within a scroll container
|
200
|
+
*/
|
201
|
+
getPositionInParent: function(el) {
|
202
|
+
return {
|
203
|
+
left: el.offsetLeft,
|
204
|
+
top: el.offsetTop
|
205
|
+
};
|
206
|
+
},
|
207
|
+
|
208
|
+
ready: function(cb) {
|
209
|
+
if(document.readyState === "complete") {
|
210
|
+
ionic.requestAnimationFrame(cb);
|
211
|
+
} else {
|
212
|
+
readyCallbacks.push(cb);
|
213
|
+
}
|
214
|
+
},
|
215
|
+
|
137
216
|
getTextBounds: function(textNode) {
|
138
217
|
if(document.createRange) {
|
139
218
|
var range = document.createRange();
|
140
219
|
range.selectNodeContents(textNode);
|
141
220
|
if(range.getBoundingClientRect) {
|
142
221
|
var rect = range.getBoundingClientRect();
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
222
|
+
if(rect) {
|
223
|
+
var sx = window.scrollX;
|
224
|
+
var sy = window.scrollY;
|
225
|
+
|
226
|
+
return {
|
227
|
+
top: rect.top + sy,
|
228
|
+
left: rect.left + sx,
|
229
|
+
right: rect.left + sx + rect.width,
|
230
|
+
bottom: rect.top + sy + rect.height,
|
231
|
+
width: rect.width,
|
232
|
+
height: rect.height
|
233
|
+
};
|
234
|
+
}
|
155
235
|
}
|
156
236
|
}
|
157
237
|
return null;
|
@@ -199,8 +279,18 @@ window.ionic = {
|
|
199
279
|
e = e.parentNode;
|
200
280
|
}
|
201
281
|
return null;
|
282
|
+
},
|
283
|
+
|
284
|
+
rectContains: function(x, y, x1, y1, x2, y2) {
|
285
|
+
if(x < x1 || x > x2) return false;
|
286
|
+
if(y < y1 || y > y2) return false;
|
287
|
+
return true;
|
202
288
|
}
|
203
289
|
};
|
290
|
+
|
291
|
+
//Shortcuts
|
292
|
+
ionic.requestAnimationFrame = ionic.DomUtil.requestAnimationFrame;
|
293
|
+
ionic.animationFrameThrottle = ionic.DomUtil.animationFrameThrottle;
|
204
294
|
})(window.ionic);
|
205
295
|
;
|
206
296
|
/**
|
@@ -208,7 +298,7 @@ window.ionic = {
|
|
208
298
|
*
|
209
299
|
* Author: Max Lynch <max@drifty.com>
|
210
300
|
*
|
211
|
-
* Framework events handles various mobile browser events, and
|
301
|
+
* Framework events handles various mobile browser events, and
|
212
302
|
* detects special events like tap/swipe/etc. and emits them
|
213
303
|
* as custom events that can be used in an app.
|
214
304
|
*
|
@@ -229,8 +319,17 @@ window.ionic = {
|
|
229
319
|
cancelable: false,
|
230
320
|
detail: undefined
|
231
321
|
};
|
232
|
-
|
233
|
-
|
322
|
+
try {
|
323
|
+
evt = document.createEvent("CustomEvent");
|
324
|
+
evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);
|
325
|
+
} catch (error) {
|
326
|
+
// fallback for browsers that don't support createEvent('CustomEvent')
|
327
|
+
evt = document.createEvent("Event");
|
328
|
+
for (var param in params) {
|
329
|
+
evt[param] = params[param];
|
330
|
+
}
|
331
|
+
evt.initEvent(event, params.bubbles, params.cancelable);
|
332
|
+
}
|
234
333
|
return evt;
|
235
334
|
};
|
236
335
|
|
@@ -244,14 +343,18 @@ window.ionic = {
|
|
244
343
|
VIRTUALIZED_EVENTS: ['tap', 'swipe', 'swiperight', 'swipeleft', 'drag', 'hold', 'release'],
|
245
344
|
|
246
345
|
// Trigger a new event
|
247
|
-
trigger: function(eventType, data) {
|
248
|
-
var event = new CustomEvent(eventType, {
|
346
|
+
trigger: function(eventType, data, bubbles, cancelable) {
|
347
|
+
var event = new CustomEvent(eventType, {
|
348
|
+
detail: data,
|
349
|
+
bubbles: !!bubbles,
|
350
|
+
cancelable: !!cancelable
|
351
|
+
});
|
249
352
|
|
250
353
|
// Make sure to trigger the event on the given target, or dispatch it from
|
251
354
|
// the window if we don't have an event target
|
252
355
|
data && data.target && data.target.dispatchEvent(event) || window.dispatchEvent(event);
|
253
356
|
},
|
254
|
-
|
357
|
+
|
255
358
|
// Bind an event
|
256
359
|
on: function(type, callback, element) {
|
257
360
|
var e = element || window;
|
@@ -288,8 +391,8 @@ window.ionic = {
|
|
288
391
|
handlePopState: function(event) {
|
289
392
|
},
|
290
393
|
};
|
291
|
-
|
292
|
-
|
394
|
+
|
395
|
+
|
293
396
|
// Map some convenient top-level functions for event handling
|
294
397
|
ionic.on = function() { ionic.EventController.on.apply(ionic.EventController, arguments); };
|
295
398
|
ionic.off = function() { ionic.EventController.off.apply(ionic.EventController, arguments); };
|
@@ -303,7 +406,7 @@ window.ionic = {
|
|
303
406
|
* Simple gesture controllers with some common gestures that emit
|
304
407
|
* gesture events.
|
305
408
|
*
|
306
|
-
* Ported from github.com/EightMedia/
|
409
|
+
* Ported from github.com/EightMedia/hammer.js Gestures - thanks!
|
307
410
|
*/
|
308
411
|
(function(ionic) {
|
309
412
|
|
@@ -323,23 +426,11 @@ window.ionic = {
|
|
323
426
|
|
324
427
|
// default settings
|
325
428
|
ionic.Gestures.defaults = {
|
326
|
-
// add
|
327
|
-
// its native behavior. this doesnt prevent the scrolling,
|
328
|
-
// the contextmenu, tap highlighting etc
|
429
|
+
// add css to the element to prevent the browser from doing
|
430
|
+
// its native behavior. this doesnt prevent the scrolling,
|
431
|
+
// but cancels the contextmenu, tap highlighting etc
|
329
432
|
// set to false to disable this
|
330
|
-
stop_browser_behavior:
|
331
|
-
// this also triggers onselectstart=false for IE
|
332
|
-
userSelect: 'none',
|
333
|
-
// this makes the element blocking in IE10 >, you could experiment with the value
|
334
|
-
// see for more options this issue; https://github.com/EightMedia/hammer.js/issues/241
|
335
|
-
touchAction: 'none',
|
336
|
-
touchCallout: 'none',
|
337
|
-
contentZooming: 'none',
|
338
|
-
userDrag: 'none',
|
339
|
-
tapHighlightColor: 'rgba(0,0,0,0)'
|
340
|
-
}
|
341
|
-
|
342
|
-
// more settings are defined per gesture at gestures.js
|
433
|
+
stop_browser_behavior: 'disable-user-behavior'
|
343
434
|
};
|
344
435
|
|
345
436
|
// detect touchevents
|
@@ -411,6 +502,7 @@ window.ionic = {
|
|
411
502
|
* @param {HTMLElement} element
|
412
503
|
* @param {Object} [options={}]
|
413
504
|
* @returns {ionic.Gestures.Instance}
|
505
|
+
* @name Gesture.Instance
|
414
506
|
* @constructor
|
415
507
|
*/
|
416
508
|
ionic.Gestures.Instance = function(element, options) {
|
@@ -1004,37 +1096,16 @@ window.ionic = {
|
|
1004
1096
|
|
1005
1097
|
|
1006
1098
|
/**
|
1007
|
-
* stop browser default behavior with css
|
1099
|
+
* stop browser default behavior with css class
|
1008
1100
|
* @param {HtmlElement} element
|
1009
|
-
* @param {Object}
|
1101
|
+
* @param {Object} css_class
|
1010
1102
|
*/
|
1011
|
-
stopDefaultBrowserBehavior: function stopDefaultBrowserBehavior(element,
|
1012
|
-
|
1013
|
-
|
1014
|
-
|
1015
|
-
if(
|
1016
|
-
|
1017
|
-
}
|
1018
|
-
|
1019
|
-
// with css properties for modern browsers
|
1020
|
-
for(var i = 0; i < vendors.length; i++) {
|
1021
|
-
for(var p in css_props) {
|
1022
|
-
if(css_props.hasOwnProperty(p)) {
|
1023
|
-
prop = p;
|
1024
|
-
|
1025
|
-
// vender prefix at the property
|
1026
|
-
if(vendors[i]) {
|
1027
|
-
prop = vendors[i] + prop.substring(0, 1).toUpperCase() + prop.substring(1);
|
1028
|
-
}
|
1029
|
-
|
1030
|
-
// set the style
|
1031
|
-
element.style[prop] = css_props[p];
|
1032
|
-
}
|
1033
|
-
}
|
1034
|
-
}
|
1035
|
-
|
1036
|
-
// also the disable onselectstart
|
1037
|
-
if(css_props.userSelect == 'none') {
|
1103
|
+
stopDefaultBrowserBehavior: function stopDefaultBrowserBehavior(element, css_class) {
|
1104
|
+
// changed from making many style changes to just adding a preset classname
|
1105
|
+
// less DOM manipulations, less code, and easier to control in the CSS side of things
|
1106
|
+
// hammer.js doesn't come with CSS, but ionic does, which is why we prefer this method
|
1107
|
+
if(element && element.classList) {
|
1108
|
+
element.classList.add(css_class);
|
1038
1109
|
element.onselectstart = function() {
|
1039
1110
|
return false;
|
1040
1111
|
};
|
@@ -1731,152 +1802,359 @@ window.ionic = {
|
|
1731
1802
|
(function(ionic) {
|
1732
1803
|
|
1733
1804
|
ionic.Platform = {
|
1805
|
+
|
1806
|
+
isReady: false,
|
1807
|
+
isFullScreen: false,
|
1808
|
+
platforms: null,
|
1809
|
+
grade: null,
|
1810
|
+
ua: navigator.userAgent,
|
1811
|
+
|
1812
|
+
ready: function(cb) {
|
1813
|
+
// run through tasks to complete now that the device is ready
|
1814
|
+
if(this.isReady) {
|
1815
|
+
cb();
|
1816
|
+
} else {
|
1817
|
+
// the platform isn't ready yet, add it to this array
|
1818
|
+
// which will be called once the platform is ready
|
1819
|
+
readyCallbacks.push(cb);
|
1820
|
+
}
|
1821
|
+
},
|
1822
|
+
|
1734
1823
|
detect: function() {
|
1735
|
-
var
|
1824
|
+
var i, bodyClass = document.body.className;
|
1736
1825
|
|
1737
|
-
|
1826
|
+
ionic.Platform._checkPlatforms();
|
1738
1827
|
|
1739
|
-
|
1740
|
-
|
1828
|
+
// only change the body class if we got platform info
|
1829
|
+
for(i = 0; i < this.platforms.length; i++) {
|
1830
|
+
bodyClass += ' platform-' + this.platforms[i];
|
1831
|
+
}
|
1741
1832
|
|
1742
|
-
|
1743
|
-
document.body.classList.add('platform-' + platforms[i]);
|
1744
|
-
}
|
1745
|
-
};
|
1833
|
+
bodyClass += ' grade-' + this.grade;
|
1746
1834
|
|
1747
|
-
document.
|
1748
|
-
|
1749
|
-
});
|
1835
|
+
document.body.className = bodyClass.trim();
|
1836
|
+
},
|
1750
1837
|
|
1751
|
-
|
1838
|
+
device: function() {
|
1839
|
+
if(window.device) return window.device;
|
1840
|
+
if(this.isCordova()) console.error('device plugin required');
|
1841
|
+
return {};
|
1752
1842
|
},
|
1843
|
+
|
1753
1844
|
_checkPlatforms: function(platforms) {
|
1754
|
-
|
1755
|
-
|
1756
|
-
|
1757
|
-
if(this.
|
1758
|
-
|
1759
|
-
|
1760
|
-
|
1761
|
-
|
1762
|
-
|
1763
|
-
|
1764
|
-
|
1845
|
+
this.platforms = [];
|
1846
|
+
this.grade = 'a';
|
1847
|
+
|
1848
|
+
if(this.isCordova()) this.platforms.push('cordova');
|
1849
|
+
if(this.isIPad()) this.platforms.push('ipad');
|
1850
|
+
|
1851
|
+
var platform = this.platform();
|
1852
|
+
if(platform) {
|
1853
|
+
this.platforms.push(platform);
|
1854
|
+
|
1855
|
+
var version = this.version();
|
1856
|
+
if(version) {
|
1857
|
+
var v = version.toString();
|
1858
|
+
if(v.indexOf('.') > 0) {
|
1859
|
+
v = v.replace('.', '_');
|
1860
|
+
} else {
|
1861
|
+
v += '_0';
|
1862
|
+
}
|
1863
|
+
this.platforms.push(platform + v.split('_')[0]);
|
1864
|
+
this.platforms.push(platform + v);
|
1865
|
+
|
1866
|
+
if(this.isAndroid() && version < 4.4) {
|
1867
|
+
this.grade = (version < 4 ? 'c' : 'b');
|
1868
|
+
}
|
1869
|
+
}
|
1765
1870
|
}
|
1766
1871
|
},
|
1767
1872
|
|
1768
|
-
// Check if we are running in Cordova
|
1769
|
-
// window.device available.
|
1873
|
+
// Check if we are running in Cordova
|
1770
1874
|
isCordova: function() {
|
1771
|
-
return (window.cordova
|
1772
|
-
//&& /^file:\/{3}[^\/]/i.test(window.location.href)
|
1773
|
-
//&& /ios|iphone|ipod|ipad|android/i.test(navigator.userAgent);
|
1875
|
+
return !(!window.cordova && !window.PhoneGap && !window.phonegap);
|
1774
1876
|
},
|
1775
1877
|
isIPad: function() {
|
1776
|
-
return
|
1878
|
+
return this.ua.toLowerCase().indexOf('ipad') >= 0;
|
1777
1879
|
},
|
1778
|
-
|
1779
|
-
|
1780
|
-
return false;
|
1781
|
-
}
|
1782
|
-
return parseFloat(window.device.version) >= 7.0;
|
1880
|
+
isIOS: function() {
|
1881
|
+
return this.is('ios');
|
1783
1882
|
},
|
1784
1883
|
isAndroid: function() {
|
1785
|
-
|
1786
|
-
|
1884
|
+
return this.is('android');
|
1885
|
+
},
|
1886
|
+
|
1887
|
+
platform: function() {
|
1888
|
+
// singleton to get the platform name
|
1889
|
+
if(platformName === null) this.setPlatform(this.device().platform);
|
1890
|
+
return platformName;
|
1891
|
+
},
|
1892
|
+
|
1893
|
+
setPlatform: function(n) {
|
1894
|
+
if(typeof n != 'undefined' && n !== null && n.length) {
|
1895
|
+
platformName = n.toLowerCase();
|
1896
|
+
} else if(this.ua.indexOf('Android') > 0) {
|
1897
|
+
platformName = 'android';
|
1898
|
+
} else if(this.ua.indexOf('iPhone') > -1 || this.ua.indexOf('iPad') > -1 || this.ua.indexOf('iPod') > -1) {
|
1899
|
+
platformName = 'ios';
|
1900
|
+
} else {
|
1901
|
+
platformName = 'unknown';
|
1902
|
+
}
|
1903
|
+
},
|
1904
|
+
|
1905
|
+
version: function() {
|
1906
|
+
// singleton to get the platform version
|
1907
|
+
if(platformVersion === null) this.setVersion(this.device().version);
|
1908
|
+
return platformVersion;
|
1909
|
+
},
|
1910
|
+
|
1911
|
+
setVersion: function(v) {
|
1912
|
+
if(typeof v != 'undefined' && v !== null) {
|
1913
|
+
v = v.split('.');
|
1914
|
+
v = parseFloat(v[0] + '.' + (v.length > 1 ? v[1] : 0));
|
1915
|
+
if(!isNaN(v)) {
|
1916
|
+
platformVersion = v;
|
1917
|
+
return;
|
1918
|
+
}
|
1919
|
+
}
|
1920
|
+
|
1921
|
+
platformVersion = 0;
|
1922
|
+
|
1923
|
+
// fallback to user-agent checking
|
1924
|
+
var pName = this.platform();
|
1925
|
+
var versionMatch = {
|
1926
|
+
'android': /Android (\d+).(\d+)?/,
|
1927
|
+
'ios': /OS (\d+)_(\d+)?/
|
1928
|
+
};
|
1929
|
+
if(versionMatch[pName]) {
|
1930
|
+
v = this.ua.match( versionMatch[pName] );
|
1931
|
+
if(v.length > 2) {
|
1932
|
+
platformVersion = parseFloat( v[1] + '.' + v[2] );
|
1933
|
+
}
|
1934
|
+
}
|
1935
|
+
},
|
1936
|
+
|
1937
|
+
// Check if the platform is the one detected by cordova
|
1938
|
+
is: function(type) {
|
1939
|
+
type = type.toLowerCase();
|
1940
|
+
// check if it has an array of platforms
|
1941
|
+
if(this.platforms) {
|
1942
|
+
for(var x = 0; x < this.platforms.length; x++) {
|
1943
|
+
if(this.platforms[x] === type) return true;
|
1944
|
+
}
|
1945
|
+
}
|
1946
|
+
// exact match
|
1947
|
+
var pName = this.platform();
|
1948
|
+
if(pName) {
|
1949
|
+
return pName === type.toLowerCase();
|
1787
1950
|
}
|
1788
|
-
|
1951
|
+
|
1952
|
+
// A quick hack for to check userAgent
|
1953
|
+
return this.ua.toLowerCase().indexOf(type) >= 0;
|
1954
|
+
},
|
1955
|
+
|
1956
|
+
exitApp: function() {
|
1957
|
+
this.ready(function(){
|
1958
|
+
navigator.app && navigator.app.exitApp && navigator.app.exitApp();
|
1959
|
+
});
|
1960
|
+
},
|
1961
|
+
|
1962
|
+
showStatusBar: function(val) {
|
1963
|
+
// Only useful when run within cordova
|
1964
|
+
this.showStatusBar = val;
|
1965
|
+
this.ready(function(){
|
1966
|
+
// run this only when or if the platform (cordova) is ready
|
1967
|
+
if(ionic.Platform.showStatusBar) {
|
1968
|
+
// they do not want it to be full screen
|
1969
|
+
StatusBar.show();
|
1970
|
+
document.body.classList.remove('status-bar-hide');
|
1971
|
+
} else {
|
1972
|
+
// it should be full screen
|
1973
|
+
StatusBar.hide();
|
1974
|
+
document.body.classList.add('status-bar-hide');
|
1975
|
+
}
|
1976
|
+
});
|
1977
|
+
},
|
1978
|
+
|
1979
|
+
fullScreen: function(showFullScreen, showStatusBar) {
|
1980
|
+
// fullScreen( [showFullScreen[, showStatusBar] ] )
|
1981
|
+
// showFullScreen: default is true if no param provided
|
1982
|
+
this.isFullScreen = (showFullScreen !== false);
|
1983
|
+
|
1984
|
+
// add/remove the fullscreen classname to the body
|
1985
|
+
ionic.DomUtil.ready(function(){
|
1986
|
+
// run this only when or if the DOM is ready
|
1987
|
+
if(ionic.Platform.isFullScreen) {
|
1988
|
+
document.body.classList.add('fullscreen');
|
1989
|
+
} else {
|
1990
|
+
document.body.classList.remove('fullscreen');
|
1991
|
+
}
|
1992
|
+
});
|
1993
|
+
|
1994
|
+
// showStatusBar: default is false if no param provided
|
1995
|
+
this.showStatusBar( (showStatusBar === true) );
|
1789
1996
|
}
|
1997
|
+
|
1790
1998
|
};
|
1791
1999
|
|
1792
|
-
|
2000
|
+
var platformName = null, // just the name, like iOS or Android
|
2001
|
+
platformVersion = null, // a float of the major and minor, like 7.1
|
2002
|
+
readyCallbacks = [];
|
2003
|
+
|
2004
|
+
// setup listeners to know when the device is ready to go
|
2005
|
+
function onWindowLoad() {
|
2006
|
+
if(ionic.Platform.isCordova()) {
|
2007
|
+
// the window and scripts are fully loaded, and a cordova/phonegap
|
2008
|
+
// object exists then let's listen for the deviceready
|
2009
|
+
document.addEventListener("deviceready", onPlatformReady, false);
|
2010
|
+
} else {
|
2011
|
+
// the window and scripts are fully loaded, but the window object doesn't have the
|
2012
|
+
// cordova/phonegap object, so its just a browser, not a webview wrapped w/ cordova
|
2013
|
+
onPlatformReady();
|
2014
|
+
}
|
2015
|
+
window.removeEventListener("load", onWindowLoad, false);
|
2016
|
+
}
|
2017
|
+
window.addEventListener("load", onWindowLoad, false);
|
2018
|
+
|
2019
|
+
function onPlatformReady() {
|
2020
|
+
// the device is all set to go, init our own stuff then fire off our event
|
2021
|
+
ionic.Platform.isReady = true;
|
2022
|
+
ionic.Platform.detect();
|
2023
|
+
for(var x=0; x<readyCallbacks.length; x++) {
|
2024
|
+
// fire off all the callbacks that were added before the platform was ready
|
2025
|
+
readyCallbacks[x]();
|
2026
|
+
}
|
2027
|
+
readyCallbacks = [];
|
2028
|
+
ionic.trigger('platformready', { target: document });
|
2029
|
+
document.removeEventListener("deviceready", onPlatformReady, false);
|
2030
|
+
}
|
2031
|
+
|
1793
2032
|
})(window.ionic);
|
1794
2033
|
;
|
1795
2034
|
(function(window, document, ionic) {
|
1796
2035
|
'use strict';
|
1797
2036
|
|
1798
|
-
// From the man himself, Mr. Paul Irish.
|
1799
|
-
// The requestAnimationFrame polyfill
|
1800
|
-
window.rAF = (function(){
|
1801
|
-
return window.requestAnimationFrame ||
|
1802
|
-
window.webkitRequestAnimationFrame ||
|
1803
|
-
window.mozRequestAnimationFrame ||
|
1804
|
-
function( callback ){
|
1805
|
-
window.setTimeout(callback, 1000 / 60);
|
1806
|
-
};
|
1807
|
-
})();
|
1808
|
-
|
1809
2037
|
// Ionic CSS polyfills
|
1810
2038
|
ionic.CSS = {};
|
1811
|
-
|
2039
|
+
|
1812
2040
|
(function() {
|
1813
|
-
var d = document.createElement('div');
|
1814
2041
|
var keys = ['webkitTransform', 'transform', '-webkit-transform', 'webkit-transform',
|
1815
2042
|
'-moz-transform', 'moz-transform', 'MozTransform', 'mozTransform'];
|
1816
2043
|
|
1817
2044
|
for(var i = 0; i < keys.length; i++) {
|
1818
|
-
if(
|
2045
|
+
if(document.documentElement.style[keys[i]] !== undefined) {
|
1819
2046
|
ionic.CSS.TRANSFORM = keys[i];
|
1820
2047
|
break;
|
1821
2048
|
}
|
1822
2049
|
}
|
1823
2050
|
})();
|
1824
2051
|
|
2052
|
+
// classList polyfill for them older Androids
|
2053
|
+
// https://gist.github.com/devongovett/1381839
|
2054
|
+
if (!("classList" in document.documentElement) && Object.defineProperty && typeof HTMLElement !== 'undefined') {
|
2055
|
+
Object.defineProperty(HTMLElement.prototype, 'classList', {
|
2056
|
+
get: function() {
|
2057
|
+
var self = this;
|
2058
|
+
function update(fn) {
|
2059
|
+
return function() {
|
2060
|
+
var x, classes = self.className.split(/\s+/);
|
2061
|
+
|
2062
|
+
for(x=0; x<arguments.length; x++) {
|
2063
|
+
fn(classes, classes.indexOf(arguments[x]), arguments[x]);
|
2064
|
+
}
|
2065
|
+
|
2066
|
+
self.className = classes.join(" ");
|
2067
|
+
};
|
2068
|
+
}
|
2069
|
+
|
2070
|
+
return {
|
2071
|
+
add: update(function(classes, index, value) {
|
2072
|
+
~index || classes.push(value);
|
2073
|
+
}),
|
2074
|
+
|
2075
|
+
remove: update(function(classes, index) {
|
2076
|
+
~index && classes.splice(index, 1);
|
2077
|
+
}),
|
2078
|
+
|
2079
|
+
toggle: update(function(classes, index, value) {
|
2080
|
+
~index ? classes.splice(index, 1) : classes.push(value);
|
2081
|
+
}),
|
2082
|
+
|
2083
|
+
contains: function(value) {
|
2084
|
+
return !!~self.className.split(/\s+/).indexOf(value);
|
2085
|
+
},
|
2086
|
+
|
2087
|
+
item: function(i) {
|
2088
|
+
return self.className.split(/\s+/)[i] || null;
|
2089
|
+
}
|
2090
|
+
};
|
2091
|
+
|
2092
|
+
}
|
2093
|
+
});
|
2094
|
+
}
|
2095
|
+
|
1825
2096
|
// polyfill use to simulate native "tap"
|
1826
|
-
function
|
1827
|
-
|
1828
|
-
|
1829
|
-
|
1830
|
-
|
1831
|
-
|
1832
|
-
|
1833
|
-
|
1834
|
-
|
1835
|
-
|
1836
|
-
|
1837
|
-
|
1838
|
-
|
1839
|
-
|
1840
|
-
|
1841
|
-
|
2097
|
+
ionic.tapElement = function(target, e) {
|
2098
|
+
// simulate a normal click by running the element's click method then focus on it
|
2099
|
+
|
2100
|
+
var ele = target.control || target;
|
2101
|
+
|
2102
|
+
if(ele.disabled) return;
|
2103
|
+
|
2104
|
+
|
2105
|
+
|
2106
|
+
var c = getCoordinates(e);
|
2107
|
+
|
2108
|
+
// using initMouseEvent instead of MouseEvent for our Android friends
|
2109
|
+
var clickEvent = document.createEvent("MouseEvents");
|
2110
|
+
clickEvent.initMouseEvent('click', true, true, window,
|
2111
|
+
1, 0, 0, c.x, c.y,
|
2112
|
+
false, false, false, false, 0, null);
|
2113
|
+
|
2114
|
+
ele.dispatchEvent(clickEvent);
|
2115
|
+
|
2116
|
+
if(ele.tagName === 'INPUT' || ele.tagName === 'TEXTAREA' || ele.tagName === 'SELECT') {
|
1842
2117
|
ele.focus();
|
2118
|
+
e.preventDefault();
|
2119
|
+
} else {
|
2120
|
+
blurActive();
|
1843
2121
|
}
|
1844
|
-
e.stopPropagation();
|
1845
|
-
e.preventDefault();
|
1846
|
-
return false;
|
1847
|
-
}
|
1848
2122
|
|
1849
|
-
|
1850
|
-
// if the
|
1851
|
-
if(
|
1852
|
-
|
1853
|
-
// An internal Ionic indicator for angular directives that contain
|
1854
|
-
// elements that normally need poly behavior, but are already processed
|
1855
|
-
// (like the radio directive that has a radio button in it, but handles
|
1856
|
-
// the tap stuff itself). This is in contrast to preventDefault which will
|
1857
|
-
// mess up other operations like change events and such
|
1858
|
-
if(e.alreadyHandled) {
|
1859
|
-
return;
|
2123
|
+
// remember the coordinates of this tap so if it happens again we can ignore it
|
2124
|
+
// but only if the coordinates are not already being actively disabled
|
2125
|
+
if( !isRecentTap(e) ) {
|
2126
|
+
recordCoordinates(e);
|
1860
2127
|
}
|
1861
2128
|
|
1862
|
-
|
2129
|
+
if(target.control) {
|
2130
|
+
|
2131
|
+
return stopEvent(e);
|
2132
|
+
}
|
2133
|
+
};
|
2134
|
+
|
2135
|
+
function tapPolyfill(orgEvent) {
|
2136
|
+
// if the source event wasn't from a touch event then don't use this polyfill
|
2137
|
+
if(!orgEvent.gesture || !orgEvent.gesture.srcEvent) return;
|
1863
2138
|
|
2139
|
+
var e = orgEvent.gesture.srcEvent; // evaluate the actual source event, not the created event by gestures.js
|
1864
2140
|
var ele = e.target;
|
1865
2141
|
|
2142
|
+
if( isRecentTap(e) ) {
|
2143
|
+
// if a tap in the same area just happened, don't continue
|
2144
|
+
|
2145
|
+
return stopEvent(e);
|
2146
|
+
}
|
2147
|
+
|
1866
2148
|
while(ele) {
|
1867
|
-
if
|
1868
|
-
|
1869
|
-
|
1870
|
-
|
1871
|
-
|
1872
|
-
|
1873
|
-
|
1874
|
-
|
1875
|
-
|
1876
|
-
});
|
1877
|
-
e.stopPropagation();
|
1878
|
-
e.preventDefault();
|
1879
|
-
return false;
|
2149
|
+
// climb up the DOM looking to see if the tapped element is, or has a parent, of one of these
|
2150
|
+
if( ele.tagName === "INPUT" ||
|
2151
|
+
ele.tagName === "A" ||
|
2152
|
+
ele.tagName === "BUTTON" ||
|
2153
|
+
ele.tagName === "LABEL" ||
|
2154
|
+
ele.tagName === "TEXTAREA" ||
|
2155
|
+
ele.tagName === "SELECT" ) {
|
2156
|
+
|
2157
|
+
return ionic.tapElement(ele, e);
|
1880
2158
|
}
|
1881
2159
|
ele = ele.parentElement;
|
1882
2160
|
}
|
@@ -1884,21 +2162,125 @@ window.ionic = {
|
|
1884
2162
|
// they didn't tap one of the above elements
|
1885
2163
|
// if the currently active element is an input, and they tapped outside
|
1886
2164
|
// of the current input, then unset its focus (blur) so the keyboard goes away
|
1887
|
-
|
1888
|
-
|
1889
|
-
|
1890
|
-
|
1891
|
-
|
1892
|
-
|
2165
|
+
blurActive();
|
2166
|
+
}
|
2167
|
+
|
2168
|
+
function preventGhostClick(e) {
|
2169
|
+
if(e.target.control) {
|
2170
|
+
// this is a label that has an associated input
|
2171
|
+
// the native layer will send the actual event, so stop this one
|
2172
|
+
|
2173
|
+
return stopEvent(e);
|
2174
|
+
}
|
2175
|
+
|
2176
|
+
if( isRecentTap(e) ) {
|
2177
|
+
// a tap has already happened at these coordinates recently, ignore this event
|
2178
|
+
|
2179
|
+
return stopEvent(e);
|
2180
|
+
}
|
2181
|
+
|
2182
|
+
// remember the coordinates of this click so if a tap or click in the
|
2183
|
+
// same area quickly happened again we can ignore it
|
2184
|
+
recordCoordinates(e);
|
2185
|
+
}
|
2186
|
+
|
2187
|
+
function isRecentTap(event) {
|
2188
|
+
// loop through the tap coordinates and see if the same area has been tapped recently
|
2189
|
+
var tapId, existingCoordinates, currentCoordinates;
|
2190
|
+
|
2191
|
+
for(tapId in tapCoordinates) {
|
2192
|
+
existingCoordinates = tapCoordinates[tapId];
|
2193
|
+
if(!currentCoordinates) currentCoordinates = getCoordinates(event); // lazy load it when needed
|
2194
|
+
|
2195
|
+
if(currentCoordinates.x > existingCoordinates.x - HIT_RADIUS &&
|
2196
|
+
currentCoordinates.x < existingCoordinates.x + HIT_RADIUS &&
|
2197
|
+
currentCoordinates.y > existingCoordinates.y - HIT_RADIUS &&
|
2198
|
+
currentCoordinates.y < existingCoordinates.y + HIT_RADIUS) {
|
2199
|
+
// the current tap coordinates are in the same area as a recent tap
|
2200
|
+
return existingCoordinates;
|
2201
|
+
}
|
2202
|
+
}
|
2203
|
+
}
|
2204
|
+
|
2205
|
+
function recordCoordinates(event) {
|
2206
|
+
var c = getCoordinates(event);
|
2207
|
+
if(c.x && c.y) {
|
2208
|
+
var tapId = Date.now();
|
2209
|
+
|
2210
|
+
// only record tap coordinates if we have valid ones
|
2211
|
+
tapCoordinates[tapId] = { x: c.x, y: c.y, id: tapId };
|
2212
|
+
|
2213
|
+
setTimeout(function() {
|
2214
|
+
// delete the tap coordinates after X milliseconds, basically allowing
|
2215
|
+
// it so a tap can happen again in the same area in the future
|
2216
|
+
delete tapCoordinates[tapId];
|
2217
|
+
}, CLICK_PREVENT_DURATION);
|
2218
|
+
}
|
2219
|
+
}
|
2220
|
+
|
2221
|
+
function getCoordinates(event) {
|
2222
|
+
// This method can get coordinates for both a mouse click
|
2223
|
+
// or a touch depending on the given event
|
2224
|
+
var gesture = (event.gesture ? event.gesture : event);
|
2225
|
+
|
2226
|
+
if(gesture) {
|
2227
|
+
var touches = gesture.touches && gesture.touches.length ? gesture.touches : [gesture];
|
2228
|
+
var e = (gesture.changedTouches && gesture.changedTouches[0]) ||
|
2229
|
+
(gesture.originalEvent && gesture.originalEvent.changedTouches &&
|
2230
|
+
gesture.originalEvent.changedTouches[0]) ||
|
2231
|
+
touches[0].originalEvent || touches[0];
|
2232
|
+
|
2233
|
+
if(e) return { x: e.clientX, y: e.clientY };
|
2234
|
+
}
|
2235
|
+
return { x:0, y:0 };
|
2236
|
+
}
|
2237
|
+
|
2238
|
+
function removeClickPrevent(e) {
|
2239
|
+
setTimeout(function(){
|
2240
|
+
var tap = isRecentTap(e);
|
2241
|
+
if(tap) delete tapCoordinates[tap.id];
|
2242
|
+
}, REMOVE_PREVENT_DELAY);
|
2243
|
+
}
|
2244
|
+
|
2245
|
+
function stopEvent(e){
|
2246
|
+
e.stopPropagation();
|
2247
|
+
e.preventDefault();
|
2248
|
+
return false;
|
2249
|
+
}
|
2250
|
+
|
2251
|
+
function blurActive() {
|
2252
|
+
var ele = document.activeElement;
|
2253
|
+
if(ele && (ele.tagName === "INPUT" ||
|
2254
|
+
ele.tagName === "TEXTAREA" ||
|
2255
|
+
ele.tagName === "SELECT")) {
|
2256
|
+
// using a timeout to prevent funky scrolling while a keyboard hides
|
2257
|
+
setTimeout(function(){
|
2258
|
+
ele.blur();
|
2259
|
+
}, 400);
|
1893
2260
|
}
|
1894
2261
|
}
|
1895
2262
|
|
2263
|
+
var tapCoordinates = {}; // used to remember coordinates to ignore if they happen again quickly
|
2264
|
+
var CLICK_PREVENT_DURATION = 1500; // max milliseconds ghostclicks in the same area should be prevented
|
2265
|
+
var REMOVE_PREVENT_DELAY = 375; // delay after a touchend/mouseup before removing the ghostclick prevent
|
2266
|
+
var HIT_RADIUS = 15;
|
2267
|
+
|
2268
|
+
// set global click handler and check if the event should stop or not
|
2269
|
+
document.addEventListener('click', preventGhostClick, true);
|
2270
|
+
|
1896
2271
|
// global tap event listener polyfill for HTML elements that were "tapped" by the user
|
1897
|
-
ionic.on("tap", tapPolyfill,
|
2272
|
+
ionic.on("tap", tapPolyfill, document);
|
2273
|
+
|
2274
|
+
// listeners used to remove ghostclick prevention
|
2275
|
+
document.addEventListener('touchend', removeClickPrevent, false);
|
2276
|
+
document.addEventListener('mouseup', removeClickPrevent, false);
|
1898
2277
|
|
1899
2278
|
})(this, document, ionic);
|
1900
2279
|
;
|
1901
2280
|
(function(ionic) {
|
2281
|
+
|
2282
|
+
/* for nextUid() function below */
|
2283
|
+
var uid = ['0','0','0'];
|
1902
2284
|
|
1903
2285
|
/**
|
1904
2286
|
* Various utilities used throughout Ionic
|
@@ -2039,6 +2421,36 @@ window.ionic = {
|
|
2039
2421
|
}
|
2040
2422
|
}
|
2041
2423
|
return obj;
|
2424
|
+
},
|
2425
|
+
|
2426
|
+
/**
|
2427
|
+
* A consistent way of creating unique IDs in angular. The ID is a sequence of alpha numeric
|
2428
|
+
* characters such as '012ABC'. The reason why we are not using simply a number counter is that
|
2429
|
+
* the number string gets longer over time, and it can also overflow, where as the nextId
|
2430
|
+
* will grow much slower, it is a string, and it will never overflow.
|
2431
|
+
*
|
2432
|
+
* @returns an unique alpha-numeric string
|
2433
|
+
*/
|
2434
|
+
nextUid: function() {
|
2435
|
+
var index = uid.length;
|
2436
|
+
var digit;
|
2437
|
+
|
2438
|
+
while(index) {
|
2439
|
+
index--;
|
2440
|
+
digit = uid[index].charCodeAt(0);
|
2441
|
+
if (digit == 57 /*'9'*/) {
|
2442
|
+
uid[index] = 'A';
|
2443
|
+
return uid.join('');
|
2444
|
+
}
|
2445
|
+
if (digit == 90 /*'Z'*/) {
|
2446
|
+
uid[index] = '0';
|
2447
|
+
} else {
|
2448
|
+
uid[index] = String.fromCharCode(digit + 1);
|
2449
|
+
return uid.join('');
|
2450
|
+
}
|
2451
|
+
}
|
2452
|
+
uid.unshift('0');
|
2453
|
+
return uid.join('');
|
2042
2454
|
}
|
2043
2455
|
};
|
2044
2456
|
|
@@ -2049,6 +2461,58 @@ window.ionic = {
|
|
2049
2461
|
ionic.proxy = ionic.Utils.proxy;
|
2050
2462
|
ionic.debounce = ionic.Utils.debounce;
|
2051
2463
|
|
2464
|
+
})(window.ionic);
|
2465
|
+
;
|
2466
|
+
(function(ionic) {
|
2467
|
+
|
2468
|
+
ionic.Platform.ready(function() {
|
2469
|
+
if (ionic.Platform.is('android')) {
|
2470
|
+
androidKeyboardFix();
|
2471
|
+
}
|
2472
|
+
});
|
2473
|
+
|
2474
|
+
function androidKeyboardFix() {
|
2475
|
+
var rememberedDeviceWidth = window.innerWidth;
|
2476
|
+
var rememberedDeviceHeight = window.innerHeight;
|
2477
|
+
var keyboardHeight;
|
2478
|
+
|
2479
|
+
window.addEventListener('resize', resize);
|
2480
|
+
|
2481
|
+
function resize() {
|
2482
|
+
|
2483
|
+
//If the width of the window changes, we have an orientation change
|
2484
|
+
if (rememberedDeviceWidth !== window.innerWidth) {
|
2485
|
+
rememberedDeviceWidth = window.innerWidth;
|
2486
|
+
rememberedDeviceHeight = window.innerHeight;
|
2487
|
+
|
2488
|
+
|
2489
|
+
//If the height changes, and it's less than before, we have a keyboard open
|
2490
|
+
} else if (rememberedDeviceHeight !== window.innerHeight &&
|
2491
|
+
window.innerHeight < rememberedDeviceHeight) {
|
2492
|
+
document.body.classList.add('hide-footer');
|
2493
|
+
//Wait for next frame so document.activeElement is set
|
2494
|
+
ionic.requestAnimationFrame(handleKeyboardChange);
|
2495
|
+
} else {
|
2496
|
+
//Otherwise we have a keyboard close or a *really* weird resize
|
2497
|
+
document.body.classList.remove('hide-footer');
|
2498
|
+
}
|
2499
|
+
|
2500
|
+
function handleKeyboardChange() {
|
2501
|
+
//keyboard opens
|
2502
|
+
keyboardHeight = rememberedDeviceHeight - window.innerHeight;
|
2503
|
+
var activeEl = document.activeElement;
|
2504
|
+
if (activeEl) {
|
2505
|
+
//This event is caught by the nearest parent scrollView
|
2506
|
+
//of the activeElement
|
2507
|
+
ionic.trigger('scrollChildIntoView', {
|
2508
|
+
target: activeEl
|
2509
|
+
}, true);
|
2510
|
+
}
|
2511
|
+
|
2512
|
+
}
|
2513
|
+
}
|
2514
|
+
}
|
2515
|
+
|
2052
2516
|
})(window.ionic);
|
2053
2517
|
;
|
2054
2518
|
(function(ionic) {
|
@@ -2065,6 +2529,7 @@ window.ionic = {
|
|
2065
2529
|
|
2066
2530
|
})(window.ionic);
|
2067
2531
|
;
|
2532
|
+
var IS_INPUT_LIKE_REGEX = /input|textarea|select/i;
|
2068
2533
|
/*
|
2069
2534
|
* Scroller
|
2070
2535
|
* http://github.com/zynga/scroller
|
@@ -2218,7 +2683,7 @@ window.ionic = {
|
|
2218
2683
|
* @param duration {Integer} Milliseconds to run the animation
|
2219
2684
|
* @param easingMethod {Function} Pointer to easing function
|
2220
2685
|
* Signature of the method should be `function(percent) { return modifiedValue; }`
|
2221
|
-
* @param root {Element
|
2686
|
+
* @param root {Element} Render root, when available. Used for internal
|
2222
2687
|
* usage of requestAnimationFrame.
|
2223
2688
|
* @return {Integer} Identifier of animation. Can be used to stop it any time.
|
2224
2689
|
*/
|
@@ -2345,9 +2810,13 @@ var Scroller;
|
|
2345
2810
|
};
|
2346
2811
|
|
2347
2812
|
|
2348
|
-
|
2349
|
-
|
2350
|
-
|
2813
|
+
/**
|
2814
|
+
* ionic.views.Scroll
|
2815
|
+
* A powerful scroll view with support for bouncing, pull to refresh, and paging.
|
2816
|
+
* @param {Object} options options for the scroll view
|
2817
|
+
* @class A scroll view system
|
2818
|
+
* @memberof ionic.views
|
2819
|
+
*/
|
2351
2820
|
ionic.views.Scroll = ionic.views.View.inherit({
|
2352
2821
|
initialize: function(options) {
|
2353
2822
|
var self = this;
|
@@ -2355,6 +2824,14 @@ ionic.views.Scroll = ionic.views.View.inherit({
|
|
2355
2824
|
this.__container = options.el;
|
2356
2825
|
this.__content = options.el.firstElementChild;
|
2357
2826
|
|
2827
|
+
//Remove any scrollTop attached to these elements; they are virtual scroll now
|
2828
|
+
//This also stops on-load-scroll-to-window.location.hash that the browser does
|
2829
|
+
setTimeout(function() {
|
2830
|
+
if (self.__container && self.__content) {
|
2831
|
+
self.__container.scrollTop = 0;
|
2832
|
+
self.__content.scrollTop = 0;
|
2833
|
+
}
|
2834
|
+
});
|
2358
2835
|
|
2359
2836
|
this.options = {
|
2360
2837
|
|
@@ -2366,6 +2843,12 @@ ionic.views.Scroll = ionic.views.View.inherit({
|
|
2366
2843
|
scrollingY: true,
|
2367
2844
|
scrollbarY: true,
|
2368
2845
|
|
2846
|
+
startX: 0,
|
2847
|
+
startY: 0,
|
2848
|
+
|
2849
|
+
/** The amount to dampen mousewheel events */
|
2850
|
+
wheelDampen: 6,
|
2851
|
+
|
2369
2852
|
/** The minimum size the scrollbars scale to while scrolling */
|
2370
2853
|
minScrollbarSizeX: 5,
|
2371
2854
|
minScrollbarSizeY: 5,
|
@@ -2445,11 +2928,18 @@ ionic.views.Scroll = ionic.views.View.inherit({
|
|
2445
2928
|
});
|
2446
2929
|
};
|
2447
2930
|
|
2931
|
+
this.__scrollLeft = this.options.startX;
|
2932
|
+
this.__scrollTop = this.options.startY;
|
2933
|
+
|
2448
2934
|
// Get the render update function, initialize event handlers,
|
2449
2935
|
// and calculate the size of the scroll container
|
2450
2936
|
this.__callback = this.getRenderFn();
|
2451
2937
|
this.__initEventHandlers();
|
2452
2938
|
this.__createScrollbars();
|
2939
|
+
|
2940
|
+
},
|
2941
|
+
|
2942
|
+
run: function() {
|
2453
2943
|
this.resize();
|
2454
2944
|
|
2455
2945
|
// Fade them out
|
@@ -2464,36 +2954,36 @@ ionic.views.Scroll = ionic.views.View.inherit({
|
|
2464
2954
|
---------------------------------------------------------------------------
|
2465
2955
|
*/
|
2466
2956
|
|
2467
|
-
/**
|
2957
|
+
/** Whether only a single finger is used in touch handling */
|
2468
2958
|
__isSingleTouch: false,
|
2469
2959
|
|
2470
|
-
/**
|
2960
|
+
/** Whether a touch event sequence is in progress */
|
2471
2961
|
__isTracking: false,
|
2472
2962
|
|
2473
|
-
/**
|
2963
|
+
/** Whether a deceleration animation went to completion. */
|
2474
2964
|
__didDecelerationComplete: false,
|
2475
2965
|
|
2476
2966
|
/**
|
2477
|
-
*
|
2967
|
+
* Whether a gesture zoom/rotate event is in progress. Activates when
|
2478
2968
|
* a gesturestart event happens. This has higher priority than dragging.
|
2479
2969
|
*/
|
2480
2970
|
__isGesturing: false,
|
2481
2971
|
|
2482
2972
|
/**
|
2483
|
-
*
|
2973
|
+
* Whether the user has moved by such a distance that we have enabled
|
2484
2974
|
* dragging mode. Hint: It's only enabled after some pixels of movement to
|
2485
2975
|
* not interrupt with clicks etc.
|
2486
2976
|
*/
|
2487
2977
|
__isDragging: false,
|
2488
2978
|
|
2489
2979
|
/**
|
2490
|
-
*
|
2980
|
+
* Not touching and dragging anymore, and smoothly animating the
|
2491
2981
|
* touch sequence using deceleration.
|
2492
2982
|
*/
|
2493
2983
|
__isDecelerating: false,
|
2494
2984
|
|
2495
2985
|
/**
|
2496
|
-
*
|
2986
|
+
* Smoothly animating the currently configured change
|
2497
2987
|
*/
|
2498
2988
|
__isAnimating: false,
|
2499
2989
|
|
@@ -2505,67 +2995,67 @@ ionic.views.Scroll = ionic.views.View.inherit({
|
|
2505
2995
|
---------------------------------------------------------------------------
|
2506
2996
|
*/
|
2507
2997
|
|
2508
|
-
/**
|
2998
|
+
/** Available outer left position (from document perspective) */
|
2509
2999
|
__clientLeft: 0,
|
2510
3000
|
|
2511
|
-
/**
|
3001
|
+
/** Available outer top position (from document perspective) */
|
2512
3002
|
__clientTop: 0,
|
2513
3003
|
|
2514
|
-
/**
|
3004
|
+
/** Available outer width */
|
2515
3005
|
__clientWidth: 0,
|
2516
3006
|
|
2517
|
-
/**
|
3007
|
+
/** Available outer height */
|
2518
3008
|
__clientHeight: 0,
|
2519
3009
|
|
2520
|
-
/**
|
3010
|
+
/** Outer width of content */
|
2521
3011
|
__contentWidth: 0,
|
2522
3012
|
|
2523
|
-
/**
|
3013
|
+
/** Outer height of content */
|
2524
3014
|
__contentHeight: 0,
|
2525
3015
|
|
2526
|
-
/**
|
3016
|
+
/** Snapping width for content */
|
2527
3017
|
__snapWidth: 100,
|
2528
3018
|
|
2529
|
-
/**
|
3019
|
+
/** Snapping height for content */
|
2530
3020
|
__snapHeight: 100,
|
2531
3021
|
|
2532
|
-
/**
|
3022
|
+
/** Height to assign to refresh area */
|
2533
3023
|
__refreshHeight: null,
|
2534
3024
|
|
2535
|
-
/**
|
3025
|
+
/** Whether the refresh process is enabled when the event is released now */
|
2536
3026
|
__refreshActive: false,
|
2537
3027
|
|
2538
|
-
/**
|
3028
|
+
/** Callback to execute on activation. This is for signalling the user about a refresh is about to happen when he release */
|
2539
3029
|
__refreshActivate: null,
|
2540
3030
|
|
2541
|
-
/**
|
3031
|
+
/** Callback to execute on deactivation. This is for signalling the user about the refresh being cancelled */
|
2542
3032
|
__refreshDeactivate: null,
|
2543
3033
|
|
2544
|
-
/**
|
3034
|
+
/** Callback to execute to start the actual refresh. Call {@link #refreshFinish} when done */
|
2545
3035
|
__refreshStart: null,
|
2546
3036
|
|
2547
|
-
/**
|
3037
|
+
/** Zoom level */
|
2548
3038
|
__zoomLevel: 1,
|
2549
3039
|
|
2550
|
-
/**
|
3040
|
+
/** Scroll position on x-axis */
|
2551
3041
|
__scrollLeft: 0,
|
2552
3042
|
|
2553
|
-
/**
|
3043
|
+
/** Scroll position on y-axis */
|
2554
3044
|
__scrollTop: 0,
|
2555
3045
|
|
2556
|
-
/**
|
3046
|
+
/** Maximum allowed scroll position on x-axis */
|
2557
3047
|
__maxScrollLeft: 0,
|
2558
3048
|
|
2559
|
-
/**
|
3049
|
+
/** Maximum allowed scroll position on y-axis */
|
2560
3050
|
__maxScrollTop: 0,
|
2561
3051
|
|
2562
|
-
/*
|
3052
|
+
/* Scheduled left position (final position when animating) */
|
2563
3053
|
__scheduledLeft: 0,
|
2564
3054
|
|
2565
|
-
/*
|
3055
|
+
/* Scheduled top position (final position when animating) */
|
2566
3056
|
__scheduledTop: 0,
|
2567
3057
|
|
2568
|
-
/*
|
3058
|
+
/* Scheduled zoom level (final scale when animating) */
|
2569
3059
|
__scheduledZoom: 0,
|
2570
3060
|
|
2571
3061
|
|
@@ -2576,16 +3066,16 @@ ionic.views.Scroll = ionic.views.View.inherit({
|
|
2576
3066
|
---------------------------------------------------------------------------
|
2577
3067
|
*/
|
2578
3068
|
|
2579
|
-
/**
|
3069
|
+
/** Left position of finger at start */
|
2580
3070
|
__lastTouchLeft: null,
|
2581
3071
|
|
2582
|
-
/**
|
3072
|
+
/** Top position of finger at start */
|
2583
3073
|
__lastTouchTop: null,
|
2584
3074
|
|
2585
|
-
/**
|
3075
|
+
/** Timestamp of last move of finger. Used to limit tracking range for deceleration speed. */
|
2586
3076
|
__lastTouchMove: null,
|
2587
3077
|
|
2588
|
-
/**
|
3078
|
+
/** List of positions, uses three indexes for each state: left, top, timestamp */
|
2589
3079
|
__positions: null,
|
2590
3080
|
|
2591
3081
|
|
@@ -2596,37 +3086,37 @@ ionic.views.Scroll = ionic.views.View.inherit({
|
|
2596
3086
|
---------------------------------------------------------------------------
|
2597
3087
|
*/
|
2598
3088
|
|
2599
|
-
/**
|
3089
|
+
/** Minimum left scroll position during deceleration */
|
2600
3090
|
__minDecelerationScrollLeft: null,
|
2601
3091
|
|
2602
|
-
/**
|
3092
|
+
/** Minimum top scroll position during deceleration */
|
2603
3093
|
__minDecelerationScrollTop: null,
|
2604
3094
|
|
2605
|
-
/**
|
3095
|
+
/** Maximum left scroll position during deceleration */
|
2606
3096
|
__maxDecelerationScrollLeft: null,
|
2607
3097
|
|
2608
|
-
/**
|
3098
|
+
/** Maximum top scroll position during deceleration */
|
2609
3099
|
__maxDecelerationScrollTop: null,
|
2610
3100
|
|
2611
|
-
/**
|
3101
|
+
/** Current factor to modify horizontal scroll position with on every step */
|
2612
3102
|
__decelerationVelocityX: null,
|
2613
3103
|
|
2614
|
-
/**
|
3104
|
+
/** Current factor to modify vertical scroll position with on every step */
|
2615
3105
|
__decelerationVelocityY: null,
|
2616
3106
|
|
2617
3107
|
|
2618
|
-
/**
|
3108
|
+
/** the browser-specific property to use for transforms */
|
2619
3109
|
__transformProperty: null,
|
2620
3110
|
__perspectiveProperty: null,
|
2621
3111
|
|
2622
|
-
/**
|
3112
|
+
/** scrollbar indicators */
|
2623
3113
|
__indicatorX: null,
|
2624
3114
|
__indicatorY: null,
|
2625
3115
|
|
2626
3116
|
/** Timeout for scrollbar fading */
|
2627
3117
|
__scrollbarFadeTimeout: null,
|
2628
3118
|
|
2629
|
-
/**
|
3119
|
+
/** whether we've tried to wait for size already */
|
2630
3120
|
__didWaitForSize: null,
|
2631
3121
|
__sizerTimeout: null,
|
2632
3122
|
|
@@ -2635,15 +3125,42 @@ ionic.views.Scroll = ionic.views.View.inherit({
|
|
2635
3125
|
|
2636
3126
|
// Event Handler
|
2637
3127
|
var container = this.__container;
|
2638
|
-
|
3128
|
+
|
3129
|
+
//Broadcasted when keyboard is shown on some platforms.
|
3130
|
+
//See js/utils/keyboard.js
|
3131
|
+
container.addEventListener('scrollChildIntoView', function(e) {
|
3132
|
+
var deviceHeight = window.innerHeight;
|
3133
|
+
var element = e.target;
|
3134
|
+
var elementHeight = e.target.offsetHeight;
|
3135
|
+
|
3136
|
+
//getBoundingClientRect() will actually give us position relative to the viewport
|
3137
|
+
var elementDeviceTop = element.getBoundingClientRect().top;
|
3138
|
+
var elementScrollTop = ionic.DomUtil.getPositionInParent(element, container).top;
|
3139
|
+
|
3140
|
+
//If the element is positioned under the keyboard...
|
3141
|
+
if (elementDeviceTop + elementHeight > deviceHeight) {
|
3142
|
+
//Put element in middle of visible screen
|
3143
|
+
self.scrollTo(0, elementScrollTop + elementHeight - (deviceHeight * 0.5), true);
|
3144
|
+
}
|
3145
|
+
|
3146
|
+
//Only the first scrollView parent of the element that broadcasted this event
|
3147
|
+
//(the active element that needs to be shown) should receive this event
|
3148
|
+
e.stopPropagation();
|
3149
|
+
});
|
3150
|
+
|
3151
|
+
function shouldIgnorePress(e) {
|
3152
|
+
// Don't react if initial down happens on a form element
|
3153
|
+
return e.target.tagName.match(IS_INPUT_LIKE_REGEX) ||
|
3154
|
+
e.target.isContentEditable;
|
3155
|
+
}
|
3156
|
+
|
3157
|
+
|
2639
3158
|
if ('ontouchstart' in window) {
|
2640
|
-
|
3159
|
+
|
2641
3160
|
container.addEventListener("touchstart", function(e) {
|
2642
|
-
|
2643
|
-
if (e.target.tagName.match(/input|textarea|select/i)) {
|
3161
|
+
if (e.defaultPrevented || shouldIgnorePress(e)) {
|
2644
3162
|
return;
|
2645
3163
|
}
|
2646
|
-
|
2647
3164
|
self.doTouchStart(e.touches, e.timeStamp);
|
2648
3165
|
e.preventDefault();
|
2649
3166
|
}, false);
|
@@ -2658,22 +3175,21 @@ ionic.views.Scroll = ionic.views.View.inherit({
|
|
2658
3175
|
document.addEventListener("touchend", function(e) {
|
2659
3176
|
self.doTouchEnd(e.timeStamp);
|
2660
3177
|
}, false);
|
2661
|
-
|
3178
|
+
|
2662
3179
|
} else {
|
2663
|
-
|
3180
|
+
|
2664
3181
|
var mousedown = false;
|
2665
3182
|
|
2666
3183
|
container.addEventListener("mousedown", function(e) {
|
2667
|
-
|
2668
|
-
if (e.target.tagName.match(/input|textarea|select/i)) {
|
3184
|
+
if (e.defaultPrevented || shouldIgnorePress(e)) {
|
2669
3185
|
return;
|
2670
3186
|
}
|
2671
|
-
|
2672
3187
|
self.doTouchStart([{
|
2673
3188
|
pageX: e.pageX,
|
2674
3189
|
pageY: e.pageY
|
2675
3190
|
}], e.timeStamp);
|
2676
3191
|
|
3192
|
+
e.preventDefault();
|
2677
3193
|
mousedown = true;
|
2678
3194
|
}, false);
|
2679
3195
|
|
@@ -2699,7 +3215,10 @@ ionic.views.Scroll = ionic.views.View.inherit({
|
|
2699
3215
|
|
2700
3216
|
mousedown = false;
|
2701
3217
|
}, false);
|
2702
|
-
|
3218
|
+
|
3219
|
+
document.addEventListener("mousewheel", function(e) {
|
3220
|
+
self.scrollBy(e.wheelDeltaX/self.options.wheelDampen, -e.wheelDeltaY/self.options.wheelDampen);
|
3221
|
+
});
|
2703
3222
|
}
|
2704
3223
|
},
|
2705
3224
|
|
@@ -2914,7 +3433,8 @@ ionic.views.Scroll = ionic.views.View.inherit({
|
|
2914
3433
|
this.__container.clientWidth,
|
2915
3434
|
this.__container.clientHeight,
|
2916
3435
|
Math.max(this.__content.scrollWidth, this.__content.offsetWidth),
|
2917
|
-
|
3436
|
+
Math.max(this.__content.scrollHeight, this.__content.offsetHeight)
|
3437
|
+
);
|
2918
3438
|
},
|
2919
3439
|
/*
|
2920
3440
|
---------------------------------------------------------------------------
|
@@ -2937,14 +3457,14 @@ ionic.views.Scroll = ionic.views.View.inherit({
|
|
2937
3457
|
} else if (typeof navigator.cpuClass === 'string') {
|
2938
3458
|
engine = 'trident';
|
2939
3459
|
}
|
2940
|
-
|
3460
|
+
|
2941
3461
|
var vendorPrefix = {
|
2942
3462
|
trident: 'ms',
|
2943
3463
|
gecko: 'Moz',
|
2944
3464
|
webkit: 'Webkit',
|
2945
3465
|
presto: 'O'
|
2946
3466
|
}[engine];
|
2947
|
-
|
3467
|
+
|
2948
3468
|
var helperElem = document.createElement("div");
|
2949
3469
|
var undef;
|
2950
3470
|
|
@@ -2955,25 +3475,25 @@ ionic.views.Scroll = ionic.views.View.inherit({
|
|
2955
3475
|
self.__perspectiveProperty = transformProperty;
|
2956
3476
|
self.__transformProperty = transformProperty;
|
2957
3477
|
self.__transformOriginProperty = transformOriginProperty;
|
2958
|
-
|
3478
|
+
|
2959
3479
|
if (helperElem.style[perspectiveProperty] !== undef) {
|
2960
|
-
|
3480
|
+
|
2961
3481
|
return function(left, top, zoom) {
|
2962
3482
|
content.style[transformProperty] = 'translate3d(' + (-left) + 'px,' + (-top) + 'px,0)';
|
2963
3483
|
self.__repositionScrollbars();
|
2964
3484
|
self.triggerScrollEvent();
|
2965
|
-
};
|
2966
|
-
|
3485
|
+
};
|
3486
|
+
|
2967
3487
|
} else if (helperElem.style[transformProperty] !== undef) {
|
2968
|
-
|
3488
|
+
|
2969
3489
|
return function(left, top, zoom) {
|
2970
3490
|
content.style[transformProperty] = 'translate(' + (-left) + 'px,' + (-top) + 'px)';
|
2971
3491
|
self.__repositionScrollbars();
|
2972
3492
|
self.triggerScrollEvent();
|
2973
3493
|
};
|
2974
|
-
|
3494
|
+
|
2975
3495
|
} else {
|
2976
|
-
|
3496
|
+
|
2977
3497
|
return function(left, top, zoom) {
|
2978
3498
|
content.style.marginLeft = left ? (-left/zoom) + 'px' : '';
|
2979
3499
|
content.style.marginTop = top ? (-top/zoom) + 'px' : '';
|
@@ -2981,7 +3501,7 @@ ionic.views.Scroll = ionic.views.View.inherit({
|
|
2981
3501
|
self.__repositionScrollbars();
|
2982
3502
|
self.triggerScrollEvent();
|
2983
3503
|
};
|
2984
|
-
|
3504
|
+
|
2985
3505
|
}
|
2986
3506
|
},
|
2987
3507
|
|
@@ -2991,10 +3511,10 @@ ionic.views.Scroll = ionic.views.View.inherit({
|
|
2991
3511
|
* Requires the available space for the outer element and the outer size of the inner element.
|
2992
3512
|
* All values which are falsy (null or zero etc.) are ignored and the old value is kept.
|
2993
3513
|
*
|
2994
|
-
* @param clientWidth {Integer
|
2995
|
-
* @param clientHeight {Integer
|
2996
|
-
* @param contentWidth {Integer
|
2997
|
-
* @param contentHeight {Integer
|
3514
|
+
* @param clientWidth {Integer} Inner width of outer element
|
3515
|
+
* @param clientHeight {Integer} Inner height of outer element
|
3516
|
+
* @param contentWidth {Integer} Outer width of inner element
|
3517
|
+
* @param contentHeight {Integer} Outer height of inner element
|
2998
3518
|
*/
|
2999
3519
|
setDimensions: function(clientWidth, clientHeight, contentWidth, contentHeight) {
|
3000
3520
|
|
@@ -3030,8 +3550,8 @@ ionic.views.Scroll = ionic.views.View.inherit({
|
|
3030
3550
|
/**
|
3031
3551
|
* Sets the client coordinates in relation to the document.
|
3032
3552
|
*
|
3033
|
-
* @param left {Integer
|
3034
|
-
* @param top {Integer
|
3553
|
+
* @param left {Integer} Left position of outer element
|
3554
|
+
* @param top {Integer} Top position of outer element
|
3035
3555
|
*/
|
3036
3556
|
setPosition: function(left, top) {
|
3037
3557
|
|
@@ -3152,9 +3672,9 @@ ionic.views.Scroll = ionic.views.View.inherit({
|
|
3152
3672
|
* the center when no coordinates are given.
|
3153
3673
|
*
|
3154
3674
|
* @param level {Number} Level to zoom to
|
3155
|
-
* @param animate {Boolean
|
3156
|
-
* @param originLeft {Number
|
3157
|
-
* @param originTop {Number
|
3675
|
+
* @param animate {Boolean} Whether to use animation
|
3676
|
+
* @param originLeft {Number} Zoom in at given left coordinate
|
3677
|
+
* @param originTop {Number} Zoom in at given top coordinate
|
3158
3678
|
*/
|
3159
3679
|
zoomTo: function(level, animate, originLeft, originTop) {
|
3160
3680
|
|
@@ -3215,9 +3735,9 @@ ionic.views.Scroll = ionic.views.View.inherit({
|
|
3215
3735
|
* Zooms the content by the given factor.
|
3216
3736
|
*
|
3217
3737
|
* @param factor {Number} Zoom by given factor
|
3218
|
-
* @param animate {Boolean
|
3219
|
-
* @param originLeft {Number
|
3220
|
-
* @param originTop {Number
|
3738
|
+
* @param animate {Boolean} Whether to use animation
|
3739
|
+
* @param originLeft {Number} Zoom in at given left coordinate
|
3740
|
+
* @param originTop {Number} Zoom in at given top coordinate
|
3221
3741
|
*/
|
3222
3742
|
zoomBy: function(factor, animate, originLeft, originTop) {
|
3223
3743
|
|
@@ -3231,10 +3751,10 @@ ionic.views.Scroll = ionic.views.View.inherit({
|
|
3231
3751
|
/**
|
3232
3752
|
* Scrolls to the given position. Respect limitations and snapping automatically.
|
3233
3753
|
*
|
3234
|
-
* @param left {Number
|
3235
|
-
* @param top {Number
|
3236
|
-
* @param animate {Boolean
|
3237
|
-
* @param zoom {Number
|
3754
|
+
* @param left {Number} Horizontal scroll position, keeps current if value is <code>null</code>
|
3755
|
+
* @param top {Number} Vertical scroll position, keeps current if value is <code>null</code>
|
3756
|
+
* @param animate {Boolean} Whether the scrolling should happen using an animation
|
3757
|
+
* @param zoom {Number} Zoom level to go to
|
3238
3758
|
*/
|
3239
3759
|
scrollTo: function(left, top, animate, zoom) {
|
3240
3760
|
|
@@ -3313,9 +3833,9 @@ ionic.views.Scroll = ionic.views.View.inherit({
|
|
3313
3833
|
/**
|
3314
3834
|
* Scroll by the given offset
|
3315
3835
|
*
|
3316
|
-
* @param left {Number
|
3317
|
-
* @param top {Number
|
3318
|
-
* @param animate {Boolean
|
3836
|
+
* @param left {Number} Scroll x-axis by given offset
|
3837
|
+
* @param top {Number} Scroll x-axis by given offset
|
3838
|
+
* @param animate {Boolean} Whether to animate the given change
|
3319
3839
|
*/
|
3320
3840
|
scrollBy: function(left, top, animate) {
|
3321
3841
|
|
@@ -3549,7 +4069,7 @@ ionic.views.Scroll = ionic.views.View.inherit({
|
|
3549
4069
|
if (scrollTop > maxScrollTop || scrollTop < 0) {
|
3550
4070
|
|
3551
4071
|
// Slow down on the edges
|
3552
|
-
if (self.options.bouncing) {
|
4072
|
+
if (self.options.bouncing || (self.__refreshHeight && scrollTop < 0)) {
|
3553
4073
|
|
3554
4074
|
scrollTop += (moveY / 2 * this.options.speedMultiplier);
|
3555
4075
|
|
@@ -3756,7 +4276,7 @@ ionic.views.Scroll = ionic.views.View.inherit({
|
|
3756
4276
|
*
|
3757
4277
|
* @param left {Number} Left scroll position
|
3758
4278
|
* @param top {Number} Top scroll position
|
3759
|
-
* @param animate {Boolean
|
4279
|
+
* @param animate {Boolean} Whether animation should be used to move to the new coordinates
|
3760
4280
|
*/
|
3761
4281
|
__publish: function(left, top, zoom, animate) {
|
3762
4282
|
|
@@ -3871,7 +4391,7 @@ ionic.views.Scroll = ionic.views.View.inherit({
|
|
3871
4391
|
|
3872
4392
|
var sizer = function() {
|
3873
4393
|
self.resize();
|
3874
|
-
|
4394
|
+
|
3875
4395
|
if((self.options.scrollingX && self.__maxScrollLeft == 0) || (self.options.scrollingY && self.__maxScrollTop == 0)) {
|
3876
4396
|
//self.__sizerTimeout = setTimeout(sizer, 1000);
|
3877
4397
|
}
|
@@ -3924,12 +4444,13 @@ ionic.views.Scroll = ionic.views.View.inherit({
|
|
3924
4444
|
};
|
3925
4445
|
|
3926
4446
|
// How much velocity is required to keep the deceleration running
|
3927
|
-
|
4447
|
+
self.__minVelocityToKeepDecelerating = self.options.snapping ? 4 : 0.1;
|
3928
4448
|
|
3929
4449
|
// Detect whether it's still worth to continue animating steps
|
3930
4450
|
// If we are already slow enough to not being user perceivable anymore, we stop the whole process here.
|
3931
4451
|
var verify = function() {
|
3932
|
-
var shouldContinue = Math.abs(self.__decelerationVelocityX) >=
|
4452
|
+
var shouldContinue = Math.abs(self.__decelerationVelocityX) >= self.__minVelocityToKeepDecelerating ||
|
4453
|
+
Math.abs(self.__decelerationVelocityY) >= self.__minVelocityToKeepDecelerating;
|
3933
4454
|
if (!shouldContinue) {
|
3934
4455
|
self.__didDecelerationComplete = true;
|
3935
4456
|
}
|
@@ -3957,7 +4478,7 @@ ionic.views.Scroll = ionic.views.View.inherit({
|
|
3957
4478
|
/**
|
3958
4479
|
* Called on every step of the animation
|
3959
4480
|
*
|
3960
|
-
* @param inMemory {Boolean
|
4481
|
+
* @param inMemory {Boolean} Whether to not render the current step, but keep it in memory only. Used internally only!
|
3961
4482
|
*/
|
3962
4483
|
__stepThroughDeceleration: function(render) {
|
3963
4484
|
|
@@ -4038,8 +4559,8 @@ ionic.views.Scroll = ionic.views.View.inherit({
|
|
4038
4559
|
var scrollOutsideY = 0;
|
4039
4560
|
|
4040
4561
|
// This configures the amount of change applied to deceleration/acceleration when reaching boundaries
|
4041
|
-
var penetrationDeceleration = self.options.penetrationDeceleration;
|
4042
|
-
var penetrationAcceleration = self.options.penetrationAcceleration;
|
4562
|
+
var penetrationDeceleration = self.options.penetrationDeceleration;
|
4563
|
+
var penetrationAcceleration = self.options.penetrationAcceleration;
|
4043
4564
|
|
4044
4565
|
// Check limits
|
4045
4566
|
if (scrollLeft < self.__minDecelerationScrollLeft) {
|
@@ -4056,17 +4577,25 @@ ionic.views.Scroll = ionic.views.View.inherit({
|
|
4056
4577
|
|
4057
4578
|
// Slow down until slow enough, then flip back to snap position
|
4058
4579
|
if (scrollOutsideX !== 0) {
|
4059
|
-
|
4580
|
+
var isHeadingOutwardsX = scrollOutsideX * self.__decelerationVelocityX <= self.__minDecelerationScrollLeft;
|
4581
|
+
if (isHeadingOutwardsX) {
|
4060
4582
|
self.__decelerationVelocityX += scrollOutsideX * penetrationDeceleration;
|
4061
|
-
}
|
4583
|
+
}
|
4584
|
+
var isStoppedX = Math.abs(self.__decelerationVelocityX) <= self.__minVelocityToKeepDecelerating;
|
4585
|
+
//If we're not heading outwards, or if the above statement got us below minDeceleration, go back towards bounds
|
4586
|
+
if (!isHeadingOutwardsX || isStoppedX) {
|
4062
4587
|
self.__decelerationVelocityX = scrollOutsideX * penetrationAcceleration;
|
4063
4588
|
}
|
4064
4589
|
}
|
4065
4590
|
|
4066
4591
|
if (scrollOutsideY !== 0) {
|
4067
|
-
|
4592
|
+
var isHeadingOutwardsY = scrollOutsideY * self.__decelerationVelocityY <= self.__minDecelerationScrollTop;
|
4593
|
+
if (isHeadingOutwardsY) {
|
4068
4594
|
self.__decelerationVelocityY += scrollOutsideY * penetrationDeceleration;
|
4069
|
-
}
|
4595
|
+
}
|
4596
|
+
var isStoppedY = Math.abs(self.__decelerationVelocityY) <= self.__minVelocityToKeepDecelerating;
|
4597
|
+
//If we're not heading outwards, or if the above statement got us below minDeceleration, go back towards bounds
|
4598
|
+
if (!isHeadingOutwardsY || isStoppedY) {
|
4070
4599
|
self.__decelerationVelocityY = scrollOutsideY * penetrationAcceleration;
|
4071
4600
|
}
|
4072
4601
|
}
|
@@ -4122,78 +4651,71 @@ ionic.views.Scroll = ionic.views.View.inherit({
|
|
4122
4651
|
* so that the header text size is maximized and aligned
|
4123
4652
|
* correctly as long as possible.
|
4124
4653
|
*/
|
4125
|
-
align: function() {
|
4126
|
-
var _this = this;
|
4654
|
+
align: ionic.animationFrameThrottle(function(titleSelector) {
|
4127
4655
|
|
4128
|
-
|
4129
|
-
|
4130
|
-
|
4656
|
+
// Find the titleEl element
|
4657
|
+
var titleEl = this.el.querySelector(titleSelector || '.title');
|
4658
|
+
if(!titleEl) {
|
4659
|
+
return;
|
4660
|
+
}
|
4131
4661
|
|
4132
|
-
|
4133
|
-
|
4134
|
-
|
4135
|
-
|
4136
|
-
|
4137
|
-
|
4138
|
-
|
4139
|
-
|
4140
|
-
|
4141
|
-
|
4142
|
-
|
4143
|
-
|
4144
|
-
|
4145
|
-
|
4146
|
-
if(c.nodeType == 3) {
|
4147
|
-
childSize = ionic.DomUtil.getTextBounds(c);
|
4148
|
-
} else if(c.nodeType == 1) {
|
4149
|
-
childSize = c.getBoundingClientRect();
|
4150
|
-
}
|
4151
|
-
if(childSize) {
|
4152
|
-
leftWidth += childSize.width;
|
4153
|
-
}
|
4662
|
+
var i, c, childSize;
|
4663
|
+
var childNodes = this.el.childNodes;
|
4664
|
+
var leftWidth = 0;
|
4665
|
+
var rightWidth = 0;
|
4666
|
+
var isCountingRightWidth = true;
|
4667
|
+
|
4668
|
+
// Compute how wide the left children are
|
4669
|
+
// Skip all titles (there may still be two titles, one leaving the dom)
|
4670
|
+
// Once we encounter a titleEl, realize we are now counting the right-buttons, not left
|
4671
|
+
for(i = 0; i < childNodes.length; i++) {
|
4672
|
+
c = childNodes[i];
|
4673
|
+
if (c.tagName && c.tagName.toLowerCase() == 'h1') {
|
4674
|
+
isCountingRightWidth = false;
|
4675
|
+
continue;
|
4154
4676
|
}
|
4155
4677
|
|
4156
|
-
|
4157
|
-
|
4158
|
-
childSize =
|
4159
|
-
|
4160
|
-
|
4161
|
-
|
4162
|
-
|
4163
|
-
|
4164
|
-
}
|
4165
|
-
if(childSize) {
|
4678
|
+
childSize = null;
|
4679
|
+
if(c.nodeType == 3) {
|
4680
|
+
childSize = ionic.DomUtil.getTextBounds(c);
|
4681
|
+
} else if(c.nodeType == 1) {
|
4682
|
+
childSize = c.getBoundingClientRect();
|
4683
|
+
}
|
4684
|
+
if(childSize) {
|
4685
|
+
if (isCountingRightWidth) {
|
4166
4686
|
rightWidth += childSize.width;
|
4687
|
+
} else {
|
4688
|
+
leftWidth += childSize.width;
|
4167
4689
|
}
|
4168
4690
|
}
|
4691
|
+
}
|
4169
4692
|
|
4170
|
-
|
4693
|
+
var margin = Math.max(leftWidth, rightWidth) + 10;
|
4171
4694
|
|
4172
|
-
|
4173
|
-
|
4174
|
-
|
4175
|
-
|
4176
|
-
|
4177
|
-
|
4178
|
-
|
4179
|
-
|
4180
|
-
if(rightWidth > 0) {
|
4181
|
-
title.style.right = (rightWidth + 5) + 'px';
|
4182
|
-
}
|
4183
|
-
}
|
4184
|
-
} else if(this.alignTitle == 'left') {
|
4185
|
-
title.classList.add('title-left');
|
4186
|
-
if(leftWidth > 0) {
|
4187
|
-
title.style.left = (leftWidth + 15) + 'px';
|
4188
|
-
}
|
4189
|
-
} else if(this.alignTitle == 'right') {
|
4190
|
-
title.classList.add('title-right');
|
4695
|
+
// Size and align the header titleEl based on the sizes of the left and
|
4696
|
+
// right children, and the desired alignment mode
|
4697
|
+
if(this.alignTitle == 'center') {
|
4698
|
+
if(margin > 10) {
|
4699
|
+
titleEl.style.left = margin + 'px';
|
4700
|
+
titleEl.style.right = margin + 'px';
|
4701
|
+
}
|
4702
|
+
if(titleEl.offsetWidth < titleEl.scrollWidth) {
|
4191
4703
|
if(rightWidth > 0) {
|
4192
|
-
|
4704
|
+
titleEl.style.right = (rightWidth + 5) + 'px';
|
4193
4705
|
}
|
4194
4706
|
}
|
4195
|
-
}
|
4196
|
-
|
4707
|
+
} else if(this.alignTitle == 'left') {
|
4708
|
+
titleEl.classList.add('titleEl-left');
|
4709
|
+
if(leftWidth > 0) {
|
4710
|
+
titleEl.style.left = (leftWidth + 15) + 'px';
|
4711
|
+
}
|
4712
|
+
} else if(this.alignTitle == 'right') {
|
4713
|
+
titleEl.classList.add('titleEl-right');
|
4714
|
+
if(rightWidth > 0) {
|
4715
|
+
titleEl.style.right = (rightWidth + 15) + 'px';
|
4716
|
+
}
|
4717
|
+
}
|
4718
|
+
})
|
4197
4719
|
});
|
4198
4720
|
|
4199
4721
|
})(ionic);
|
@@ -4245,14 +4767,14 @@ ionic.views.Scroll = ionic.views.View.inherit({
|
|
4245
4767
|
content.classList.remove(ITEM_SLIDING_CLASS);
|
4246
4768
|
|
4247
4769
|
// Grab the starting X point for the item (for example, so we can tell whether it is open or closed to start)
|
4248
|
-
offsetX = parseFloat(content.style.
|
4770
|
+
offsetX = parseFloat(content.style[ionic.CSS.TRANSFORM].replace('translate3d(', '').split(',')[0]) || 0;
|
4249
4771
|
|
4250
4772
|
// Grab the buttons
|
4251
4773
|
buttons = content.parentNode.querySelector('.' + ITEM_OPTIONS_CLASS);
|
4252
4774
|
if(!buttons) {
|
4253
4775
|
return;
|
4254
4776
|
}
|
4255
|
-
|
4777
|
+
|
4256
4778
|
buttonsWidth = buttons.offsetWidth;
|
4257
4779
|
|
4258
4780
|
this._currentDrag = {
|
@@ -4262,41 +4784,39 @@ ionic.views.Scroll = ionic.views.View.inherit({
|
|
4262
4784
|
};
|
4263
4785
|
};
|
4264
4786
|
|
4265
|
-
SlideDrag.prototype.drag = function(e) {
|
4266
|
-
var
|
4787
|
+
SlideDrag.prototype.drag = ionic.animationFrameThrottle(function(e) {
|
4788
|
+
var buttonsWidth;
|
4267
4789
|
|
4268
|
-
|
4269
|
-
|
4270
|
-
|
4271
|
-
|
4272
|
-
}
|
4273
|
-
|
4274
|
-
// Check if we should start dragging. Check if we've dragged past the threshold,
|
4275
|
-
// or we are starting from the open state.
|
4276
|
-
if(!_this._isDragging &&
|
4277
|
-
((Math.abs(e.gesture.deltaX) > _this.dragThresholdX) ||
|
4278
|
-
(Math.abs(_this._currentDrag.startOffsetX) > 0)))
|
4279
|
-
{
|
4280
|
-
_this._isDragging = true;
|
4281
|
-
}
|
4790
|
+
// We really aren't dragging
|
4791
|
+
if(!this._currentDrag) {
|
4792
|
+
return;
|
4793
|
+
}
|
4282
4794
|
|
4283
|
-
|
4284
|
-
|
4795
|
+
// Check if we should start dragging. Check if we've dragged past the threshold,
|
4796
|
+
// or we are starting from the open state.
|
4797
|
+
if(!this._isDragging &&
|
4798
|
+
((Math.abs(e.gesture.deltaX) > this.dragThresholdX) ||
|
4799
|
+
(Math.abs(this._currentDrag.startOffsetX) > 0)))
|
4800
|
+
{
|
4801
|
+
this._isDragging = true;
|
4802
|
+
}
|
4285
4803
|
|
4286
|
-
|
4287
|
-
|
4804
|
+
if(this._isDragging) {
|
4805
|
+
buttonsWidth = this._currentDrag.buttonsWidth;
|
4288
4806
|
|
4289
|
-
|
4290
|
-
|
4291
|
-
// Calculate the new X position, capped at the top of the buttons
|
4292
|
-
newX = Math.min(-buttonsWidth, -buttonsWidth + (((e.gesture.deltaX + buttonsWidth) * 0.4)));
|
4293
|
-
}
|
4807
|
+
// Grab the new X point, capping it at zero
|
4808
|
+
var newX = Math.min(0, this._currentDrag.startOffsetX + e.gesture.deltaX);
|
4294
4809
|
|
4295
|
-
|
4296
|
-
|
4810
|
+
// If the new X position is past the buttons, we need to slow down the drag (rubber band style)
|
4811
|
+
if(newX < -buttonsWidth) {
|
4812
|
+
// Calculate the new X position, capped at the top of the buttons
|
4813
|
+
newX = Math.min(-buttonsWidth, -buttonsWidth + (((e.gesture.deltaX + buttonsWidth) * 0.4)));
|
4297
4814
|
}
|
4298
|
-
|
4299
|
-
|
4815
|
+
|
4816
|
+
this._currentDrag.content.style[ionic.CSS.TRANSFORM] = 'translate3d(' + newX + 'px, 0, 0)';
|
4817
|
+
this._currentDrag.content.style.webkitTransition = 'none';
|
4818
|
+
}
|
4819
|
+
});
|
4300
4820
|
|
4301
4821
|
SlideDrag.prototype.end = function(e, doneCallback) {
|
4302
4822
|
var _this = this;
|
@@ -4311,7 +4831,7 @@ ionic.views.Scroll = ionic.views.View.inherit({
|
|
4311
4831
|
// The final resting point X will be the width of the exposed buttons
|
4312
4832
|
var restingPoint = -this._currentDrag.buttonsWidth;
|
4313
4833
|
|
4314
|
-
// Check if the drag didn't clear the buttons mid-point
|
4834
|
+
// Check if the drag didn't clear the buttons mid-point
|
4315
4835
|
// and we aren't moving fast enough to swipe open
|
4316
4836
|
if(e.gesture.deltaX > -(this._currentDrag.buttonsWidth/2)) {
|
4317
4837
|
|
@@ -4333,19 +4853,19 @@ ionic.views.Scroll = ionic.views.View.inherit({
|
|
4333
4853
|
// e.target.removeEventListener('webkitTransitionEnd', onRestingAnimationEnd);
|
4334
4854
|
// };
|
4335
4855
|
|
4336
|
-
|
4337
|
-
// var currentX = parseFloat(_this._currentDrag.content.style.
|
4856
|
+
ionic.requestAnimationFrame(function() {
|
4857
|
+
// var currentX = parseFloat(_this._currentDrag.content.style[ionic.CSS.TRANSFORM].replace('translate3d(', '').split(',')[0]) || 0;
|
4338
4858
|
// if(currentX !== restingPoint) {
|
4339
4859
|
// _this._currentDrag.content.classList.add(ITEM_SLIDING_CLASS);
|
4340
4860
|
// _this._currentDrag.content.addEventListener('webkitTransitionEnd', onRestingAnimationEnd);
|
4341
4861
|
// }
|
4342
4862
|
if(restingPoint === 0) {
|
4343
|
-
_this._currentDrag.content.style.
|
4863
|
+
_this._currentDrag.content.style[ionic.CSS.TRANSFORM] = '';
|
4344
4864
|
} else {
|
4345
|
-
_this._currentDrag.content.style.
|
4865
|
+
_this._currentDrag.content.style[ionic.CSS.TRANSFORM] = 'translate3d(' + restingPoint + 'px, 0, 0)';
|
4346
4866
|
}
|
4347
|
-
_this._currentDrag.content.style.
|
4348
|
-
|
4867
|
+
_this._currentDrag.content.style[ionic.CSS.TRANSFORM] = '';
|
4868
|
+
|
4349
4869
|
|
4350
4870
|
// Kill the current drag
|
4351
4871
|
_this._currentDrag = null;
|
@@ -4360,68 +4880,100 @@ ionic.views.Scroll = ionic.views.View.inherit({
|
|
4360
4880
|
this.dragThresholdY = opts.dragThresholdY || 0;
|
4361
4881
|
this.onReorder = opts.onReorder;
|
4362
4882
|
this.el = opts.el;
|
4883
|
+
this.scrollEl = opts.scrollEl;
|
4884
|
+
this.scrollView = opts.scrollView;
|
4363
4885
|
};
|
4364
4886
|
|
4365
4887
|
ReorderDrag.prototype = new DragOp();
|
4366
4888
|
|
4889
|
+
ReorderDrag.prototype._moveElement = function(e) {
|
4890
|
+
var y = (e.gesture.center.pageY - this._currentDrag.elementHeight/2);
|
4891
|
+
this.el.style[ionic.CSS.TRANSFORM] = 'translate3d(0, '+y+'px, 0)';
|
4892
|
+
};
|
4893
|
+
|
4367
4894
|
ReorderDrag.prototype.start = function(e) {
|
4368
4895
|
var content;
|
4369
4896
|
|
4370
4897
|
|
4371
4898
|
// Grab the starting Y point for the item
|
4372
|
-
var offsetY = this.el.offsetTop;//parseFloat(this.el.style.
|
4899
|
+
var offsetY = this.el.offsetTop;//parseFloat(this.el.style[ionic.CSS.TRANSFORM].replace('translate3d(', '').split(',')[1]) || 0;
|
4373
4900
|
|
4374
4901
|
var startIndex = ionic.DomUtil.getChildIndex(this.el, this.el.nodeName.toLowerCase());
|
4375
|
-
|
4902
|
+
var elementHeight = this.el.offsetHeight;
|
4376
4903
|
var placeholder = this.el.cloneNode(true);
|
4377
4904
|
|
4905
|
+
// If we have a scroll pane, move our draggable element outside of it
|
4906
|
+
// We do this because when we drag our element down below the edge of the page
|
4907
|
+
// and scroll the scroll-pane, if the element is *part* of the scroll-pane,
|
4908
|
+
// it will scroll 'with' the scroll-pane's contents and change position.
|
4909
|
+
var appendToElement = (this.scrollEl || this.el).parentNode;
|
4910
|
+
|
4378
4911
|
placeholder.classList.add(ITEM_PLACEHOLDER_CLASS);
|
4379
4912
|
|
4380
4913
|
this.el.parentNode.insertBefore(placeholder, this.el);
|
4381
|
-
|
4382
4914
|
this.el.classList.add(ITEM_REORDERING_CLASS);
|
4383
4915
|
|
4916
|
+
appendToElement.parentNode.appendChild(this.el);
|
4917
|
+
|
4384
4918
|
this._currentDrag = {
|
4385
|
-
|
4919
|
+
elementHeight: elementHeight,
|
4386
4920
|
startIndex: startIndex,
|
4387
|
-
placeholder: placeholder
|
4921
|
+
placeholder: placeholder,
|
4922
|
+
scrollHeight: scroll,
|
4923
|
+
list: placeholder.parentNode
|
4388
4924
|
};
|
4925
|
+
|
4926
|
+
this._moveElement(e);
|
4389
4927
|
};
|
4390
4928
|
|
4391
|
-
ReorderDrag.prototype.drag = function(e) {
|
4392
|
-
|
4929
|
+
ReorderDrag.prototype.drag = ionic.animationFrameThrottle(function(e) {
|
4930
|
+
// We really aren't dragging
|
4931
|
+
if(!this._currentDrag) {
|
4932
|
+
return;
|
4933
|
+
}
|
4393
4934
|
|
4394
|
-
|
4395
|
-
|
4396
|
-
if(!_this._currentDrag) {
|
4397
|
-
return;
|
4398
|
-
}
|
4935
|
+
var scrollY = 0;
|
4936
|
+
var pageY = e.gesture.center.pageY;
|
4399
4937
|
|
4400
|
-
|
4401
|
-
|
4402
|
-
|
4403
|
-
_this._isDragging = true;
|
4404
|
-
}
|
4938
|
+
//If we have a scrollView, check scroll boundaries for dragged element and scroll if necessary
|
4939
|
+
if (this.scrollView) {
|
4940
|
+
var container = this.scrollEl;
|
4405
4941
|
|
4406
|
-
|
4407
|
-
var newY = _this._currentDrag.startOffsetTop + e.gesture.deltaY;
|
4408
|
-
|
4409
|
-
_this.el.style.top = newY + 'px';
|
4942
|
+
scrollY = this.scrollView.getValues().top;
|
4410
4943
|
|
4411
|
-
|
4944
|
+
var containerTop = container.offsetTop;
|
4945
|
+
var pixelsPastTop = containerTop - pageY + this._currentDrag.elementHeight/2;
|
4946
|
+
var pixelsPastBottom = pageY + this._currentDrag.elementHeight/2 - containerTop - container.offsetHeight;
|
4412
4947
|
|
4413
|
-
|
4948
|
+
if (e.gesture.deltaY < 0 && pixelsPastTop > 0 && scrollY > 0) {
|
4949
|
+
this.scrollView.scrollBy(null, -pixelsPastTop);
|
4414
4950
|
}
|
4415
|
-
|
4416
|
-
|
4951
|
+
if (e.gesture.deltaY > 0 && pixelsPastBottom > 0) {
|
4952
|
+
if (scrollY < this.scrollView.getScrollMax().top) {
|
4953
|
+
this.scrollView.scrollBy(null, pixelsPastBottom);
|
4954
|
+
}
|
4955
|
+
}
|
4956
|
+
}
|
4957
|
+
|
4958
|
+
// Check if we should start dragging. Check if we've dragged past the threshold,
|
4959
|
+
// or we are starting from the open state.
|
4960
|
+
if(!this._isDragging && Math.abs(e.gesture.deltaY) > this.dragThresholdY) {
|
4961
|
+
this._isDragging = true;
|
4962
|
+
}
|
4963
|
+
|
4964
|
+
if(this._isDragging) {
|
4965
|
+
this._moveElement(e);
|
4966
|
+
|
4967
|
+
this._currentDrag.currentY = scrollY + pageY - this._currentDrag.placeholder.parentNode.offsetTop;
|
4968
|
+
|
4969
|
+
this._reorderItems();
|
4970
|
+
}
|
4971
|
+
});
|
4417
4972
|
|
4418
4973
|
// When an item is dragged, we need to reorder any items for sorting purposes
|
4419
4974
|
ReorderDrag.prototype._reorderItems = function() {
|
4420
4975
|
var placeholder = this._currentDrag.placeholder;
|
4421
4976
|
var siblings = Array.prototype.slice.call(this._currentDrag.placeholder.parentNode.children);
|
4422
|
-
|
4423
|
-
// Remove the floating element from the child search list
|
4424
|
-
siblings.splice(siblings.indexOf(this.el), 1);
|
4425
4977
|
|
4426
4978
|
var index = siblings.indexOf(this._currentDrag.placeholder);
|
4427
4979
|
var topSibling = siblings[Math.max(0, index - 1)];
|
@@ -4444,12 +4996,12 @@ ionic.views.Scroll = ionic.views.View.inherit({
|
|
4444
4996
|
}
|
4445
4997
|
|
4446
4998
|
var placeholder = this._currentDrag.placeholder;
|
4999
|
+
var finalPosition = ionic.DomUtil.getChildIndex(placeholder, placeholder.nodeName.toLowerCase());
|
4447
5000
|
|
4448
5001
|
// Reposition the element
|
4449
5002
|
this.el.classList.remove(ITEM_REORDERING_CLASS);
|
4450
|
-
this.el.style.
|
5003
|
+
this.el.style[ionic.CSS.TRANSFORM] = '';
|
4451
5004
|
|
4452
|
-
var finalPosition = ionic.DomUtil.getChildIndex(placeholder, placeholder.nodeName.toLowerCase());
|
4453
5005
|
placeholder.parentNode.insertBefore(this.el, placeholder);
|
4454
5006
|
placeholder.parentNode.removeChild(placeholder);
|
4455
5007
|
|
@@ -4494,7 +5046,7 @@ ionic.views.Scroll = ionic.views.View.inherit({
|
|
4494
5046
|
window.ionic.onGesture('release', function(e) {
|
4495
5047
|
_this._handleEndDrag(e);
|
4496
5048
|
}, this.el);
|
4497
|
-
|
5049
|
+
|
4498
5050
|
window.ionic.onGesture('drag', function(e) {
|
4499
5051
|
_this._handleDrag(e);
|
4500
5052
|
}, this.el);
|
@@ -4599,6 +5151,8 @@ ionic.views.Scroll = ionic.views.View.inherit({
|
|
4599
5151
|
if(item) {
|
4600
5152
|
this._dragOp = new ReorderDrag({
|
4601
5153
|
el: item,
|
5154
|
+
scrollEl: this.scrollEl,
|
5155
|
+
scrollView: this.scrollView,
|
4602
5156
|
onReorder: function(el, start, end) {
|
4603
5157
|
_this.onReorder && _this.onReorder(el, start, end);
|
4604
5158
|
}
|
@@ -4624,7 +5178,7 @@ ionic.views.Scroll = ionic.views.View.inherit({
|
|
4624
5178
|
|
4625
5179
|
_handleEndDrag: function(e) {
|
4626
5180
|
var _this = this;
|
4627
|
-
|
5181
|
+
|
4628
5182
|
if(!this._dragOp) {
|
4629
5183
|
//ionic.views.ListView.__super__._handleEndDrag.call(this, e);
|
4630
5184
|
return;
|
@@ -4647,7 +5201,7 @@ ionic.views.Scroll = ionic.views.View.inherit({
|
|
4647
5201
|
*/
|
4648
5202
|
_handleDrag: function(e) {
|
4649
5203
|
var _this = this, content, buttons;
|
4650
|
-
|
5204
|
+
|
4651
5205
|
// If the user has a touch timeout to highlight an element, clear it if we
|
4652
5206
|
// get sufficient draggage
|
4653
5207
|
if(Math.abs(e.gesture.deltaX) > 10 || Math.abs(e.gesture.deltaY) > 10) {
|
@@ -4662,7 +5216,7 @@ ionic.views.Scroll = ionic.views.View.inherit({
|
|
4662
5216
|
}
|
4663
5217
|
|
4664
5218
|
// No drag still, pass it up
|
4665
|
-
if(!this._dragOp) {
|
5219
|
+
if(!this._dragOp) {
|
4666
5220
|
//ionic.views.ListView.__super__._handleDrag.call(this, e);
|
4667
5221
|
return;
|
4668
5222
|
}
|
@@ -4696,10 +5250,10 @@ ionic.views.Scroll = ionic.views.View.inherit({
|
|
4696
5250
|
(function(ionic) {
|
4697
5251
|
'use strict';
|
4698
5252
|
/**
|
4699
|
-
*
|
5253
|
+
* Loading
|
4700
5254
|
*
|
4701
|
-
*
|
4702
|
-
*
|
5255
|
+
* The Loading is an overlay that can be used to indicate
|
5256
|
+
* activity while blocking user interaction.
|
4703
5257
|
*/
|
4704
5258
|
ionic.views.Loading = ionic.views.View.inherit({
|
4705
5259
|
initialize: function(opts) {
|
@@ -4709,6 +5263,8 @@ ionic.views.Scroll = ionic.views.View.inherit({
|
|
4709
5263
|
|
4710
5264
|
this.maxWidth = opts.maxWidth || 200;
|
4711
5265
|
|
5266
|
+
this.showDelay = opts.showDelay || 0;
|
5267
|
+
|
4712
5268
|
this._loadingBox = this.el.querySelector('.loading');
|
4713
5269
|
},
|
4714
5270
|
show: function() {
|
@@ -4719,18 +5275,24 @@ ionic.views.Scroll = ionic.views.View.inherit({
|
|
4719
5275
|
|
4720
5276
|
var width = Math.min(_this.maxWidth, Math.max(window.outerWidth - 40, lb.offsetWidth));
|
4721
5277
|
|
4722
|
-
lb.style.width = width;
|
5278
|
+
lb.style.width = width + 'px';
|
4723
5279
|
|
4724
5280
|
lb.style.marginLeft = (-lb.offsetWidth) / 2 + 'px';
|
4725
5281
|
lb.style.marginTop = (-lb.offsetHeight) / 2 + 'px';
|
4726
5282
|
|
4727
|
-
|
5283
|
+
// Wait 'showDelay' ms before showing the loading screen
|
5284
|
+
this._showDelayTimeout = window.setTimeout(function() {
|
5285
|
+
_this.el.classList.add('active');
|
5286
|
+
}, _this.showDelay);
|
4728
5287
|
}
|
4729
5288
|
},
|
4730
5289
|
hide: function() {
|
4731
5290
|
// Force a reflow so the animation will actually run
|
4732
5291
|
this.el.offsetWidth;
|
4733
5292
|
|
5293
|
+
// Prevent unnecessary 'show' after 'hide' has already been called
|
5294
|
+
window.clearTimeout(this._showDelayTimeout);
|
5295
|
+
|
4734
5296
|
this.el.classList.remove('active');
|
4735
5297
|
}
|
4736
5298
|
});
|
@@ -4744,7 +5306,8 @@ ionic.views.Scroll = ionic.views.View.inherit({
|
|
4744
5306
|
initialize: function(opts) {
|
4745
5307
|
opts = ionic.extend({
|
4746
5308
|
focusFirstInput: false,
|
4747
|
-
unfocusOnHide: true
|
5309
|
+
unfocusOnHide: true,
|
5310
|
+
focusFirstDelay: 600
|
4748
5311
|
}, opts);
|
4749
5312
|
|
4750
5313
|
ionic.extend(this, opts);
|
@@ -4752,11 +5315,16 @@ ionic.views.Scroll = ionic.views.View.inherit({
|
|
4752
5315
|
this.el = opts.el;
|
4753
5316
|
},
|
4754
5317
|
show: function() {
|
5318
|
+
var self = this;
|
5319
|
+
|
4755
5320
|
this.el.classList.add('active');
|
4756
5321
|
|
4757
5322
|
if(this.focusFirstInput) {
|
4758
|
-
|
4759
|
-
|
5323
|
+
// Let any animations run first
|
5324
|
+
window.setTimeout(function() {
|
5325
|
+
var input = self.el.querySelector('input, textarea');
|
5326
|
+
input && input.focus && input.focus();
|
5327
|
+
}, this.focusFirstDelay);
|
4760
5328
|
}
|
4761
5329
|
},
|
4762
5330
|
hide: function() {
|
@@ -4765,9 +5333,12 @@ ionic.views.Scroll = ionic.views.View.inherit({
|
|
4765
5333
|
// Unfocus all elements
|
4766
5334
|
if(this.unfocusOnHide) {
|
4767
5335
|
var inputs = this.el.querySelectorAll('input, textarea');
|
4768
|
-
|
4769
|
-
|
4770
|
-
|
5336
|
+
// Let any animations run first
|
5337
|
+
window.setTimeout(function() {
|
5338
|
+
for(var i = 0; i < inputs.length; i++) {
|
5339
|
+
inputs[i].blur && inputs[i].blur();
|
5340
|
+
}
|
5341
|
+
});
|
4771
5342
|
}
|
4772
5343
|
}
|
4773
5344
|
});
|
@@ -4852,7 +5423,7 @@ ionic.views.Scroll = ionic.views.View.inherit({
|
|
4852
5423
|
alert: function(message) {
|
4853
5424
|
var _this = this;
|
4854
5425
|
|
4855
|
-
|
5426
|
+
ionic.requestAnimationFrame(function() {
|
4856
5427
|
_this.setTitle(message);
|
4857
5428
|
_this.el.classList.add('active');
|
4858
5429
|
});
|
@@ -4878,21 +5449,29 @@ ionic.views.Scroll = ionic.views.View.inherit({
|
|
4878
5449
|
ionic.views.SideMenu = ionic.views.View.inherit({
|
4879
5450
|
initialize: function(opts) {
|
4880
5451
|
this.el = opts.el;
|
4881
|
-
this.width = opts.width;
|
4882
5452
|
this.isEnabled = opts.isEnabled || true;
|
5453
|
+
this.setWidth(opts.width);
|
4883
5454
|
},
|
4884
5455
|
|
4885
5456
|
getFullWidth: function() {
|
4886
5457
|
return this.width;
|
4887
5458
|
},
|
5459
|
+
setWidth: function(width) {
|
5460
|
+
this.width = width;
|
5461
|
+
this.el.style.width = width + 'px';
|
5462
|
+
},
|
4888
5463
|
setIsEnabled: function(isEnabled) {
|
4889
5464
|
this.isEnabled = isEnabled;
|
4890
5465
|
},
|
4891
5466
|
bringUp: function() {
|
4892
|
-
this.el.style.zIndex
|
5467
|
+
if(this.el.style.zIndex !== '0') {
|
5468
|
+
this.el.style.zIndex = '0';
|
5469
|
+
}
|
4893
5470
|
},
|
4894
5471
|
pushDown: function() {
|
4895
|
-
this.el.style.zIndex
|
5472
|
+
if(this.el.style.zIndex !== '-1') {
|
5473
|
+
this.el.style.zIndex = '-1';
|
5474
|
+
}
|
4896
5475
|
}
|
4897
5476
|
});
|
4898
5477
|
|
@@ -4922,11 +5501,11 @@ ionic.views.Scroll = ionic.views.View.inherit({
|
|
4922
5501
|
this.el.classList.add(this.animationClass);
|
4923
5502
|
},
|
4924
5503
|
getTranslateX: function() {
|
4925
|
-
return parseFloat(this.el.style.
|
5504
|
+
return parseFloat(this.el.style[ionic.CSS.TRANSFORM].replace('translate3d(', '').split(',')[0]);
|
4926
5505
|
},
|
4927
|
-
setTranslateX: function(x) {
|
4928
|
-
this.el.style.
|
4929
|
-
}
|
5506
|
+
setTranslateX: ionic.animationFrameThrottle(function(x) {
|
5507
|
+
this.el.style[ionic.CSS.TRANSFORM] = 'translate3d(' + x + 'px, 0, 0)';
|
5508
|
+
})
|
4930
5509
|
});
|
4931
5510
|
|
4932
5511
|
})(ionic);
|
@@ -5162,7 +5741,7 @@ ionic.views.Slider = ionic.views.View.inherit({
|
|
5162
5741
|
|
5163
5742
|
function stop() {
|
5164
5743
|
|
5165
|
-
delay = 0;
|
5744
|
+
delay = options.auto || 0;
|
5166
5745
|
clearTimeout(interval);
|
5167
5746
|
|
5168
5747
|
}
|
@@ -5231,6 +5810,7 @@ ionic.views.Slider = ionic.views.View.inherit({
|
|
5231
5810
|
} else {
|
5232
5811
|
element.addEventListener('mousemove', this, false);
|
5233
5812
|
element.addEventListener('mouseup', this, false);
|
5813
|
+
document.addEventListener('mouseup', this, false);
|
5234
5814
|
}
|
5235
5815
|
},
|
5236
5816
|
move: function(event) {
|
@@ -5374,6 +5954,7 @@ ionic.views.Slider = ionic.views.View.inherit({
|
|
5374
5954
|
} else {
|
5375
5955
|
element.removeEventListener('mousemove', events, false)
|
5376
5956
|
element.removeEventListener('mouseup', events, false)
|
5957
|
+
document.removeEventListener('mouseup', events, false);
|
5377
5958
|
}
|
5378
5959
|
|
5379
5960
|
},
|
@@ -5522,6 +6103,7 @@ ionic.views.TabBarItem = ionic.views.View.inherit({
|
|
5522
6103
|
|
5523
6104
|
this._buildItem();
|
5524
6105
|
},
|
6106
|
+
|
5525
6107
|
// Factory for creating an item from a given javascript object
|
5526
6108
|
create: function(itemData) {
|
5527
6109
|
var item = document.createElement('a');
|
@@ -5533,12 +6115,21 @@ ionic.views.TabBarItem = ionic.views.View.inherit({
|
|
5533
6115
|
icon.className = itemData.icon;
|
5534
6116
|
item.appendChild(icon);
|
5535
6117
|
}
|
6118
|
+
|
6119
|
+
// If there is a badge, add the badge element
|
6120
|
+
if(itemData.badge) {
|
6121
|
+
var badge = document.createElement('i');
|
6122
|
+
badge.className = 'badge';
|
6123
|
+
badge.innerHTML = itemData.badge;
|
6124
|
+
item.appendChild(badge);
|
6125
|
+
item.className = 'tab-item has-badge';
|
6126
|
+
}
|
6127
|
+
|
5536
6128
|
item.appendChild(document.createTextNode(itemData.title));
|
5537
6129
|
|
5538
6130
|
return new ionic.views.TabBarItem(item);
|
5539
6131
|
},
|
5540
6132
|
|
5541
|
-
|
5542
6133
|
_buildItem: function() {
|
5543
6134
|
var _this = this, child, children = Array.prototype.slice.call(this.el.children);
|
5544
6135
|
|
@@ -5549,13 +6140,23 @@ ionic.views.TabBarItem = ionic.views.View.inherit({
|
|
5549
6140
|
// TODO: This heuristic might not be sufficient
|
5550
6141
|
if(child.tagName.toLowerCase() == 'i' && /icon/.test(child.className)) {
|
5551
6142
|
this.icon = child.className;
|
5552
|
-
break;
|
5553
6143
|
}
|
5554
6144
|
|
6145
|
+
// Test if this is a "i" tag with badge in the class name
|
6146
|
+
// TODO: This heuristic might not be sufficient
|
6147
|
+
if(child.tagName.toLowerCase() == 'i' && /badge/.test(child.className)) {
|
6148
|
+
this.badge = child.textContent.trim();
|
6149
|
+
}
|
5555
6150
|
}
|
5556
6151
|
|
5557
|
-
|
5558
|
-
|
6152
|
+
this.title = '';
|
6153
|
+
for(i = 0, j = this.el.childNodes.length; i < j; i++) {
|
6154
|
+
child = this.el.childNodes[i];
|
6155
|
+
|
6156
|
+
if (child.nodeName === "#text") {
|
6157
|
+
this.title += child.nodeValue.trim();
|
6158
|
+
}
|
6159
|
+
}
|
5559
6160
|
|
5560
6161
|
this._tapHandler = function(e) {
|
5561
6162
|
_this.onTap && _this.onTap(e);
|
@@ -5579,6 +6180,10 @@ ionic.views.TabBarItem = ionic.views.View.inherit({
|
|
5579
6180
|
return this.title;
|
5580
6181
|
},
|
5581
6182
|
|
6183
|
+
getBadge: function() {
|
6184
|
+
return this.badge;
|
6185
|
+
},
|
6186
|
+
|
5582
6187
|
setSelected: function(isSelected) {
|
5583
6188
|
this.isSelected = isSelected;
|
5584
6189
|
if(isSelected) {
|
@@ -5721,17 +6326,20 @@ ionic.views.TabBar = ionic.views.View.inherit({
|
|
5721
6326
|
initialize: function(opts) {
|
5722
6327
|
this.el = opts.el;
|
5723
6328
|
this.checkbox = opts.checkbox;
|
6329
|
+
this.track = opts.track;
|
5724
6330
|
this.handle = opts.handle;
|
5725
6331
|
this.openPercent = -1;
|
5726
6332
|
},
|
5727
6333
|
|
5728
6334
|
tap: function(e) {
|
5729
|
-
|
6335
|
+
if(this.el.getAttribute('disabled') !== 'disabled') {
|
6336
|
+
this.val( !this.checkbox.checked );
|
6337
|
+
}
|
5730
6338
|
},
|
5731
6339
|
|
5732
6340
|
drag: function(e) {
|
5733
|
-
var slidePageLeft = this.
|
5734
|
-
var slidePageRight = this.
|
6341
|
+
var slidePageLeft = this.track.offsetLeft + (this.handle.offsetWidth / 2);
|
6342
|
+
var slidePageRight = this.track.offsetLeft + this.track.offsetWidth - (this.handle.offsetWidth / 2);
|
5735
6343
|
|
5736
6344
|
if(e.pageX >= slidePageRight - 4) {
|
5737
6345
|
this.val(true);
|
@@ -5752,9 +6360,9 @@ ionic.views.TabBar = ionic.views.View.inherit({
|
|
5752
6360
|
} else if(openPercent === 100) {
|
5753
6361
|
this.val(true);
|
5754
6362
|
} else {
|
5755
|
-
var openPixel = Math.round( (openPercent / 100) * this.
|
6363
|
+
var openPixel = Math.round( (openPercent / 100) * this.track.offsetWidth - (this.handle.offsetWidth) );
|
5756
6364
|
openPixel = (openPixel < 1 ? 0 : openPixel);
|
5757
|
-
this.handle.style.
|
6365
|
+
this.handle.style[ionic.CSS.TRANSFORM] = 'translate3d(' + openPixel + 'px,0,0)';
|
5758
6366
|
}
|
5759
6367
|
}
|
5760
6368
|
},
|
@@ -5765,8 +6373,8 @@ ionic.views.TabBar = ionic.views.View.inherit({
|
|
5765
6373
|
|
5766
6374
|
val: function(value) {
|
5767
6375
|
if(value === true || value === false) {
|
5768
|
-
if(this.handle.style.
|
5769
|
-
this.handle.style.
|
6376
|
+
if(this.handle.style[ionic.CSS.TRANSFORM] !== "") {
|
6377
|
+
this.handle.style[ionic.CSS.TRANSFORM] = "";
|
5770
6378
|
}
|
5771
6379
|
this.checkbox.checked = value;
|
5772
6380
|
this.openPercent = (value ? 100 : 0);
|
@@ -6036,7 +6644,7 @@ ionic.controllers.NavController = ionic.controllers.ViewController.inherit({
|
|
6036
6644
|
* @return {float} The amount the side menu is open, either positive or negative for left (positive), or right (negative)
|
6037
6645
|
*/
|
6038
6646
|
getOpenAmount: function() {
|
6039
|
-
return this.content.getTranslateX() || 0;
|
6647
|
+
return this.content && this.content.getTranslateX() || 0;
|
6040
6648
|
},
|
6041
6649
|
|
6042
6650
|
/**
|
@@ -6348,7 +6956,8 @@ ionic.controllers.TabBarController = ionic.controllers.ViewController.inherit({
|
|
6348
6956
|
|
6349
6957
|
this.tabBar.addItem({
|
6350
6958
|
title: controller.title,
|
6351
|
-
icon: controller.icon
|
6959
|
+
icon: controller.icon,
|
6960
|
+
badge: controller.badge
|
6352
6961
|
});
|
6353
6962
|
|
6354
6963
|
// If we don't have a selected controller yet, select the first one.
|