You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

18 lines
122 KiB

/*!
* Copyright 2015 Drifty Co.
* http://drifty.com/
*
* Ionic, v1.3.1
* A powerful HTML5 mobile app framework.
* http://ionicframework.com/
*
* By @maxlynch, @benjsperry, @adamdbradley <3
*
* Licensed under the MIT license. Please see LICENSE for more information.
*
*/
!function(){function e(e,t,n,i,o,r){function a(i,a,c,s,u){function d(){N.resizeRequiresRefresh(b.__clientWidth,b.__clientHeight)&&g()}function f(){var e;return e={dataLength:0,width:0,height:0,resizeRequiresRefresh:function(t,n){var i=e.dataLength&&t&&n&&(t!==e.width||n!==e.height);return e.width=t,e.height=n,!!i},dataChangeRequiresRefresh:function(t){var n=t.length>0||t.length<e.dataLength;return e.dataLength=t.length,!!n}}}function h(){return T||(T=new e({afterItemsNode:M[0],containerNode:S,heightData:A,widthData:V,forceRefreshImages:!(!l(c.forceRefreshImages)||"false"===c.forceRefreshImages),keyExpression:I,renderBuffer:D,scope:i,scrollView:s.scrollView,transclude:u}))}function p(){var e=angular.element(b.__content.querySelector(".collection-repeat-after-container"));if(!e.length){var t=!1,n=[].filter.call(b.__content.childNodes,function(e){return ionic.DomUtil.contains(e,S)?(t=!0,!1):t});e=angular.element('<span class="collection-repeat-after-container">'),b.options.scrollingX&&e.addClass("horizontal"),e.append(n),b.__content.appendChild(e[0])}return e}function v(){L?m(L,A):A.computed=!0,R?m(R,V):V.computed=!0}function g(){var e=P.length>0;if(e&&(A.computed||V.computed)&&w(),e&&A.computed){if(A.value=E.height,!A.value)throw new Error('collection-repeat tried to compute the height of repeated elements "'+k+'", but was unable to. Please provide the "item-height" attribute. http://ionicframework.com/docs/api/directive/collectionRepeat/')}else!A.dynamic&&A.getValue&&(A.value=A.getValue());if(e&&V.computed){if(V.value=E.width,!V.value)throw new Error('collection-repeat tried to compute the width of repeated elements "'+k+'", but was unable to. Please provide the "item-width" attribute. http://ionicframework.com/docs/api/directive/collectionRepeat/')}else!V.dynamic&&V.getValue&&(V.value=V.getValue());h().refreshLayout()}function m(e,n){if(e){var i;try{i=t(e)}catch(o){e.trim().match(/\d+(px|%)$/)&&(e='"'+e+'"'),i=t(e)}var r=e.replace(/(\'|\"|px|%)/g,"").trim(),a=r.length&&!/([a-zA-Z]|\$|:|\?)/.test(r);if(n.attrValue=e,a)if(e.indexOf("%")>-1){var c=parseFloat(i())/100;n.getValue=n===A?function(){return Math.floor(c*b.__clientHeight)}:function(){return Math.floor(c*b.__clientWidth)}}else n.value=parseInt(i());else n.dynamic=!0,n.getValue=n===A?function(e,t){var n=i(e,t);return n.charAt&&"%"===n.charAt(n.length-1)?Math.floor(parseFloat(n)/100*b.__clientHeight):parseInt(n)}:function(e,t){var n=i(e,t);return n.charAt&&"%"===n.charAt(n.length-1)?Math.floor(parseFloat(n)/100*b.__clientWidth):parseInt(n)}}}function w(){O||u(H=i.$new(),function(e){e[0].removeAttribute("collection-repeat"),O=e[0]}),H[I]=(x(i)||[])[0],o.$$phase||H.$digest(),S.appendChild(O);var e=n.getComputedStyle(O);E.width=parseInt(e.width),E.height=parseInt(e.height),S.removeChild(O)}var b=s.scrollView,y=a[0],S=angular.element('<div class="collection-repeat-container">')[0];if(y.parentNode.replaceChild(S,y),b.options.scrollingX&&b.options.scrollingY)throw new Error("collection-repeat expected a parent x or y scrollView, not an xy scrollView.");var k=c.collectionRepeat,C=k.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+track\s+by\s+([\s\S]+?))?\s*$/);if(!C)throw new Error("collection-repeat expected expression in form of '_item_ in _collection_[ track by _id_]' but got '"+c.collectionRepeat+"'.");var T,I=C[1],B=C[2],x=t(B),A={},V={},E={},P=[],_=c.itemRenderBuffer||c.collectionBufferSize,D=angular.isDefined(_)?parseInt(_):$,L=c.itemHeight||c.collectionItemHeight,R=c.itemWidth||c.collectionItemWidth,M=p(),N=f();v(),s.$element.on("scroll-resize",g),angular.element(n).on("resize",d);var z=o.$on("$ionicExposeAside",ionic.animationFrameThrottle(function(){s.scrollView.resize(),d()}));r(g,0,!1),i.$watchCollection(x,function(e){if(P=e||(e=[]),!angular.isArray(e))throw new Error("collection-repeat expected an array for '"+B+"', but got a "+typeof value);i.$$postDigest(function(){h().setData(P),N.dataChangeRequiresRefresh(P)&&g()})}),i.$on("$destroy",function(){angular.element(n).off("resize",d),z(),s.$element&&s.$element.off("scroll-resize",g),O&&O.parentNode&&O.parentNode.removeChild(O),H&&H.$destroy(),H=O=null,T&&T.destroy(),T=null});var O,H}return{restrict:"A",priority:1e3,transclude:"element",$$tlb:!0,require:"^^$ionicScroll",link:a}}function t(e,t,n){var i={primaryPos:0,secondaryPos:0,primarySize:0,secondarySize:0,rowPrimarySize:0};return function(o){function r(){return a(!0)}function a(t){if(!a.destroyed){var n,o,r,l,u,d=ee.getScrollValue(),f=d+ee.scrollPrimarySize;ee.updateRenderRange(d,f),F=Math.max(0,F-T),W=Math.min(A.length-1,W+T);for(n in Z)(F>n||n>W)&&(r=Z[n],delete Z[n],G.push(r),r.isShown=!1);for(n=F;W>=n;n++)n>=A.length||Z[n]&&!t||(r=Z[n]||(Z[n]=G.length?G.pop():j.length?j.shift():new s),K.push(r),r.isShown=!0,u=r.scope,u.$index=n,u[C]=A[n],u.$first=0===n,u.$last=n===A.length-1,u.$middle=!(u.$first||u.$last),u.$odd=!(u.$even=0===(1&n)),u.$$disconnected&&ionic.Utils.reconnectScope(r.scope),l=ee.getDimensions(n),(r.secondaryPos!==l.secondaryPos||r.primaryPos!==l.primaryPos)&&(r.node.style[ionic.CSS.TRANSFORM]=O.replace(N,r.primaryPos=l.primaryPos).replace(z,r.secondaryPos=l.secondaryPos)),(r.secondarySize!==l.secondarySize||r.primarySize!==l.primarySize)&&(r.node.style.cssText=r.node.style.cssText.replace(m,H.replace(N,(r.primarySize=l.primarySize)+1).replace(z,r.secondarySize=l.secondarySize))));for(W===A.length-1&&(l=ee.getDimensions(A.length-1)||i,w.style[ionic.CSS.TRANSFORM]=O.replace(N,l.primaryPos+l.primarySize).replace(z,0));G.length;)r=G.pop(),r.scope.$broadcast("$collectionRepeatLeave"),ionic.Utils.disconnectScope(r.scope),j.push(r),r.node.style[ionic.CSS.TRANSFORM]="translate3d(-9999px,-9999px,0)",r.primaryPos=r.secondaryPos=null;if(y)for(n=0,o=K.length;o>n&&(r=K[n]);n++)if(r.images)for(var h,p=0,v=r.images.length;v>p&&(h=r.images[p]);p++){var $=h.src;h.src=g,h.src=$}if(t)for(var b=e.$$phase;K.length;)r=K.pop(),b||r.scope.$digest();else c()}}function c(){var t;c.running||(c.running=!0,n(function(){for(var n=e.$$phase;K.length;)t=K.pop(),t.isShown&&(n||t.scope.$digest());c.running=!1}))}function s(){var e=this;this.scope=I.$new(),this.id="item"+J++,x(this.scope,function(t){e.element=t,e.element.data("$$collectionRepeatItem",e),e.node=t[0],e.node.style[ionic.CSS.TRANSFORM]="translate3d(-9999px,-9999px,0)",e.node.style.cssText+=" height: 0px; width: 0px;",ionic.Utils.disconnectScope(e.scope),b.appendChild(e.node),e.images=t[0].getElementsByTagName("img")})}function l(){this.getItemPrimarySize=P,this.getItemSecondarySize=D,this.getScrollValue=function(){return Math.max(0,Math.min(B.__scrollTop-q,B.__maxScrollTop-q-U))},this.refreshDirection=function(){this.scrollPrimarySize=B.__clientHeight,this.scrollSecondarySize=B.__clientWidth,this.estimatedPrimarySize=v,this.estimatedSecondarySize=$,this.estimatedItemsAcross=R&&Math.floor(B.__clientWidth/$)||1}}function u(){this.getItemPrimarySize=D,this.getItemSecondarySize=P,this.getScrollValue=function(){return Math.max(0,Math.min(B.__scrollLeft-q,B.__maxScrollLeft-q-U))},this.refreshDirection=function(){this.scrollPrimarySize=B.__clientWidth,this.scrollSecondarySize=B.__clientHeight,this.estimatedPrimarySize=$,this.estimatedSecondarySize=v,this.estimatedItemsAcross=R&&Math.floor(B.__clientHeight/v)||1}}function d(){this.getEstimatedSecondaryPos=function(e){return e%this.estimatedItemsAcross*this.estimatedSecondarySize},this.getEstimatedPrimaryPos=function(e){return Math.floor(e/this.estimatedItemsAcross)*this.estimatedPrimarySize},this.getEstimatedIndex=function(e){return Math.floor(e/this.estimatedPrimarySize)*this.estimatedItemsAcross}}function f(){this.getEstimatedSecondaryPos=function(){return 0},this.getEstimatedPrimaryPos=function(e){return e*this.estimatedPrimarySize},this.getEstimatedIndex=function(e){return Math.floor(e/this.estimatedPrimarySize)}}function h(){this.getContentSize=function(){return this.getEstimatedPrimaryPos(A.length-1)+this.estimatedPrimarySize+q+U};var e={};this.getDimensions=function(t){return e.primaryPos=this.getEstimatedPrimaryPos(t),e.secondaryPos=this.getEstimatedSecondaryPos(t),e.primarySize=this.estimatedPrimarySize,e.secondarySize=this.estimatedSecondarySize,e},this.updateRenderRange=function(e,t){F=Math.max(0,this.getEstimatedIndex(e)),W=Math.min(A.length-1,this.getEstimatedIndex(t)+this.estimatedItemsAcross-1),Y=Math.max(0,this.getEstimatedPrimaryPos(F)),X=this.getEstimatedPrimaryPos(W)+this.estimatedPrimarySize}}function p(){function e(e){var t,r,a;for(t=Math.max(0,n);e>=t&&(a=c[t]);t++)r=c[t-1]||i,a.primarySize=o.getItemPrimarySize(t,A[t]),a.secondarySize=o.scrollSecondarySize,a.primaryPos=r.primaryPos+r.primarySize,a.secondaryPos=0}function t(e){var t,r,a;for(t=Math.max(n,0);e>=t&&(a=c[t]);t++)r=c[t-1]||i,a.secondarySize=Math.min(o.getItemSecondarySize(t,A[t]),o.scrollSecondarySize),a.secondaryPos=r.secondaryPos+r.secondarySize,0===t||a.secondaryPos+a.secondarySize>o.scrollSecondarySize?(a.secondaryPos=0,a.primarySize=o.getItemPrimarySize(t,A[t]),a.primaryPos=r.primaryPos+r.rowPrimarySize,a.rowStartIndex=t,a.rowPrimarySize=a.primarySize):(a.primarySize=o.getItemPrimarySize(t,A[t]),a.primaryPos=r.primaryPos,a.rowStartIndex=r.rowStartIndex,c[a.rowStartIndex].rowPrimarySize=a.rowPrimarySize=Math.max(c[a.rowStartIndex].rowPrimarySize,a.primarySize),a.rowPrimarySize=Math.max(a.primarySize,a.rowPrimarySize))}var n,o=this,r=ionic.debounce(Q,25,!0),a=R?t:e,c=[];this.getContentSize=function(){var e=c[n]||i;return(e.primaryPos+e.primarySize||0)+this.getEstimatedPrimaryPos(A.length-n-1)+q+U},this.onDestroy=function(){c.length=0},this.onRefreshData=function(){var e,t;for(e=c.length,t=A.length;t>e;e++)c.push({});n=-1},this.onRefreshLayout=function(){n=-1},this.getDimensions=function(e){return e=Math.min(e,A.length-1),e>n&&(e>.9*A.length?(a(A.length-1),n=A.length-1,Q()):(a(e),n=e,r())),c[e]};var s=-1,l=-1;this.updateRenderRange=function(e,t){var n,i,o;if(this.getDimensions(2*this.getEstimatedIndex(t)),-1===s||0===e)n=0;else if(e>=l)for(n=s,i=A.length;i>n&&!((o=this.getDimensions(n))&&o.primaryPos+o.rowPrimarySize>=e);n++);else for(n=s;n>=0;n--)if((o=this.getDimensions(n))&&o.primaryPos<=e){n=R?o.rowStartIndex:n;break}F=Math.min(Math.max(0,n),A.length-1),Y=-1!==F?this.getDimensions(F).primaryPos:-1;var r;for(n=F+1,i=A.length;i>n;n++)if((o=this.getDimensions(n))&&o.primaryPos+o.rowPrimarySize>t){if(R)for(r=o;i-1>n&&(o=this.getDimensions(n+1)).primaryPos===r.primaryPos;)n++;break}W=Math.min(n,A.length-1),X=-1!==W?(o=this.getDimensions(W)).primaryPos+(o.rowPrimarySize||o.primarySize):-1,l=e,s=F}}var v,$,w=o.afterItemsNode,b=o.containerNode,y=o.forceRefreshImages,S=o.heightData,k=o.widthData,C=o.keyExpression,T=o.renderBuffer,I=o.scope,B=o.scrollView,x=o.transclude,A=[],V={},E=S.getValue||function(){return S.value},P=function(e,t){return V[C]=t,V.$index=e,E(I,V)},_=k.getValue||function(){return k.value},D=function(e,t){return V[C]=t,V.$index=e,_(I,V)},L=!!B.options.scrollingY,R=L?k.dynamic||k.value!==B.__clientWidth:S.dynamic||S.value!==B.__clientHeight,M=!S.dynamic&&!k.dynamic,N="PRIMARY",z="SECONDARY",O=L?"translate3d(SECONDARYpx,PRIMARYpx,0)":"translate3d(PRIMARYpx,SECONDARYpx,0)",H=L?"height: PRIMARYpx; width: SECONDARYpx;":"height: SECONDARYpx; width: PRIMARYpx;",q=0,U=0,F=-1,W=-1,X=-1,Y=-1,j=[],G=[],K=[],Z={},J=0,Q=L?function(){B.setDimensions(null,null,null,ee.getContentSize(),!0)}:function(){B.setDimensions(null,null,ee.getContentSize(),null,!0)},ee=L?new l:new u;(R?d:f).call(ee),(M?h:p).call(ee);var te=L?"getContentHeight":"getContentWidth",ne=B.options[te];B.options[te]=angular.bind(ee,ee.getContentSize),B.__$callback=B.__callback,B.__callback=function(e,t,n,i){var o=ee.getScrollValue();(-1===F||o+ee.scrollPrimarySize>X||Y>o)&&a(),B.__$callback(e,t,n,i)};var ie=!1,oe=!1;this.refreshLayout=function(){A.length?(v=P(0,A[0]),$=D(0,A[0])):(v=100,$=100);var e=getComputedStyle(w)||{},n=w.firstElementChild&&getComputedStyle(w.firstElementChild)||{},i=w.lastElementChild&&getComputedStyle(w.lastElementChild)||{};U=(parseInt(e[L?"height":"width"])||0)+(n&&parseInt(n[L?"marginTop":"marginLeft"])||0)+(i&&parseInt(i[L?"marginBottom":"marginRight"])||0),q=0;var o=b;do q+=o[L?"offsetTop":"offsetLeft"];while(ionic.DomUtil.contains(B.__content,o=o.offsetParent));var a=b.previousElementSibling,c=a?t.getComputedStyle(a):{},l=parseInt(c[L?"marginBottom":"marginRight"]||0);if(b.style[ionic.CSS.TRANSFORM]=O.replace(N,-l).replace(z,0),q-=l,B.__clientHeight&&B.__clientWidth||(B.__clientWidth=B.__container.clientWidth,B.__clientHeight=B.__container.clientHeight),(ee.onRefreshLayout||angular.noop)(),ee.refreshDirection(),Q(),!ie)for(var u=Math.max(20,3*T),d=0;u>d;d++)j.push(new s);ie=!0,ie&&oe&&((B.__scrollLeft>B.__maxScrollLeft||B.__scrollTop>B.__maxScrollTop)&&B.resize(),r(!0))},this.setData=function(e){A=e,(ee.onRefreshData||angular.noop)(),oe=!0},this.destroy=function(){a.destroyed=!0,j.forEach(function(e){e.scope.$destroy(),e.scope=e.element=e.node=e.images=null}),j.length=K.length=G.length=0,Z={},B.options[te]=ne,B.__callback=B.__$callback,B.resize(),(ee.onDestroy||angular.noop)()}}}function n(e){return["$ionicGesture","$parse",function(t,n){var i=e.substr(2).toLowerCase();return function(o,r,a){var c=n(a[e]),s=function(e){o.$apply(function(){c(o,{$event:e})})},l=t.on(i,s,r);o.$on("$destroy",function(){t.off(l,i,s)})}}]}function i(e){return["$document","$timeout",function(t,n){return{restrict:"E",controller:"$ionicHeaderBar",compile:function(i){function o(t,n,i,o){e?(t.$watch(function(){return n[0].className},function(e){var n=-1===e.indexOf("ng-hide"),i=-1!==e.indexOf("bar-subheader");t.$hasHeader=n&&!i,t.$hasSubheader=n&&i,t.$emit("$ionicSubheader",t.$hasSubheader)}),t.$on("$destroy",function(){delete t.$hasHeader,delete t.$hasSubheader}),o.align(),t.$on("$ionicHeader.align",function(){ionic.requestAnimationFrame(function(){o.align()})})):(t.$watch(function(){return n[0].className},function(e){var n=-1===e.indexOf("ng-hide"),i=-1!==e.indexOf("bar-subfooter");t.$hasFooter=n&&!i,t.$hasSubfooter=n&&i}),t.$on("$destroy",function(){delete t.$hasFooter,delete t.$hasSubfooter}),t.$watch("$hasTabs",function(e){n.toggleClass("has-tabs",!!e)}),o.align(),t.$on("$ionicFooter.align",function(){ionic.requestAnimationFrame(function(){o.align()})}))}return i.addClass(e?"bar bar-header":"bar bar-footer"),n(function(){e&&t[0].getElementsByClassName("tabs-top").length&&i.addClass("has-tabs-top")}),{pre:o}}}}]}function o(e){return e.clientHeight}function r(e){e.stopPropagation()}var a=angular.module("ionic",["ngAnimate","ngSanitize","ui.router","ngIOS9UIWebViewPatch"]),c=angular.extend,s=angular.forEach,l=angular.isDefined,u=angular.isNumber,d=angular.isString,f=angular.element,h=angular.noop;a.factory("$ionicActionSheet",["$rootScope","$compile","$animate","$timeout","$ionicTemplateLoader","$ionicPlatform","$ionicBody","IONIC_BACK_PRIORITY",function(e,t,n,i,o,r,a,s){function l(o){function l(e){e&&/icon/.test(e)&&(u.$actionSheetHasIcon=!0)}var u=e.$new(!0);c(u,{cancel:h,destructiveButtonClicked:h,buttonClicked:h,$deregisterBackButton:h,buttons:[],cancelOnStateChange:!0},o||{});for(var d=0;d<u.buttons.length;d++)l(u.buttons[d].text);l(u.cancelText),l(u.destructiveText);var p=u.element=t('<ion-action-sheet ng-class="cssClass" buttons="buttons"></ion-action-sheet>')(u),v=f(p[0].querySelector(".action-sheet-wrapper")),g=u.cancelOnStateChange?e.$on("$stateChangeSuccess",function(){u.cancel()}):h;return u.removeSheet=function(e){u.removed||(u.removed=!0,v.removeClass("action-sheet-up"),i(function(){a.removeClass("action-sheet-open")},400),u.$deregisterBackButton(),g(),n.removeClass(p,"active").then(function(){u.$destroy(),p.remove(),u.cancel.$scope=v=null,(e||h)(o.buttons)}))},u.showSheet=function(e){u.removed||(a.append(p).addClass("action-sheet-open"),n.addClass(p,"active").then(function(){u.removed||(e||h)()}),i(function(){u.removed||v.addClass("action-sheet-up")},20,!1))},u.$deregisterBackButton=r.registerBackButtonAction(function(){i(u.cancel)},s.actionSheet),u.cancel=function(){u.removeSheet(o.cancel)},u.buttonClicked=function(e){o.buttonClicked(e,o.buttons[e])===!0&&u.removeSheet()},u.destructiveButtonClicked=function(){o.destructiveButtonClicked()===!0&&u.removeSheet()},u.showSheet(),u.cancel.$scope=u,u.cancel}return{show:l}}]),f.prototype.addClass=function(e){var t,n,i,o,r,a;if(e&&"ng-scope"!=e&&"ng-isolate-scope"!=e)for(t=0;t<this.length;t++)if(o=this[t],o.setAttribute)if(e.indexOf(" ")<0&&o.classList.add)o.classList.add(e);else{for(a=(" "+(o.getAttribute("class")||"")+" ").replace(/[\n\t]/g," "),r=e.split(" "),n=0;n<r.length;n++)i=r[n].trim(),-1===a.indexOf(" "+i+" ")&&(a+=i+" ");o.setAttribute("class",a.trim())}return this},f.prototype.removeClass=function(e){var t,n,i,o,r;if(e)for(t=0;t<this.length;t++)if(r=this[t],r.getAttribute)if(e.indexOf(" ")<0&&r.classList.remove)r.classList.remove(e);else for(i=e.split(" "),n=0;n<i.length;n++)o=i[n],r.setAttribute("class",(" "+(r.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").replace(" "+o.trim()+" "," ").trim());return this},a.factory("$ionicBackdrop",["$document","$timeout","$$rAF","$rootScope",function(e,t,n,i){function o(){s++,1===s&&(c.addClass("visible"),i.$broadcast("backdrop.shown"),n(function(){s>=1&&c.addClass("active")}))}function r(){1===s&&(c.removeClass("active"),i.$broadcast("backdrop.hidden"),t(function(){0===s&&c.removeClass("visible")},400,!1)),s=Math.max(0,s-1)}function a(){return c}var c=f('<div class="backdrop">'),s=0;return e[0].body.appendChild(c[0]),{retain:o,release:r,getElement:a,_element:c}}]),a.factory("$ionicBind",["$parse","$interpolate",function(e,t){var n=/^\s*([@=&])(\??)\s*(\w*)\s*$/;return function(i,o,r){s(r||{},function(r,a){var c,s,l=r.match(n)||[],u=l[3]||a,d=l[1];switch(d){case"@":if(!o[u])return;o.$observe(u,function(e){i[a]=e}),o[u]&&(i[a]=t(o[u])(i));break;case"=":if(!o[u])return;s=i.$watch(o[u],function(e){i[a]=e}),i.$on("$destroy",s);break;case"&":if(o[u]&&o[u].match(RegExp(a+"(.*?)")))throw new Error('& expression binding "'+a+'" looks like it will recursively call "'+o[u]+'" and cause a stack overflow! Please choose a different scopeName.');c=e(o[u]),i[a]=function(e){return c(i,e)}}})}}]),a.factory("$ionicBody",["$document",function(e){return{addClass:function(){for(var t=0;t<arguments.length;t++)e[0].body.classList.add(arguments[t]);return this},removeClass:function(){for(var t=0;t<arguments.length;t++)e[0].body.classList.remove(arguments[t]);return this},enableClass:function(e){var t=Array.prototype.slice.call(arguments).slice(1);return e?this.addClass.apply(this,t):this.removeClass.apply(this,t),this},append:function(t){return e[0].body.appendChild(t.length?t[0]:t),this},get:function(){return e[0].body}}}]),a.factory("$ionicClickBlock",["$document","$ionicBody","$timeout",function(e,t,n){function i(e){e.preventDefault(),e.stopPropagation()}function o(){s&&(a?a.classList.remove(l):(a=e[0].createElement("div"),a.className="click-block",t.append(a),a.addEventListener("touchstart",i),a.addEventListener("mousedown",i)),s=!1)}function r(){a&&a.classList.add(l)}var a,c,s,l="click-block-hide";return{show:function(e){s=!0,n.cancel(c),c=n(this.hide,e||310,!1),o()},hide:function(){s=!1,n.cancel(c),r()}}}]),a.factory("$ionicGesture",[function(){return{on:function(e,t,n,i){return window.ionic.onGesture(e,t,n[0],i)},off:function(e,t,n){return window.ionic.offGesture(e,t,n)}}}]),a.factory("$ionicHistory",["$rootScope","$state","$location","$window","$timeout","$ionicViewSwitcher","$ionicNavViewDelegate",function(e,t,n,i,o,r,a){function s(e){return e?R.views[e]:null}function u(e){return e?s(e.backViewId):null}function d(e){return e?s(e.forwardViewId):null}function f(e){return e?R.histories[e]:null}function h(e){var t=p(e);return R.histories[t.historyId]||(R.histories[t.historyId]={historyId:t.historyId,parentHistoryId:p(t.scope.$parent).historyId,stack:[],cursor:-1}),f(t.historyId)}function p(t){for(var n=t;n;){if(n.hasOwnProperty("$historyId"))return{historyId:n.$historyId,scope:n};n=n.$parent}return{historyId:"root",scope:e}}function v(e){R.currentView=s(e),R.backView=u(R.currentView),R.forwardView=d(R.currentView)}function g(){var e;if(t&&t.current&&t.current.name){if(e=t.current.name,t.params)for(var n in t.params)t.params.hasOwnProperty(n)&&t.params[n]&&(e+="_"+n+"="+t.params[n]);return e}return ionic.Utils.nextUid()}function m(){var e;if(t&&t.params)for(var n in t.params)t.params.hasOwnProperty(n)&&(e=e||{},e[n]=t.params[n]);return e}function $(e){return e&&e.length&&/ion-side-menus|ion-tabs/i.test(e[0].tagName)}function w(e,t){if(t&&t.$$state&&t.$$state.self.canSwipeBack===!1)return!1;if(e&&"false"===e.attr("can-swipe-back"))return!1;var n=e.find("ion-view");return n&&"false"===n.attr("can-swipe-back")?!1:!0}var b,y,S,k,C,T="initialView",I="newView",B="moveBack",x="moveForward",A="back",V="forward",E="enter",P="exit",_="swap",D="none",L=0,R={histories:{root:{historyId:"root",parentHistoryId:null,stack:[],cursor:-1}},views:{},backView:null,forwardView:null,currentView:null},M=function(){};return M.prototype.initialize=function(e){if(e){for(var t in e)this[t]=e[t];return this}return null},M.prototype.go=function(){if(this.stateName)return t.go(this.stateName,this.stateParams);if(this.url&&this.url!==n.url()){if(R.backView===this)return i.history.go(-1);if(R.forwardView===this)return i.history.go(1);n.url(this.url)}return null},M.prototype.destroy=function(){this.scope&&(this.scope.$destroy&&this.scope.$destroy(),this.scope=null)},{register:function(e,t){var i,a,c,l=g(),d=h(e),$=R.currentView,M=R.backView,N=R.forwardView,z=null,O=null,H=D,q=d.historyId,U=n.url();if(b!==l&&(b=l,L++),C)z=C.viewId,O=C.action,H=C.direction,C=null;else if(M&&M.stateId===l)z=M.viewId,q=M.historyId,O=B,M.historyId===$.historyId?H=A:$&&(H=P,i=f(M.historyId),i&&i.parentHistoryId===$.historyId?H=E:(i=f($.historyId),i&&i.parentHistoryId===d.parentHistoryId&&(H=_)));else if(N&&N.stateId===l)z=N.viewId,q=N.historyId,O=x,N.historyId===$.historyId?H=V:$&&(H=P,$.historyId===d.parentHistoryId?H=E:(i=f($.historyId),i&&i.parentHistoryId===d.parentHistoryId&&(H=_))),i=p(e),N.historyId&&i.scope&&(i.scope.$historyId=N.historyId,q=N.historyId);else if($&&$.historyId!==q&&d.cursor>-1&&d.stack.length>0&&d.cursor<d.stack.length&&d.stack[d.cursor].stateId===l){var F=d.stack[d.cursor];if(z=F.viewId,q=F.historyId,O=B,H=_,i=f($.historyId),i&&i.parentHistoryId===q?H=P:(i=f(q),i&&i.parentHistoryId===$.historyId&&(H=E)),i=s(F.backViewId),i&&F.historyId!==i.historyId){var W=Object.keys(R.views);W.forEach(function(e){var t=R.views[e];t.backViewId===F.viewId&&(t.backViewId=null)}),d.stack[d.cursor].backViewId=$.viewId}}else{if(c=r.createViewEle(t),this.isAbstractEle(c,t))return{action:"abstractView",direction:D,ele:c};if(z=ionic.Utils.nextUid(),$){if($.forwardViewId=z,O=I,N&&$.stateId!==N.stateId&&$.historyId===N.historyId&&(i=f(N.historyId))){for(a=i.stack.length-1;a>=N.index;a--){var X=i.stack[a];X&&X.destroy&&X.destroy(),i.stack.splice(a)}q=N.historyId}d.historyId===$.historyId?H=V:$.historyId!==d.historyId&&(H=E,i=f($.historyId),i&&i.parentHistoryId===d.parentHistoryId?H=_:(i=f(i.parentHistoryId),i&&i.historyId===d.historyId&&(H=P)))}else O=T;2>L&&(H=D),R.views[z]=this.createView({viewId:z,index:d.stack.length,historyId:d.historyId,backViewId:$&&$.viewId?$.viewId:null,forwardViewId:null,stateId:l,stateName:this.currentStateName(),stateParams:m(),url:U,canSwipeBack:w(c,t)}),d.stack.push(R.views[z])}if(S&&S(),o.cancel(k),y){if(y.disableAnimate&&(H=D),y.disableBack&&(R.views[z].backViewId=null),y.historyRoot){for(a=0;a<d.stack.length;a++)d.stack[a].viewId===z?(d.stack[a].index=0,d.stack[a].backViewId=d.stack[a].forwardViewId=null):delete R.views[d.stack[a].viewId];d.stack=[R.views[z]]}y=null}if(v(z),R.backView&&q==R.backView.historyId&&l==R.backView.stateId&&U==R.backView.url)for(a=0;a<d.stack.length;a++)if(d.stack[a].viewId==z){O="dupNav",H=D,a>0&&(d.stack[a-1].forwardViewId=null),R.forwardView=null,R.currentView.index=R.backView.index,R.currentView.backViewId=R.backView.backViewId,R.backView=u(R.backView),d.stack.splice(a,1);break}return d.cursor=R.currentView.index,{viewId:z,action:O,direction:H,historyId:q,enableBack:this.enabledBack(R.currentView),isHistoryRoot:0===R.currentView.index,ele:c}},registerHistory:function(e){e.$historyId=ionic.Utils.nextUid()},createView:function(e){var t=new M;return t.initialize(e)},getViewById:s,viewHistory:function(){return R},currentView:function(e){return arguments.length&&(R.currentView=e),R.currentView},currentHistoryId:function(){return R.currentView?R.currentView.historyId:null},currentTitle:function(e){return R.currentView?(arguments.length&&(R.currentView.title=e),R.currentView.title):void 0},backView:function(e){return arguments.length&&(R.backView=e),R.backView},backTitle:function(e){var t=e&&s(e.backViewId)||R.backView;return t&&t.title},forwardView:function(e){return arguments.length&&(R.forwardView=e),R.forwardView},currentStateName:function(){return t&&t.current?t.current.name:null},isCurrentStateNavView:function(e){return!!(t&&t.current&&t.current.views&&t.current.views[e])},goToHistoryRoot:function(e){if(e){var t=f(e);if(t&&t.stack.length){if(R.currentView&&R.currentView.viewId===t.stack[0].viewId)return;C={viewId:t.stack[0].viewId,action:B,direction:A},t.stack[0].go()}}},goBack:function(e){if(l(e)&&-1!==e){if(e>-1)return;var t=R.histories[this.currentHistoryId()],n=t.cursor+e+1;1>n&&(n=1),t.cursor=n,v(t.stack[n].viewId);for(var i=n-1,r=[],a=s(t.stack[i].forwardViewId);a&&(r.push(a.stateId||a.viewId),i++,!(i>=t.stack.length));)a=s(t.stack[i].forwardViewId);var c=this;r.length&&o(function(){c.clearCache(r)},300)}R.backView&&R.backView.go()},removeBackView:function(){var e=this,t=R.histories[this.currentHistoryId()],n=t.cursor,i=t.stack[n],o=t.stack[n-1],r=t.stack[n-2];o&&r&&(t.stack.splice(n-1,1),e.clearCache([o.viewId]),i.backViewId=r.viewId,i.index=i.index-1,r.forwardViewId=i.viewId,R.backView=r,t.currentCursor+=-1)},enabledBack:function(e){var t=u(e);return!(!t||t.historyId!==e.historyId)},clearHistory:function(){var e=R.histories,t=R.currentView;if(e)for(var n in e)e[n].stack&&(e[n].stack=[],e[n].cursor=-1),t&&t.historyId===n?(t.backViewId=t.forwardViewId=null,e[n].stack.push(t)):e[n].destroy&&e[n].destroy();for(var i in R.views)i!==t.viewId&&delete R.views[i];t&&v(t.viewId)},clearCache:function(e){return o(function(){a._instances.forEach(function(t){t.clearCache(e)})})},nextViewOptions:function(t){return S&&S(),arguments.length&&(o.cancel(k),null===t?y=t:(y=y||{},c(y,t),y.expire&&(S=e.$on("$stateChangeSuccess",function(){k=o(function(){y=null},y.expire)})))),y},isAbstractEle:function(e,t){return t&&t.$$state&&t.$$state.self["abstract"]?!0:!(!e||!$(e)&&!$(e.children()))},isActiveScope:function(e){if(!e)return!1;for(var t,n=e,i=this.currentHistoryId();n;){if(n.$$disconnected)return!1;if(!t&&n.hasOwnProperty("$historyId")&&(t=!0),i){if(n.hasOwnProperty("$historyId")&&i==n.$historyId)return!0;if(n.hasOwnProperty("$activeHistoryId")&&i==n.$activeHistoryId){if(n.hasOwnProperty("$historyId"))return!0;if(!t)return!0}}t&&n.hasOwnProperty("$activeHistoryId")&&(t=!1),n=n.$parent}return i?"root"==i:!0}}}]).run(["$rootScope","$state","$location","$document","$ionicPlatform","$ionicHistory","IONIC_BACK_PRIORITY",function(e,t,n,i,o,r,a){function c(e){var t=r.backView();return t?t.go():ionic.Platform.exitApp(),e.preventDefault(),!1}e.$on("$ionicView.beforeEnter",function(){ionic.keyboard&&ionic.keyboard.hide&&ionic.keyboard.hide()}),e.$on("$ionicHistory.change",function(e,i){if(!i)return null;var o=r.viewHistory(),a=i.historyId?o.histories[i.historyId]:null;if(a&&a.cursor>-1&&a.cursor<a.stack.length){var c=a.stack[a.cursor];return c.go(i)}!i.url&&i.uiSref&&(i.url=t.href(i.uiSref)),i.url&&(0===i.url.indexOf("#")&&(i.url=i.url.replace("#","")),i.url!==n.url()&&n.url(i.url))}),e.$ionicGoBack=function(e){r.goBack(e)},e.$on("$ionicView.afterEnter",function(e,t){t&&t.title&&(i[0].title=t.title)}),o.registerBackButtonAction(c,a.view)}]),a.provider("$ionicConfig",function(){function e(e,i){a.platform[e]=i,o.platform[e]={},t(a,a.platform[e]),n(a.platform[e],o.platform[e],"")}function t(e,n){for(var i in e)i!=r&&e.hasOwnProperty(i)&&(angular.isObject(e[i])?(l(n[i])||(n[i]={}),t(e[i],n[i])):l(n[i])||(n[i]=null))}function n(e,t,o){s(e,function(c,s){angular.isObject(e[s])?(t[s]={},n(e[s],t[s],o+"."+s)):t[s]=function(n){if(arguments.length)return e[s]=n,t;if(e[s]==r){var c=i(a.platform,ionic.Platform.platform()+o+"."+s);return c||c===!1?c:i(a.platform,"default"+o+"."+s)}return e[s]}})}function i(e,t){t=t.split(".");for(var n=0;n<t.length;n++){if(!e||!l(e[t[n]]))return null;e=e[t[n]]}return e}var o=this;o.platform={};var r="platform",a={views:{maxCache:r,forwardCache:r,transition:r,swipeBackEnabled:r,swipeBackHitWidth:r},navBar:{alignTitle:r,positionPrimaryButtons:r,positionSecondaryButtons:r,transition:r},backButton:{icon:r,text:r,previousTitleText:r},form:{checkbox:r,toggle:r},scrolling:{jsScrolling:r},spinner:{icon:r},tabs:{style:r,position:r},templates:{maxPrefetch:r},platform:{}};n(a,o,""),e("default",{views:{maxCache:10,forwardCache:!1,transition:"ios",swipeBackEnabled:!0,swipeBackHitWidth:45},navBar:{alignTitle:"center",positionPrimaryButtons:"left",positionSecondaryButtons:"right",transition:"view"},backButton:{icon:"ion-ios-arrow-back",text:"Back",previousTitleText:!0},form:{checkbox:"circle",toggle:"large"},scrolling:{jsScrolling:!0},spinner:{icon:"ios"},tabs:{style:"standard",position:"bottom"},templates:{maxPrefetch:30}}),e("ios",{}),e("android",{views:{transition:"android",swipeBackEnabled:!1},navBar:{alignTitle:"left",positionPrimaryButtons:"right",positionSecondaryButtons:"right"},backButton:{icon:"ion-android-arrow-back",text:!1,previousTitleText:!1},form:{checkbox:"square",toggle:"small"},spinner:{icon:"android"},tabs:{style:"striped",position:"top"},scrolling:{jsScrolling:!1}}),e("windowsphone",{spinner:{icon:"android"}}),o.transitions={views:{},navBar:{}},o.transitions.views.ios=function(e,t,n,i){function o(e,t,n,i){var o={};o[ionic.CSS.TRANSITION_DURATION]=r.shouldAnimate?"":0,o.opacity=t,i>-1&&(o.boxShadow="0 0 10px rgba(0,0,0,"+(r.shouldAnimate?.45*i:.3)+")"),o[ionic.CSS.TRANSFORM]="translate3d("+n+"%,0,0)",ionic.DomUtil.cachedStyles(e,o)}var r={run:function(i){"forward"==n?(o(e,1,99*(1-i),1-i),o(t,1-.1*i,-33*i,-1)):"back"==n?(o(e,1-.1*(1-i),-33*(1-i),-1),o(t,1,100*i,1-i)):(o(e,1,0,-1),o(t,0,0,-1))},shouldAnimate:i&&("forward"==n||"back"==n)};return r},o.transitions.navBar.ios=function(e,t,n,i){function o(e,t,n,i){var o={};o[ionic.CSS.TRANSITION_DURATION]=c.shouldAnimate?"":"0ms",o.opacity=1===t?"":t,e.setCss("buttons-left",o),e.setCss("buttons-right",o),e.setCss("back-button",o),o[ionic.CSS.TRANSFORM]="translate3d("+i+"px,0,0)",e.setCss("back-text",o),o[ionic.CSS.TRANSFORM]="translate3d("+n+"px,0,0)",e.setCss("title",o)}function r(e,t,n){if(e&&t){var i=(e.titleTextX()+e.titleWidth())*(1-n),r=t&&(t.titleTextX()-e.backButtonTextLeft())*(1-n)||0;o(e,n,i,r)}}function a(e,t,n){if(e&&t){var i=(-(e.titleTextX()-t.backButtonTextLeft())-e.titleLeftRight())*n;o(e,1-n,i,0)}}var c={run:function(n){var i=e.controller(),o=t&&t.controller();"back"==c.direction?(a(i,o,1-n),r(o,i,1-n)):(r(i,o,n),a(o,i,n))},direction:n,shouldAnimate:i&&("forward"==n||"back"==n)};return c},o.transitions.views.android=function(e,t,n,i){function o(e,t,n){var i={};i[ionic.CSS.TRANSITION_DURATION]=r.shouldAnimate?"":0,i[ionic.CSS.TRANSFORM]="translate3d("+t+"%,0,0)",i.opacity=n,ionic.DomUtil.cachedStyles(e,i)}i=i&&("forward"==n||"back"==n);var r={run:function(i){"forward"==n?(o(e,99*(1-i),1),o(t,-100*i,1)):"back"==n?(o(e,-100*(1-i),1),o(t,100*i,1)):(o(e,0,1),o(t,0,0))},shouldAnimate:i};return r},o.transitions.navBar.android=function(e,t,n,i){function o(e,t){if(e){var n={};n.opacity=1===t?"":t,e.setCss("buttons-left",n),e.setCss("buttons-right",n),e.setCss("back-button",n),e.setCss("back-text",n),e.setCss("title",n)}}return{run:function(n){o(e.controller(),n),o(t&&t.controller(),1-n)},shouldAnimate:i&&("forward"==n||"back"==n)}},
o.transitions.views.none=function(e,t){return{run:function(n){o.transitions.views.android(e,t,!1,!1).run(n)},shouldAnimate:!1}},o.transitions.navBar.none=function(e,t){return{run:function(n){o.transitions.navBar.ios(e,t,!1,!1).run(n),o.transitions.navBar.android(e,t,!1,!1).run(n)},shouldAnimate:!1}},o.setPlatformConfig=e,o.$get=function(){return o}}).config(["$compileProvider",function(e){e.aHrefSanitizationWhitelist(/^\s*(https?|sms|tel|geo|ftp|mailto|file|ghttps?|ms-appx-web|ms-appx|x-wmapp0):/),e.imgSrcSanitizationWhitelist(/^\s*(https?|ftp|file|content|blob|ms-appx|ms-appx-web|x-wmapp0):|data:image\//)}]);var p='<div class="loading-container"><div class="loading"></div></div>';a.constant("$ionicLoadingConfig",{template:"<ion-spinner></ion-spinner>"}).factory("$ionicLoading",["$ionicLoadingConfig","$ionicBody","$ionicTemplateLoader","$ionicBackdrop","$timeout","$q","$log","$compile","$ionicPlatform","$rootScope","IONIC_BACK_PRIORITY",function(e,t,n,i,o,r,a,s,l,u,d){function f(){return m||(m=n.compile({template:p,appendTo:t.get()}).then(function(e){return e.show=function(a){var c=a.templateUrl?n.load(a.templateUrl):r.when(a.template||a.content||"");e.scope=a.scope||e.scope,e.isShown||(e.hasBackdrop=!a.noBackdrop&&a.showBackdrop!==!1,e.hasBackdrop&&(i.retain(),i.getElement().addClass("backdrop-loading"))),a.duration&&(o.cancel(e.durationTimeout),e.durationTimeout=o(angular.bind(e,e.hide),+a.duration)),$(),$=l.registerBackButtonAction(h,d.loading),c.then(function(n){if(n){var i=e.element.children();i.html(n),s(i.contents())(e.scope)}e.isShown&&(e.element.addClass("visible"),ionic.requestAnimationFrame(function(){e.isShown&&(e.element.addClass("active"),t.addClass("loading-active"))}))}),e.isShown=!0},e.hide=function(){$(),e.isShown&&(e.hasBackdrop&&(i.release(),i.getElement().removeClass("backdrop-loading")),e.element.removeClass("active"),t.removeClass("loading-active"),e.element.removeClass("visible"),ionic.requestAnimationFrame(function(){!e.isShown&&e.element.removeClass("visible")})),o.cancel(e.durationTimeout),e.isShown=!1;var n=e.element.children();n.html("")},e})),m}function v(t){t=c({},e||{},t||{});var n=t.delay||t.showDelay||0;return w(),b(),t.hideOnStateChange&&(w=u.$on("$stateChangeSuccess",g),b=u.$on("$stateChangeError",g)),o.cancel(y),y=o(h,n),y.then(f).then(function(e){return e.show(t)})}function g(){return w(),b(),o.cancel(y),f().then(function(e){return e.hide()})}var m,$=h,w=h,b=h,y=r.when();return{show:v,hide:g,_getLoader:f}}]),a.factory("$ionicModal",["$rootScope","$ionicBody","$compile","$timeout","$ionicPlatform","$ionicTemplateLoader","$$q","$log","$ionicClickBlock","$window","IONIC_BACK_PRIORITY",function(e,t,n,i,o,r,a,s,l,u,d){var p=ionic.views.Modal.inherit({initialize:function(e){ionic.views.Modal.prototype.initialize.call(this,e),this.animation=e.animation||"slide-in-up"},show:function(e){var n=this;if(n.scope.$$destroyed)return s.error("Cannot call "+n.viewType+".show() after remove(). Please create a new "+n.viewType+" instance."),a.when();l.show(600),m.add(n);var r=f(n.modalEl);n.el.classList.remove("hide"),i(function(){n._isShown&&t.addClass(n.viewType+"-open")},400,!1),n.el.parentElement||(r.addClass(n.animation),t.append(n.el));var c=r.data("$$ionicScrollController");return c&&c.resize(),e&&n.positionView&&(n.positionView(e,r),n._onWindowResize=function(){n._isShown&&n.positionView(e,r)},ionic.on("resize",n._onWindowResize,window)),r.addClass("ng-enter active").removeClass("ng-leave ng-leave-active"),n._isShown=!0,n._deregisterBackButton=o.registerBackButtonAction(n.hardwareBackButtonClose?angular.bind(n,n.hide):h,d.modal),ionic.views.Modal.prototype.show.call(n),i(function(){n._isShown&&(r.addClass("ng-enter-active"),ionic.trigger("resize"),n.scope.$parent&&n.scope.$parent.$broadcast(n.viewType+".shown",n),n.el.classList.add("active"),n.scope.$broadcast("$ionicHeader.align"),n.scope.$broadcast("$ionicFooter.align"),n.scope.$broadcast("$ionic.modalPresented"))},20),i(function(){n._isShown&&(n.$el.on("touchmove",function(e){var t=ionic.DomUtil.getParentOrSelfWithClass(e.target,"scroll");t||e.preventDefault()}),n.$el.on("click",function(e){n.backdropClickToClose&&e.target===n.el&&m.isHighest(n)&&n.hide()}))},400)},hide:function(){var e=this,n=f(e.modalEl);return l.show(600),m.remove(e),e.el.classList.remove("active"),n.addClass("ng-leave"),i(function(){e._isShown||(n.addClass("ng-leave-active").removeClass("ng-enter ng-enter-active active"),e.scope.$broadcast("$ionic.modalRemoved"))},20,!1),e.$el.off("click"),e._isShown=!1,e.scope.$parent&&e.scope.$parent.$broadcast(e.viewType+".hidden",e),e._deregisterBackButton&&e._deregisterBackButton(),ionic.views.Modal.prototype.hide.call(e),e.positionView&&ionic.off("resize",e._onWindowResize,window),i(function(){t.removeClass(e.viewType+"-open"),e.el.classList.add("hide")},e.hideDelay||320)},remove:function(){var e,t,n=this;return n.scope.$parent&&n.scope.$parent.$broadcast(n.viewType+".removed",n),n._isShown?t=n.hide():(e=a.defer(),e.resolve(),t=e.promise),t.then(function(){n.scope.$destroy(),n.$el.remove()})},isShown:function(){return!!this._isShown}}),v=function(t,i){var o=i.scope&&i.scope.$new()||e.$new(!0);i.viewType=i.viewType||"modal",c(o,{$hasHeader:!1,$hasSubheader:!1,$hasFooter:!1,$hasSubfooter:!1,$hasTabs:!1,$hasTabsTop:!1});var r=n("<ion-"+i.viewType+">"+t+"</ion-"+i.viewType+">")(o);i.$el=r,i.el=r[0],i.modalEl=i.el.querySelector("."+i.viewType);var a=new p(i);return a.scope=o,i.scope||(o[i.viewType]=a),a},g=[],m={add:function(e){g.push(e)},remove:function(e){var t=g.indexOf(e);t>-1&&t<g.length&&g.splice(t,1)},isHighest:function(e){var t=g.indexOf(e);return t>-1&&t===g.length-1}};return{fromTemplate:function(e,t){var n=v(e,t||{});return n},fromTemplateUrl:function(e,t,n){var i;return angular.isFunction(t)&&(i=t,t=n),r.load(e).then(function(e){var n=v(e,t||{});return i&&i(n),n})},stack:m}}]),a.service("$ionicNavBarDelegate",ionic.DelegateService(["align","showBackButton","showBar","title","changeTitle","setTitle","getTitle","back","getPreviousTitle"])),a.service("$ionicNavViewDelegate",ionic.DelegateService(["clearCache"])),a.constant("IONIC_BACK_PRIORITY",{view:100,sideMenu:150,modal:200,actionSheet:300,popup:400,loading:500}).provider("$ionicPlatform",function(){return{$get:["$q","$ionicScrollDelegate",function(e,t){var n={onHardwareBackButton:function(e){ionic.Platform.ready(function(){document.addEventListener("backbutton",e,!1)})},offHardwareBackButton:function(e){ionic.Platform.ready(function(){document.removeEventListener("backbutton",e)})},$backButtonActions:{},registerBackButtonAction:function(e,t,i){n._hasBackButtonHandler||(n.$backButtonActions={},n.onHardwareBackButton(n.hardwareBackButtonClick),n._hasBackButtonHandler=!0);var o={id:i?i:ionic.Utils.nextUid(),priority:t?t:0,fn:e};return n.$backButtonActions[o.id]=o,function(){delete n.$backButtonActions[o.id]}},hardwareBackButtonClick:function(e){var t,i;for(i in n.$backButtonActions)(!t||n.$backButtonActions[i].priority>=t.priority)&&(t=n.$backButtonActions[i]);return t?(t.fn(e),t):void 0},is:function(e){return ionic.Platform.is(e)},on:function(e,t){return ionic.Platform.ready(function(){document.addEventListener(e,t,!1)}),function(){ionic.Platform.ready(function(){document.removeEventListener(e,t)})}},ready:function(n){var i=e.defer();return ionic.Platform.ready(function(){window.addEventListener("statusTap",function(){t.scrollTop(!0)}),i.resolve(),n&&n()}),i.promise}};return n}]}}),a.factory("$ionicPopover",["$ionicModal","$ionicPosition","$document","$window",function(e,t,n,i){function o(e,n){var o=f(e.target||e),a=t.offset(o),c=n.prop("offsetWidth"),s=n.prop("offsetHeight"),l=i.innerWidth,u=i.innerHeight,d={left:a.left+a.width/2-c/2},h=f(n[0].querySelector(".popover-arrow"));d.left<r?d.left=r:d.left+c+r>l&&(d.left=l-c-r),a.top+a.height+s>u&&a.top-s>0?(d.top=a.top-s,n.addClass("popover-bottom")):(d.top=a.top+a.height,n.removeClass("popover-bottom")),h.css({left:a.left+a.width/2-h.prop("offsetWidth")/2-d.left+"px"}),n.css({top:d.top+"px",left:d.left+"px",marginLeft:"0",opacity:"1"})}var r=6,a={viewType:"popover",hideDelay:1,animation:"none",positionView:o};return{fromTemplate:function(t,n){return e.fromTemplate(t,ionic.Utils.extend({},a,n))},fromTemplateUrl:function(t,n){return e.fromTemplateUrl(t,ionic.Utils.extend({},a,n))}}}]);var v='<div class="popup-container" ng-class="cssClass"><div class="popup"><div class="popup-head"><h3 class="popup-title" ng-bind-html="title"></h3><h5 class="popup-sub-title" ng-bind-html="subTitle" ng-if="subTitle"></h5></div><div class="popup-body"></div><div class="popup-buttons" ng-show="buttons.length"><button ng-repeat="button in buttons" ng-click="$buttonTapped(button, $event)" class="button" ng-class="button.type || \'button-default\'" ng-bind-html="button.text"></button></div></div></div>';a.factory("$ionicPopup",["$ionicTemplateLoader","$ionicBackdrop","$q","$timeout","$rootScope","$ionicBody","$compile","$ionicPlatform","$ionicModal","IONIC_BACK_PRIORITY",function(e,t,n,i,o,r,a,s,l,u){function d(t){t=c({scope:null,title:"",buttons:[]},t||{});var s={};return s.scope=(t.scope||o).$new(),s.element=f(v),s.responseDeferred=n.defer(),r.get().appendChild(s.element[0]),a(s.element)(s.scope),c(s.scope,{title:t.title,buttons:t.buttons,subTitle:t.subTitle,cssClass:t.cssClass,$buttonTapped:function(e,t){var n=(e.onTap||h).apply(s,[t]);t=t.originalEvent||t,t.defaultPrevented||s.responseDeferred.resolve(n)}}),n.when(t.templateUrl?e.load(t.templateUrl):t.template||t.content||"").then(function(e){var t=f(s.element[0].querySelector(".popup-body"));e?(t.html(e),a(t.contents())(s.scope)):t.remove()}),s.show=function(){s.isShown||s.removed||(l.stack.add(s),s.isShown=!0,ionic.requestAnimationFrame(function(){s.isShown&&(s.element.removeClass("popup-hidden"),s.element.addClass("popup-showing active"),m(s.element))}))},s.hide=function(e){return e=e||h,s.isShown?(l.stack.remove(s),s.isShown=!1,s.element.removeClass("active"),s.element.addClass("popup-hidden"),void i(e,250,!1)):e()},s.remove=function(){s.removed||(s.hide(function(){s.element.remove(),s.scope.$destroy()}),s.removed=!0)},s}function p(){var e=S[S.length-1];e&&e.responseDeferred.resolve()}function g(e){function n(){S.push(o),i(o.show,a,!1),o.responseDeferred.promise.then(function(e){var n=S.indexOf(o);return-1!==n&&S.splice(n,1),o.remove(),S.length>0?S[S.length-1].show():(t.release(),i(function(){S.length||r.removeClass("popup-open")},400,!1),(k._backButtonActionDone||h)()),e})}var o=k._createPopup(e),a=0;return S.length>0?(a=y.stackPushDelay,i(S[S.length-1].hide,a,!1)):(r.addClass("popup-open"),t.retain(),k._backButtonActionDone=s.registerBackButtonAction(p,u.popup)),o.responseDeferred.promise.close=function(e){o.removed||o.responseDeferred.resolve(e)},o.responseDeferred.notify({close:o.responseDeferred.close}),n(),o.responseDeferred.promise}function m(e){var t=e[0].querySelector("[autofocus]");t&&t.focus()}function $(e){return g(c({buttons:[{text:e.okText||"OK",type:e.okType||"button-positive",onTap:function(){return!0}}]},e||{}))}function w(e){return g(c({buttons:[{text:e.cancelText||"Cancel",type:e.cancelType||"button-default",onTap:function(){return!1}},{text:e.okText||"OK",type:e.okType||"button-positive",onTap:function(){return!0}}]},e||{}))}function b(e){var t=o.$new(!0);t.data={},t.data.fieldtype=e.inputType?e.inputType:"text",t.data.response=e.defaultText?e.defaultText:"",t.data.placeholder=e.inputPlaceholder?e.inputPlaceholder:"",t.data.maxlength=e.maxLength?parseInt(e.maxLength):"";var n="";return e.template&&/<[a-z][\s\S]*>/i.test(e.template)===!1&&(n="<span>"+e.template+"</span>",delete e.template),g(c({template:n+'<input ng-model="data.response" type="{{ data.fieldtype }}"maxlength="{{ data.maxlength }}"placeholder="{{ data.placeholder }}">',scope:t,buttons:[{text:e.cancelText||"Cancel",type:e.cancelType||"button-default",onTap:function(){}},{text:e.okText||"OK",type:e.okType||"button-positive",onTap:function(){return t.data.response||""}}]},e||{}))}var y={stackPushDelay:75},S=[],k={show:g,alert:$,confirm:w,prompt:b,_createPopup:d,_popupStack:S};return k}]),a.factory("$ionicPosition",["$document","$window",function(e,t){function n(e,n){return e.currentStyle?e.currentStyle[n]:t.getComputedStyle?t.getComputedStyle(e)[n]:e.style[n]}function i(e){return"static"===(n(e,"position")||"static")}var o=function(t){for(var n=e[0],o=t.offsetParent||n;o&&o!==n&&i(o);)o=o.offsetParent;return o||n};return{position:function(t){var n=this.offset(t),i={top:0,left:0},r=o(t[0]);r!=e[0]&&(i=this.offset(f(r)),i.top+=r.clientTop-r.scrollTop,i.left+=r.clientLeft-r.scrollLeft);var a=t[0].getBoundingClientRect();return{width:a.width||t.prop("offsetWidth"),height:a.height||t.prop("offsetHeight"),top:n.top-i.top,left:n.left-i.left}},offset:function(n){var i=n[0].getBoundingClientRect();return{width:i.width||n.prop("offsetWidth"),height:i.height||n.prop("offsetHeight"),top:i.top+(t.pageYOffset||e[0].documentElement.scrollTop),left:i.left+(t.pageXOffset||e[0].documentElement.scrollLeft)}}}}]),a.service("$ionicScrollDelegate",ionic.DelegateService(["resize","scrollTop","scrollBottom","scrollTo","scrollBy","zoomTo","zoomBy","getScrollPosition","anchorScroll","freezeScroll","freezeAllScrolls","getScrollView"])),a.service("$ionicSideMenuDelegate",ionic.DelegateService(["toggleLeft","toggleRight","getOpenRatio","isOpen","isOpenLeft","isOpenRight","canDragContent","edgeDragThreshold"])),a.service("$ionicSlideBoxDelegate",ionic.DelegateService(["update","slide","select","enableSlide","previous","next","stop","autoPlay","start","currentIndex","selected","slidesCount","count","loop"])),a.service("$ionicTabsDelegate",ionic.DelegateService(["select","selectedIndex","showBar"])),function(){var e=[];a.factory("$ionicTemplateCache",["$http","$templateCache","$timeout",function(t,n,i){function o(e){return"undefined"==typeof e?r():(d(e)&&(e=[e]),s(e,function(e){c.push(e)}),void(a&&r()))}function r(){var e;if(o._runCount++,a=!0,0!==c.length){for(var s=0;4>s&&(e=c.pop());)d(e)&&t.get(e,{cache:n}),s++;c.length&&i(r,1e3)}}var a,c=e;return o._runCount=0,o}]).config(["$stateProvider","$ionicConfigProvider",function(t,n){var i=t.state;t.state=function(o,r){if("object"==typeof r){var a=r.prefetchTemplate!==!1&&e.length<n.templates.maxPrefetch();if(a&&d(r.templateUrl)&&e.push(r.templateUrl),angular.isObject(r.views))for(var c in r.views)a=r.views[c].prefetchTemplate!==!1&&e.length<n.templates.maxPrefetch(),a&&d(r.views[c].templateUrl)&&e.push(r.views[c].templateUrl)}return i.call(t,o,r)}}]).run(["$ionicTemplateCache",function(e){e()}])}(),a.factory("$ionicTemplateLoader",["$compile","$controller","$http","$q","$rootScope","$templateCache",function(e,t,n,i,o,r){function a(e){return n.get(e,{cache:r}).then(function(e){return e.data&&e.data.trim()})}function s(n){n=c({template:"",templateUrl:"",scope:null,controller:null,locals:{},appendTo:null},n||{});var r=n.templateUrl?this.load(n.templateUrl):i.when(n.template);return r.then(function(i){var r,a=n.scope||o.$new(),s=f("<div>").html(i).contents();return n.controller&&(r=t(n.controller,c(n.locals,{$scope:a})),s.children().data("$ngControllerController",r)),n.appendTo&&f(n.appendTo).append(s),e(s)(a),{element:s,scope:a}})}return{load:a,compile:s}}]),a.factory("$ionicViewService",["$ionicHistory","$log",function(e,t){function n(e,n){t.warn("$ionicViewService"+e+" is deprecated, please use $ionicHistory"+n+" instead: http://ionicframework.com/docs/nightly/api/service/$ionicHistory/")}n("","");var i={getCurrentView:"currentView",getBackView:"backView",getForwardView:"forwardView",getCurrentStateName:"currentStateName",nextViewOptions:"nextViewOptions",clearHistory:"clearHistory"};return s(i,function(t,o){i[o]=function(){return n("."+o,"."+t),e[t].apply(this,arguments)}}),i}]),a.factory("$ionicViewSwitcher",["$timeout","$document","$q","$ionicClickBlock","$ionicConfig","$ionicNavBarDelegate",function(e,t,n,i,o,r){function a(e,t){return u(e)["abstract"]?u(e).name:t?t.stateId||t.viewId:ionic.Utils.nextUid()}function u(e){return e&&e.$$state&&e.$$state.self||{}}function d(e,t,n,i){var r=u(e),a=w||D(t,"view-transition")||r.viewTransition||o.views.transition()||"ios",s=o.navBar.transition();return n=b||D(t,"view-direction")||r.viewDirection||n||"none",c(h(i),{transition:a,navBarTransition:"view"===s?a:s,direction:n,shouldAnimate:"none"!==a&&"none"!==n})}function h(e){return e=e||{},{viewId:e.viewId,historyId:e.historyId,stateId:e.stateId,stateName:e.stateName,stateParams:e.stateParams}}function p(e,t){return arguments.length>1?void D(e,x,t):D(e,x)}function v(e){if(e&&e.length){var t=e.scope();t&&(t.$emit("$ionicView.unloaded",e.data(B)),t.$destroy()),e.remove()}}function g(e,t){var n=e.lastIndexOf("."),i=t.lastIndexOf(".");if(0>n||0>i)return!1;var o=e.substring(0,n),r=t.substring(0,i);return o===r}function m(e,t){if(!e)return null;var n=angular.element(e).attr("abstract"),i=angular.element(e).attr("state");if("true"!==n)return i===t.stateName?angular.element(e).scope():null;for(var o=$(e),r=0;r<o.length;r++){var a=angular.element(o[r]).attr("state");if(a===t.stateName)return t.abstractView=!0,angular.element(o[r]).scope()}return null}function $(e){for(var t=[],n=angular.element(e).find("ion-nav-view"),i=0;i<n.length;i++){for(var o=angular.element(n[i]).children(),r=[],a=0;a<o.length;a++)r=r.concat(o[a]);t=t.concat(r)}return t}var w,b,y="webkitTransitionEnd transitionend",S="$noCache",k="$destroyEle",C="$eleId",T="$accessed",I="$fallbackTimer",B="$viewData",x="nav-view",A="active",V="cached",E="stage",P=0;ionic.transition=ionic.transition||{},ionic.transition.isActive=!1;var _,D=ionic.DomUtil.cachedAttr,L=[],R=1100,M={create:function(t,s,f,$,x,_){var N,z,O,H=++P,q={init:function(e,t){M.isTransitioning(!0),q.loadViewElements(e),q.render(e,function(){t&&t()})},loadViewElements:function(e){var n,i,o,r=t.getViewElements(),c=a(s,f),u=t.activeEleId();for(n=0,i=r.length;i>n&&(o=r.eq(n),o.data(C)===c?o.data(S)?(o.data(C,c+ionic.Utils.nextUid()),o.data(k,!0)):N=o:l(u)&&o.data(C)===u&&(z=o),!N||!z);n++);O=!!N,O||(N=e.ele||M.createViewEle(s),N.data(C,c)),_&&t.activeEleId(c),e.ele=null},render:function(e,n){if(O)ionic.Utils.reconnectScope(N.scope());else{p(N,E);var i=d(s,N,e.direction,f),r=o.transitions.views[i.transition]||o.transitions.views.none;r(N,null,i.direction,!0).run(0),N.data(B,{viewId:i.viewId,historyId:i.historyId,stateName:i.stateName,stateParams:i.stateParams}),(u(s).cache===!1||"false"===u(s).cache||"false"==N.attr("cache-view")||0===o.views.maxCache())&&N.data(S,!0);var a=t.appendViewElement(N,s);delete i.direction,delete i.transition,a.$emit("$ionicView.loaded",i)}N.data(T,Date.now()),n&&n()},transition:function(a,l,u){function v(){p(N,F.shouldAnimate?"entering":A),p(z,F.shouldAnimate?"leaving":V),F.run(1),r._instances.forEach(function(e){e.triggerTransitionStart(H)}),F.shouldAnimate||m()}function g(e){e.target===this&&m()}function m(){m.x||(m.x=!0,N.off(y,g),e.cancel(N.data(I)),z&&e.cancel(z.data(I)),C&&C.resolve(t),H===P&&(n.all(L).then(M.transitionEnd),q.emit("after",T,B),q.cleanup(T)),r._instances.forEach(function(e){e.triggerTransitionEnd()}),w=b=f=$=N=z=null)}function S(e){e.target===this&&k()}function k(){p(N,V),p(z,A),N.off(y,S),e.cancel(N.data(I)),M.transitionEnd([t])}var C,T=d(s,N,a,f),B=c(c({},T),h($));T.transitionId=B.transitionId=H,T.fromCache=!!O,T.enableBack=!!l,T.renderStart=x,T.renderEnd=_,D(N.parent(),"nav-view-transition",T.transition),D(N.parent(),"nav-view-direction",T.direction),e.cancel(N.data(I));var U=o.transitions.views[T.transition]||o.transitions.views.none,F=U(N,z,T.direction,T.shouldAnimate&&u&&_);if(F.shouldAnimate&&(N.on(y,g),N.data(I,e(m,R)),i.show(R)),x&&(q.emit("before",T,B),p(N,E),F.run(0)),_&&(C=n.defer(),L.push(C.promise)),x&&_)e(function(){ionic.requestAnimationFrame(v)});else{if(!_)return p(N,"entering"),p(z,"leaving"),{run:F.run,cancel:function(t){t?(N.on(y,S),N.data(I,e(k,R)),i.show(R)):k(),F.shouldAnimate=t,F.run(0),F=null}};_&&v()}},emit:function(e,t,n){var i,o=m(N,t),r=m(z,n);!t.viewId||t.abstractView?r&&(r.$emit("$ionicView.beforeLeave",n),r.$emit("$ionicView.leave",n),r.$emit("$ionicView.afterLeave",n),r.$broadcast("$ionicParentView.beforeLeave",n),r.$broadcast("$ionicParentView.leave",n),r.$broadcast("$ionicParentView.afterLeave",n)):("after"==e&&(o&&(o.$emit("$ionicView.enter",t),o.$broadcast("$ionicParentView.enter",t)),r?(r.$emit("$ionicView.leave",n),r.$broadcast("$ionicParentView.leave",n)):o&&n&&n.viewId&&t.stateName!==n.stateName&&(i=g(t.stateName,n.stateName),i&&o.$emit("$ionicNavView.leave",n))),o&&(o.$emit("$ionicView."+e+"Enter",t),o.$broadcast("$ionicParentView."+e+"Enter",t)),r?(r.$emit("$ionicView."+e+"Leave",n),r.$broadcast("$ionicParentView."+e+"Leave",n)):o&&n&&n.viewId&&t.stateName!==n.stateName&&(i=g(t.stateName,n.stateName),i&&o.$emit("$ionicNavView."+e+"Leave",n)))},cleanup:function(e){z&&"back"==e.direction&&!o.views.forwardCache()&&v(z);var n,i,r,a=t.getViewElements(),c=a.length,s=c-1>o.views.maxCache(),l=Date.now();for(n=0;c>n;n++)i=a.eq(n),s&&i.data(T)<l?(l=i.data(T),r=a.eq(n)):i.data(k)&&p(i)!=A&&v(i);v(r),N.data(S)&&N.data(k,!0)},enteringEle:function(){return N},leavingEle:function(){return z}};return q},transitionEnd:function(e){s(e,function(e){e.transitionEnd()}),M.isTransitioning(!1),i.hide(),L=[]},nextTransition:function(e){w=e},nextDirection:function(e){b=e},isTransitioning:function(t){return arguments.length&&(ionic.transition.isActive=!!t,e.cancel(_),t&&(_=e(function(){M.isTransitioning(!1)},999))),ionic.transition.isActive},createViewEle:function(e){var n=t[0].createElement("div");return e&&e.$template&&(n.innerHTML=e.$template,1===n.children.length)?(n.children[0].classList.add("pane"),e.$$state&&e.$$state.self&&e.$$state.self["abstract"]?angular.element(n.children[0]).attr("abstract","true"):e.$$state&&e.$$state.self&&angular.element(n.children[0]).attr("state",e.$$state.self.name),f(n.children[0])):(n.className="pane",f(n))},viewEleIsActive:function(e,t){p(e,t?A:V)},getTransitionData:d,navViewAttr:p,destroyViewEle:v};return M}]),angular.module("ngIOS9UIWebViewPatch",["ng"]).config(["$provide",function(e){"use strict";e.decorator("$browser",["$delegate","$window",function(e,t){function n(e){return/(iPhone|iPad|iPod).* OS 9_\d/.test(e)&&!/Version\/9\./.test(e)}function i(e){function t(){n=null}var n=null,i=e.url;return e.url=function(){return arguments.length?(n=arguments[0],i.apply(e,arguments)):n||i.apply(e,arguments)},window.addEventListener("popstate",t,!1),window.addEventListener("hashchange",t,!1),e}return n(t.navigator.userAgent)?i(e):e}])}]),a.config(["$provide",function(e){e.decorator("$compile",["$delegate",function(e){return e.$$addScopeInfo=function(e,t,n,i){var o=n?i?"$isolateScopeNoTemplate":"$isolateScope":"$scope";e.data(o,t)},e}])}]),a.config(["$provide",function(e){function t(e,t){return e.__hash=e.hash,e.hash=function(n){return l(n)&&n.length>0&&t(function(){var e=document.querySelector(".scroll-content");e&&(e.scrollTop=0)},0,!1),e.__hash(n)},e}e.decorator("$location",["$delegate","$timeout",t])}]),a.controller("$ionicHeaderBar",["$scope","$element","$attrs","$q","$ionicConfig","$ionicHistory",function(e,t,n,i,o,r){function a(e){return C[e]||(C[e]=t[0].querySelector("."+e)),C[e]}var c="title",s="back-text",l="back-button",u="default-title",d="previous-title",f="hide",h=this,p="",v="",g=0,m=0,$="",w=!1,b=!0,y=!0,S=!1,k=0;h.beforeEnter=function(t){e.$broadcast("$ionicView.beforeEnter",t)},h.title=function(e){return arguments.length&&e!==p&&(a(c).innerHTML=e,p=e,k=0),p},h.enableBack=function(e,t){return arguments.length&&(w=e,t||h.updateBackButton()),w},h.showBack=function(e,t){return arguments.length&&(b=e,t||h.updateBackButton()),b},h.showNavBack=function(e){y=e,h.updateBackButton()},h.updateBackButton=function(){var e;(b&&y&&w)!==S&&(S=b&&y&&w,e=a(l),e&&e.classList[S?"remove":"add"](f)),w&&(e=e||a(l),e&&(h.backButtonIcon!==o.backButton.icon()&&(e=a(l+" .icon"),e&&(h.backButtonIcon=o.backButton.icon(),e.className="icon "+h.backButtonIcon)),h.backButtonText!==o.backButton.text()&&(e=a(l+" .back-text"),e&&(e.textContent=h.backButtonText=o.backButton.text()))))},h.titleTextWidth=function(){var e=a(c);if(e)for(var t=angular.element(e).children(),n=0;n<t.length;n++)if(angular.element(t[n]).hasClass("nav-bar-title")){e=t[n];break}var i=ionic.DomUtil.getTextBounds(e);return k=Math.min(i&&i.width||30)},h.titleWidth=function(){var e=h.titleTextWidth(),t=a(c).offsetWidth;return e>t&&(e=t+(g-m-5)),e},h.titleTextX=function(){return t[0].offsetWidth/2-h.titleWidth()/2},h.titleLeftRight=function(){return g-m},h.backButtonTextLeft=function(){for(var e=0,t=a(s);t;)e+=t.offsetLeft,t=t.parentElement;return e},h.resetBackButton=function(e){if(o.backButton.previousTitleText()){var t=a(d);if(t){t.classList.remove(f);var n=e&&r.getViewById(e.viewId),i=r.backTitle(n);i!==v&&(v=t.innerHTML=i)}var c=a(u);c&&c.classList.remove(f)}},h.align=function(e){var i=a(c);e=e||n.alignTitle||o.navBar.alignTitle();var r=h.calcWidths(e,!1);if(b&&v&&o.backButton.previousTitleText()){var s=h.calcWidths(e,!0),l=t[0].offsetWidth-s.titleLeft-s.titleRight;h.titleTextWidth()<=l&&(r=s)}return h.updatePositions(i,r.titleLeft,r.titleRight,r.buttonsLeft,r.buttonsRight,r.css,r.showPrevTitle)},h.calcWidths=function(e,n){var i,o,r,h,p,v,g,m,$,w=a(c),y=a(l),S=t[0].childNodes,k=0,C=0,T=0,I=0,B="",x=0;for(i=0;i<S.length;i++){if(p=S[i],g=0,1==p.nodeType){if(p===w){$=!0;continue}if(p.classList.contains(f))continue;if(b&&p===y){for(o=0;o<p.childNodes.length;o++)if(h=p.childNodes[o],1==h.nodeType)if(h.classList.contains(s))for(r=0;r<h.children.length;r++)if(v=h.children[r],n){if(v.classList.contains(u))continue;x+=v.offsetWidth}else{if(v.classList.contains(d))continue;x+=v.offsetWidth}else x+=h.offsetWidth;else 3==h.nodeType&&h.nodeValue.trim()&&(m=ionic.DomUtil.getTextBounds(h),x+=m&&m.width||0);g=x||p.offsetWidth}else g=p.offsetWidth}else 3==p.nodeType&&p.nodeValue.trim()&&(m=ionic.DomUtil.getTextBounds(p),g=m&&m.width||0);$?C+=g:k+=g}if("left"==e)B="title-left",k&&(T=k+15),C&&(I=C+15);else if("right"==e)B="title-right",k&&(T=k+15),C&&(I=C+15);else{var A=Math.max(k,C)+10;A>10&&(T=I=A)}return{backButtonWidth:x,buttonsLeft:k,buttonsRight:C,titleLeft:T,titleRight:I,showPrevTitle:n,css:B}},h.updatePositions=function(e,n,r,c,s,l,p){var v=i.defer();if(e&&(n!==g&&(e.style.left=n?n+"px":"",g=n),r!==m&&(e.style.right=r?r+"px":"",m=r),l!==$&&(l&&e.classList.add(l),$&&e.classList.remove($),$=l)),o.backButton.previousTitleText()){var w=a(d),b=a(u);w&&w.classList[p?"remove":"add"](f),b&&b.classList[p?"add":"remove"](f)}return ionic.requestAnimationFrame(function(){if(e&&e.offsetWidth+10<e.scrollWidth){var n=s+5,i=t[0].offsetWidth-g-h.titleTextWidth()-20;r=n>i?n:i,r!==m&&(e.style.right=r+"px",m=r)}v.resolve()}),v.promise},h.setCss=function(e,t){ionic.DomUtil.cachedStyles(a(e),t)};var C={};e.$on("$destroy",function(){for(var e in C)C[e]=null})}]),a.controller("$ionInfiniteScroll",["$scope","$attrs","$element","$timeout",function(e,t,n,i){function o(){ionic.requestAnimationFrame(function(){n[0].classList.add("active")}),s.isLoading=!0,e.$parent&&e.$parent.$apply(t.onInfinite||"")}function r(){ionic.requestAnimationFrame(function(){n[0].classList.remove("active")}),i(function(){s.jsScrolling&&s.scrollView.resize(),(s.jsScrolling&&s.scrollView.__container&&s.scrollView.__container.offsetHeight>0||!s.jsScrolling)&&s.checkBounds()},30,!1),s.isLoading=!1}function a(){if(!s.isLoading){var e={};if(s.jsScrolling){e=s.getJSMaxScroll();var t=s.scrollView.getValues();(-1!==e.left&&t.left>=e.left||-1!==e.top&&t.top>=e.top)&&o()}else e=s.getNativeMaxScroll(),(-1!==e.left&&s.scrollEl.scrollLeft>=e.left-s.scrollEl.clientWidth||-1!==e.top&&s.scrollEl.scrollTop>=e.top-s.scrollEl.clientHeight)&&o()}}function c(e){var n=(t.distance||"2.5%").trim(),i=-1!==n.indexOf("%");return i?e*(1-parseFloat(n)/100):e-parseFloat(n)}var s=this;s.isLoading=!1,e.icon=function(){return l(t.icon)?t.icon:"ion-load-d"},e.spinner=function(){return l(t.spinner)?t.spinner:""},e.$on("scroll.infiniteScrollComplete",function(){r()}),e.$on("$destroy",function(){s.scrollCtrl&&s.scrollCtrl.$element&&s.scrollCtrl.$element.off("scroll",s.checkBounds),s.scrollEl&&s.scrollEl.removeEventListener&&s.scrollEl.removeEventListener("scroll",s.checkBounds)}),s.checkBounds=ionic.Utils.throttle(a,300),s.getJSMaxScroll=function(){var e=s.scrollView.getScrollMax();return{left:s.scrollView.options.scrollingX?c(e.left):-1,top:s.scrollView.options.scrollingY?c(e.top):-1}},s.getNativeMaxScroll=function(){var e={left:s.scrollEl.scrollWidth,top:s.scrollEl.scrollHeight},t=window.getComputedStyle(s.scrollEl)||{};return{left:!e.left||"scroll"!==t.overflowX&&"auto"!==t.overflowX&&"scroll"!==s.scrollEl.style["overflow-x"]?-1:c(e.left),top:!e.top||"scroll"!==t.overflowY&&"auto"!==t.overflowY&&"scroll"!==s.scrollEl.style["overflow-y"]?-1:c(e.top)}},s.__finishInfiniteScroll=r}]),a.service("$ionicListDelegate",ionic.DelegateService(["showReorder","showDelete","canSwipeItems","closeOptionButtons"])).controller("$ionicList",["$scope","$attrs","$ionicListDelegate","$ionicHistory",function(e,t,n,i){var o=this,r=!0,a=!1,c=!1,s=n._registerInstance(o,t.delegateHandle,function(){return i.isActiveScope(e)});e.$on("$destroy",s),o.showReorder=function(e){return arguments.length&&(a=!!e),a},o.showDelete=function(e){return arguments.length&&(c=!!e),c},o.canSwipeItems=function(e){return arguments.length&&(r=!!e),r},o.closeOptionButtons=function(){o.listView&&o.listView.clearDragEffects()}}]),a.controller("$ionicNavBar",["$scope","$element","$attrs","$compile","$timeout","$ionicNavBarDelegate","$ionicConfig","$ionicHistory",function(e,t,n,i,o,r,a,c){function u(e,t){var n=console.warn||console.log;n&&n.call(console,"navBarController."+e+" is deprecated, please use "+t+" instead")}function d(e){return x[e]?f(x[e]):void 0}function h(){for(var e=0;e<B.length;e++)if(B[e].isActive)return B[e]}function p(){for(var e=0;e<B.length;e++)if(!B[e].isActive)return B[e]}function v(e,t){e&&ionic.DomUtil.cachedAttr(e.containerEle(),"nav-bar",t)}function g(e){ionic.DomUtil.cachedAttr(t,"nav-swipe",e)}var m,$,w,b="hide",y="$ionNavBarController",S="primaryButtons",k="secondaryButtons",C="backButton",T="primaryButtons secondaryButtons leftButtons rightButtons title".split(" "),I=this,B=[],x={},A=!0;t.parent().data(y,I);var V=n.delegateHandle||"navBar"+ionic.Utils.nextUid(),E=r._registerInstance(I,V);I.init=function(){t.addClass("nav-bar-container"),ionic.DomUtil.cachedAttr(t,"nav-bar-transition",a.views.transition()),I.createHeaderBar(!1),I.createHeaderBar(!0),e.$emit("ionNavBar.init",V)},I.createHeaderBar=function(o){function r(e,t){e&&("title"===t?g.append(e):"rightButtons"==t||t==k&&"left"!=a.navBar.positionSecondaryButtons()||t==S&&"right"==a.navBar.positionPrimaryButtons()?(v||(v=f('<div class="buttons buttons-right">'),h.append(v)),t==k?v.append(e):v.prepend(e)):(p||(p=f('<div class="buttons buttons-left">'),m[C]?m[C].after(p):h.prepend(p)),t==k?p.append(e):p.prepend(e)))}var c=f('<div class="nav-bar-block">');ionic.DomUtil.cachedAttr(c,"nav-bar",o?"active":"cached");var u=n.alignTitle||a.navBar.alignTitle(),h=f("<ion-header-bar>").addClass(n["class"]).attr("align-title",u);l(n.noTapScroll)&&h.attr("no-tap-scroll",n.noTapScroll);var p,v,g=f('<div class="title title-'+u+'">'),m={},$={};m[C]=d(C),m[C]&&h.append(m[C]),h.append(g),s(T,function(e){m[e]=d(e),r(m[e],e)});for(var w=0;w<h[0].children.length;w++)h[0].children[w].classList.add("header-item");c.append(h),t.append(i(c)(e.$new()));var y=h.data("$ionHeaderBarController");y.backButtonIcon=a.backButton.icon(),y.backButtonText=a.backButton.text();var I={isActive:o,title:function(e){y.title(e)},setItem:function(e,t){I.removeItem(t),e?("title"===t&&I.title(""),r(e,t),m[t]&&m[t].addClass(b),$[t]=e):m[t]&&m[t].removeClass(b)},removeItem:function(e){$[e]&&($[e].scope().$destroy(),$[e].remove(),$[e]=null)},containerEle:function(){return c},headerBarEle:function(){return h},afterLeave:function(){
s(T,function(e){I.removeItem(e)}),y.resetBackButton()},controller:function(){return y},destroy:function(){s(T,function(e){I.removeItem(e)}),c.scope().$destroy();for(var e in m)m[e]&&(m[e].removeData(),m[e]=null);p&&p.removeData(),v&&v.removeData(),g.removeData(),h.removeData(),c.remove(),c=h=g=p=v=null}};return B.push(I),I},I.navElement=function(e,t){return l(t)&&(x[e]=t),x[e]},I.update=function(e){var t=!e.hasHeaderBar&&e.showNavBar;e.transition=a.views.transition(),t||(e.direction="none"),I.enable(t);var n=I.isInitialized?p():h(),i=I.isInitialized?h():null,o=n.controller();o.enableBack(e.enableBack,!0),o.showBack(e.showBack,!0),o.updateBackButton(),I.title(e.title,n),I.showBar(t),e.navBarItems&&s(T,function(t){n.setItem(e.navBarItems[t],t)}),I.transition(n,i,e),I.isInitialized=!0,g("")},I.transition=function(n,i,r){function c(){for(var e=0;e<B.length;e++)B[e].isActive=!1;n.isActive=!0,v(n,"active"),v(i,"cached"),I.activeTransition=d=$=null}var s=n.controller(),l=a.transitions.navBar[r.navBarTransition]||a.transitions.navBar.none,u=r.transitionId;s.beforeEnter(r);var d=l(n,i,r.direction,r.shouldAnimate&&I.isInitialized);ionic.DomUtil.cachedAttr(t,"nav-bar-transition",r.navBarTransition),ionic.DomUtil.cachedAttr(t,"nav-bar-direction",r.direction),d.shouldAnimate&&r.renderEnd?v(n,"stage"):(v(n,"entering"),v(i,"leaving")),s.resetBackButton(r),d.run(0),I.activeTransition={run:function(e){d.shouldAnimate=!1,d.direction="back",d.run(e)},cancel:function(t,o,r){g(o),v(i,"active"),v(n,"cached"),d.shouldAnimate=t,d.run(0),I.activeTransition=d=null;var a;r.showBar!==I.showBar()&&I.showBar(r.showBar),r.showBackButton!==I.showBackButton()&&I.showBackButton(r.showBackButton),a&&e.$apply()},complete:function(e,t){g(t),d.shouldAnimate=e,d.run(1),$=c}},o(s.align,16),(m=function(){w===u&&(v(n,"entering"),v(i,"leaving"),d.run(1),$=function(){w!=u&&d.shouldAnimate||c()},m=null)})()},I.triggerTransitionStart=function(e){w=e,m&&m()},I.triggerTransitionEnd=function(){$&&$()},I.showBar=function(t){return arguments.length&&(I.visibleBar(t),e.$parent.$hasHeader=!!t),!!e.$parent.$hasHeader},I.visibleBar=function(e){e&&!A?(t.removeClass(b),I.align()):!e&&A&&t.addClass(b),A=e},I.enable=function(e){I.visibleBar(e);for(var t=0;t<r._instances.length;t++)r._instances[t]!==I&&r._instances[t].visibleBar(!1)},I.showBackButton=function(t){if(arguments.length){for(var n=0;n<B.length;n++)B[n].controller().showNavBack(!!t);e.$isBackButtonShown=!!t}return e.$isBackButtonShown},I.showActiveBackButton=function(e){var t=h();return t?arguments.length?t.controller().showBack(e):t.controller().showBack():void 0},I.title=function(t,n){return l(t)&&(t=t||"",n=n||h(),n&&n.title(t),e.$title=t,c.currentTitle(t)),e.$title},I.align=function(e,t){t=t||h(),t&&t.controller().align(e)},I.hasTabsTop=function(e){t[e?"addClass":"removeClass"]("nav-bar-tabs-top")},I.hasBarSubheader=function(e){t[e?"addClass":"removeClass"]("nav-bar-has-subheader")},I.changeTitle=function(e){u("changeTitle(val)","title(val)"),I.title(e)},I.setTitle=function(e){u("setTitle(val)","title(val)"),I.title(e)},I.getTitle=function(){return u("getTitle()","title()"),I.title()},I.back=function(){u("back()","$ionicHistory.goBack()"),c.goBack()},I.getPreviousTitle=function(){u("getPreviousTitle()","$ionicHistory.backTitle()"),c.goBack()},e.$on("$destroy",function(){e.$parent.$hasHeader=!1,t.parent().removeData(y);for(var n=0;n<B.length;n++)B[n].destroy();t.remove(),t=B=null,E()})}]),a.controller("$ionicNavView",["$scope","$element","$attrs","$compile","$controller","$ionicNavBarDelegate","$ionicNavViewDelegate","$ionicHistory","$ionicViewSwitcher","$ionicConfig","$ionicScrollDelegate","$ionicSideMenuDelegate",function(e,t,n,i,o,r,a,s,l,u,d,f){function h(e,n){for(var i,o,r=t.children(),a=0,c=r.length;c>a;a++)if(i=r.eq(a),V(i)==I){o=i.scope(),o&&o.$emit(e.name.replace("Tabs","View"),n),o&&o.$broadcast(e.name.replace("Tabs","ParentView"),n);break}}function p(e){ionic.DomUtil.cachedAttr(t,"nav-swipe",e)}function v(e,t){var n=m();n&&n.hasTabsTop(t)}function g(e,t){var n=m();n&&n.hasBarSubheader(t)}function m(){if(w)for(var e=0;e<r._instances.length;e++)if(r._instances[e].$$delegateHandle==w)return r._instances[e];return t.inheritedData("$ionNavBarController")}var $,w,b,y,S,k="$eleId",C="$destroyEle",T="$noCache",I="active",B="cached",x=this,A=!1,V=l.navViewAttr;x.scope=e,x.element=t,x.init=function(){var i=n.name||"",o=t.parent().inheritedData("$uiView"),r=o&&o.state?o.state.name:"";i.indexOf("@")<0&&(i=i+"@"+r);var c={name:i,state:null};t.data("$uiView",c);var s=a._registerInstance(x,n.delegateHandle);return e.$on("$destroy",function(){s(),x.isSwipeFreeze&&d.freezeAllScrolls(!1)}),e.$on("$ionicHistory.deselect",x.cacheCleanup),e.$on("$ionicTabs.top",v),e.$on("$ionicSubheader",g),e.$on("$ionicTabs.beforeLeave",h),e.$on("$ionicTabs.afterLeave",h),e.$on("$ionicTabs.leave",h),ionic.Platform.ready(function(){ionic.Platform.isWebView()&&ionic.Platform.isIOS()&&x.initSwipeBack()}),c},x.register=function(t){var n=c({},s.currentView()),i=s.register(e,t);x.update(i);var o=s.getViewById(i.viewId)||{},r=y!==i.viewId;x.render(i,t,o,n,r,!0)},x.update=function(e){A=!0,$=e.direction;var n=t.parent().inheritedData("$ionNavViewController");n&&(n.isPrimary(!1),("enter"===$||"exit"===$)&&(n.direction($),"enter"===$&&($="none")))},x.render=function(e,t,n,i,o,r){var a=l.create(x,t,n,i,o,r);a.init(e,function(){a.transition(x.direction(),e.enableBack,!S),y=S=null})},x.beforeEnter=function(e){if(A){w=e.navBarDelegate;var t=m();t&&t.update(e),p("")}},x.activeEleId=function(e){return arguments.length&&(b=e),b},x.transitionEnd=function(){var e,n,i,o=t.children();for(e=0,n=o.length;n>e;e++)i=o.eq(e),i.data(k)===b?V(i,I):("leaving"===V(i)||V(i)===I||V(i)===B)&&(i.data(C)||i.data(T)?l.destroyViewEle(i):(V(i,B),ionic.Utils.disconnectScope(i.scope())));p(""),x.isSwipeFreeze&&d.freezeAllScrolls(!1)},x.cacheCleanup=function(){for(var e=t.children(),n=0,i=e.length;i>n;n++)e.eq(n).data(C)&&l.destroyViewEle(e.eq(n))},x.clearCache=function(e){var n,i,o,r,a,c,s=t.children();for(o=0,r=s.length;r>o;o++)if(n=s.eq(o),e)for(c=n.data(k),a=0;a<e.length;a++)c===e[a]&&l.destroyViewEle(n);else V(n)==B?l.destroyViewEle(n):V(n)==I&&(i=n.scope(),i&&i.$broadcast("$ionicView.clearCache"))},x.getViewElements=function(){return t.children()},x.appendViewElement=function(n,r){var a=i(n);t.append(n);var c=e.$new();if(r&&r.$$controller){r.$scope=c;var s=o(r.$$controller,r);r.$$controllerAs&&(c[r.$$controllerAs]=s),t.children().data("$ngControllerController",s)}return a(c),c},x.title=function(e){var t=m();t&&t.title(e)},x.enableBackButton=function(e){var t=m();t&&t.enableBackButton(e)},x.showBackButton=function(e){var t=m();return t?arguments.length?t.showActiveBackButton(e):t.showActiveBackButton():!0},x.showBar=function(e){var t=m();return t?arguments.length?t.showBar(e):t.showBar():!0},x.isPrimary=function(e){return arguments.length&&(A=e),A},x.direction=function(e){return arguments.length&&($=e),$},x.initSwipeBack=function(){function n(e){if(A&&u.views.swipeBackEnabled()&&!f.isOpenRight()&&(k=r(e),!(k>T))){v=s.backView();var n=s.currentView();if(v&&v.historyId===n.historyId&&n.canSwipeBack!==!1){b||(b=window.innerWidth),x.isSwipeFreeze=d.freezeAllScrolls(!0);var a={direction:"back"};C=[],I={showBar:x.showBar(),showBackButton:x.showBackButton()};var p=l.create(x,a,v,n,!0,!1);p.loadViewElements(a),p.render(a),c=p.transition("back",s.enabledBack(v),!0),h=m(),$=ionic.onGesture("drag",i,t[0]),w=ionic.onGesture("release",o,t[0])}}}function i(e){if(A&&c){var t=r(e);if(C.push({t:Date.now(),x:t}),t>=b-15)o(e);else{var n=Math.min(Math.max(a(t),0),1);c.run(n),h&&h.activeTransition&&h.activeTransition.run(n)}}}function o(e){if(A&&c&&C&&C.length>1){for(var t=Date.now(),n=r(e),s=C[C.length-1],l=C.length-2;l>=0&&!(t-s.t>200);l--)s=C[l];var u=n>=C[C.length-2].x,f=a(n),g=Math.abs(s.x-n)/(t-s.t);if(y=v.viewId,S=.03>f||f>.97,u&&(f>.5||g>.1)){var m=g>.5||.05>g||n>b-45?"fast":"slow";p(S?"":m),v.go(),h&&h.activeTransition&&h.activeTransition.complete(!S,m)}else p(S?"":"fast"),y=null,c.cancel(!S),h&&h.activeTransition&&h.activeTransition.cancel(!S,"fast",I),S=null}ionic.offGesture($,"drag",i),ionic.offGesture(w,"release",o),b=c=C=null,x.isSwipeFreeze=d.freezeAllScrolls(!1)}function r(e){return ionic.tap.pointerCoord(e.gesture.srcEvent).x}function a(e){return(e-k)/b}var c,h,v,g,$,w,b,k,C,T=u.views.swipeBackHitWidth(),I={};g=ionic.onGesture("dragstart",n,t[0]),e.$on("$destroy",function(){ionic.offGesture(g,"dragstart",n),ionic.offGesture($,"drag",i),ionic.offGesture(w,"release",o),x.element=c=h=null})}}]),a.controller("$ionicRefresher",["$scope","$attrs","$element","$ionicBind","$timeout",function(e,t,n,i,o){function r(e){e.touches=e.touches||[{screenX:e.screenX,screenY:e.screenY}],P=Math.floor(e.touches[0].screenY)}function a(e){e.touches=e.touches||[{screenX:e.screenX,screenY:e.screenY}],P=e.touches[0].screenY}function c(){P=null,(D||T)&&(T?(T=!1,B=0,x>A?($(),p(A,E)):(p(0,E,m),I=!1)):(B=0,I=!1,h(!1)))}function s(e){if(e.touches=e.touches||[{screenX:e.screenX,screenY:e.screenY}],(P||"mousemove"!=e.type)&&D&&!(e.touches.length>1)){if(null===P&&(P=e.touches[0].screenY),_=e.touches[0].screenY-P,ionic.Platform.isAndroid()&&4.4===ionic.Platform.version()&&!ionic.Platform.isCrosswalk()&&0===S.scrollTop&&_>0&&(T=!0,e.preventDefault()),0>=_-B||0!==S.scrollTop)return I&&(I=!1,h(!1)),T&&f(S,_- -1*B),void(0!==x&&d(0));_>0&&0===S.scrollTop&&!I&&(B=_),e.preventDefault(),I||(I=!0,h(!0)),T=!0,d((_-B)/3),!V&&x>A?(V=!0,ionic.requestAnimationFrame(g)):V&&A>x&&(V=!1,ionic.requestAnimationFrame(m))}}function u(e){D=0===e.target.scrollTop||T}function d(e){k.style[ionic.CSS.TRANSFORM]="translate3d(0px, "+e+"px, 0px)",x=e}function f(e,t){e.scrollTop=t;var n=document.createEvent("UIEvents");n.initUIEvent("scroll",!0,!0,window,1),e.dispatchEvent(n)}function h(e){e?ionic.requestAnimationFrame(function(){k.classList.add("overscroll"),w()}):ionic.requestAnimationFrame(function(){k.classList.remove("overscroll"),b(),m()})}function p(e,t,n){function i(e){return--e*e*e+1}function o(){var c=Date.now(),s=Math.min(1,(c-r)/t),l=i(s);d(Math.floor(l*(e-a)+a)),1>s?ionic.requestAnimationFrame(o):(5>e&&e>-5&&(I=!1,h(!1)),n&&n())}var r=Date.now(),a=x;return a===e?void n():void ionic.requestAnimationFrame(o)}function v(){k&&(ionic.off(L,a,k),ionic.off(R,s,k),ionic.off(M,c,k),ionic.off("mousedown",r,k),ionic.off("mousemove",s,k),ionic.off("mouseup",c,k)),S&&ionic.off("scroll",u,S),S=null,k=null}function g(){n[0].classList.add("active"),e.$onPulling()}function m(){o(function(){n.removeClass("active refreshing refreshing-tail"),V&&(V=!1)},150)}function $(){n[0].classList.add("refreshing");var t=e.$onRefresh();t&&t.then&&t["finally"](function(){e.$broadcast("scroll.refreshComplete")})}function w(){n[0].classList.remove("invisible")}function b(){n[0].classList.add("invisible")}function y(){n[0].classList.add("refreshing-tail")}var S,k,C=this,T=!1,I=!1,B=0,x=0,A=60,V=!1,E=500,P=null,_=null,D=!0;l(t.pullingIcon)||t.$set("pullingIcon","ion-android-arrow-down"),e.showSpinner=!l(t.refreshingIcon)&&"none"!=t.spinner,e.showIcon=l(t.refreshingIcon),i(e,t,{pullingIcon:"@",pullingText:"@",refreshingIcon:"@",refreshingText:"@",spinner:"@",disablePullingRotation:"@",$onRefresh:"&onRefresh",$onPulling:"&onPulling"}),e.$on("scroll.refreshComplete",function(){o(function(){ionic.requestAnimationFrame(y),p(0,E,m),o(function(){I&&(I=!1,h(!1))},E)},E)});var L,R,M;window.navigator.pointerEnabled?(L="pointerdown",R="pointermove",M="pointerup"):window.navigator.msPointerEnabled?(L="MSPointerDown",R="MSPointerMove",M="MSPointerUp"):(L="touchstart",R="touchmove",M="touchend"),C.init=function(){if(S=n.parent().parent()[0],k=n.parent()[0],!(S&&S.classList.contains("ionic-scroll")&&k&&k.classList.contains("scroll")))throw new Error("Refresher must be immediate child of ion-content or ion-scroll");ionic.on(L,a,k),ionic.on(R,s,k),ionic.on(M,c,k),ionic.on("mousedown",r,k),ionic.on("mousemove",s,k),ionic.on("mouseup",c,k),ionic.on("scroll",u,S),e.$on("$destroy",v)},C.getRefresherDomMethods=function(){return{activate:g,deactivate:m,start:$,show:w,hide:b,tail:y}},C.__handleTouchmove=s,C.__getScrollChild=function(){return k},C.__getScrollParent=function(){return S}}]),a.controller("$ionicScroll",["$scope","scrollViewOptions","$timeout","$window","$location","$document","$ionicScrollDelegate","$ionicHistory",function(e,t,n,i,o,r,a,c){var s=this;s.__timeout=n,s._scrollViewOptions=t,s.isNative=function(){return!!t.nativeScrolling};var u,d=s.element=t.el,h=s.$element=f(d);u=s.isNative()?s.scrollView=new ionic.views.ScrollNative(t):s.scrollView=new ionic.views.Scroll(t),(h.parent().length?h.parent():h).data("$$ionicScrollController",s);var p=a._registerInstance(s,t.delegateHandle,function(){return c.isActiveScope(e)});l(t.bouncing)||ionic.Platform.ready(function(){u&&u.options&&(u.options.bouncing=!0,ionic.Platform.isAndroid()&&(u.options.bouncing=!1,u.options.deceleration=.95))});var v=angular.bind(u,u.resize);angular.element(i).on("resize",v);var g=function(t){var n=(t.originalEvent||t).detail||{};e.$onScroll&&e.$onScroll({event:t,scrollTop:n.scrollTop||0,scrollLeft:n.scrollLeft||0})};h.on("scroll",g),e.$on("$destroy",function(){p(),u&&u.__cleanup&&u.__cleanup(),angular.element(i).off("resize",v),h&&h.off("scroll",g),s._scrollViewOptions&&(s._scrollViewOptions.el=null),t&&(t.el=null),u=s.scrollView=t=s._scrollViewOptions=d=s.$element=h=null}),n(function(){u&&u.run&&u.run()}),s.getScrollView=function(){return u},s.getScrollPosition=function(){return u.getValues()},s.resize=function(){return n(v,0,!1).then(function(){h&&h.triggerHandler("scroll-resize")})},s.scrollTop=function(e){s.resize().then(function(){u&&u.scrollTo(0,0,!!e)})},s.scrollBottom=function(e){s.resize().then(function(){if(u){var t=u.getScrollMax();u.scrollTo(t.left,t.top,!!e)}})},s.scrollTo=function(e,t,n){s.resize().then(function(){u&&u.scrollTo(e,t,!!n)})},s.zoomTo=function(e,t,n,i){s.resize().then(function(){u&&u.zoomTo(e,!!t,n,i)})},s.zoomBy=function(e,t,n,i){s.resize().then(function(){u&&u.zoomBy(e,!!t,n,i)})},s.scrollBy=function(e,t,n){s.resize().then(function(){u&&u.scrollBy(e,t,!!n)})},s.anchorScroll=function(e){s.resize().then(function(){if(u){var t=o.hash(),n=t&&r[0].getElementById(t);if(!t||!n)return void u.scrollTo(0,0,!!e);var i=n,a=0,c=0;do null!==i&&(a+=i.offsetLeft),null!==i&&(c+=i.offsetTop),i=i.offsetParent;while(i.attributes!=s.element.attributes&&i.offsetParent);u.scrollTo(a,c,!!e)}})},s.freezeScroll=u.freeze,s.freezeScrollShut=u.freezeShut,s.freezeAllScrolls=function(e){for(var t=0;t<a._instances.length;t++)a._instances[t].freezeScroll(e)},s._setRefresher=function(e,t,n){s.refresher=t;var i=s.refresher.clientHeight||60;u.activatePullToRefresh(i,n)}}]),a.controller("$ionicSideMenus",["$scope","$attrs","$ionicSideMenuDelegate","$ionicPlatform","$ionicBody","$ionicHistory","$ionicScrollDelegate","IONIC_BACK_PRIORITY","$rootScope",function(e,t,n,i,o,r,a,c,s){var l,d,f,p,v,g,m,$=this,w=!0;$.$scope=e,$.initialize=function(e){$.left=e.left,$.right=e.right,$.setContent(e.content),$.dragThresholdX=e.dragThresholdX||10,r.registerHistory($.$scope)},$.setContent=function(e){e&&($.content=e,$.content.onDrag=function(e){$._handleDrag(e)},$.content.endDrag=function(e){$._endDrag(e)})},$.isOpenLeft=function(){return $.getOpenAmount()>0},$.isOpenRight=function(){return $.getOpenAmount()<0},$.toggleLeft=function(e){if(!m&&$.left.isEnabled){var t=$.getOpenAmount();0===arguments.length&&(e=0>=t),$.content.enableAnimation(),e?($.openPercentage(100),s.$emit("$ionicSideMenuOpen","left")):($.openPercentage(0),s.$emit("$ionicSideMenuClose","left"))}},$.toggleRight=function(e){if(!m&&$.right.isEnabled){var t=$.getOpenAmount();0===arguments.length&&(e=t>=0),$.content.enableAnimation(),e?($.openPercentage(-100),s.$emit("$ionicSideMenuOpen","right")):($.openPercentage(0),s.$emit("$ionicSideMenuClose","right"))}},$.toggle=function(e){"right"==e?$.toggleRight():$.toggleLeft()},$.close=function(){$.openPercentage(0),s.$emit("$ionicSideMenuClose","left"),s.$emit("$ionicSideMenuClose","right")},$.getOpenAmount=function(){return $.content&&$.content.getTranslateX()||0},$.getOpenRatio=function(){var e=$.getOpenAmount();return e>=0?e/$.left.width:e/$.right.width},$.isOpen=function(){return 0!==$.getOpenAmount()},$.getOpenPercentage=function(){return 100*$.getOpenRatio()},$.openPercentage=function(e){var t=e/100;$.left&&e>=0?$.openAmount($.left.width*t):$.right&&0>e&&$.openAmount($.right.width*t),o.enableClass(0!==e,"menu-open"),$.content.setCanScroll(0==e)},$.openAmount=function(e){var t=$.left&&$.left.width||0,n=$.right&&$.right.width||0;return($.left&&$.left.isEnabled||!(e>0))&&($.right&&$.right.isEnabled||!(0>e))?d&&e>t?void $.content.setTranslateX(t):l&&-n>e?void $.content.setTranslateX(-n):($.content.setTranslateX(e),void(e>=0?(d=!0,l=!1,e>0&&($.right&&$.right.pushDown&&$.right.pushDown(),$.left&&$.left.bringUp&&$.left.bringUp())):(l=!0,d=!1,$.right&&$.right.bringUp&&$.right.bringUp(),$.left&&$.left.pushDown&&$.left.pushDown()))):void $.content.setTranslateX(0)},$.snapToRest=function(e){$.content.enableAnimation(),f=!1;var t=$.getOpenRatio();if(0===t)return void $.openPercentage(0);var n=.3,i=e.gesture.velocityX,o=e.gesture.direction;t>0&&.5>t&&"right"==o&&n>i?$.openPercentage(0):t>.5&&"left"==o&&n>i?$.openPercentage(100):0>t&&t>-.5&&"left"==o&&n>i?$.openPercentage(0):.5>t&&"right"==o&&n>i?$.openPercentage(-100):"right"==o&&t>=0&&(t>=.5||i>n)?$.openPercentage(100):"left"==o&&0>=t&&(-.5>=t||i>n)?$.openPercentage(-100):$.openPercentage(0)},$.enableMenuWithBackViews=function(e){return arguments.length&&(w=!!e),w},$.isAsideExposed=function(){return!!m},$.exposeAside=function(e){($.left&&$.left.isEnabled||$.right&&$.right.isEnabled)&&($.close(),m=e,$.left&&$.left.isEnabled&&$.right&&$.right.isEnabled?$.content.setMarginLeftAndRight(m?$.left.width:0,m?$.right.width:0):$.left&&$.left.isEnabled?$.content.setMarginLeft(m?$.left.width:0):$.right&&$.right.isEnabled&&$.content.setMarginRight(m?$.right.width:0),$.$scope.$emit("$ionicExposeAside",m))},$.activeAsideResizing=function(e){o.enableClass(e,"aside-resizing")},$._endDrag=function(e){m||(f&&$.snapToRest(e),p=null,v=null,g=null)},$._handleDrag=function(t){!m&&e.dragContent&&(p?v=t.gesture.touches[0].pageX:(p=t.gesture.touches[0].pageX,v=p),!f&&Math.abs(v-p)>$.dragThresholdX&&(p=v,f=!0,$.content.disableAnimation(),g=$.getOpenAmount()),f&&$.openAmount(g+(v-p)))},$.canDragContent=function(t){return arguments.length&&(e.dragContent=!!t),e.dragContent},$.edgeThreshold=25,$.edgeThresholdEnabled=!1,$.edgeDragThreshold=function(e){return arguments.length&&(u(e)&&e>0?($.edgeThreshold=e,$.edgeThresholdEnabled=!0):$.edgeThresholdEnabled=!!e),$.edgeThresholdEnabled},$.isDraggableTarget=function(t){var n=$.edgeThresholdEnabled&&!$.isOpen(),i=t.gesture.startEvent&&t.gesture.startEvent.center&&t.gesture.startEvent.center.pageX,o=!n||i<=$.edgeThreshold||i>=$.content.element.offsetWidth-$.edgeThreshold,a=r.backView(),c=w?!0:!a;if(!c){var s=r.currentView()||{};return o&&a.historyId!==s.historyId}return(e.dragContent||$.isOpen())&&o&&!t.gesture.srcEvent.defaultPrevented&&c&&!t.target.tagName.match(/input|textarea|select|object|embed/i)&&!t.target.isContentEditable&&!(t.target.dataset?t.target.dataset.preventScroll:"true"==t.target.getAttribute("data-prevent-scroll"))},e.sideMenuContentTranslateX=0;var b=h,y=angular.bind($,$.close);e.$watch(function(){return 0!==$.getOpenAmount()},function(e){b(),e&&(b=i.registerBackButtonAction(y,c.sideMenu))});var S=n._registerInstance($,t.delegateHandle,function(){return r.isActiveScope(e)});e.$on("$destroy",function(){S(),b(),$.$scope=null,$.content&&($.content.setCanScroll(!0),$.content.element=null,$.content=null)}),$.initialize({left:{width:275},right:{width:275}})}]),function(e){function t(e,i,o,r){var a,c,s,l=document.createElement(f[e]||e);for(a in i)if(angular.isArray(i[a]))for(c=0;c<i[a].length;c++)if(i[a][c].fn)for(s=0;s<i[a][c].t;s++)t(a,i[a][c].fn(s,r),l,r);else t(a,i[a][c],l,r);else n(l,a,i[a]);o.appendChild(l)}function n(e,t,n){e.setAttribute(f[t]||t,n)}function i(e,t){var n=e.split(";"),i=n.slice(t),o=n.slice(0,n.length-i.length);return n=i.concat(o).reverse(),n.join(";")+";"+n[0]}function o(e,t){return e/=t/2,1>e?.5*e*e*e:(e-=2,.5*(e*e*e+2))}var r="translate(32,32)",c="stroke-opacity",s="round",l="indefinite",u="750ms",d="none",f={a:"animate",an:"attributeName",at:"animateTransform",c:"circle",da:"stroke-dasharray",os:"stroke-dashoffset",f:"fill",lc:"stroke-linecap",rc:"repeatCount",sw:"stroke-width",t:"transform",v:"values"},h={v:"0,32,32;360,32,32",an:"transform",type:"rotate",rc:l,dur:u},p={sw:4,lc:s,line:[{fn:function(e,t){return{y1:"ios"==t?17:12,y2:"ios"==t?29:20,t:r+" rotate("+(30*e+(6>e?180:-180))+")",a:[{fn:function(){return{an:c,dur:u,v:i("0;.1;.15;.25;.35;.45;.55;.65;.7;.85;1",e),rc:l}},t:1}]}},t:12}]},v={android:{c:[{sw:6,da:128,os:82,r:26,cx:32,cy:32,f:d}]},ios:p,"ios-small":p,bubbles:{sw:0,c:[{fn:function(e){return{cx:24*Math.cos(2*Math.PI*e/8),cy:24*Math.sin(2*Math.PI*e/8),t:r,a:[{fn:function(){return{an:"r",dur:u,v:i("1;2;3;4;5;6;7;8",e),rc:l}},t:1}]}},t:8}]},circles:{c:[{fn:function(e){return{r:5,cx:24*Math.cos(2*Math.PI*e/8),cy:24*Math.sin(2*Math.PI*e/8),t:r,sw:0,a:[{fn:function(){return{an:"fill-opacity",dur:u,v:i(".3;.3;.3;.4;.7;.85;.9;1",e),rc:l}},t:1}]}},t:8}]},crescent:{c:[{sw:4,da:128,os:82,r:26,cx:32,cy:32,f:d,at:[h]}]},dots:{c:[{fn:function(e){return{cx:16+16*e,cy:32,sw:0,a:[{fn:function(){return{an:"fill-opacity",dur:u,v:i(".5;.6;.8;1;.8;.6;.5",e),rc:l}},t:1},{fn:function(){return{an:"r",dur:u,v:i("4;5;6;5;4;3;3",e),rc:l}},t:1}]}},t:3}]},lines:{sw:7,lc:s,line:[{fn:function(e){return{x1:10+14*e,x2:10+14*e,a:[{fn:function(){return{an:"y1",dur:u,v:i("16;18;28;18;16",e),rc:l}},t:1},{fn:function(){return{an:"y2",dur:u,v:i("48;44;36;46;48",e),rc:l}},t:1},{fn:function(){return{an:c,dur:u,v:i("1;.8;.5;.4;1",e),rc:l}},t:1}]}},t:4}]},ripple:{f:d,"fill-rule":"evenodd",sw:3,circle:[{fn:function(e){return{cx:32,cy:32,a:[{fn:function(){return{an:"r",begin:-1*e+"s",dur:"2s",v:"0;24",keyTimes:"0;1",keySplines:"0.1,0.2,0.3,1",calcMode:"spline",rc:l}},t:1},{fn:function(){return{an:c,begin:-1*e+"s",dur:"2s",v:".2;1;.2;0",rc:l}},t:1}]}},t:2}]},spiral:{defs:[{linearGradient:[{id:"sGD",gradientUnits:"userSpaceOnUse",x1:55,y1:46,x2:2,y2:46,stop:[{offset:.1,"class":"stop1"},{offset:1,"class":"stop2"}]}]}],g:[{sw:4,lc:s,f:d,path:[{stroke:"url(#sGD)",d:"M4,32 c0,15,12,28,28,28c8,0,16-4,21-9"},{d:"M60,32 C60,16,47.464,4,32,4S4,16,4,32"}],at:[h]}]}},g={android:function(t){function i(){if(!r.stop){var t=o(Date.now()-a,650),d=1,f=0,h=188-58*t,p=182-182*t;c%2&&(d=-1,f=-64,h=128- -58*t,p=182*t);var v=[0,-101,-90,-11,-180,79,-270,-191][c];n(u,"da",Math.max(Math.min(h,188),128)),n(u,"os",Math.max(Math.min(p,182),0)),n(u,"t","scale("+d+",1) translate("+f+",0) rotate("+v+",32,32)"),s+=4.1,s>359&&(s=0),n(l,"t","rotate("+s+",32,32)"),t>=1&&(c++,c>7&&(c=0),a=Date.now()),e.requestAnimationFrame(i)}}var r={};this.stop=!1;var a,c=0,s=0,l=t.querySelector("g"),u=t.querySelector("circle");return function(){return a=Date.now(),i(),r}}};a.controller("$ionicSpinner",["$element","$attrs","$ionicConfig",function(e,n,i){var o,r;this.init=function(){o=n.icon||i.spinner.icon();var r=document.createElement("div");return t("svg",{viewBox:"0 0 64 64",g:[v[o]]},r,o),e.html(r.innerHTML),this.start(),o},this.start=function(){g[o]&&(r=g[o](e[0])())},this.stop=function(){g[o]&&(r.stop=!0)}}])}(ionic),a.controller("$ionicTab",["$scope","$ionicHistory","$attrs","$location","$state",function(e,t,n,i,o){this.$scope=e,this.hrefMatchesState=function(){return n.href&&0===i.path().indexOf(n.href.replace(/^#/,"").replace(/\/$/,""))},this.srefMatchesState=function(){return n.uiSref&&o.includes(n.uiSref.split("(")[0])},this.navNameMatchesState=function(){return this.navViewName&&t.isCurrentStateNavView(this.navViewName)},this.tabMatchesState=function(){return this.hrefMatchesState()||this.srefMatchesState()||this.navNameMatchesState()}}]),a.controller("$ionicTabs",["$scope","$element","$ionicHistory",function(e,t,n){var i,o=this,r=null,a=null,c=!0;o.tabs=[],o.selectedIndex=function(){return o.tabs.indexOf(r)},o.selectedTab=function(){return r},o.previousSelectedTab=function(){return a},o.add=function(e){n.registerHistory(e),o.tabs.push(e)},o.remove=function(e){var t=o.tabs.indexOf(e);if(-1!==t){if(e.$tabSelected)if(o.deselect(e),1===o.tabs.length);else{var n=t===o.tabs.length-1?t-1:t+1;o.select(o.tabs[n])}o.tabs.splice(t,1)}},o.deselect=function(e){e.$tabSelected&&(a=r,r=i=null,e.$tabSelected=!1,(e.onDeselect||h)(),e.$broadcast&&e.$broadcast("$ionicHistory.deselect"))},o.select=function(t,a){var c;if(u(t)){if(c=t,c>=o.tabs.length)return;t=o.tabs[c]}else c=o.tabs.indexOf(t);1===arguments.length&&(a=!(!t.navViewName&&!t.uiSref)),r&&r.$historyId==t.$historyId?a&&n.goToHistoryRoot(t.$historyId):i!==c&&(s(o.tabs,function(e){o.deselect(e)}),r=t,i=c,o.$scope&&o.$scope.$parent&&(o.$scope.$parent.$activeHistoryId=t.$historyId),t.$tabSelected=!0,(t.onSelect||h)(),a&&e.$emit("$ionicHistory.change",{type:"tab",tabIndex:c,historyId:t.$historyId,navViewName:t.navViewName,hasNavView:!!t.navViewName,title:t.title,url:t.href,uiSref:t.uiSref}),e.$broadcast("tabSelected",{selectedTab:t,selectedTabIndex:c}))},o.hasActiveScope=function(){for(var e=0;e<o.tabs.length;e++)if(n.isActiveScope(o.tabs[e]))return!0;return!1},o.showBar=function(e){return arguments.length&&(e?t.removeClass("tabs-item-hide"):t.addClass("tabs-item-hide"),c=!!e),c}}]),a.controller("$ionicView",["$scope","$element","$attrs","$compile","$rootScope",function(e,t,n,i,o){function r(){var t=l(n.viewTitle)&&"viewTitle"||l(n.title)&&"title";t&&(a(n[t]),$.push(n.$observe(t,a))),l(n.hideBackButton)&&$.push(e.$watch(n.hideBackButton,function(e){f.showBackButton(!e)})),l(n.hideNavBar)&&$.push(e.$watch(n.hideNavBar,function(e){f.showBar(!e)}))}function a(e){l(e)&&e!==v&&(v=e,f.title(v))}function s(){for(var e=0;e<$.length;e++)$[e]();$=[]}function u(t){return t?i(t)(e.$new()):void 0}function d(t){return!!e.$eval(n[t])}var f,h,p,v,g=this,m={},$=[],w=e.$on("ionNavBar.init",function(e,t){e.stopPropagation(),h=t});g.init=function(){w();var n=t.inheritedData("$ionModalController");f=t.inheritedData("$ionNavViewController"),f&&!n&&(e.$on("$ionicView.beforeEnter",g.beforeEnter),e.$on("$ionicView.afterEnter",r),e.$on("$ionicView.beforeLeave",s))},g.beforeEnter=function(t,i){if(i&&!i.viewNotified){i.viewNotified=!0,o.$$phase||e.$digest(),v=l(n.viewTitle)?n.viewTitle:n.title;var r={};for(var a in m)r[a]=u(m[a]);f.beforeEnter(c(i,{title:v,showBack:!d("hideBackButton"),navBarItems:r,navBarDelegate:h||null,showNavBar:!d("hideNavBar"),hasHeaderBar:!!p})),s()}},g.navElement=function(e,t){m[e]=t}}]),a.directive("ionActionSheet",["$document",function(e){return{restrict:"E",scope:!0,replace:!0,link:function(t,n){var i=function(e){27==e.which&&(t.cancel(),t.$apply())},o=function(e){e.target==n[0]&&(t.cancel(),t.$apply())};t.$on("$destroy",function(){n.remove(),e.unbind("keyup",i)}),e.bind("keyup",i),n.bind("click",o)},template:'<div class="action-sheet-backdrop"><div class="action-sheet-wrapper"><div class="action-sheet" ng-class="{\'action-sheet-has-icons\': $actionSheetHasIcon}"><div class="action-sheet-group action-sheet-options"><div class="action-sheet-title" ng-if="titleText" ng-bind-html="titleText"></div><button class="button action-sheet-option" ng-click="buttonClicked($index)" ng-class="b.className" ng-repeat="b in buttons" ng-bind-html="b.text"></button><button class="button destructive action-sheet-destructive" ng-if="destructiveText" ng-click="destructiveButtonClicked()" ng-bind-html="destructiveText"></button></div><div class="action-sheet-group action-sheet-cancel" ng-if="cancelText"><button class="button" ng-click="cancel()" ng-bind-html="cancelText"></button></div></div></div></div>'}}]),a.directive("ionCheckbox",["$ionicConfig",function(e){return{restrict:"E",replace:!0,require:"?ngModel",transclude:!0,template:'<label class="item item-checkbox"><div class="checkbox checkbox-input-hidden disable-pointer-events"><input type="checkbox"><i class="checkbox-icon"></i></div><div class="item-content disable-pointer-events" ng-transclude></div></label>',compile:function(t,n){var i=t.find("input");s({name:n.name,"ng-value":n.ngValue,"ng-model":n.ngModel,"ng-checked":n.ngChecked,"ng-disabled":n.ngDisabled,"ng-true-value":n.ngTrueValue,"ng-false-value":n.ngFalseValue,"ng-change":n.ngChange,"ng-required":n.ngRequired,required:n.required},function(e,t){l(e)&&i.attr(t,e)});var o=t[0].querySelector(".checkbox");o.classList.add("checkbox-"+e.form.checkbox())}}}]),a.directive("collectionRepeat",e).factory("$ionicCollectionManager",t);var g="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",m=/height:.*?px;\s*width:.*?px/,$=3;e.$inject=["$ionicCollectionManager","$parse","$window","$$rAF","$rootScope","$timeout"],t.$inject=["$rootScope","$window","$$rAF"],a.directive("ionContent",["$timeout","$controller","$ionicBind","$ionicConfig",function(e,t,n,i){return{restrict:"E",require:"^?ionNavView",scope:!0,priority:800,compile:function(e,o){function r(e,i,r){function u(){e.$onScrollComplete({scrollTop:c.scrollView.__scrollTop,scrollLeft:c.scrollView.__scrollLeft})}var d=e.$parent;if(e.$watch(function(){return(d.$hasHeader?" has-header":"")+(d.$hasSubheader?" has-subheader":"")+(d.$hasFooter?" has-footer":"")+(d.$hasSubfooter?" has-subfooter":"")+(d.$hasTabs?" has-tabs":"")+(d.$hasTabsTop?" has-tabs-top":"")},function(e,t){i.removeClass(t),i.addClass(e)}),e.$hasHeader=e.$hasSubheader=e.$hasFooter=e.$hasSubfooter=e.$hasTabs=e.$hasTabsTop=!1,n(e,r,{$onScroll:"&onScroll",$onScrollComplete:"&onScrollComplete",hasBouncing:"@",padding:"@",direction:"@",scrollbarX:"@",scrollbarY:"@",startX:"@",startY:"@",scrollEventInterval:"@"}),e.direction=e.direction||"y",l(r.padding)&&e.$watch(r.padding,function(e){(a||i).toggleClass("padding",!!e)}),"false"===r.scroll);else{var f={};s?(i.addClass("overflow-scroll"),f={el:i[0],delegateHandle:o.delegateHandle,startX:e.$eval(e.startX)||0,startY:e.$eval(e.startY)||0,nativeScrolling:!0}):f={el:i[0],delegateHandle:o.delegateHandle,locking:"true"===(o.locking||"true"),bouncing:e.$eval(e.hasBouncing),startX:e.$eval(e.startX)||0,startY:e.$eval(e.startY)||0,scrollbarX:e.$eval(e.scrollbarX)!==!1,scrollbarY:e.$eval(e.scrollbarY)!==!1,scrollingX:e.direction.indexOf("x")>=0,scrollingY:e.direction.indexOf("y")>=0,scrollEventInterval:parseInt(e.scrollEventInterval,10)||10,scrollingComplete:u},c=t("$ionicScroll",{$scope:e,scrollViewOptions:f}),e.scrollCtrl=c,e.$on("$destroy",function(){f&&(f.scrollingComplete=h,delete f.el),a=null,i=null,o.$$element=null})}}var a,c;e.addClass("scroll-content ionic-scroll"),"false"!=o.scroll?(a=f('<div class="scroll"></div>'),a.append(e.contents()),e.append(a)):e.addClass("scroll-content-false");var s="false"!==o.overflowScroll&&("true"===o.overflowScroll||!i.scrolling.jsScrolling());return s&&(s=!e[0].querySelector("[collection-repeat]")),{pre:r}}}}]),a.directive("exposeAsideWhen",["$window",function(e){return{restrict:"A",require:"^ionSideMenus",link:function(t,n,i,o){function r(){var t="large"==i.exposeAsideWhen?"(min-width:768px)":i.exposeAsideWhen;o.exposeAside(e.matchMedia(t).matches),o.activeAsideResizing(!1)}function a(){o.activeAsideResizing(!0),l()}var c=e.innerWidth,s=e.innerHeight;ionic.on("resize",function(){(c!==e.innerWidth||s!==e.innerHeight)&&(c=e.innerWidth,s=e.innerHeight,a())},e);var l=ionic.debounce(function(){t.$apply(r)},300,!1);t.$evalAsync(r)}}}]);var w="onHold onTap onDoubleTap onTouch onRelease onDragStart onDrag onDragEnd onDragUp onDragRight onDragDown onDragLeft onSwipe onSwipeUp onSwipeRight onSwipeDown onSwipeLeft".split(" ");w.forEach(function(e){a.directive(e,n(e))}),a.directive("ionHeaderBar",i(!0)).directive("ionFooterBar",i(!1)),a.directive("ionInfiniteScroll",["$timeout",function(e){return{restrict:"E",require:["?^$ionicScroll","ionInfiniteScroll"],
template:function(e,t){return t.icon?'<i class="icon {{icon()}} icon-refreshing {{scrollingType}}"></i>':'<ion-spinner icon="{{spinner()}}"></ion-spinner>'},scope:!0,controller:"$ionInfiniteScroll",link:function(t,n,i,o){var r=o[1],a=r.scrollCtrl=o[0],c=r.jsScrolling=!a.isNative();if(c)r.scrollView=a.scrollView,t.scrollingType="js-scrolling",a.$element.on("scroll",r.checkBounds);else{var s=ionic.DomUtil.getParentOrSelfWithClass(n[0].parentNode,"overflow-scroll");if(r.scrollEl=s,!s)throw"Infinite scroll must be used inside a scrollable div";r.scrollEl.addEventListener("scroll",r.checkBounds)}var u=l(i.immediateCheck)?t.$eval(i.immediateCheck):!0;u&&e(function(){r.checkBounds()})}}}]);var b=-1;a.directive("ionInput",[function(){return{restrict:"E",controller:["$scope","$element",function(e,t){this.$scope=e,this.$element=t,this.setInputAriaLabeledBy=function(e){var n=t[0].querySelectorAll("input,textarea");n.length&&n[0].setAttribute("aria-labelledby",e)},this.focus=function(){var e=t[0].querySelectorAll("input,textarea");e.length&&e[0].focus()}}]}}]),a.directive("ionLabel",[function(){return{restrict:"E",require:"?^ionInput",compile:function(){return function(e,t,n,i){var o=t[0];t.addClass("input-label"),t.attr("aria-label",t.text());var r=o.id||"_label-"+ ++b;o.id||t.attr("id",r),i&&(i.setInputAriaLabeledBy(r),t.on("click",function(){i.focus()}))}}}}]),a.directive("inputLabel",[function(){return{restrict:"C",require:"?^ionInput",compile:function(){return function(e,t,n,i){var o=t[0];t.attr("aria-label",t.text());var r=o.id||"_label-"+ ++b;o.id||t.attr("id",r),i&&i.setInputAriaLabeledBy(r)}}}}]),a.directive("ionItem",["$$rAF",function(e){return{restrict:"E",controller:["$scope","$element",function(e,t){this.$scope=e,this.$element=t}],scope:!0,compile:function(t,n){var i=l(n.href)||l(n.ngHref)||l(n.uiSref),o=i||/ion-(delete|option|reorder)-button/i.test(t.html());if(o){var r=f(i?"<a></a>":"<div></div>");r.addClass("item-content"),(l(n.href)||l(n.ngHref))&&(r.attr("ng-href","{{$href()}}"),l(n.target)&&r.attr("target","{{$target()}}")),r.append(t.contents()),t.addClass("item item-complex").append(r)}else t.addClass("item");return function(t,n,i){t.$href=function(){return i.href||i.ngHref},t.$target=function(){return i.target};var o=n[0].querySelector(".item-content");o&&t.$on("$collectionRepeatLeave",function(){o&&o.$$ionicOptionsOpen&&(o.style[ionic.CSS.TRANSFORM]="",o.style[ionic.CSS.TRANSITION]="none",e(function(){o.style[ionic.CSS.TRANSITION]=""}),o.$$ionicOptionsOpen=!1)})}}}}]);var y='<div class="item-left-edit item-delete enable-pointer-events"></div>';a.directive("ionDeleteButton",function(){function e(e){e.stopPropagation()}return{restrict:"E",require:["^^ionItem","^?ionList"],priority:Number.MAX_VALUE,compile:function(t,n){return n.$set("class",(n["class"]||"")+" button icon button-icon",!0),function(t,n,i,o){function r(){c=c||n.controller("ionList"),c&&c.showDelete()&&s.addClass("visible active")}var a=o[0],c=o[1],s=f(y);s.append(n),a.$element.append(s).addClass("item-left-editable"),n.on("click",e),r(),t.$on("$ionic.reconnectScope",r)}}}}),a.directive("itemFloatingLabel",function(){return{restrict:"C",link:function(e,t){var n=t[0],i=n.querySelector("input, textarea"),o=n.querySelector(".input-label");if(i&&o){var r=function(){i.value?o.classList.add("has-input"):o.classList.remove("has-input")};i.addEventListener("input",r);var a=f(i).controller("ngModel");a&&(a.$render=function(){i.value=a.$viewValue||"",r()}),e.$on("$destroy",function(){i.removeEventListener("input",r)})}}}});var S='<div class="item-options invisible"></div>';a.directive("ionOptionButton",[function(){function e(e){e.stopPropagation()}return{restrict:"E",require:"^ionItem",priority:Number.MAX_VALUE,compile:function(t,n){return n.$set("class",(n["class"]||"")+" button",!0),function(t,n,i,o){o.optionsContainer||(o.optionsContainer=f(S),o.$element.append(o.optionsContainer)),o.optionsContainer.append(n),o.$element.addClass("item-right-editable"),n.on("click",e)}}}}]);var k='<div data-prevent-scroll="true" class="item-right-edit item-reorder enable-pointer-events"></div>';a.directive("ionReorderButton",["$parse",function(e){return{restrict:"E",require:["^ionItem","^?ionList"],priority:Number.MAX_VALUE,compile:function(t,n){return n.$set("class",(n["class"]||"")+" button icon button-icon",!0),t[0].setAttribute("data-prevent-scroll",!0),function(t,n,i,o){var r=o[0],a=o[1],c=e(i.onReorder);t.$onReorder=function(e,n){c(t,{$fromIndex:e,$toIndex:n})},i.ngClick||i.onClick||i.onclick||(n[0].onclick=function(e){return e.stopPropagation(),!1});var s=f(k);s.append(n),r.$element.append(s).addClass("item-right-editable"),a&&a.showReorder()&&s.addClass("visible active")}}}}]),a.directive("keyboardAttach",function(){return function(e,t){function n(e){if(!ionic.Platform.isAndroid()||ionic.Platform.isFullScreen){var n=e.keyboardHeight||e.detail&&e.detail.keyboardHeight;t.css("bottom",n+"px"),r=t.controller("$ionicScroll"),r&&(r.scrollView.__container.style.bottom=n+o(t[0])+"px")}}function i(){(!ionic.Platform.isAndroid()||ionic.Platform.isFullScreen)&&(t.css("bottom",""),r&&(r.scrollView.__container.style.bottom=""))}ionic.on("native.keyboardshow",n,window),ionic.on("native.keyboardhide",i,window),ionic.on("native.showkeyboard",n,window),ionic.on("native.hidekeyboard",i,window);var r;e.$on("$destroy",function(){ionic.off("native.keyboardshow",n,window),ionic.off("native.keyboardhide",i,window),ionic.off("native.showkeyboard",n,window),ionic.off("native.hidekeyboard",i,window)})}}),a.directive("ionList",["$timeout",function(e){return{restrict:"E",require:["ionList","^?$ionicScroll"],controller:"$ionicList",compile:function(t,n){var i=f('<div class="list">').append(t.contents()).addClass(n.type);return t.append(i),function(t,i,o,r){function a(){function o(e,t){t()&&e.addClass("visible")||e.removeClass("active"),ionic.requestAnimationFrame(function(){t()&&e.addClass("active")||e.removeClass("visible")})}var r=c.listView=new ionic.views.ListView({el:i[0],listEl:i.children()[0],scrollEl:s&&s.element,scrollView:s&&s.scrollView,onReorder:function(t,n,i){var o=f(t).scope();o&&o.$onReorder&&e(function(){o.$onReorder(n,i)})},canSwipe:function(){return c.canSwipeItems()}});t.$on("$destroy",function(){r&&(r.deregister&&r.deregister(),r=null)}),l(n.canSwipe)&&t.$watch("!!("+n.canSwipe+")",function(e){c.canSwipeItems(e)}),l(n.showDelete)&&t.$watch("!!("+n.showDelete+")",function(e){c.showDelete(e)}),l(n.showReorder)&&t.$watch("!!("+n.showReorder+")",function(e){c.showReorder(e)}),t.$watch(function(){return c.showDelete()},function(e,t){if(e||t){e&&c.closeOptionButtons(),c.canSwipeItems(!e),i.children().toggleClass("list-left-editing",e),i.toggleClass("disable-pointer-events",e);var n=f(i[0].getElementsByClassName("item-delete"));o(n,c.showDelete)}}),t.$watch(function(){return c.showReorder()},function(e,t){if(e||t){e&&c.closeOptionButtons(),c.canSwipeItems(!e),i.children().toggleClass("list-right-editing",e),i.toggleClass("disable-pointer-events",e);var n=f(i[0].getElementsByClassName("item-reorder"));o(n,c.showReorder)}})}var c=r[0],s=r[1];e(a)}}}}]),a.directive("menuClose",["$ionicHistory","$timeout",function(e,t){return{restrict:"AC",link:function(n,i){i.bind("click",function(){var n=i.inheritedData("$ionSideMenusController");n&&(e.nextViewOptions({historyRoot:!0,disableAnimate:!0,expire:300}),t(function(){e.nextViewOptions({historyRoot:!1,disableAnimate:!1})},300),n.close())})}}}]),a.directive("menuToggle",function(){return{restrict:"AC",link:function(e,t,n){e.$on("$ionicView.beforeEnter",function(e,n){if(n.enableBack){var i=t.inheritedData("$ionSideMenusController");i.enableMenuWithBackViews()||t.addClass("hide")}else t.removeClass("hide")}),t.bind("click",function(){var e=t.inheritedData("$ionSideMenusController");e&&e.toggle(n.menuToggle)})}}}),a.directive("ionModal",[function(){return{restrict:"E",transclude:!0,replace:!0,controller:[function(){}],template:'<div class="modal-backdrop"><div class="modal-backdrop-bg"></div><div class="modal-wrapper" ng-transclude></div></div>'}}]),a.directive("ionModalView",function(){return{restrict:"E",compile:function(e){e.addClass("modal")}}}),a.directive("ionNavBackButton",["$ionicConfig","$document",function(e,t){return{restrict:"E",require:"^ionNavBar",compile:function(n,i){function o(e){return/ion-|icon/.test(e.className)}var r=t[0].createElement("button");for(var a in i.$attr)r.setAttribute(i.$attr[a],i[a]);i.ngClick||r.setAttribute("ng-click","$ionicGoBack()"),r.className="button back-button hide buttons "+(n.attr("class")||""),r.innerHTML=n.html()||"";for(var c,s,l,u,d=o(n[0]),f=0;f<n[0].childNodes.length;f++)c=n[0].childNodes[f],1===c.nodeType?o(c)?d=!0:c.classList.contains("default-title")?l=!0:c.classList.contains("previous-title")&&(u=!0):s||3!==c.nodeType||(s=!!c.nodeValue.trim());var h=e.backButton.icon();if(!d&&h&&"none"!==h&&(r.innerHTML='<i class="icon '+h+'"></i> '+r.innerHTML,r.className+=" button-clear"),!s){var p=t[0].createElement("span");p.className="back-text",!l&&e.backButton.text()&&(p.innerHTML+='<span class="default-title">'+e.backButton.text()+"</span>"),!u&&e.backButton.previousTitleText()&&(p.innerHTML+='<span class="previous-title"></span>'),r.appendChild(p)}return n.attr("class","hide"),n.empty(),{pre:function(e,t,n,i){i.navElement("backButton",r.outerHTML),r=null}}}}}]),a.directive("ionNavBar",function(){return{restrict:"E",controller:"$ionicNavBar",scope:!0,link:function(e,t,n,i){i.init()}}}),a.directive("ionNavButtons",["$document",function(e){return{require:"^ionNavBar",restrict:"E",compile:function(t,n){var i="left";/^primary|secondary|right$/i.test(n.side||"")&&(i=n.side.toLowerCase());var o=e[0].createElement("span");o.className=i+"-buttons",o.innerHTML=t.html();var r=i+"Buttons";return t.attr("class","hide"),t.empty(),{pre:function(e,t,n,i){var a=t.parent().data("$ionViewController");a?a.navElement(r,o.outerHTML):i.navElement(r,o.outerHTML),o=null}}}}}]),a.directive("navDirection",["$ionicViewSwitcher",function(e){return{restrict:"A",priority:1e3,link:function(t,n,i){n.bind("click",function(){e.nextDirection(i.navDirection)})}}}]),a.directive("ionNavTitle",["$document",function(e){return{require:"^ionNavBar",restrict:"E",compile:function(t,n){var i="title",o=e[0].createElement("span");for(var r in n.$attr)o.setAttribute(n.$attr[r],n[r]);return o.classList.add("nav-bar-title"),o.innerHTML=t.html(),t.attr("class","hide"),t.empty(),{pre:function(e,t,n,r){var a=t.parent().data("$ionViewController");a?a.navElement(i,o.outerHTML):r.navElement(i,o.outerHTML),o=null}}}}}]),a.directive("navTransition",["$ionicViewSwitcher",function(e){return{restrict:"A",priority:1e3,link:function(t,n,i){n.bind("click",function(){e.nextTransition(i.navTransition)})}}}]),a.directive("ionNavView",["$state","$ionicConfig",function(e,t){return{restrict:"E",terminal:!0,priority:2e3,transclude:!0,controller:"$ionicNavView",compile:function(n,i,o){return n.addClass("view-container"),ionic.DomUtil.cachedAttr(n,"nav-view-transition",t.views.transition()),function(t,n,i,r){function a(t){var n=e.$current&&e.$current.locals[s.name];n&&(t||n!==c)&&(c=n,s.state=n.$$state,r.register(n))}var c;o(t,function(e){n.append(e)});var s=r.init();t.$on("$stateChangeSuccess",function(){a(!1)}),t.$on("$viewContentLoading",function(){a(!1)}),a(!0)}}}}]),a.config(["$provide",function(e){e.decorator("ngClickDirective",["$delegate",function(e){return e.shift(),e}])}]).factory("$ionicNgClick",["$parse",function(e){return function(t,n,i){var o=angular.isFunction(i)?i:e(i);n.on("click",function(e){t.$apply(function(){o(t,{$event:e})})}),n.onclick=h}}]).directive("ngClick",["$ionicNgClick",function(e){return function(t,n,i){e(t,n,i.ngClick)}}]).directive("ionStopEvent",function(){return{restrict:"A",link:function(e,t,n){t.bind(n.ionStopEvent,r)}}}),a.directive("ionPane",function(){return{restrict:"E",link:function(e,t){t.addClass("pane")}}}),a.directive("ionPopover",[function(){return{restrict:"E",transclude:!0,replace:!0,controller:[function(){}],template:'<div class="popover-backdrop"><div class="popover-wrapper" ng-transclude></div></div>'}}]),a.directive("ionPopoverView",function(){return{restrict:"E",compile:function(e){e.append(f('<div class="popover-arrow">')),e.addClass("popover")}}}),a.directive("ionRadio",function(){return{restrict:"E",replace:!0,require:"?ngModel",transclude:!0,template:'<label class="item item-radio"><input type="radio" name="radio-group"><div class="radio-content"><div class="item-content disable-pointer-events" ng-transclude></div><i class="radio-icon disable-pointer-events icon ion-checkmark"></i></div></label>',compile:function(e,t){if(t.icon){var n=e.find("i");n.removeClass("ion-checkmark").addClass(t.icon)}var i=e.find("input");return s({name:t.name,value:t.value,disabled:t.disabled,"ng-value":t.ngValue,"ng-model":t.ngModel,"ng-disabled":t.ngDisabled,"ng-change":t.ngChange,"ng-required":t.ngRequired,required:t.required},function(e,t){l(e)&&i.attr(t,e)}),function(e,t,n){e.getValue=function(){return e.ngValue||n.value}}}}}),a.directive("ionRefresher",[function(){return{restrict:"E",replace:!0,require:["?^$ionicScroll","ionRefresher"],controller:"$ionicRefresher",template:'<div class="scroll-refresher invisible" collection-repeat-ignore><div class="ionic-refresher-content" ng-class="{\'ionic-refresher-with-text\': pullingText || refreshingText}"><div class="icon-pulling" ng-class="{\'pulling-rotation-disabled\':disablePullingRotation}"><i class="icon {{pullingIcon}}"></i></div><div class="text-pulling" ng-bind-html="pullingText"></div><div class="icon-refreshing"><ion-spinner ng-if="showSpinner" icon="{{spinner}}"></ion-spinner><i ng-if="showIcon" class="icon {{refreshingIcon}}"></i></div><div class="text-refreshing" ng-bind-html="refreshingText"></div></div></div>',link:function(e,t,n,i){var o=i[0],r=i[1];!o||o.isNative()?r.init():(t[0].classList.add("js-scrolling"),o._setRefresher(e,t[0],r.getRefresherDomMethods()),e.$on("scroll.refreshComplete",function(){e.$evalAsync(function(){o.scrollView.finishPullToRefresh()})}))}}}]),a.directive("ionScroll",["$timeout","$controller","$ionicBind","$ionicConfig",function(e,t,n,i){return{restrict:"E",scope:!0,controller:function(){},compile:function(e,o){function r(e,i,o){n(e,o,{direction:"@",paging:"@",$onScroll:"&onScroll",scroll:"@",scrollbarX:"@",scrollbarY:"@",zooming:"@",minZoom:"@",maxZoom:"@"}),e.direction=e.direction||"y",l(o.padding)&&e.$watch(o.padding,function(e){a.toggleClass("padding",!!e)}),e.$eval(e.paging)===!0&&a.addClass("scroll-paging"),e.direction||(e.direction="y");var r=e.$eval(e.paging)===!0;c&&i.addClass("overflow-scroll"),i.addClass("scroll-"+e.direction);var s={el:i[0],delegateHandle:o.delegateHandle,locking:"true"===(o.locking||"true"),bouncing:e.$eval(o.hasBouncing),paging:r,scrollbarX:e.$eval(e.scrollbarX)!==!1,scrollbarY:e.$eval(e.scrollbarY)!==!1,scrollingX:e.direction.indexOf("x")>=0,scrollingY:e.direction.indexOf("y")>=0,zooming:e.$eval(e.zooming)===!0,maxZoom:e.$eval(e.maxZoom)||3,minZoom:e.$eval(e.minZoom)||.5,preventDefault:!0,nativeScrolling:c};r&&(s.speedMultiplier=.8,s.bouncing=!1),t("$ionicScroll",{$scope:e,scrollViewOptions:s})}e.addClass("scroll-view ionic-scroll");var a=f('<div class="scroll"></div>');a.append(e.contents()),e.append(a);var c="false"!==o.overflowScroll&&("true"===o.overflowScroll||!i.scrolling.jsScrolling());return{pre:r}}}}]),a.directive("ionSideMenu",function(){return{restrict:"E",require:"^ionSideMenus",scope:!0,compile:function(e,t){return angular.isUndefined(t.isEnabled)&&t.$set("isEnabled","true"),angular.isUndefined(t.width)&&t.$set("width","275"),e.addClass("menu menu-"+t.side),function(e,n,i,o){e.side=i.side||"left";var r=o[e.side]=new ionic.views.SideMenu({width:t.width,el:n[0],isEnabled:!0});e.$watch(i.width,function(e){var t=+e;t&&t==e&&r.setWidth(+e)}),e.$watch(i.isEnabled,function(e){r.setIsEnabled(!!e)})}}}}),a.directive("ionSideMenuContent",["$timeout","$ionicGesture","$window",function(e,t,n){return{restrict:"EA",require:"^ionSideMenus",scope:!0,compile:function(i,o){function r(r,a,c,s){function u(e){0!==s.getOpenAmount()?(s.close(),e.gesture.srcEvent.preventDefault(),v=null,g=null):v||(v=ionic.tap.pointerCoord(e.gesture.srcEvent))}function d(e){s.isDraggableTarget(e)&&"x"==p(e)&&(s._handleDrag(e),e.gesture.srcEvent.preventDefault())}function f(e){"x"==p(e)&&e.gesture.srcEvent.preventDefault()}function h(e){s._endDrag(e),v=null,g=null}function p(e){if(g)return g;if(e&&e.gesture){if(v){var t=ionic.tap.pointerCoord(e.gesture.srcEvent),n=Math.abs(t.x-v.x),i=Math.abs(t.y-v.y),o=i>n?"y":"x";return Math.max(n,i)>30&&(g=o),o}v=ionic.tap.pointerCoord(e.gesture.srcEvent)}return"y"}var v=null,g=null;l(o.dragContent)?r.$watch(o.dragContent,function(e){s.canDragContent(e)}):s.canDragContent(!0),l(o.edgeDragThreshold)&&r.$watch(o.edgeDragThreshold,function(e){s.edgeDragThreshold(e)});var m={element:i[0],onDrag:function(){},endDrag:function(){},setCanScroll:function(e){var t=a[0].querySelector(".scroll");if(t){var n=angular.element(t.parentElement);if(n){var i=n.scope();i.scrollCtrl&&i.scrollCtrl.freezeScrollShut(!e)}}},getTranslateX:function(){return r.sideMenuContentTranslateX||0},setTranslateX:ionic.animationFrameThrottle(function(t){var n=m.offsetX+t;a[0].style[ionic.CSS.TRANSFORM]="translate3d("+n+"px,0,0)",e(function(){r.sideMenuContentTranslateX=t})}),setMarginLeft:ionic.animationFrameThrottle(function(e){e?(e=parseInt(e,10),a[0].style[ionic.CSS.TRANSFORM]="translate3d("+e+"px,0,0)",a[0].style.width=n.innerWidth-e+"px",m.offsetX=e):(a[0].style[ionic.CSS.TRANSFORM]="translate3d(0,0,0)",a[0].style.width="",m.offsetX=0)}),setMarginRight:ionic.animationFrameThrottle(function(e){e?(e=parseInt(e,10),a[0].style.width=n.innerWidth-e+"px",m.offsetX=e):(a[0].style.width="",m.offsetX=0),a[0].style[ionic.CSS.TRANSFORM]="translate3d(0,0,0)"}),setMarginLeftAndRight:ionic.animationFrameThrottle(function(e,t){e=e&&parseInt(e,10)||0,t=t&&parseInt(t,10)||0;var i=e+t;i>0?(a[0].style[ionic.CSS.TRANSFORM]="translate3d("+e+"px,0,0)",a[0].style.width=n.innerWidth-i+"px",m.offsetX=e):(a[0].style[ionic.CSS.TRANSFORM]="translate3d(0,0,0)",a[0].style.width="",m.offsetX=0)}),enableAnimation:function(){r.animationEnabled=!0,a[0].classList.add("menu-animated")},disableAnimation:function(){r.animationEnabled=!1,a[0].classList.remove("menu-animated")},offsetX:0};s.setContent(m);var $={stop_browser_behavior:!1};$.prevent_default_directions=["left","right"];var w=t.on("tap",u,a,$),b=t.on("dragright",d,a,$),y=t.on("dragleft",d,a,$),S=t.on("dragup",f,a,$),k=t.on("dragdown",f,a,$),C=t.on("release",h,a,$);r.$on("$destroy",function(){m&&(m.element=null,m=null),t.off(y,"dragleft",d),t.off(b,"dragright",d),t.off(S,"dragup",f),t.off(k,"dragdown",f),t.off(C,"release",h),t.off(w,"tap",u)})}return i.addClass("menu-content pane"),{pre:r}}}}]),a.directive("ionSideMenus",["$ionicBody",function(e){return{restrict:"ECA",controller:"$ionicSideMenus",compile:function(t,n){function i(t,n,i,o){o.enableMenuWithBackViews(t.$eval(i.enableMenuWithBackViews)),t.$on("$ionicExposeAside",function(n,i){t.$exposeAside||(t.$exposeAside={}),t.$exposeAside.active=i,e.enableClass(i,"aside-open")}),t.$on("$ionicView.beforeEnter",function(e,n){n.historyId&&(t.$activeHistoryId=n.historyId)}),t.$on("$destroy",function(){e.removeClass("menu-open","aside-open")})}return n.$set("class",(n["class"]||"")+" view"),{pre:i}}}}]),a.directive("ionSlideBox",["$animate","$timeout","$compile","$ionicSlideBoxDelegate","$ionicHistory","$ionicScrollDelegate",function(e,t,n,i,o,r){return{restrict:"E",replace:!0,transclude:!0,scope:{autoPlay:"=",doesContinue:"@",slideInterval:"@",showPager:"@",pagerClick:"&",disableScroll:"@",onSlideChanged:"&",activeSlide:"=?",bounce:"@"},controller:["$scope","$element","$attrs",function(e,n,a){function c(e){e&&!s.isScrollFreeze?r.freezeAllScrolls(e):!e&&s.isScrollFreeze&&r.freezeAllScrolls(!1),s.isScrollFreeze=e}var s=this,u=e.$eval(e.doesContinue)===!0,d=e.$eval(e.bounce)!==!1,f=l(a.autoPlay)?!!e.autoPlay:!1,h=f?e.$eval(e.slideInterval)||4e3:0,p=new ionic.views.Slider({el:n[0],auto:h,continuous:u,startSlide:e.activeSlide,bouncing:d,slidesChanged:function(){e.currentSlide=p.currentIndex(),t(function(){})},callback:function(n){e.currentSlide=n,e.onSlideChanged({index:e.currentSlide,$index:e.currentSlide}),e.$parent.$broadcast("slideBox.slideChanged",n),e.activeSlide=n,t(function(){})},onDrag:function(){c(!0)},onDragEnd:function(){c(!1)}});p.enableSlide(e.$eval(a.disableScroll)!==!0),e.$watch("activeSlide",function(e){l(e)&&p.slide(e)}),e.$on("slideBox.nextSlide",function(){p.next()}),e.$on("slideBox.prevSlide",function(){p.prev()}),e.$on("slideBox.setSlide",function(e,t){p.slide(t)}),this.__slider=p;var v=i._registerInstance(p,a.delegateHandle,function(){return o.isActiveScope(e)});e.$on("$destroy",function(){v(),p.kill()}),this.slidesCount=function(){return p.slidesCount()},this.onPagerClick=function(t){e.pagerClick({index:t})},t(function(){p.load()})}],template:'<div class="slider"><div class="slider-slides" ng-transclude></div></div>',link:function(t,i,o){function r(){if(!a){var e=t.$new();a=f("<ion-pager></ion-pager>"),i.append(a),a=n(a)(e)}return a}e.enabled(i,!1),l(o.showPager)||(t.showPager=!0,r().toggleClass("hide",!1)),o.$observe("showPager",function(e){void 0!==e&&(e=t.$eval(e),r().toggleClass("hide",!e))});var a}}}]).directive("ionSlide",function(){return{restrict:"E",require:"?^ionSlideBox",compile:function(e){e.addClass("slider-slide")}}}).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}" ng-click="pagerClick($index)"><i class="icon ion-record"></i></span></div>',link:function(e,t,n,i){var o=function(e){for(var n=t[0].children,i=n.length,o=0;i>o;o++)o==e?n[o].classList.add("active"):n[o].classList.remove("active")};e.pagerClick=function(e){i.onPagerClick(e)},e.numSlides=function(){return new Array(i.slidesCount())},e.$watch("currentSlide",function(e){o(e)})}}}),a.directive("ionSlides",["$animate","$timeout","$compile",function(e,t,n){return{restrict:"E",transclude:!0,scope:{options:"=",slider:"="},template:'<div class="swiper-container"><div class="swiper-wrapper" ng-transclude></div><div ng-hide="!showPager" class="swiper-pagination"></div></div>',controller:["$scope","$element",function(e,i){var o=this;this.update=function(){t(function(){if(o.__slider){o.__slider.update(),o._options.loop&&o.__slider.createLoop();var t=o.__slider.slides.length;t>10&&(e.showPager=!1),o.__slider.activeIndex>t-1&&o.__slider.slideTo(t-1)}})},this.rapidUpdate=ionic.debounce(function(){o.update()},50),this.getSlider=function(){return o.__slider};var r=e.options||{},a=angular.extend({pagination:i.children().children()[1],paginationClickable:!0,lazyLoading:!0,preloadImages:!1},r);this._options=a,t(function(){var t=new ionic.views.Swiper(i.children()[0],a,e,n);e.$emit("$ionicSlides.sliderInitialized",{slider:t}),o.__slider=t,e.slider=o.__slider,e.$on("$destroy",function(){t.destroy(),o.__slider=null})}),t(function(){o.rapidUpdate()},200)}],link:function(e){e.showPager=!0}}}]).directive("ionSlidePage",[function(){return{restrict:"E",require:"?^ionSlides",transclude:!0,replace:!0,template:'<div class="swiper-slide" ng-transclude></div>',link:function(e,t,n,i){i.rapidUpdate(),e.$on("$destroy",function(){i.rapidUpdate()})}}}]),a.directive("ionSpinner",function(){return{restrict:"E",controller:"$ionicSpinner",link:function(e,t,n,i){var o=i.init();t.addClass("spinner spinner-"+o),t.on("$destroy",function(){i.stop()})}}}),a.directive("ionTab",["$compile","$ionicConfig","$ionicBind","$ionicViewSwitcher",function(e,t,n,i){function o(e,t){return l(t)?" "+e+'="'+t+'"':""}return{restrict:"E",require:["^ionTabs","ionTab"],controller:"$ionicTab",scope:!0,compile:function(r,a){for(var c="<ion-tab-nav"+o("ng-click",a.ngClick)+o("title",a.title)+o("icon",a.icon)+o("icon-on",a.iconOn)+o("icon-off",a.iconOff)+o("badge",a.badge)+o("badge-style",a.badgeStyle)+o("hidden",a.hidden)+o("disabled",a.disabled)+o("class",a["class"])+"></ion-tab-nav>",s=document.createElement("div"),l=0;l<r[0].children.length;l++)s.appendChild(r[0].children[l].cloneNode(!0));var u=s.childElementCount;r.empty();var d,h;return u&&("ION-NAV-VIEW"===s.children[0].tagName&&(d=s.children[0].getAttribute("name"),s.children[0].classList.add("view-container"),h=!0),1===u&&(s=s.children[0]),h||s.classList.add("pane"),s.classList.add("tab-content")),function(o,r,a,l){function h(){w.tabMatchesState()&&$.select(o,!1)}function p(n){n&&u?(b||(g=o.$new(),m=f(s),i.viewEleIsActive(m,!0),$.$element.append(m),e(m)(g),b=!0),i.viewEleIsActive(m,!0)):b&&m&&(t.views.maxCache()>0?i.viewEleIsActive(m,!1):v())}function v(){g&&g.$destroy(),b&&m&&m.remove(),s.innerHTML="",b=g=m=null}var g,m,$=l[0],w=l[1],b=!1;o.$tabSelected=!1,n(o,a,{onSelect:"&",onDeselect:"&",title:"@",uiSref:"@",href:"@"}),$.add(o),o.$on("$destroy",function(){o.$tabsDestroy||$.remove(o),y.isolateScope().$destroy(),y.remove(),y=s=m=null}),r[0].removeAttribute("title"),d&&(w.navViewName=o.navViewName=d),o.$on("$stateChangeSuccess",h),h();var y=f(c);y.data("$ionTabsController",$),y.data("$ionTabController",w),$.$tabsElement.append(e(y)(o)),o.$watch("$tabSelected",p),o.$on("$ionicView.afterEnter",function(){i.viewEleIsActive(m,o.$tabSelected)}),o.$on("$ionicView.clearCache",function(){o.$tabSelected||v()})}}}}]),a.directive("ionTabNav",[function(){return{restrict:"E",replace:!0,require:["^ionTabs","^ionTab"],template:"<a ng-class=\"{'has-badge':badge, 'tab-hidden':isHidden(), 'tab-item-active': isTabActive()}\" "+' ng-disabled="disabled()" class="tab-item"><span class="badge {{badgeStyle}}" ng-if="badge">{{badge}}</span><i class="icon {{getIcon()}}" ng-if="getIcon()"></i><span class="tab-title" ng-bind-html="title"></span></a>',scope:{title:"@",icon:"@",iconOn:"@",iconOff:"@",badge:"=",hidden:"@",disabled:"&",badgeStyle:"@","class":"@"},link:function(e,t,n,i){var o=i[0],r=i[1];t[0].removeAttribute("title"),e.selectTab=function(e){e.preventDefault(),o.select(r.$scope,!0)},n.ngClick||t.on("click",function(t){e.$apply(function(){e.selectTab(t)})}),e.isHidden=function(){return"true"===n.hidden||n.hidden===!0?!0:!1},e.getIconOn=function(){return e.iconOn||e.icon},e.getIconOff=function(){return e.iconOff||e.icon},e.isTabActive=function(){return o.selectedTab()===r.$scope},e.getIcon=function(){return o.selectedTab()===r.$scope?e.iconOn||e.icon:e.iconOff||e.icon}}}}]),a.directive("ionTabs",["$ionicTabsDelegate","$ionicConfig",function(e,t){return{restrict:"E",scope:!0,controller:"$ionicTabs",compile:function(n){function i(t,n,i,o){function a(e,t){e.stopPropagation();var n=o.previousSelectedTab();n&&n.$broadcast(e.name.replace("NavView","Tabs"),t)}var c=e._registerInstance(o,i.delegateHandle,o.hasActiveScope);o.$scope=t,o.$element=n,o.$tabsElement=f(n[0].querySelector(".tabs")),t.$watch(function(){return n[0].className},function(e){var n=-1!==e.indexOf("tabs-top"),i=-1!==e.indexOf("tabs-item-hide");t.$hasTabs=!n&&!i,t.$hasTabsTop=n&&!i,t.$emit("$ionicTabs.top",t.$hasTabsTop)}),t.$on("$ionicNavView.beforeLeave",a),t.$on("$ionicNavView.afterLeave",a),t.$on("$ionicNavView.leave",a),t.$on("$destroy",function(){t.$tabsDestroy=!0,c(),o.$tabsElement=o.$element=o.$scope=r=null,delete t.$hasTabs,delete t.$hasTabsTop})}function o(e,t,n,i){i.selectedTab()||i.select(0)}var r=f('<div class="tab-nav tabs">');return r.append(n.contents()),n.append(r).addClass("tabs-"+t.tabs.position()+" tabs-"+t.tabs.style()),{pre:i,post:o}}}}]),a.directive("ionTitle",[function(){return{restrict:"E",compile:function(e){e.addClass("title")}}}]),a.directive("ionToggle",["$timeout","$ionicConfig",function(e,t){return{restrict:"E",replace:!0,require:"?ngModel",transclude:!0,template:'<div class="item item-toggle"><div ng-transclude></div><label class="toggle"><input type="checkbox"><div class="track"><div class="handle"></div></div></label></div>',compile:function(e,n){var i=e.find("input");return s({name:n.name,"ng-value":n.ngValue,"ng-model":n.ngModel,"ng-checked":n.ngChecked,"ng-disabled":n.ngDisabled,"ng-true-value":n.ngTrueValue,"ng-false-value":n.ngFalseValue,"ng-change":n.ngChange,"ng-required":n.ngRequired,required:n.required},function(e,t){l(e)&&i.attr(t,e)}),n.toggleClass&&e[0].getElementsByTagName("label")[0].classList.add(n.toggleClass),e.addClass("toggle-"+t.form.toggle()),function(e,t){var n=t[0].getElementsByTagName("label")[0],i=n.children[0],o=n.children[1],r=o.children[0],a=f(i).controller("ngModel");e.toggle=new ionic.views.Toggle({el:n,track:o,checkbox:i,handle:r,onChange:function(){a&&(a.$setViewValue(i.checked),e.$apply())}}),e.$on("$destroy",function(){e.toggle.destroy()})}}}}]),a.directive("ionView",function(){return{restrict:"EA",priority:1e3,controller:"$ionicView",compile:function(e){return e.addClass("pane"),e[0].removeAttribute("title"),function(e,t,n,i){i.init()}}}})}();