Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
bhikandeshmukh
GitHub Repository: bhikandeshmukh/shark
Path: blob/master/phs/Paytm-Phishing/signup/otp_files/paytmOauth.js
996 views
1
/*! JSEncrypt v2.3.1 | https://npmcdn.com/[email protected]/LICENSE.txt */
2
!function(t,e){"function"==typeof define&&define.amd?define(["exports"],e):e("object"==typeof exports&&"string"!=typeof exports.nodeName?module.exports:t)}(this,function(t){function e(t,e,i){null!=t&&("number"==typeof t?this.fromNumber(t,e,i):null==e&&"string"!=typeof t?this.fromString(t,256):this.fromString(t,e))}function i(){return new e(null)}function r(t,e,i,r,s,n){for(;--n>=0;){var o=e*this[t++]+i[r]+s;s=Math.floor(o/67108864),i[r++]=67108863&o}return s}function s(t,e,i,r,s,n){for(var o=32767&e,h=e>>15;--n>=0;){var a=32767&this[t],u=this[t++]>>15,c=h*a+u*o;a=o*a+((32767&c)<<15)+i[r]+(1073741823&s),s=(a>>>30)+(c>>>15)+h*u+(s>>>30),i[r++]=1073741823&a}return s}function n(t,e,i,r,s,n){for(var o=16383&e,h=e>>14;--n>=0;){var a=16383&this[t],u=this[t++]>>14,c=h*a+u*o;a=o*a+((16383&c)<<14)+i[r]+s,s=(a>>28)+(c>>14)+h*u,i[r++]=268435455&a}return s}function o(t){return Be.charAt(t)}function h(t,e){var i=Ke[t.charCodeAt(e)];return null==i?-1:i}function a(t){for(var e=this.t-1;e>=0;--e)t[e]=this[e];t.t=this.t,t.s=this.s}function u(t){this.t=1,this.s=0>t?-1:0,t>0?this[0]=t:-1>t?this[0]=t+this.DV:this.t=0}function c(t){var e=i();return e.fromInt(t),e}function f(t,i){var r;if(16==i)r=4;else if(8==i)r=3;else if(256==i)r=8;else if(2==i)r=1;else if(32==i)r=5;else{if(4!=i)return void this.fromRadix(t,i);r=2}this.t=0,this.s=0;for(var s=t.length,n=!1,o=0;--s>=0;){var a=8==r?255&t[s]:h(t,s);0>a?"-"==t.charAt(s)&&(n=!0):(n=!1,0==o?this[this.t++]=a:o+r>this.DB?(this[this.t-1]|=(a&(1<<this.DB-o)-1)<<o,this[this.t++]=a>>this.DB-o):this[this.t-1]|=a<<o,o+=r,o>=this.DB&&(o-=this.DB))}8==r&&0!=(128&t[0])&&(this.s=-1,o>0&&(this[this.t-1]|=(1<<this.DB-o)-1<<o)),this.clamp(),n&&e.ZERO.subTo(this,this)}function p(){for(var t=this.s&this.DM;this.t>0&&this[this.t-1]==t;)--this.t}function l(t){if(this.s<0)return"-"+this.negate().toString(t);var e;if(16==t)e=4;else if(8==t)e=3;else if(2==t)e=1;else if(32==t)e=5;else{if(4!=t)return this.toRadix(t);e=2}var i,r=(1<<e)-1,s=!1,n="",h=this.t,a=this.DB-h*this.DB%e;if(h-- >0)for(a<this.DB&&(i=this[h]>>a)>0&&(s=!0,n=o(i));h>=0;)e>a?(i=(this[h]&(1<<a)-1)<<e-a,i|=this[--h]>>(a+=this.DB-e)):(i=this[h]>>(a-=e)&r,0>=a&&(a+=this.DB,--h)),i>0&&(s=!0),s&&(n+=o(i));return s?n:"0"}function d(){var t=i();return e.ZERO.subTo(this,t),t}function g(){return this.s<0?this.negate():this}function m(t){var e=this.s-t.s;if(0!=e)return e;var i=this.t;if(e=i-t.t,0!=e)return this.s<0?-e:e;for(;--i>=0;)if(0!=(e=this[i]-t[i]))return e;return 0}function y(t){var e,i=1;return 0!=(e=t>>>16)&&(t=e,i+=16),0!=(e=t>>8)&&(t=e,i+=8),0!=(e=t>>4)&&(t=e,i+=4),0!=(e=t>>2)&&(t=e,i+=2),0!=(e=t>>1)&&(t=e,i+=1),i}function b(){return this.t<=0?0:this.DB*(this.t-1)+y(this[this.t-1]^this.s&this.DM)}function T(t,e){var i;for(i=this.t-1;i>=0;--i)e[i+t]=this[i];for(i=t-1;i>=0;--i)e[i]=0;e.t=this.t+t,e.s=this.s}function S(t,e){for(var i=t;i<this.t;++i)e[i-t]=this[i];e.t=Math.max(this.t-t,0),e.s=this.s}function R(t,e){var i,r=t%this.DB,s=this.DB-r,n=(1<<s)-1,o=Math.floor(t/this.DB),h=this.s<<r&this.DM;for(i=this.t-1;i>=0;--i)e[i+o+1]=this[i]>>s|h,h=(this[i]&n)<<r;for(i=o-1;i>=0;--i)e[i]=0;e[o]=h,e.t=this.t+o+1,e.s=this.s,e.clamp()}function E(t,e){e.s=this.s;var i=Math.floor(t/this.DB);if(i>=this.t)return void(e.t=0);var r=t%this.DB,s=this.DB-r,n=(1<<r)-1;e[0]=this[i]>>r;for(var o=i+1;o<this.t;++o)e[o-i-1]|=(this[o]&n)<<s,e[o-i]=this[o]>>r;r>0&&(e[this.t-i-1]|=(this.s&n)<<s),e.t=this.t-i,e.clamp()}function D(t,e){for(var i=0,r=0,s=Math.min(t.t,this.t);s>i;)r+=this[i]-t[i],e[i++]=r&this.DM,r>>=this.DB;if(t.t<this.t){for(r-=t.s;i<this.t;)r+=this[i],e[i++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;i<t.t;)r-=t[i],e[i++]=r&this.DM,r>>=this.DB;r-=t.s}e.s=0>r?-1:0,-1>r?e[i++]=this.DV+r:r>0&&(e[i++]=r),e.t=i,e.clamp()}function w(t,i){var r=this.abs(),s=t.abs(),n=r.t;for(i.t=n+s.t;--n>=0;)i[n]=0;for(n=0;n<s.t;++n)i[n+r.t]=r.am(0,s[n],i,n,0,r.t);i.s=0,i.clamp(),this.s!=t.s&&e.ZERO.subTo(i,i)}function x(t){for(var e=this.abs(),i=t.t=2*e.t;--i>=0;)t[i]=0;for(i=0;i<e.t-1;++i){var r=e.am(i,e[i],t,2*i,0,1);(t[i+e.t]+=e.am(i+1,2*e[i],t,2*i+1,r,e.t-i-1))>=e.DV&&(t[i+e.t]-=e.DV,t[i+e.t+1]=1)}t.t>0&&(t[t.t-1]+=e.am(i,e[i],t,2*i,0,1)),t.s=0,t.clamp()}function B(t,r,s){var n=t.abs();if(!(n.t<=0)){var o=this.abs();if(o.t<n.t)return null!=r&&r.fromInt(0),void(null!=s&&this.copyTo(s));null==s&&(s=i());var h=i(),a=this.s,u=t.s,c=this.DB-y(n[n.t-1]);c>0?(n.lShiftTo(c,h),o.lShiftTo(c,s)):(n.copyTo(h),o.copyTo(s));var f=h.t,p=h[f-1];if(0!=p){var l=p*(1<<this.F1)+(f>1?h[f-2]>>this.F2:0),d=this.FV/l,g=(1<<this.F1)/l,m=1<<this.F2,v=s.t,b=v-f,T=null==r?i():r;for(h.dlShiftTo(b,T),s.compareTo(T)>=0&&(s[s.t++]=1,s.subTo(T,s)),e.ONE.dlShiftTo(f,T),T.subTo(h,h);h.t<f;)h[h.t++]=0;for(;--b>=0;){var S=s[--v]==p?this.DM:Math.floor(s[v]*d+(s[v-1]+m)*g);if((s[v]+=h.am(0,S,s,b,0,f))<S)for(h.dlShiftTo(b,T),s.subTo(T,s);s[v]<--S;)s.subTo(T,s)}null!=r&&(s.drShiftTo(f,r),a!=u&&e.ZERO.subTo(r,r)),s.t=f,s.clamp(),c>0&&s.rShiftTo(c,s),0>a&&e.ZERO.subTo(s,s)}}}function K(t){var r=i();return this.abs().divRemTo(t,null,r),this.s<0&&r.compareTo(e.ZERO)>0&&t.subTo(r,r),r}function A(t){this.m=t}function U(t){return t.s<0||t.compareTo(this.m)>=0?t.mod(this.m):t}function O(t){return t}function V(t){t.divRemTo(this.m,null,t)}function N(t,e,i){t.multiplyTo(e,i),this.reduce(i)}function J(t,e){t.squareTo(e),this.reduce(e)}function I(){if(this.t<1)return 0;var t=this[0];if(0==(1&t))return 0;var e=3&t;return e=e*(2-(15&t)*e)&15,e=e*(2-(255&t)*e)&255,e=e*(2-((65535&t)*e&65535))&65535,e=e*(2-t*e%this.DV)%this.DV,e>0?this.DV-e:-e}function P(t){this.m=t,this.mp=t.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<<t.DB-15)-1,this.mt2=2*t.t}function M(t){var r=i();return t.abs().dlShiftTo(this.m.t,r),r.divRemTo(this.m,null,r),t.s<0&&r.compareTo(e.ZERO)>0&&this.m.subTo(r,r),r}function L(t){var e=i();return t.copyTo(e),this.reduce(e),e}function q(t){for(;t.t<=this.mt2;)t[t.t++]=0;for(var e=0;e<this.m.t;++e){var i=32767&t[e],r=i*this.mpl+((i*this.mph+(t[e]>>15)*this.mpl&this.um)<<15)&t.DM;for(i=e+this.m.t,t[i]+=this.m.am(0,r,t,e,0,this.m.t);t[i]>=t.DV;)t[i]-=t.DV,t[++i]++}t.clamp(),t.drShiftTo(this.m.t,t),t.compareTo(this.m)>=0&&t.subTo(this.m,t)}function C(t,e){t.squareTo(e),this.reduce(e)}function H(t,e,i){t.multiplyTo(e,i),this.reduce(i)}function j(){return 0==(this.t>0?1&this[0]:this.s)}function k(t,r){if(t>4294967295||1>t)return e.ONE;var s=i(),n=i(),o=r.convert(this),h=y(t)-1;for(o.copyTo(s);--h>=0;)if(r.sqrTo(s,n),(t&1<<h)>0)r.mulTo(n,o,s);else{var a=s;s=n,n=a}return r.revert(s)}function F(t,e){var i;return i=256>t||e.isEven()?new A(e):new P(e),this.exp(t,i)}
3
// Copyright (c) 2005-2009 Tom Wu
4
// All Rights Reserved.
5
// See "LICENSE" for details.
6
function _(){var t=i();return this.copyTo(t),t}function z(){if(this.s<0){if(1==this.t)return this[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this[0];if(0==this.t)return 0}return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]}function Z(){return 0==this.t?this.s:this[0]<<24>>24}function G(){return 0==this.t?this.s:this[0]<<16>>16}function $(t){return Math.floor(Math.LN2*this.DB/Math.log(t))}function Y(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1}function W(t){if(null==t&&(t=10),0==this.signum()||2>t||t>36)return"0";var e=this.chunkSize(t),r=Math.pow(t,e),s=c(r),n=i(),o=i(),h="";for(this.divRemTo(s,n,o);n.signum()>0;)h=(r+o.intValue()).toString(t).substr(1)+h,n.divRemTo(s,n,o);return o.intValue().toString(t)+h}function Q(t,i){this.fromInt(0),null==i&&(i=10);for(var r=this.chunkSize(i),s=Math.pow(i,r),n=!1,o=0,a=0,u=0;u<t.length;++u){var c=h(t,u);0>c?"-"==t.charAt(u)&&0==this.signum()&&(n=!0):(a=i*a+c,++o>=r&&(this.dMultiply(s),this.dAddOffset(a,0),o=0,a=0))}o>0&&(this.dMultiply(Math.pow(i,o)),this.dAddOffset(a,0)),n&&e.ZERO.subTo(this,this)}function X(t,i,r){if("number"==typeof i)if(2>t)this.fromInt(1);else for(this.fromNumber(t,r),this.testBit(t-1)||this.bitwiseTo(e.ONE.shiftLeft(t-1),ht,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(i);)this.dAddOffset(2,0),this.bitLength()>t&&this.subTo(e.ONE.shiftLeft(t-1),this);else{var s=new Array,n=7&t;s.length=(t>>3)+1,i.nextBytes(s),n>0?s[0]&=(1<<n)-1:s[0]=0,this.fromString(s,256)}}function tt(){var t=this.t,e=new Array;e[0]=this.s;var i,r=this.DB-t*this.DB%8,s=0;if(t-- >0)for(r<this.DB&&(i=this[t]>>r)!=(this.s&this.DM)>>r&&(e[s++]=i|this.s<<this.DB-r);t>=0;)8>r?(i=(this[t]&(1<<r)-1)<<8-r,i|=this[--t]>>(r+=this.DB-8)):(i=this[t]>>(r-=8)&255,0>=r&&(r+=this.DB,--t)),0!=(128&i)&&(i|=-256),0==s&&(128&this.s)!=(128&i)&&++s,(s>0||i!=this.s)&&(e[s++]=i);return e}function et(t){return 0==this.compareTo(t)}function it(t){return this.compareTo(t)<0?this:t}function rt(t){return this.compareTo(t)>0?this:t}function st(t,e,i){var r,s,n=Math.min(t.t,this.t);for(r=0;n>r;++r)i[r]=e(this[r],t[r]);if(t.t<this.t){for(s=t.s&this.DM,r=n;r<this.t;++r)i[r]=e(this[r],s);i.t=this.t}else{for(s=this.s&this.DM,r=n;r<t.t;++r)i[r]=e(s,t[r]);i.t=t.t}i.s=e(this.s,t.s),i.clamp()}function nt(t,e){return t&e}function ot(t){var e=i();return this.bitwiseTo(t,nt,e),e}function ht(t,e){return t|e}function at(t){var e=i();return this.bitwiseTo(t,ht,e),e}function ut(t,e){return t^e}function ct(t){var e=i();return this.bitwiseTo(t,ut,e),e}function ft(t,e){return t&~e}function pt(t){var e=i();return this.bitwiseTo(t,ft,e),e}function lt(){for(var t=i(),e=0;e<this.t;++e)t[e]=this.DM&~this[e];return t.t=this.t,t.s=~this.s,t}function dt(t){var e=i();return 0>t?this.rShiftTo(-t,e):this.lShiftTo(t,e),e}function gt(t){var e=i();return 0>t?this.lShiftTo(-t,e):this.rShiftTo(t,e),e}function mt(t){if(0==t)return-1;var e=0;return 0==(65535&t)&&(t>>=16,e+=16),0==(255&t)&&(t>>=8,e+=8),0==(15&t)&&(t>>=4,e+=4),0==(3&t)&&(t>>=2,e+=2),0==(1&t)&&++e,e}function yt(){for(var t=0;t<this.t;++t)if(0!=this[t])return t*this.DB+mt(this[t]);return this.s<0?this.t*this.DB:-1}function vt(t){for(var e=0;0!=t;)t&=t-1,++e;return e}function bt(){for(var t=0,e=this.s&this.DM,i=0;i<this.t;++i)t+=vt(this[i]^e);return t}function Tt(t){var e=Math.floor(t/this.DB);return e>=this.t?0!=this.s:0!=(this[e]&1<<t%this.DB)}function St(t,i){var r=e.ONE.shiftLeft(t);return this.bitwiseTo(r,i,r),r}function Rt(t){return this.changeBit(t,ht)}function Et(t){return this.changeBit(t,ft)}function Dt(t){return this.changeBit(t,ut)}function wt(t,e){for(var i=0,r=0,s=Math.min(t.t,this.t);s>i;)r+=this[i]+t[i],e[i++]=r&this.DM,r>>=this.DB;if(t.t<this.t){for(r+=t.s;i<this.t;)r+=this[i],e[i++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;i<t.t;)r+=t[i],e[i++]=r&this.DM,r>>=this.DB;r+=t.s}e.s=0>r?-1:0,r>0?e[i++]=r:-1>r&&(e[i++]=this.DV+r),e.t=i,e.clamp()}function xt(t){var e=i();return this.addTo(t,e),e}function Bt(t){var e=i();return this.subTo(t,e),e}function Kt(t){var e=i();return this.multiplyTo(t,e),e}function At(){var t=i();return this.squareTo(t),t}function Ut(t){var e=i();return this.divRemTo(t,e,null),e}function Ot(t){var e=i();return this.divRemTo(t,null,e),e}function Vt(t){var e=i(),r=i();return this.divRemTo(t,e,r),new Array(e,r)}function Nt(t){this[this.t]=this.am(0,t-1,this,0,0,this.t),++this.t,this.clamp()}function Jt(t,e){if(0!=t){for(;this.t<=e;)this[this.t++]=0;for(this[e]+=t;this[e]>=this.DV;)this[e]-=this.DV,++e>=this.t&&(this[this.t++]=0),++this[e]}}function It(){}function Pt(t){return t}function Mt(t,e,i){t.multiplyTo(e,i)}function Lt(t,e){t.squareTo(e)}function qt(t){return this.exp(t,new It)}function Ct(t,e,i){var r=Math.min(this.t+t.t,e);for(i.s=0,i.t=r;r>0;)i[--r]=0;var s;for(s=i.t-this.t;s>r;++r)i[r+this.t]=this.am(0,t[r],i,r,0,this.t);for(s=Math.min(t.t,e);s>r;++r)this.am(0,t[r],i,r,0,e-r);i.clamp()}function Ht(t,e,i){--e;var r=i.t=this.t+t.t-e;for(i.s=0;--r>=0;)i[r]=0;for(r=Math.max(e-this.t,0);r<t.t;++r)i[this.t+r-e]=this.am(e-r,t[r],i,0,0,this.t+r-e);i.clamp(),i.drShiftTo(1,i)}function jt(t){this.r2=i(),this.q3=i(),e.ONE.dlShiftTo(2*t.t,this.r2),this.mu=this.r2.divide(t),this.m=t}function kt(t){if(t.s<0||t.t>2*this.m.t)return t.mod(this.m);if(t.compareTo(this.m)<0)return t;var e=i();return t.copyTo(e),this.reduce(e),e}function Ft(t){return t}function _t(t){for(t.drShiftTo(this.m.t-1,this.r2),t.t>this.m.t+1&&(t.t=this.m.t+1,t.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);t.compareTo(this.r2)<0;)t.dAddOffset(1,this.m.t+1);for(t.subTo(this.r2,t);t.compareTo(this.m)>=0;)t.subTo(this.m,t)}function zt(t,e){t.squareTo(e),this.reduce(e)}function Zt(t,e,i){t.multiplyTo(e,i),this.reduce(i)}function Gt(t,e){var r,s,n=t.bitLength(),o=c(1);if(0>=n)return o;r=18>n?1:48>n?3:144>n?4:768>n?5:6,s=8>n?new A(e):e.isEven()?new jt(e):new P(e);var h=new Array,a=3,u=r-1,f=(1<<r)-1;if(h[1]=s.convert(this),r>1){var p=i();for(s.sqrTo(h[1],p);f>=a;)h[a]=i(),s.mulTo(p,h[a-2],h[a]),a+=2}var l,d,g=t.t-1,m=!0,v=i();for(n=y(t[g])-1;g>=0;){for(n>=u?l=t[g]>>n-u&f:(l=(t[g]&(1<<n+1)-1)<<u-n,g>0&&(l|=t[g-1]>>this.DB+n-u)),a=r;0==(1&l);)l>>=1,--a;if((n-=a)<0&&(n+=this.DB,--g),m)h[l].copyTo(o),m=!1;else{for(;a>1;)s.sqrTo(o,v),s.sqrTo(v,o),a-=2;a>0?s.sqrTo(o,v):(d=o,o=v,v=d),s.mulTo(v,h[l],o)}for(;g>=0&&0==(t[g]&1<<n);)s.sqrTo(o,v),d=o,o=v,v=d,--n<0&&(n=this.DB-1,--g)}return s.revert(o)}function $t(t){var e=this.s<0?this.negate():this.clone(),i=t.s<0?t.negate():t.clone();if(e.compareTo(i)<0){var r=e;e=i,i=r}var s=e.getLowestSetBit(),n=i.getLowestSetBit();if(0>n)return e;for(n>s&&(n=s),n>0&&(e.rShiftTo(n,e),i.rShiftTo(n,i));e.signum()>0;)(s=e.getLowestSetBit())>0&&e.rShiftTo(s,e),(s=i.getLowestSetBit())>0&&i.rShiftTo(s,i),e.compareTo(i)>=0?(e.subTo(i,e),e.rShiftTo(1,e)):(i.subTo(e,i),i.rShiftTo(1,i));return n>0&&i.lShiftTo(n,i),i}function Yt(t){if(0>=t)return 0;var e=this.DV%t,i=this.s<0?t-1:0;if(this.t>0)if(0==e)i=this[0]%t;else for(var r=this.t-1;r>=0;--r)i=(e*i+this[r])%t;return i}function Wt(t){var i=t.isEven();if(this.isEven()&&i||0==t.signum())return e.ZERO;for(var r=t.clone(),s=this.clone(),n=c(1),o=c(0),h=c(0),a=c(1);0!=r.signum();){for(;r.isEven();)r.rShiftTo(1,r),i?(n.isEven()&&o.isEven()||(n.addTo(this,n),o.subTo(t,o)),n.rShiftTo(1,n)):o.isEven()||o.subTo(t,o),o.rShiftTo(1,o);for(;s.isEven();)s.rShiftTo(1,s),i?(h.isEven()&&a.isEven()||(h.addTo(this,h),a.subTo(t,a)),h.rShiftTo(1,h)):a.isEven()||a.subTo(t,a),a.rShiftTo(1,a);r.compareTo(s)>=0?(r.subTo(s,r),i&&n.subTo(h,n),o.subTo(a,o)):(s.subTo(r,s),i&&h.subTo(n,h),a.subTo(o,a))}return 0!=s.compareTo(e.ONE)?e.ZERO:a.compareTo(t)>=0?a.subtract(t):a.signum()<0?(a.addTo(t,a),a.signum()<0?a.add(t):a):a}function Qt(t){var e,i=this.abs();if(1==i.t&&i[0]<=Ae[Ae.length-1]){for(e=0;e<Ae.length;++e)if(i[0]==Ae[e])return!0;return!1}if(i.isEven())return!1;for(e=1;e<Ae.length;){for(var r=Ae[e],s=e+1;s<Ae.length&&Ue>r;)r*=Ae[s++];for(r=i.modInt(r);s>e;)if(r%Ae[e++]==0)return!1}return i.millerRabin(t)}function Xt(t){var r=this.subtract(e.ONE),s=r.getLowestSetBit();if(0>=s)return!1;var n=r.shiftRight(s);t=t+1>>1,t>Ae.length&&(t=Ae.length);for(var o=i(),h=0;t>h;++h){o.fromInt(Ae[Math.floor(Math.random()*Ae.length)]);var a=o.modPow(n,this);if(0!=a.compareTo(e.ONE)&&0!=a.compareTo(r)){for(var u=1;u++<s&&0!=a.compareTo(r);)if(a=a.modPowInt(2,this),0==a.compareTo(e.ONE))return!1;if(0!=a.compareTo(r))return!1}}return!0}function te(){this.i=0,this.j=0,this.S=new Array}function ee(t){var e,i,r;for(e=0;256>e;++e)this.S[e]=e;for(i=0,e=0;256>e;++e)i=i+this.S[e]+t[e%t.length]&255,r=this.S[e],this.S[e]=this.S[i],this.S[i]=r;this.i=0,this.j=0}function ie(){var t;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,t=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=t,this.S[t+this.S[this.i]&255]}function re(){return new te}function se(){if(null==Oe){for(Oe=re();Je>Ne;){var t=Math.floor(65536*Math.random());Ve[Ne++]=255&t}for(Oe.init(Ve),Ne=0;Ne<Ve.length;++Ne)Ve[Ne]=0;Ne=0}return Oe.next()}function ne(t){var e;for(e=0;e<t.length;++e)t[e]=se()}function oe(){}function he(t,i){return new e(t,i)}function ae(t,i){if(i<t.length+11)return console.error("Message too long for RSA"),null;for(var r=new Array,s=t.length-1;s>=0&&i>0;){var n=t.charCodeAt(s--);128>n?r[--i]=n:n>127&&2048>n?(r[--i]=63&n|128,r[--i]=n>>6|192):(r[--i]=63&n|128,r[--i]=n>>6&63|128,r[--i]=n>>12|224)}r[--i]=0;for(var o=new oe,h=new Array;i>2;){for(h[0]=0;0==h[0];)o.nextBytes(h);r[--i]=h[0]}return r[--i]=2,r[--i]=0,new e(r)}function ue(){this.n=null,this.e=0,this.d=null,this.p=null,this.q=null,this.dmp1=null,this.dmq1=null,this.coeff=null}function ce(t,e){null!=t&&null!=e&&t.length>0&&e.length>0?(this.n=he(t,16),this.e=parseInt(e,16)):console.error("Invalid RSA public key")}function fe(t){return t.modPowInt(this.e,this.n)}function pe(t){var e=ae(t,this.n.bitLength()+7>>3);if(null==e)return null;var i=this.doPublic(e);if(null==i)return null;var r=i.toString(16);return 0==(1&r.length)?r:"0"+r}function le(t,e){for(var i=t.toByteArray(),r=0;r<i.length&&0==i[r];)++r;if(i.length-r!=e-1||2!=i[r])return null;for(++r;0!=i[r];)if(++r>=i.length)return null;for(var s="";++r<i.length;){var n=255&i[r];128>n?s+=String.fromCharCode(n):n>191&&224>n?(s+=String.fromCharCode((31&n)<<6|63&i[r+1]),++r):(s+=String.fromCharCode((15&n)<<12|(63&i[r+1])<<6|63&i[r+2]),r+=2)}return s}function de(t,e,i){null!=t&&null!=e&&t.length>0&&e.length>0?(this.n=he(t,16),this.e=parseInt(e,16),this.d=he(i,16)):console.error("Invalid RSA private key")}function ge(t,e,i,r,s,n,o,h){null!=t&&null!=e&&t.length>0&&e.length>0?(this.n=he(t,16),this.e=parseInt(e,16),this.d=he(i,16),this.p=he(r,16),this.q=he(s,16),this.dmp1=he(n,16),this.dmq1=he(o,16),this.coeff=he(h,16)):console.error("Invalid RSA private key")}function me(t,i){var r=new oe,s=t>>1;this.e=parseInt(i,16);for(var n=new e(i,16);;){for(;this.p=new e(t-s,1,r),0!=this.p.subtract(e.ONE).gcd(n).compareTo(e.ONE)||!this.p.isProbablePrime(10););for(;this.q=new e(s,1,r),0!=this.q.subtract(e.ONE).gcd(n).compareTo(e.ONE)||!this.q.isProbablePrime(10););if(this.p.compareTo(this.q)<=0){var o=this.p;this.p=this.q,this.q=o}var h=this.p.subtract(e.ONE),a=this.q.subtract(e.ONE),u=h.multiply(a);if(0==u.gcd(n).compareTo(e.ONE)){this.n=this.p.multiply(this.q),this.d=n.modInverse(u),this.dmp1=this.d.mod(h),this.dmq1=this.d.mod(a),this.coeff=this.q.modInverse(this.p);break}}}function ye(t){if(null==this.p||null==this.q)return t.modPow(this.d,this.n);for(var e=t.mod(this.p).modPow(this.dmp1,this.p),i=t.mod(this.q).modPow(this.dmq1,this.q);e.compareTo(i)<0;)e=e.add(this.p);return e.subtract(i).multiply(this.coeff).mod(this.p).multiply(this.q).add(i)}function ve(t){var e=he(t,16),i=this.doPrivate(e);return null==i?null:le(i,this.n.bitLength()+7>>3)}function be(t){var e,i,r="";for(e=0;e+3<=t.length;e+=3)i=parseInt(t.substring(e,e+3),16),r+=Le.charAt(i>>6)+Le.charAt(63&i);for(e+1==t.length?(i=parseInt(t.substring(e,e+1),16),r+=Le.charAt(i<<2)):e+2==t.length&&(i=parseInt(t.substring(e,e+2),16),r+=Le.charAt(i>>2)+Le.charAt((3&i)<<4));(3&r.length)>0;)r+=qe;return r}function Te(t){var e,i,r="",s=0;for(e=0;e<t.length&&t.charAt(e)!=qe;++e)v=Le.indexOf(t.charAt(e)),v<0||(0==s?(r+=o(v>>2),i=3&v,s=1):1==s?(r+=o(i<<2|v>>4),i=15&v,s=2):2==s?(r+=o(i),r+=o(v>>2),i=3&v,s=3):(r+=o(i<<2|v>>4),r+=o(15&v),s=0));return 1==s&&(r+=o(i<<2)),r}
7
// Copyright (c) 2005 Tom Wu
8
// All Rights Reserved.
9
// See "LICENSE" for details.
10
var Se,Re=0xdeadbeefcafe,Ee=15715070==(16777215&Re);Ee&&"Microsoft Internet Explorer"==navigator.appName?(e.prototype.am=s,Se=30):Ee&&"Netscape"!=navigator.appName?(e.prototype.am=r,Se=26):(e.prototype.am=n,Se=28),e.prototype.DB=Se,e.prototype.DM=(1<<Se)-1,e.prototype.DV=1<<Se;var De=52;e.prototype.FV=Math.pow(2,De),e.prototype.F1=De-Se,e.prototype.F2=2*Se-De;var we,xe,Be="0123456789abcdefghijklmnopqrstuvwxyz",Ke=new Array;for(we="0".charCodeAt(0),xe=0;9>=xe;++xe)Ke[we++]=xe;for(we="a".charCodeAt(0),xe=10;36>xe;++xe)Ke[we++]=xe;for(we="A".charCodeAt(0),xe=10;36>xe;++xe)Ke[we++]=xe;A.prototype.convert=U,A.prototype.revert=O,A.prototype.reduce=V,A.prototype.mulTo=N,A.prototype.sqrTo=J,P.prototype.convert=M,P.prototype.revert=L,P.prototype.reduce=q,P.prototype.mulTo=H,P.prototype.sqrTo=C,e.prototype.copyTo=a,e.prototype.fromInt=u,e.prototype.fromString=f,e.prototype.clamp=p,e.prototype.dlShiftTo=T,e.prototype.drShiftTo=S,e.prototype.lShiftTo=R,e.prototype.rShiftTo=E,e.prototype.subTo=D,e.prototype.multiplyTo=w,e.prototype.squareTo=x,e.prototype.divRemTo=B,e.prototype.invDigit=I,e.prototype.isEven=j,e.prototype.exp=k,e.prototype.toString=l,e.prototype.negate=d,e.prototype.abs=g,e.prototype.compareTo=m,e.prototype.bitLength=b,e.prototype.mod=K,e.prototype.modPowInt=F,e.ZERO=c(0),e.ONE=c(1),It.prototype.convert=Pt,It.prototype.revert=Pt,It.prototype.mulTo=Mt,It.prototype.sqrTo=Lt,jt.prototype.convert=kt,jt.prototype.revert=Ft,jt.prototype.reduce=_t,jt.prototype.mulTo=Zt,jt.prototype.sqrTo=zt;var Ae=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],Ue=(1<<26)/Ae[Ae.length-1];e.prototype.chunkSize=$,e.prototype.toRadix=W,e.prototype.fromRadix=Q,e.prototype.fromNumber=X,e.prototype.bitwiseTo=st,e.prototype.changeBit=St,e.prototype.addTo=wt,e.prototype.dMultiply=Nt,e.prototype.dAddOffset=Jt,e.prototype.multiplyLowerTo=Ct,e.prototype.multiplyUpperTo=Ht,e.prototype.modInt=Yt,e.prototype.millerRabin=Xt,e.prototype.clone=_,e.prototype.intValue=z,e.prototype.byteValue=Z,e.prototype.shortValue=G,e.prototype.signum=Y,e.prototype.toByteArray=tt,e.prototype.equals=et,e.prototype.min=it,e.prototype.max=rt,e.prototype.and=ot,e.prototype.or=at,e.prototype.xor=ct,e.prototype.andNot=pt,e.prototype.not=lt,e.prototype.shiftLeft=dt,e.prototype.shiftRight=gt,e.prototype.getLowestSetBit=yt,e.prototype.bitCount=bt,e.prototype.testBit=Tt,e.prototype.setBit=Rt,e.prototype.clearBit=Et,e.prototype.flipBit=Dt,e.prototype.add=xt,e.prototype.subtract=Bt,e.prototype.multiply=Kt,e.prototype.divide=Ut,e.prototype.remainder=Ot,e.prototype.divideAndRemainder=Vt,e.prototype.modPow=Gt,e.prototype.modInverse=Wt,e.prototype.pow=qt,e.prototype.gcd=$t,e.prototype.isProbablePrime=Qt,e.prototype.square=At,te.prototype.init=ee,te.prototype.next=ie;var Oe,Ve,Ne,Je=256;if(null==Ve){Ve=new Array,Ne=0;var Ie;if(window.crypto&&window.crypto.getRandomValues){var Pe=new Uint32Array(256);for(window.crypto.getRandomValues(Pe),Ie=0;Ie<Pe.length;++Ie)Ve[Ne++]=255&Pe[Ie]}var Me=function(t){if(this.count=this.count||0,this.count>=256||Ne>=Je)return void(window.removeEventListener?window.removeEventListener("mousemove",Me,!1):window.detachEvent&&window.detachEvent("onmousemove",Me));try{var e=t.x+t.y;Ve[Ne++]=255&e,this.count+=1}catch(i){}};window.addEventListener?window.addEventListener("mousemove",Me,!1):window.attachEvent&&window.attachEvent("onmousemove",Me)}oe.prototype.nextBytes=ne,ue.prototype.doPublic=fe,ue.prototype.setPublic=ce,ue.prototype.encrypt=pe,ue.prototype.doPrivate=ye,ue.prototype.setPrivate=de,ue.prototype.setPrivateEx=ge,ue.prototype.generate=me,ue.prototype.decrypt=ve,
11
// Copyright (c) 2011 Kevin M Burns Jr.
12
// All Rights Reserved.
13
// See "LICENSE" for details.
14
//
15
// Extension to jsbn which adds facilities for asynchronous RSA key generation
16
// Primarily created to avoid execution timeout on mobile devices
17
//
18
// http://www-cs-students.stanford.edu/~tjw/jsbn/
19
//
20
// ---
21
function(){var t=function(t,r,s){var n=new oe,o=t>>1;this.e=parseInt(r,16);var h=new e(r,16),a=this,u=function(){var r=function(){if(a.p.compareTo(a.q)<=0){var t=a.p;a.p=a.q,a.q=t}var i=a.p.subtract(e.ONE),r=a.q.subtract(e.ONE),n=i.multiply(r);0==n.gcd(h).compareTo(e.ONE)?(a.n=a.p.multiply(a.q),a.d=h.modInverse(n),a.dmp1=a.d.mod(i),a.dmq1=a.d.mod(r),a.coeff=a.q.modInverse(a.p),setTimeout(function(){s()},0)):setTimeout(u,0)},c=function(){a.q=i(),a.q.fromNumberAsync(o,1,n,function(){a.q.subtract(e.ONE).gcda(h,function(t){0==t.compareTo(e.ONE)&&a.q.isProbablePrime(10)?setTimeout(r,0):setTimeout(c,0)})})},f=function(){a.p=i(),a.p.fromNumberAsync(t-o,1,n,function(){a.p.subtract(e.ONE).gcda(h,function(t){0==t.compareTo(e.ONE)&&a.p.isProbablePrime(10)?setTimeout(c,0):setTimeout(f,0)})})};setTimeout(f,0)};setTimeout(u,0)};ue.prototype.generateAsync=t;var r=function(t,e){var i=this.s<0?this.negate():this.clone(),r=t.s<0?t.negate():t.clone();if(i.compareTo(r)<0){var s=i;i=r,r=s}var n=i.getLowestSetBit(),o=r.getLowestSetBit();if(0>o)return void e(i);o>n&&(o=n),o>0&&(i.rShiftTo(o,i),r.rShiftTo(o,r));var h=function(){(n=i.getLowestSetBit())>0&&i.rShiftTo(n,i),(n=r.getLowestSetBit())>0&&r.rShiftTo(n,r),i.compareTo(r)>=0?(i.subTo(r,i),i.rShiftTo(1,i)):(r.subTo(i,r),r.rShiftTo(1,r)),i.signum()>0?setTimeout(h,0):(o>0&&r.lShiftTo(o,r),setTimeout(function(){e(r)},0))};setTimeout(h,10)};e.prototype.gcda=r;var s=function(t,i,r,s){if("number"==typeof i)if(2>t)this.fromInt(1);else{this.fromNumber(t,r),this.testBit(t-1)||this.bitwiseTo(e.ONE.shiftLeft(t-1),ht,this),this.isEven()&&this.dAddOffset(1,0);var n=this,o=function(){n.dAddOffset(2,0),n.bitLength()>t&&n.subTo(e.ONE.shiftLeft(t-1),n),n.isProbablePrime(i)?setTimeout(function(){s()},0):setTimeout(o,0)};setTimeout(o,0)}else{var h=new Array,a=7&t;h.length=(t>>3)+1,i.nextBytes(h),a>0?h[0]&=(1<<a)-1:h[0]=0,this.fromString(h,256)}};e.prototype.fromNumberAsync=s}();var Le="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",qe="=",Ce=Ce||{};Ce.env=Ce.env||{};var He=Ce,je=Object.prototype,ke="[object Function]",Fe=["toString","valueOf"];Ce.env.parseUA=function(t){var e,i=function(t){var e=0;return parseFloat(t.replace(/\./g,function(){return 1==e++?"":"."}))},r=navigator,s={ie:0,opera:0,gecko:0,webkit:0,chrome:0,mobile:null,air:0,ipad:0,iphone:0,ipod:0,ios:null,android:0,webos:0,caja:r&&r.cajaVersion,secure:!1,os:null},n=t||navigator&&navigator.userAgent,o=window&&window.location,h=o&&o.href;return s.secure=h&&0===h.toLowerCase().indexOf("https"),n&&(/windows|win32/i.test(n)?s.os="windows":/macintosh/i.test(n)?s.os="macintosh":/rhino/i.test(n)&&(s.os="rhino"),/KHTML/.test(n)&&(s.webkit=1),e=n.match(/AppleWebKit\/([^\s]*)/),e&&e[1]&&(s.webkit=i(e[1]),/ Mobile\//.test(n)?(s.mobile="Apple",e=n.match(/OS ([^\s]*)/),e&&e[1]&&(e=i(e[1].replace("_","."))),s.ios=e,s.ipad=s.ipod=s.iphone=0,e=n.match(/iPad|iPod|iPhone/),e&&e[0]&&(s[e[0].toLowerCase()]=s.ios)):(e=n.match(/NokiaN[^\/]*|Android \d\.\d|webOS\/\d\.\d/),e&&(s.mobile=e[0]),/webOS/.test(n)&&(s.mobile="WebOS",e=n.match(/webOS\/([^\s]*);/),e&&e[1]&&(s.webos=i(e[1]))),/ Android/.test(n)&&(s.mobile="Android",e=n.match(/Android ([^\s]*);/),e&&e[1]&&(s.android=i(e[1])))),e=n.match(/Chrome\/([^\s]*)/),e&&e[1]?s.chrome=i(e[1]):(e=n.match(/AdobeAIR\/([^\s]*)/),e&&(s.air=e[0]))),s.webkit||(e=n.match(/Opera[\s\/]([^\s]*)/),e&&e[1]?(s.opera=i(e[1]),e=n.match(/Version\/([^\s]*)/),e&&e[1]&&(s.opera=i(e[1])),e=n.match(/Opera Mini[^;]*/),e&&(s.mobile=e[0])):(e=n.match(/MSIE\s([^;]*)/),e&&e[1]?s.ie=i(e[1]):(e=n.match(/Gecko\/([^\s]*)/),e&&(s.gecko=1,e=n.match(/rv:([^\s\)]*)/),e&&e[1]&&(s.gecko=i(e[1]))))))),s},Ce.env.ua=Ce.env.parseUA(),Ce.isFunction=function(t){return"function"==typeof t||je.toString.apply(t)===ke},Ce._IEEnumFix=Ce.env.ua.ie?function(t,e){var i,r,s;for(i=0;i<Fe.length;i+=1)r=Fe[i],s=e[r],He.isFunction(s)&&s!=je[r]&&(t[r]=s)}:function(){},Ce.extend=function(t,e,i){if(!e||!t)throw new Error("extend failed, please check that all dependencies are included.");var r,s=function(){};if(s.prototype=e.prototype,t.prototype=new s,t.prototype.constructor=t,t.superclass=e.prototype,e.prototype.constructor==je.constructor&&(e.prototype.constructor=e),i){for(r in i)He.hasOwnProperty(i,r)&&(t.prototype[r]=i[r]);He._IEEnumFix(t.prototype,i)}},/*
22
* asn1.js - ASN.1 DER encoder classes
23
*
24
* Copyright (c) 2013 Kenji Urushima ([email protected])
25
*
26
* This software is licensed under the terms of the MIT License.
27
* http://kjur.github.com/jsrsasign/license
28
*
29
* The above copyright and license notice shall be
30
* included in all copies or substantial portions of the Software.
31
*/
32
/**
33
* @fileOverview
34
* @name asn1-1.0.js
35
* @author Kenji Urushima [email protected]
36
* @version 1.0.2 (2013-May-30)
37
* @since 2.1
38
* @license <a href="http://kjur.github.io/jsrsasign/license/">MIT License</a>
39
*/
40
"undefined"!=typeof KJUR&&KJUR||(KJUR={}),"undefined"!=typeof KJUR.asn1&&KJUR.asn1||(KJUR.asn1={}),KJUR.asn1.ASN1Util=new function(){this.integerToByteHex=function(t){var e=t.toString(16);return e.length%2==1&&(e="0"+e),e},this.bigIntToMinTwosComplementsHex=function(t){var i=t.toString(16);if("-"!=i.substr(0,1))i.length%2==1?i="0"+i:i.match(/^[0-7]/)||(i="00"+i);else{var r=i.substr(1),s=r.length;s%2==1?s+=1:i.match(/^[0-7]/)||(s+=2);for(var n="",o=0;s>o;o++)n+="f";var h=new e(n,16),a=h.xor(t).add(e.ONE);i=a.toString(16).replace(/^-/,"")}return i},this.getPEMStringFromHex=function(t,e){var i=CryptoJS.enc.Hex.parse(t),r=CryptoJS.enc.Base64.stringify(i),s=r.replace(/(.{64})/g,"$1\r\n");return s=s.replace(/\r\n$/,""),"-----BEGIN "+e+"-----\r\n"+s+"\r\n-----END "+e+"-----\r\n"}},KJUR.asn1.ASN1Object=function(){var t="";this.getLengthHexFromValue=function(){if("undefined"==typeof this.hV||null==this.hV)throw"this.hV is null or undefined.";if(this.hV.length%2==1)throw"value hex must be even length: n="+t.length+",v="+this.hV;var e=this.hV.length/2,i=e.toString(16);if(i.length%2==1&&(i="0"+i),128>e)return i;var r=i.length/2;if(r>15)throw"ASN.1 length too long to represent by 8x: n = "+e.toString(16);var s=128+r;return s.toString(16)+i},this.getEncodedHex=function(){return(null==this.hTLV||this.isModified)&&(this.hV=this.getFreshValueHex(),this.hL=this.getLengthHexFromValue(),this.hTLV=this.hT+this.hL+this.hV,this.isModified=!1),this.hTLV},this.getValueHex=function(){return this.getEncodedHex(),this.hV},this.getFreshValueHex=function(){return""}},KJUR.asn1.DERAbstractString=function(t){KJUR.asn1.DERAbstractString.superclass.constructor.call(this);this.getString=function(){return this.s},this.setString=function(t){this.hTLV=null,this.isModified=!0,this.s=t,this.hV=stohex(this.s)},this.setStringHex=function(t){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=t},this.getFreshValueHex=function(){return this.hV},"undefined"!=typeof t&&("undefined"!=typeof t.str?this.setString(t.str):"undefined"!=typeof t.hex&&this.setStringHex(t.hex))},Ce.extend(KJUR.asn1.DERAbstractString,KJUR.asn1.ASN1Object),KJUR.asn1.DERAbstractTime=function(t){KJUR.asn1.DERAbstractTime.superclass.constructor.call(this);this.localDateToUTC=function(t){utc=t.getTime()+6e4*t.getTimezoneOffset();var e=new Date(utc);return e},this.formatDate=function(t,e){var i=this.zeroPadding,r=this.localDateToUTC(t),s=String(r.getFullYear());"utc"==e&&(s=s.substr(2,2));var n=i(String(r.getMonth()+1),2),o=i(String(r.getDate()),2),h=i(String(r.getHours()),2),a=i(String(r.getMinutes()),2),u=i(String(r.getSeconds()),2);return s+n+o+h+a+u+"Z"},this.zeroPadding=function(t,e){return t.length>=e?t:new Array(e-t.length+1).join("0")+t},this.getString=function(){return this.s},this.setString=function(t){this.hTLV=null,this.isModified=!0,this.s=t,this.hV=stohex(this.s)},this.setByDateValue=function(t,e,i,r,s,n){var o=new Date(Date.UTC(t,e-1,i,r,s,n,0));this.setByDate(o)},this.getFreshValueHex=function(){return this.hV}},Ce.extend(KJUR.asn1.DERAbstractTime,KJUR.asn1.ASN1Object),KJUR.asn1.DERAbstractStructured=function(t){KJUR.asn1.DERAbstractString.superclass.constructor.call(this);this.setByASN1ObjectArray=function(t){this.hTLV=null,this.isModified=!0,this.asn1Array=t},this.appendASN1Object=function(t){this.hTLV=null,this.isModified=!0,this.asn1Array.push(t)},this.asn1Array=new Array,"undefined"!=typeof t&&"undefined"!=typeof t.array&&(this.asn1Array=t.array)},Ce.extend(KJUR.asn1.DERAbstractStructured,KJUR.asn1.ASN1Object),KJUR.asn1.DERBoolean=function(){KJUR.asn1.DERBoolean.superclass.constructor.call(this),this.hT="01",this.hTLV="0101ff"},Ce.extend(KJUR.asn1.DERBoolean,KJUR.asn1.ASN1Object),KJUR.asn1.DERInteger=function(t){KJUR.asn1.DERInteger.superclass.constructor.call(this),this.hT="02",this.setByBigInteger=function(t){this.hTLV=null,this.isModified=!0,this.hV=KJUR.asn1.ASN1Util.bigIntToMinTwosComplementsHex(t)},this.setByInteger=function(t){var i=new e(String(t),10);this.setByBigInteger(i)},this.setValueHex=function(t){this.hV=t},this.getFreshValueHex=function(){return this.hV},"undefined"!=typeof t&&("undefined"!=typeof t.bigint?this.setByBigInteger(t.bigint):"undefined"!=typeof t["int"]?this.setByInteger(t["int"]):"undefined"!=typeof t.hex&&this.setValueHex(t.hex))},Ce.extend(KJUR.asn1.DERInteger,KJUR.asn1.ASN1Object),KJUR.asn1.DERBitString=function(t){KJUR.asn1.DERBitString.superclass.constructor.call(this),this.hT="03",this.setHexValueIncludingUnusedBits=function(t){this.hTLV=null,this.isModified=!0,this.hV=t},this.setUnusedBitsAndHexValue=function(t,e){if(0>t||t>7)throw"unused bits shall be from 0 to 7: u = "+t;var i="0"+t;this.hTLV=null,this.isModified=!0,this.hV=i+e},this.setByBinaryString=function(t){t=t.replace(/0+$/,"");var e=8-t.length%8;8==e&&(e=0);for(var i=0;e>=i;i++)t+="0";for(var r="",i=0;i<t.length-1;i+=8){var s=t.substr(i,8),n=parseInt(s,2).toString(16);1==n.length&&(n="0"+n),r+=n}this.hTLV=null,this.isModified=!0,this.hV="0"+e+r},this.setByBooleanArray=function(t){for(var e="",i=0;i<t.length;i++)e+=1==t[i]?"1":"0";this.setByBinaryString(e)},this.newFalseArray=function(t){for(var e=new Array(t),i=0;t>i;i++)e[i]=!1;return e},this.getFreshValueHex=function(){return this.hV},"undefined"!=typeof t&&("undefined"!=typeof t.hex?this.setHexValueIncludingUnusedBits(t.hex):"undefined"!=typeof t.bin?this.setByBinaryString(t.bin):"undefined"!=typeof t.array&&this.setByBooleanArray(t.array))},Ce.extend(KJUR.asn1.DERBitString,KJUR.asn1.ASN1Object),KJUR.asn1.DEROctetString=function(t){KJUR.asn1.DEROctetString.superclass.constructor.call(this,t),this.hT="04"},Ce.extend(KJUR.asn1.DEROctetString,KJUR.asn1.DERAbstractString),KJUR.asn1.DERNull=function(){KJUR.asn1.DERNull.superclass.constructor.call(this),this.hT="05",this.hTLV="0500"},Ce.extend(KJUR.asn1.DERNull,KJUR.asn1.ASN1Object),KJUR.asn1.DERObjectIdentifier=function(t){var i=function(t){var e=t.toString(16);return 1==e.length&&(e="0"+e),e},r=function(t){var r="",s=new e(t,10),n=s.toString(2),o=7-n.length%7;7==o&&(o=0);for(var h="",a=0;o>a;a++)h+="0";n=h+n;for(var a=0;a<n.length-1;a+=7){var u=n.substr(a,7);a!=n.length-7&&(u="1"+u),r+=i(parseInt(u,2))}return r};KJUR.asn1.DERObjectIdentifier.superclass.constructor.call(this),this.hT="06",this.setValueHex=function(t){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=t},this.setValueOidString=function(t){if(!t.match(/^[0-9.]+$/))throw"malformed oid string: "+t;var e="",s=t.split("."),n=40*parseInt(s[0])+parseInt(s[1]);e+=i(n),s.splice(0,2);for(var o=0;o<s.length;o++)e+=r(s[o]);this.hTLV=null,this.isModified=!0,this.s=null,this.hV=e},this.setValueName=function(t){if("undefined"==typeof KJUR.asn1.x509.OID.name2oidList[t])throw"DERObjectIdentifier oidName undefined: "+t;var e=KJUR.asn1.x509.OID.name2oidList[t];this.setValueOidString(e)},this.getFreshValueHex=function(){return this.hV},"undefined"!=typeof t&&("undefined"!=typeof t.oid?this.setValueOidString(t.oid):"undefined"!=typeof t.hex?this.setValueHex(t.hex):"undefined"!=typeof t.name&&this.setValueName(t.name))},Ce.extend(KJUR.asn1.DERObjectIdentifier,KJUR.asn1.ASN1Object),KJUR.asn1.DERUTF8String=function(t){KJUR.asn1.DERUTF8String.superclass.constructor.call(this,t),this.hT="0c"},Ce.extend(KJUR.asn1.DERUTF8String,KJUR.asn1.DERAbstractString),KJUR.asn1.DERNumericString=function(t){KJUR.asn1.DERNumericString.superclass.constructor.call(this,t),this.hT="12"},Ce.extend(KJUR.asn1.DERNumericString,KJUR.asn1.DERAbstractString),KJUR.asn1.DERPrintableString=function(t){KJUR.asn1.DERPrintableString.superclass.constructor.call(this,t),this.hT="13"},Ce.extend(KJUR.asn1.DERPrintableString,KJUR.asn1.DERAbstractString),KJUR.asn1.DERTeletexString=function(t){KJUR.asn1.DERTeletexString.superclass.constructor.call(this,t),this.hT="14"},Ce.extend(KJUR.asn1.DERTeletexString,KJUR.asn1.DERAbstractString),KJUR.asn1.DERIA5String=function(t){KJUR.asn1.DERIA5String.superclass.constructor.call(this,t),this.hT="16"},Ce.extend(KJUR.asn1.DERIA5String,KJUR.asn1.DERAbstractString),KJUR.asn1.DERUTCTime=function(t){KJUR.asn1.DERUTCTime.superclass.constructor.call(this,t),this.hT="17",this.setByDate=function(t){this.hTLV=null,this.isModified=!0,this.date=t,this.s=this.formatDate(this.date,"utc"),this.hV=stohex(this.s)},"undefined"!=typeof t&&("undefined"!=typeof t.str?this.setString(t.str):"undefined"!=typeof t.hex?this.setStringHex(t.hex):"undefined"!=typeof t.date&&this.setByDate(t.date))},Ce.extend(KJUR.asn1.DERUTCTime,KJUR.asn1.DERAbstractTime),KJUR.asn1.DERGeneralizedTime=function(t){KJUR.asn1.DERGeneralizedTime.superclass.constructor.call(this,t),this.hT="18",this.setByDate=function(t){this.hTLV=null,this.isModified=!0,this.date=t,this.s=this.formatDate(this.date,"gen"),this.hV=stohex(this.s)},"undefined"!=typeof t&&("undefined"!=typeof t.str?this.setString(t.str):"undefined"!=typeof t.hex?this.setStringHex(t.hex):"undefined"!=typeof t.date&&this.setByDate(t.date))},Ce.extend(KJUR.asn1.DERGeneralizedTime,KJUR.asn1.DERAbstractTime),KJUR.asn1.DERSequence=function(t){KJUR.asn1.DERSequence.superclass.constructor.call(this,t),this.hT="30",this.getFreshValueHex=function(){for(var t="",e=0;e<this.asn1Array.length;e++){var i=this.asn1Array[e];t+=i.getEncodedHex()}return this.hV=t,this.hV}},Ce.extend(KJUR.asn1.DERSequence,KJUR.asn1.DERAbstractStructured),KJUR.asn1.DERSet=function(t){KJUR.asn1.DERSet.superclass.constructor.call(this,t),this.hT="31",this.getFreshValueHex=function(){for(var t=new Array,e=0;e<this.asn1Array.length;e++){var i=this.asn1Array[e];t.push(i.getEncodedHex())}return t.sort(),this.hV=t.join(""),this.hV}},Ce.extend(KJUR.asn1.DERSet,KJUR.asn1.DERAbstractStructured),KJUR.asn1.DERTaggedObject=function(t){KJUR.asn1.DERTaggedObject.superclass.constructor.call(this),this.hT="a0",this.hV="",this.isExplicit=!0,this.asn1Object=null,this.setASN1Object=function(t,e,i){this.hT=e,this.isExplicit=t,this.asn1Object=i,this.isExplicit?(this.hV=this.asn1Object.getEncodedHex(),this.hTLV=null,this.isModified=!0):(this.hV=null,this.hTLV=i.getEncodedHex(),this.hTLV=this.hTLV.replace(/^../,e),this.isModified=!1)},this.getFreshValueHex=function(){return this.hV},"undefined"!=typeof t&&("undefined"!=typeof t.tag&&(this.hT=t.tag),"undefined"!=typeof t.explicit&&(this.isExplicit=t.explicit),"undefined"!=typeof t.obj&&(this.asn1Object=t.obj,this.setASN1Object(this.isExplicit,this.hT,this.asn1Object)))},Ce.extend(KJUR.asn1.DERTaggedObject,KJUR.asn1.ASN1Object),
41
// Copyright (c) 2008-2013 Lapo Luchini <[email protected]>
42
// copyright notice and this permission notice appear in all copies.
43
//
44
// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
45
// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
46
// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
47
// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
48
// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
49
// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
50
// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
51
function(t){"use strict";var e,i={};i.decode=function(i){var r;if(e===t){var s="0123456789ABCDEF",n=" \f\n\r \u2028\u2029";for(e=[],r=0;16>r;++r)e[s.charAt(r)]=r;for(s=s.toLowerCase(),r=10;16>r;++r)e[s.charAt(r)]=r;for(r=0;r<n.length;++r)e[n.charAt(r)]=-1}var o=[],h=0,a=0;for(r=0;r<i.length;++r){var u=i.charAt(r);if("="==u)break;if(u=e[u],-1!=u){if(u===t)throw"Illegal character at offset "+r;h|=u,++a>=2?(o[o.length]=h,h=0,a=0):h<<=4}}if(a)throw"Hex encoding incomplete: 4 bits missing";return o},window.Hex=i}(),
52
// Copyright (c) 2008-2013 Lapo Luchini <[email protected]>
53
// copyright notice and this permission notice appear in all copies.
54
//
55
// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
56
// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
57
// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
58
// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
59
// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
60
// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
61
// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
62
function(t){"use strict";var e,i={};i.decode=function(i){var r;if(e===t){var s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n="= \f\n\r \u2028\u2029";for(e=[],r=0;64>r;++r)e[s.charAt(r)]=r;for(r=0;r<n.length;++r)e[n.charAt(r)]=-1}var o=[],h=0,a=0;for(r=0;r<i.length;++r){var u=i.charAt(r);if("="==u)break;if(u=e[u],-1!=u){if(u===t)throw"Illegal character at offset "+r;h|=u,++a>=4?(o[o.length]=h>>16,o[o.length]=h>>8&255,o[o.length]=255&h,h=0,a=0):h<<=6}}switch(a){case 1:throw"Base64 encoding incomplete: at least 2 bits missing";case 2:o[o.length]=h>>10;break;case 3:o[o.length]=h>>16,o[o.length]=h>>8&255}return o},i.re=/-----BEGIN [^-]+-----([A-Za-z0-9+\/=\s]+)-----END [^-]+-----|begin-base64[^\n]+\n([A-Za-z0-9+\/=\s]+)====/,i.unarmor=function(t){var e=i.re.exec(t);if(e)if(e[1])t=e[1];else{if(!e[2])throw"RegExp out of sync";t=e[2]}return i.decode(t)},window.Base64=i}(),
63
// Copyright (c) 2008-2013 Lapo Luchini <[email protected]>
64
// copyright notice and this permission notice appear in all copies.
65
//
66
// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
67
// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
68
// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
69
// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
70
// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
71
// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
72
// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
73
function(t){"use strict";function e(t,i){t instanceof e?(this.enc=t.enc,this.pos=t.pos):(this.enc=t,this.pos=i)}function i(t,e,i,r,s){this.stream=t,this.header=e,this.length=i,this.tag=r,this.sub=s}var r=100,s="…",n={tag:function(t,e){var i=document.createElement(t);return i.className=e,i},text:function(t){return document.createTextNode(t)}};e.prototype.get=function(e){if(e===t&&(e=this.pos++),e>=this.enc.length)throw"Requesting byte offset "+e+" on a stream of length "+this.enc.length;return this.enc[e]},e.prototype.hexDigits="0123456789ABCDEF",e.prototype.hexByte=function(t){return this.hexDigits.charAt(t>>4&15)+this.hexDigits.charAt(15&t)},e.prototype.hexDump=function(t,e,i){for(var r="",s=t;e>s;++s)if(r+=this.hexByte(this.get(s)),i!==!0)switch(15&s){case 7:r+=" ";break;case 15:r+="\n";break;default:r+=" "}return r},e.prototype.parseStringISO=function(t,e){for(var i="",r=t;e>r;++r)i+=String.fromCharCode(this.get(r));return i},e.prototype.parseStringUTF=function(t,e){for(var i="",r=t;e>r;){var s=this.get(r++);i+=128>s?String.fromCharCode(s):s>191&&224>s?String.fromCharCode((31&s)<<6|63&this.get(r++)):String.fromCharCode((15&s)<<12|(63&this.get(r++))<<6|63&this.get(r++))}return i},e.prototype.parseStringBMP=function(t,e){for(var i="",r=t;e>r;r+=2){var s=this.get(r),n=this.get(r+1);i+=String.fromCharCode((s<<8)+n)}return i},e.prototype.reTime=/^((?:1[89]|2\d)?\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/,e.prototype.parseTime=function(t,e){var i=this.parseStringISO(t,e),r=this.reTime.exec(i);return r?(i=r[1]+"-"+r[2]+"-"+r[3]+" "+r[4],r[5]&&(i+=":"+r[5],r[6]&&(i+=":"+r[6],r[7]&&(i+="."+r[7]))),r[8]&&(i+=" UTC","Z"!=r[8]&&(i+=r[8],r[9]&&(i+=":"+r[9]))),i):"Unrecognized time: "+i},e.prototype.parseInteger=function(t,e){var i=e-t;if(i>4){i<<=3;var r=this.get(t);if(0===r)i-=8;else for(;128>r;)r<<=1,--i;return"("+i+" bit)"}for(var s=0,n=t;e>n;++n)s=s<<8|this.get(n);return s},e.prototype.parseBitString=function(t,e){var i=this.get(t),r=(e-t-1<<3)-i,s="("+r+" bit)";if(20>=r){var n=i;s+=" ";for(var o=e-1;o>t;--o){for(var h=this.get(o),a=n;8>a;++a)s+=h>>a&1?"1":"0";n=0}}return s},e.prototype.parseOctetString=function(t,e){var i=e-t,n="("+i+" byte) ";i>r&&(e=t+r);for(var o=t;e>o;++o)n+=this.hexByte(this.get(o));return i>r&&(n+=s),n},e.prototype.parseOID=function(t,e){for(var i="",r=0,s=0,n=t;e>n;++n){var o=this.get(n);if(r=r<<7|127&o,s+=7,!(128&o)){if(""===i){var h=80>r?40>r?0:1:2;i=h+"."+(r-40*h)}else i+="."+(s>=31?"bigint":r);r=s=0}}return i},i.prototype.typeName=function(){if(this.tag===t)return"unknown";var e=this.tag>>6,i=(this.tag>>5&1,31&this.tag);switch(e){case 0:switch(i){case 0:return"EOC";case 1:return"BOOLEAN";case 2:return"INTEGER";case 3:return"BIT_STRING";case 4:return"OCTET_STRING";case 5:return"NULL";case 6:return"OBJECT_IDENTIFIER";case 7:return"ObjectDescriptor";case 8:return"EXTERNAL";case 9:return"REAL";case 10:return"ENUMERATED";case 11:return"EMBEDDED_PDV";case 12:return"UTF8String";case 16:return"SEQUENCE";case 17:return"SET";case 18:return"NumericString";case 19:return"PrintableString";case 20:return"TeletexString";case 21:return"VideotexString";case 22:return"IA5String";case 23:return"UTCTime";case 24:return"GeneralizedTime";case 25:return"GraphicString";case 26:return"VisibleString";case 27:return"GeneralString";case 28:return"UniversalString";case 30:return"BMPString";default:return"Universal_"+i.toString(16)}case 1:return"Application_"+i.toString(16);case 2:return"["+i+"]";case 3:return"Private_"+i.toString(16)}},i.prototype.reSeemsASCII=/^[ -~]+$/,i.prototype.content=function(){if(this.tag===t)return null;var e=this.tag>>6,i=31&this.tag,n=this.posContent(),o=Math.abs(this.length);if(0!==e){if(null!==this.sub)return"("+this.sub.length+" elem)";var h=this.stream.parseStringISO(n,n+Math.min(o,r));return this.reSeemsASCII.test(h)?h.substring(0,2*r)+(h.length>2*r?s:""):this.stream.parseOctetString(n,n+o)}switch(i){case 1:return 0===this.stream.get(n)?"false":"true";case 2:return this.stream.parseInteger(n,n+o);case 3:return this.sub?"("+this.sub.length+" elem)":this.stream.parseBitString(n,n+o);case 4:return this.sub?"("+this.sub.length+" elem)":this.stream.parseOctetString(n,n+o);case 6:return this.stream.parseOID(n,n+o);case 16:case 17:return"("+this.sub.length+" elem)";case 12:return this.stream.parseStringUTF(n,n+o);case 18:case 19:case 20:case 21:case 22:case 26:return this.stream.parseStringISO(n,n+o);case 30:return this.stream.parseStringBMP(n,n+o);case 23:case 24:return this.stream.parseTime(n,n+o)}return null},i.prototype.toString=function(){return this.typeName()+"@"+this.stream.pos+"[header:"+this.header+",length:"+this.length+",sub:"+(null===this.sub?"null":this.sub.length)+"]"},i.prototype.print=function(e){if(e===t&&(e=""),document.writeln(e+this),null!==this.sub){e+=" ";for(var i=0,r=this.sub.length;r>i;++i)this.sub[i].print(e)}},i.prototype.toPrettyString=function(e){e===t&&(e="");var i=e+this.typeName()+" @"+this.stream.pos;if(this.length>=0&&(i+="+"),i+=this.length,32&this.tag?i+=" (constructed)":3!=this.tag&&4!=this.tag||null===this.sub||(i+=" (encapsulates)"),i+="\n",null!==this.sub){e+=" ";for(var r=0,s=this.sub.length;s>r;++r)i+=this.sub[r].toPrettyString(e)}return i},i.prototype.toDOM=function(){var t=n.tag("div","node");t.asn1=this;var e=n.tag("div","head"),i=this.typeName().replace(/_/g," ");e.innerHTML=i;var r=this.content();if(null!==r){r=String(r).replace(/</g,"&lt;");var s=n.tag("span","preview");s.appendChild(n.text(r)),e.appendChild(s)}t.appendChild(e),this.node=t,this.head=e;var o=n.tag("div","value");if(i="Offset: "+this.stream.pos+"<br/>",i+="Length: "+this.header+"+",i+=this.length>=0?this.length:-this.length+" (undefined)",32&this.tag?i+="<br/>(constructed)":3!=this.tag&&4!=this.tag||null===this.sub||(i+="<br/>(encapsulates)"),null!==r&&(i+="<br/>Value:<br/><b>"+r+"</b>","object"==typeof oids&&6==this.tag)){var h=oids[r];h&&(h.d&&(i+="<br/>"+h.d),h.c&&(i+="<br/>"+h.c),h.w&&(i+="<br/>(warning!)"))}o.innerHTML=i,t.appendChild(o);var a=n.tag("div","sub");if(null!==this.sub)for(var u=0,c=this.sub.length;c>u;++u)a.appendChild(this.sub[u].toDOM());return t.appendChild(a),e.onclick=function(){t.className="node collapsed"==t.className?"node":"node collapsed"},t},i.prototype.posStart=function(){return this.stream.pos},i.prototype.posContent=function(){return this.stream.pos+this.header},i.prototype.posEnd=function(){return this.stream.pos+this.header+Math.abs(this.length)},i.prototype.fakeHover=function(t){this.node.className+=" hover",t&&(this.head.className+=" hover")},i.prototype.fakeOut=function(t){var e=/ ?hover/;this.node.className=this.node.className.replace(e,""),t&&(this.head.className=this.head.className.replace(e,""))},i.prototype.toHexDOM_sub=function(t,e,i,r,s){if(!(r>=s)){var o=n.tag("span",e);o.appendChild(n.text(i.hexDump(r,s))),t.appendChild(o)}},i.prototype.toHexDOM=function(e){var i=n.tag("span","hex");if(e===t&&(e=i),this.head.hexNode=i,this.head.onmouseover=function(){this.hexNode.className="hexCurrent"},this.head.onmouseout=function(){this.hexNode.className="hex"},i.asn1=this,i.onmouseover=function(){var t=!e.selected;t&&(e.selected=this.asn1,this.className="hexCurrent"),this.asn1.fakeHover(t)},i.onmouseout=function(){var t=e.selected==this.asn1;this.asn1.fakeOut(t),t&&(e.selected=null,this.className="hex")},this.toHexDOM_sub(i,"tag",this.stream,this.posStart(),this.posStart()+1),this.toHexDOM_sub(i,this.length>=0?"dlen":"ulen",this.stream,this.posStart()+1,this.posContent()),null===this.sub)i.appendChild(n.text(this.stream.hexDump(this.posContent(),this.posEnd())));else if(this.sub.length>0){var r=this.sub[0],s=this.sub[this.sub.length-1];this.toHexDOM_sub(i,"intro",this.stream,this.posContent(),r.posStart());for(var o=0,h=this.sub.length;h>o;++o)i.appendChild(this.sub[o].toHexDOM(e));this.toHexDOM_sub(i,"outro",this.stream,s.posEnd(),this.posEnd())}return i},i.prototype.toHexString=function(t){return this.stream.hexDump(this.posStart(),this.posEnd(),!0)},i.decodeLength=function(t){var e=t.get(),i=127&e;if(i==e)return i;if(i>3)throw"Length over 24 bits not supported at position "+(t.pos-1);if(0===i)return-1;e=0;for(var r=0;i>r;++r)e=e<<8|t.get();return e},i.hasContent=function(t,r,s){if(32&t)return!0;if(3>t||t>4)return!1;var n=new e(s);3==t&&n.get();var o=n.get();if(o>>6&1)return!1;try{var h=i.decodeLength(n);return n.pos-s.pos+h==r}catch(a){return!1}},i.decode=function(t){t instanceof e||(t=new e(t,0));var r=new e(t),s=t.get(),n=i.decodeLength(t),o=t.pos-r.pos,h=null;if(i.hasContent(s,n,t)){var a=t.pos;if(3==s&&t.get(),h=[],n>=0){for(var u=a+n;t.pos<u;)h[h.length]=i.decode(t);if(t.pos!=u)throw"Content size is not correct for container starting at offset "+a}else try{for(;;){var c=i.decode(t);if(0===c.tag)break;h[h.length]=c}n=a-t.pos}catch(f){throw"Exception while decoding undefined length content: "+f}}else t.pos+=n;return new i(r,o,n,s,h)},i.test=function(){for(var t=[{value:[39],expected:39},{value:[129,201],expected:201},{value:[131,254,220,186],expected:16702650}],r=0,s=t.length;s>r;++r){var n=new e(t[r].value,0),o=i.decodeLength(n);o!=t[r].expected&&document.write("In test["+r+"] expected "+t[r].expected+" got "+o+"\n")}},window.ASN1=i}(),ASN1.prototype.getHexStringValue=function(){var t=this.toHexString(),e=2*this.header,i=2*this.length;return t.substr(e,i)},ue.prototype.parseKey=function(t){try{var e=0,i=0,r=/^\s*(?:[0-9A-Fa-f][0-9A-Fa-f]\s*)+$/,s=r.test(t)?Hex.decode(t):Base64.unarmor(t),n=ASN1.decode(s);if(3===n.sub.length&&(n=n.sub[2].sub[0]),9===n.sub.length){e=n.sub[1].getHexStringValue(),this.n=he(e,16),i=n.sub[2].getHexStringValue(),this.e=parseInt(i,16);var o=n.sub[3].getHexStringValue();this.d=he(o,16);var h=n.sub[4].getHexStringValue();this.p=he(h,16);var a=n.sub[5].getHexStringValue();this.q=he(a,16);var u=n.sub[6].getHexStringValue();this.dmp1=he(u,16);var c=n.sub[7].getHexStringValue();this.dmq1=he(c,16);var f=n.sub[8].getHexStringValue();this.coeff=he(f,16)}else{if(2!==n.sub.length)return!1;var p=n.sub[1],l=p.sub[0];e=l.sub[0].getHexStringValue(),this.n=he(e,16),i=l.sub[1].getHexStringValue(),this.e=parseInt(i,16)}return!0}catch(d){return!1}},ue.prototype.getPrivateBaseKey=function(){var t={array:[new KJUR.asn1.DERInteger({"int":0}),new KJUR.asn1.DERInteger({bigint:this.n}),new KJUR.asn1.DERInteger({"int":this.e}),new KJUR.asn1.DERInteger({bigint:this.d}),new KJUR.asn1.DERInteger({bigint:this.p}),new KJUR.asn1.DERInteger({bigint:this.q}),new KJUR.asn1.DERInteger({bigint:this.dmp1}),new KJUR.asn1.DERInteger({bigint:this.dmq1}),new KJUR.asn1.DERInteger({bigint:this.coeff})]},e=new KJUR.asn1.DERSequence(t);return e.getEncodedHex()},ue.prototype.getPrivateBaseKeyB64=function(){return be(this.getPrivateBaseKey())},ue.prototype.getPublicBaseKey=function(){var t={array:[new KJUR.asn1.DERObjectIdentifier({oid:"1.2.840.113549.1.1.1"}),new KJUR.asn1.DERNull]},e=new KJUR.asn1.DERSequence(t);t={array:[new KJUR.asn1.DERInteger({bigint:this.n}),new KJUR.asn1.DERInteger({"int":this.e})]};var i=new KJUR.asn1.DERSequence(t);t={hex:"00"+i.getEncodedHex()};var r=new KJUR.asn1.DERBitString(t);t={array:[e,r]};var s=new KJUR.asn1.DERSequence(t);return s.getEncodedHex()},ue.prototype.getPublicBaseKeyB64=function(){return be(this.getPublicBaseKey())},ue.prototype.wordwrap=function(t,e){if(e=e||64,!t)return t;var i="(.{1,"+e+"})( +|$\n?)|(.{1,"+e+"})";return t.match(RegExp(i,"g")).join("\n")},ue.prototype.getPrivateKey=function(){var t="-----BEGIN RSA PRIVATE KEY-----\n";return t+=this.wordwrap(this.getPrivateBaseKeyB64())+"\n",t+="-----END RSA PRIVATE KEY-----"},ue.prototype.getPublicKey=function(){var t="-----BEGIN PUBLIC KEY-----\n";return t+=this.wordwrap(this.getPublicBaseKeyB64())+"\n",t+="-----END PUBLIC KEY-----"},ue.prototype.hasPublicKeyProperty=function(t){return t=t||{},t.hasOwnProperty("n")&&t.hasOwnProperty("e")},ue.prototype.hasPrivateKeyProperty=function(t){return t=t||{},t.hasOwnProperty("n")&&t.hasOwnProperty("e")&&t.hasOwnProperty("d")&&t.hasOwnProperty("p")&&t.hasOwnProperty("q")&&t.hasOwnProperty("dmp1")&&t.hasOwnProperty("dmq1")&&t.hasOwnProperty("coeff")},ue.prototype.parsePropertiesFrom=function(t){this.n=t.n,this.e=t.e,t.hasOwnProperty("d")&&(this.d=t.d,this.p=t.p,this.q=t.q,this.dmp1=t.dmp1,this.dmq1=t.dmq1,this.coeff=t.coeff)};var _e=function(t){ue.call(this),t&&("string"==typeof t?this.parseKey(t):(this.hasPrivateKeyProperty(t)||this.hasPublicKeyProperty(t))&&this.parsePropertiesFrom(t))};_e.prototype=new ue,_e.prototype.constructor=_e;var ze=function(t){t=t||{},this.default_key_size=parseInt(t.default_key_size)||1024,this.default_public_exponent=t.default_public_exponent||"010001",this.log=t.log||!1,this.key=null};ze.prototype.setKey=function(t){this.log&&this.key&&console.warn("A key was already set, overriding existing."),this.key=new _e(t)},ze.prototype.setPrivateKey=function(t){this.setKey(t)},ze.prototype.setPublicKey=function(t){this.setKey(t)},ze.prototype.decrypt=function(t){try{return this.getKey().decrypt(Te(t))}catch(e){return!1}},ze.prototype.encrypt=function(t){try{return be(this.getKey().encrypt(t))}catch(e){return!1}},ze.prototype.getKey=function(t){if(!this.key){if(this.key=new _e,t&&"[object Function]"==={}.toString.call(t))return void this.key.generateAsync(this.default_key_size,this.default_public_exponent,t);this.key.generate(this.default_key_size,this.default_public_exponent)}return this.key},ze.prototype.getPrivateKey=function(){return this.getKey().getPrivateKey()},ze.prototype.getPrivateKeyB64=function(){return this.getKey().getPrivateBaseKeyB64()},ze.prototype.getPublicKey=function(){return this.getKey().getPublicKey()},ze.prototype.getPublicKeyB64=function(){return this.getKey().getPublicBaseKeyB64()},ze.version="2.3.1",t.JSEncrypt=ze});
74
/*----------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
75
76
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.io=e():t.io=e()}(this,function(){return function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return t[r].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){"use strict";function r(t,e){"object"===("undefined"==typeof t?"undefined":o(t))&&(e=t,t=void 0),e=e||{};var n,r=i(t),s=r.source,u=r.id,h=r.path,f=p[u]&&h in p[u].nsps,l=e.forceNew||e["force new connection"]||!1===e.multiplex||f;return l?(c("ignoring socket cache for %s",s),n=a(s,e)):(p[u]||(c("new io instance for %s",s),p[u]=a(s,e)),n=p[u]),r.query&&!e.query&&(e.query=r.query),n.socket(r.path,e)}var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=n(1),s=n(7),a=n(13),c=n(3)("socket.io-client");t.exports=e=r;var p=e.managers={};e.protocol=s.protocol,e.connect=r,e.Manager=n(13),e.Socket=n(39)},function(t,e,n){(function(e){"use strict";function r(t,n){var r=t;n=n||e.location,null==t&&(t=n.protocol+"//"+n.host),"string"==typeof t&&("/"===t.charAt(0)&&(t="/"===t.charAt(1)?n.protocol+t:n.host+t),/^(https?|wss?):\/\//.test(t)||(i("protocol-less url %s",t),t="undefined"!=typeof n?n.protocol+"//"+t:"https://"+t),i("parse %s",t),r=o(t)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";var s=r.host.indexOf(":")!==-1,a=s?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+a+":"+r.port,r.href=r.protocol+"://"+a+(n&&n.port===r.port?"":":"+r.port),r}var o=n(2),i=n(3)("socket.io-client:url");t.exports=r}).call(e,function(){return this}())},function(t,e){var n=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,r=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];t.exports=function(t){var e=t,o=t.indexOf("["),i=t.indexOf("]");o!=-1&&i!=-1&&(t=t.substring(0,o)+t.substring(o,i).replace(/:/g,";")+t.substring(i,t.length));for(var s=n.exec(t||""),a={},c=14;c--;)a[r[c]]=s[c]||"";return o!=-1&&i!=-1&&(a.source=e,a.host=a.host.substring(1,a.host.length-1).replace(/;/g,":"),a.authority=a.authority.replace("[","").replace("]","").replace(/;/g,":"),a.ipv6uri=!0),a}},function(t,e,n){(function(r){function o(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type)||("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))}function i(t){var n=this.useColors;if(t[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+t[0]+(n?"%c ":" ")+"+"+e.humanize(this.diff),n){var r="color: "+this.color;t.splice(1,0,r,"color: inherit");var o=0,i=0;t[0].replace(/%[a-zA-Z%]/g,function(t){"%%"!==t&&(o++,"%c"===t&&(i=o))}),t.splice(i,0,r)}}function s(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function a(t){try{null==t?e.storage.removeItem("debug"):e.storage.debug=t}catch(n){}}function c(){var t;try{t=e.storage.debug}catch(n){}return!t&&"undefined"!=typeof r&&"env"in r&&(t=r.env.DEBUG),t}function p(){try{return window.localStorage}catch(t){}}e=t.exports=n(5),e.log=s,e.formatArgs=i,e.save=a,e.load=c,e.useColors=o,e.storage="undefined"!=typeof chrome&&"undefined"!=typeof chrome.storage?chrome.storage.local:p(),e.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],e.formatters.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},e.enable(c())}).call(e,n(4))},function(t,e){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function o(t){if(u===setTimeout)return setTimeout(t,0);if((u===n||!u)&&setTimeout)return u=setTimeout,setTimeout(t,0);try{return u(t,0)}catch(e){try{return u.call(null,t,0)}catch(e){return u.call(this,t,0)}}}function i(t){if(h===clearTimeout)return clearTimeout(t);if((h===r||!h)&&clearTimeout)return h=clearTimeout,clearTimeout(t);try{return h(t)}catch(e){try{return h.call(null,t)}catch(e){return h.call(this,t)}}}function s(){y&&l&&(y=!1,l.length?d=l.concat(d):m=-1,d.length&&a())}function a(){if(!y){var t=o(s);y=!0;for(var e=d.length;e;){for(l=d,d=[];++m<e;)l&&l[m].run();m=-1,e=d.length}l=null,y=!1,i(t)}}function c(t,e){this.fun=t,this.array=e}function p(){}var u,h,f=t.exports={};!function(){try{u="function"==typeof setTimeout?setTimeout:n}catch(t){u=n}try{h="function"==typeof clearTimeout?clearTimeout:r}catch(t){h=r}}();var l,d=[],y=!1,m=-1;f.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];d.push(new c(t,e)),1!==d.length||y||o(a)},c.prototype.run=function(){this.fun.apply(null,this.array)},f.title="browser",f.browser=!0,f.env={},f.argv=[],f.version="",f.versions={},f.on=p,f.addListener=p,f.once=p,f.off=p,f.removeListener=p,f.removeAllListeners=p,f.emit=p,f.prependListener=p,f.prependOnceListener=p,f.listeners=function(t){return[]},f.binding=function(t){throw new Error("process.binding is not supported")},f.cwd=function(){return"/"},f.chdir=function(t){throw new Error("process.chdir is not supported")},f.umask=function(){return 0}},function(t,e,n){function r(t){var n,r=0;for(n in t)r=(r<<5)-r+t.charCodeAt(n),r|=0;return e.colors[Math.abs(r)%e.colors.length]}function o(t){function n(){if(n.enabled){var t=n,r=+new Date,o=r-(p||r);t.diff=o,t.prev=p,t.curr=r,p=r;for(var i=new Array(arguments.length),s=0;s<i.length;s++)i[s]=arguments[s];i[0]=e.coerce(i[0]),"string"!=typeof i[0]&&i.unshift("%O");var a=0;i[0]=i[0].replace(/%([a-zA-Z%])/g,function(n,r){if("%%"===n)return n;a++;var o=e.formatters[r];if("function"==typeof o){var s=i[a];n=o.call(t,s),i.splice(a,1),a--}return n}),e.formatArgs.call(t,i);var c=n.log||e.log||console.log.bind(console);c.apply(t,i)}}return n.namespace=t,n.enabled=e.enabled(t),n.useColors=e.useColors(),n.color=r(t),"function"==typeof e.init&&e.init(n),n}function i(t){e.save(t),e.names=[],e.skips=[];for(var n=("string"==typeof t?t:"").split(/[\s,]+/),r=n.length,o=0;o<r;o++)n[o]&&(t=n[o].replace(/\*/g,".*?"),"-"===t[0]?e.skips.push(new RegExp("^"+t.substr(1)+"$")):e.names.push(new RegExp("^"+t+"$")))}function s(){e.enable("")}function a(t){var n,r;for(n=0,r=e.skips.length;n<r;n++)if(e.skips[n].test(t))return!1;for(n=0,r=e.names.length;n<r;n++)if(e.names[n].test(t))return!0;return!1}function c(t){return t instanceof Error?t.stack||t.message:t}e=t.exports=o.debug=o["default"]=o,e.coerce=c,e.disable=s,e.enable=i,e.enabled=a,e.humanize=n(6),e.names=[],e.skips=[],e.formatters={};var p},function(t,e){function n(t){if(t=String(t),!(t.length>100)){var e=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(t);if(e){var n=parseFloat(e[1]),r=(e[2]||"ms").toLowerCase();switch(r){case"years":case"year":case"yrs":case"yr":case"y":return n*u;case"days":case"day":case"d":return n*p;case"hours":case"hour":case"hrs":case"hr":case"h":return n*c;case"minutes":case"minute":case"mins":case"min":case"m":return n*a;case"seconds":case"second":case"secs":case"sec":case"s":return n*s;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}function r(t){return t>=p?Math.round(t/p)+"d":t>=c?Math.round(t/c)+"h":t>=a?Math.round(t/a)+"m":t>=s?Math.round(t/s)+"s":t+"ms"}function o(t){return i(t,p,"day")||i(t,c,"hour")||i(t,a,"minute")||i(t,s,"second")||t+" ms"}function i(t,e,n){if(!(t<e))return t<1.5*e?Math.floor(t/e)+" "+n:Math.ceil(t/e)+" "+n+"s"}var s=1e3,a=60*s,c=60*a,p=24*c,u=365.25*p;t.exports=function(t,e){e=e||{};var i=typeof t;if("string"===i&&t.length>0)return n(t);if("number"===i&&isNaN(t)===!1)return e["long"]?o(t):r(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},function(t,e,n){function r(){}function o(t){var n=""+t.type;return e.BINARY_EVENT!==t.type&&e.BINARY_ACK!==t.type||(n+=t.attachments+"-"),t.nsp&&"/"!==t.nsp&&(n+=t.nsp+","),null!=t.id&&(n+=t.id),null!=t.data&&(n+=JSON.stringify(t.data)),h("encoded %j as %s",t,n),n}function i(t,e){function n(t){var n=d.deconstructPacket(t),r=o(n.packet),i=n.buffers;i.unshift(r),e(i)}d.removeBlobs(t,n)}function s(){this.reconstructor=null}function a(t){var n=0,r={type:Number(t.charAt(0))};if(null==e.types[r.type])return u();if(e.BINARY_EVENT===r.type||e.BINARY_ACK===r.type){for(var o="";"-"!==t.charAt(++n)&&(o+=t.charAt(n),n!=t.length););if(o!=Number(o)||"-"!==t.charAt(n))throw new Error("Illegal attachments");r.attachments=Number(o)}if("/"===t.charAt(n+1))for(r.nsp="";++n;){var i=t.charAt(n);if(","===i)break;if(r.nsp+=i,n===t.length)break}else r.nsp="/";var s=t.charAt(n+1);if(""!==s&&Number(s)==s){for(r.id="";++n;){var i=t.charAt(n);if(null==i||Number(i)!=i){--n;break}if(r.id+=t.charAt(n),n===t.length)break}r.id=Number(r.id)}return t.charAt(++n)&&(r=c(r,t.substr(n))),h("decoded %s as %j",t,r),r}function c(t,e){try{t.data=JSON.parse(e)}catch(n){return u()}return t}function p(t){this.reconPack=t,this.buffers=[]}function u(){return{type:e.ERROR,data:"parser error"}}var h=n(3)("socket.io-parser"),f=n(8),l=n(9),d=n(11),y=n(12);e.protocol=4,e.types=["CONNECT","DISCONNECT","EVENT","ACK","ERROR","BINARY_EVENT","BINARY_ACK"],e.CONNECT=0,e.DISCONNECT=1,e.EVENT=2,e.ACK=3,e.ERROR=4,e.BINARY_EVENT=5,e.BINARY_ACK=6,e.Encoder=r,e.Decoder=s,r.prototype.encode=function(t,n){if(t.type!==e.EVENT&&t.type!==e.ACK||!l(t.data)||(t.type=t.type===e.EVENT?e.BINARY_EVENT:e.BINARY_ACK),h("encoding packet %j",t),e.BINARY_EVENT===t.type||e.BINARY_ACK===t.type)i(t,n);else{var r=o(t);n([r])}},f(s.prototype),s.prototype.add=function(t){var n;if("string"==typeof t)n=a(t),e.BINARY_EVENT===n.type||e.BINARY_ACK===n.type?(this.reconstructor=new p(n),0===this.reconstructor.reconPack.attachments&&this.emit("decoded",n)):this.emit("decoded",n);else{if(!y(t)&&!t.base64)throw new Error("Unknown type: "+t);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,this.emit("decoded",n))}},s.prototype.destroy=function(){this.reconstructor&&this.reconstructor.finishedReconstruction()},p.prototype.takeBinaryData=function(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){var e=d.reconstructPacket(this.reconPack,this.buffers);return this.finishedReconstruction(),e}return null},p.prototype.finishedReconstruction=function(){this.reconPack=null,this.buffers=[]}},function(t,e,n){function r(t){if(t)return o(t)}function o(t){for(var e in r.prototype)t[e]=r.prototype[e];return t}t.exports=r,r.prototype.on=r.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},r.prototype.once=function(t,e){function n(){this.off(t,n),e.apply(this,arguments)}return n.fn=e,this.on(t,n),this},r.prototype.off=r.prototype.removeListener=r.prototype.removeAllListeners=r.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n=this._callbacks["$"+t];if(!n)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var r,o=0;o<n.length;o++)if(r=n[o],r===e||r.fn===e){n.splice(o,1);break}return this},r.prototype.emit=function(t){this._callbacks=this._callbacks||{};var e=[].slice.call(arguments,1),n=this._callbacks["$"+t];if(n){n=n.slice(0);for(var r=0,o=n.length;r<o;++r)n[r].apply(this,e)}return this},r.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},r.prototype.hasListeners=function(t){return!!this.listeners(t).length}},function(t,e,n){(function(e){function r(t){if(!t||"object"!=typeof t)return!1;if(o(t)){for(var n=0,i=t.length;n<i;n++)if(r(t[n]))return!0;return!1}if("function"==typeof e.Buffer&&e.Buffer.isBuffer&&e.Buffer.isBuffer(t)||"function"==typeof e.ArrayBuffer&&t instanceof ArrayBuffer||s&&t instanceof Blob||a&&t instanceof File)return!0;if(t.toJSON&&"function"==typeof t.toJSON&&1===arguments.length)return r(t.toJSON(),!0);for(var c in t)if(Object.prototype.hasOwnProperty.call(t,c)&&r(t[c]))return!0;return!1}var o=n(10),i=Object.prototype.toString,s="function"==typeof e.Blob||"[object BlobConstructor]"===i.call(e.Blob),a="function"==typeof e.File||"[object FileConstructor]"===i.call(e.File);t.exports=r}).call(e,function(){return this}())},function(t,e){var n={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}},function(t,e,n){(function(t){function r(t,e){if(!t)return t;if(s(t)){var n={_placeholder:!0,num:e.length};return e.push(t),n}if(i(t)){for(var o=new Array(t.length),a=0;a<t.length;a++)o[a]=r(t[a],e);return o}if("object"==typeof t&&!(t instanceof Date)){var o={};for(var c in t)o[c]=r(t[c],e);return o}return t}function o(t,e){if(!t)return t;if(t&&t._placeholder)return e[t.num];if(i(t))for(var n=0;n<t.length;n++)t[n]=o(t[n],e);else if("object"==typeof t)for(var r in t)t[r]=o(t[r],e);return t}var i=n(10),s=n(12),a=Object.prototype.toString,c="function"==typeof t.Blob||"[object BlobConstructor]"===a.call(t.Blob),p="function"==typeof t.File||"[object FileConstructor]"===a.call(t.File);e.deconstructPacket=function(t){var e=[],n=t.data,o=t;return o.data=r(n,e),o.attachments=e.length,{packet:o,buffers:e}},e.reconstructPacket=function(t,e){return t.data=o(t.data,e),t.attachments=void 0,t},e.removeBlobs=function(t,e){function n(t,a,u){if(!t)return t;if(c&&t instanceof Blob||p&&t instanceof File){r++;var h=new FileReader;h.onload=function(){u?u[a]=this.result:o=this.result,--r||e(o)},h.readAsArrayBuffer(t)}else if(i(t))for(var f=0;f<t.length;f++)n(t[f],f,t);else if("object"==typeof t&&!s(t))for(var l in t)n(t[l],l,t)}var r=0,o=t;n(o),r||e(o)}}).call(e,function(){return this}())},function(t,e){(function(e){function n(t){return e.Buffer&&e.Buffer.isBuffer(t)||e.ArrayBuffer&&t instanceof ArrayBuffer}t.exports=n}).call(e,function(){return this}())},function(t,e,n){"use strict";function r(t,e){if(!(this instanceof r))return new r(t,e);t&&"object"===("undefined"==typeof t?"undefined":o(t))&&(e=t,t=void 0),e=e||{},e.path=e.path||"/socket.io",this.nsps={},this.subs=[],this.opts=e,this.reconnection(e.reconnection!==!1),this.reconnectionAttempts(e.reconnectionAttempts||1/0),this.reconnectionDelay(e.reconnectionDelay||1e3),this.reconnectionDelayMax(e.reconnectionDelayMax||5e3),this.randomizationFactor(e.randomizationFactor||.5),this.backoff=new l({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==e.timeout?2e4:e.timeout),this.readyState="closed",this.uri=t,this.connecting=[],this.lastPing=null,this.encoding=!1,this.packetBuffer=[];var n=e.parser||c;this.encoder=new n.Encoder,this.decoder=new n.Decoder,this.autoConnect=e.autoConnect!==!1,this.autoConnect&&this.open()}var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=n(14),s=n(39),a=n(8),c=n(7),p=n(41),u=n(42),h=n(3)("socket.io-client:manager"),f=n(37),l=n(43),d=Object.prototype.hasOwnProperty;t.exports=r,r.prototype.emitAll=function(){this.emit.apply(this,arguments);for(var t in this.nsps)d.call(this.nsps,t)&&this.nsps[t].emit.apply(this.nsps[t],arguments)},r.prototype.updateSocketIds=function(){for(var t in this.nsps)d.call(this.nsps,t)&&(this.nsps[t].id=this.generateId(t))},r.prototype.generateId=function(t){return("/"===t?"":t+"#")+this.engine.id},a(r.prototype),r.prototype.reconnection=function(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection},r.prototype.reconnectionAttempts=function(t){return arguments.length?(this._reconnectionAttempts=t,this):this._reconnectionAttempts},r.prototype.reconnectionDelay=function(t){return arguments.length?(this._reconnectionDelay=t,this.backoff&&this.backoff.setMin(t),this):this._reconnectionDelay},r.prototype.randomizationFactor=function(t){return arguments.length?(this._randomizationFactor=t,this.backoff&&this.backoff.setJitter(t),this):this._randomizationFactor},r.prototype.reconnectionDelayMax=function(t){return arguments.length?(this._reconnectionDelayMax=t,this.backoff&&this.backoff.setMax(t),this):this._reconnectionDelayMax},r.prototype.timeout=function(t){return arguments.length?(this._timeout=t,this):this._timeout},r.prototype.maybeReconnectOnOpen=function(){!this.reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()},r.prototype.open=r.prototype.connect=function(t,e){if(h("readyState %s",this.readyState),~this.readyState.indexOf("open"))return this;h("opening %s",this.uri),this.engine=i(this.uri,this.opts);var n=this.engine,r=this;this.readyState="opening",this.skipReconnect=!1;var o=p(n,"open",function(){r.onopen(),t&&t()}),s=p(n,"error",function(e){if(h("connect_error"),r.cleanup(),r.readyState="closed",r.emitAll("connect_error",e),t){var n=new Error("Connection error");n.data=e,t(n)}else r.maybeReconnectOnOpen()});if(!1!==this._timeout){var a=this._timeout;h("connect attempt will timeout after %d",a);var c=setTimeout(function(){h("connect attempt timed out after %d",a),o.destroy(),n.close(),n.emit("error","timeout"),r.emitAll("connect_timeout",a)},a);this.subs.push({destroy:function(){clearTimeout(c)}})}return this.subs.push(o),this.subs.push(s),this},r.prototype.onopen=function(){h("open"),this.cleanup(),this.readyState="open",this.emit("open");var t=this.engine;this.subs.push(p(t,"data",u(this,"ondata"))),this.subs.push(p(t,"ping",u(this,"onping"))),this.subs.push(p(t,"pong",u(this,"onpong"))),this.subs.push(p(t,"error",u(this,"onerror"))),this.subs.push(p(t,"close",u(this,"onclose"))),this.subs.push(p(this.decoder,"decoded",u(this,"ondecoded")))},r.prototype.onping=function(){this.lastPing=new Date,this.emitAll("ping")},r.prototype.onpong=function(){this.emitAll("pong",new Date-this.lastPing)},r.prototype.ondata=function(t){this.decoder.add(t)},r.prototype.ondecoded=function(t){this.emit("packet",t)},r.prototype.onerror=function(t){h("error",t),this.emitAll("error",t)},r.prototype.socket=function(t,e){function n(){~f(o.connecting,r)||o.connecting.push(r)}var r=this.nsps[t];if(!r){r=new s(this,t,e),this.nsps[t]=r;var o=this;r.on("connecting",n),r.on("connect",function(){r.id=o.generateId(t)}),this.autoConnect&&n()}return r},r.prototype.destroy=function(t){var e=f(this.connecting,t);~e&&this.connecting.splice(e,1),this.connecting.length||this.close()},r.prototype.packet=function(t){h("writing packet %j",t);var e=this;t.query&&0===t.type&&(t.nsp+="?"+t.query),e.encoding?e.packetBuffer.push(t):(e.encoding=!0,this.encoder.encode(t,function(n){for(var r=0;r<n.length;r++)e.engine.write(n[r],t.options);e.encoding=!1,e.processPacketQueue()}))},r.prototype.processPacketQueue=function(){if(this.packetBuffer.length>0&&!this.encoding){var t=this.packetBuffer.shift();this.packet(t)}},r.prototype.cleanup=function(){h("cleanup");for(var t=this.subs.length,e=0;e<t;e++){var n=this.subs.shift();n.destroy()}this.packetBuffer=[],this.encoding=!1,this.lastPing=null,this.decoder.destroy()},r.prototype.close=r.prototype.disconnect=function(){h("disconnect"),this.skipReconnect=!0,this.reconnecting=!1,"opening"===this.readyState&&this.cleanup(),this.backoff.reset(),this.readyState="closed",this.engine&&this.engine.close()},r.prototype.onclose=function(t){h("onclose"),this.cleanup(),this.backoff.reset(),this.readyState="closed",this.emit("close",t),this._reconnection&&!this.skipReconnect&&this.reconnect()},r.prototype.reconnect=function(){if(this.reconnecting||this.skipReconnect)return this;var t=this;if(this.backoff.attempts>=this._reconnectionAttempts)h("reconnect failed"),this.backoff.reset(),this.emitAll("reconnect_failed"),this.reconnecting=!1;else{var e=this.backoff.duration();h("will wait %dms before reconnect attempt",e),this.reconnecting=!0;var n=setTimeout(function(){t.skipReconnect||(h("attempting reconnect"),t.emitAll("reconnect_attempt",t.backoff.attempts),t.emitAll("reconnecting",t.backoff.attempts),t.skipReconnect||t.open(function(e){e?(h("reconnect attempt error"),t.reconnecting=!1,t.reconnect(),t.emitAll("reconnect_error",e.data)):(h("reconnect success"),t.onreconnect())}))},e);this.subs.push({destroy:function(){clearTimeout(n)}})}},r.prototype.onreconnect=function(){var t=this.backoff.attempts;this.reconnecting=!1,this.backoff.reset(),this.updateSocketIds(),this.emitAll("reconnect",t)}},function(t,e,n){t.exports=n(15)},function(t,e,n){t.exports=n(16),t.exports.parser=n(23)},function(t,e,n){(function(e){function r(t,n){if(!(this instanceof r))return new r(t,n);n=n||{},t&&"object"==typeof t&&(n=t,t=null),t?(t=u(t),n.hostname=t.host,n.secure="https"===t.protocol||"wss"===t.protocol,n.port=t.port,t.query&&(n.query=t.query)):n.host&&(n.hostname=u(n.host).host),this.secure=null!=n.secure?n.secure:e.location&&"https:"===location.protocol,n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.agent=n.agent||!1,this.hostname=n.hostname||(e.location?location.hostname:"localhost"),this.port=n.port||(e.location&&location.port?location.port:this.secure?443:80),this.query=n.query||{},"string"==typeof this.query&&(this.query=f.decode(this.query)),this.upgrade=!1!==n.upgrade,this.path=(n.path||"/engine.io").replace(/\/$/,"")+"/",this.forceJSONP=!!n.forceJSONP,this.jsonp=!1!==n.jsonp,this.forceBase64=!!n.forceBase64,this.enablesXDR=!!n.enablesXDR,this.timestampParam=n.timestampParam||"t",this.timestampRequests=n.timestampRequests,this.transports=n.transports||["polling","websocket"],this.transportOptions=n.transportOptions||{},this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.policyPort=n.policyPort||843,this.rememberUpgrade=n.rememberUpgrade||!1,this.binaryType=null,this.onlyBinaryUpgrades=n.onlyBinaryUpgrades,this.perMessageDeflate=!1!==n.perMessageDeflate&&(n.perMessageDeflate||{}),!0===this.perMessageDeflate&&(this.perMessageDeflate={}),this.perMessageDeflate&&null==this.perMessageDeflate.threshold&&(this.perMessageDeflate.threshold=1024),this.pfx=n.pfx||null,this.key=n.key||null,this.passphrase=n.passphrase||null,this.cert=n.cert||null,this.ca=n.ca||null,this.ciphers=n.ciphers||null,this.rejectUnauthorized=void 0===n.rejectUnauthorized||n.rejectUnauthorized,this.forceNode=!!n.forceNode;var o="object"==typeof e&&e;o.global===o&&(n.extraHeaders&&Object.keys(n.extraHeaders).length>0&&(this.extraHeaders=n.extraHeaders),n.localAddress&&(this.localAddress=n.localAddress)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingIntervalTimer=null,this.pingTimeoutTimer=null,this.open()}function o(t){var e={};for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}var i=n(17),s=n(8),a=n(3)("engine.io-client:socket"),c=n(37),p=n(23),u=n(2),h=n(38),f=n(31);t.exports=r,r.priorWebsocketSuccess=!1,s(r.prototype),r.protocol=p.protocol,r.Socket=r,r.Transport=n(22),r.transports=n(17),r.parser=n(23),r.prototype.createTransport=function(t){a('creating transport "%s"',t);var e=o(this.query);e.EIO=p.protocol,e.transport=t;var n=this.transportOptions[t]||{};this.id&&(e.sid=this.id);var r=new i[t]({query:e,socket:this,agent:n.agent||this.agent,hostname:n.hostname||this.hostname,port:n.port||this.port,secure:n.secure||this.secure,path:n.path||this.path,forceJSONP:n.forceJSONP||this.forceJSONP,jsonp:n.jsonp||this.jsonp,forceBase64:n.forceBase64||this.forceBase64,enablesXDR:n.enablesXDR||this.enablesXDR,timestampRequests:n.timestampRequests||this.timestampRequests,timestampParam:n.timestampParam||this.timestampParam,policyPort:n.policyPort||this.policyPort,pfx:n.pfx||this.pfx,key:n.key||this.key,passphrase:n.passphrase||this.passphrase,cert:n.cert||this.cert,ca:n.ca||this.ca,ciphers:n.ciphers||this.ciphers,rejectUnauthorized:n.rejectUnauthorized||this.rejectUnauthorized,perMessageDeflate:n.perMessageDeflate||this.perMessageDeflate,extraHeaders:n.extraHeaders||this.extraHeaders,forceNode:n.forceNode||this.forceNode,localAddress:n.localAddress||this.localAddress,requestTimeout:n.requestTimeout||this.requestTimeout,protocols:n.protocols||void 0});return r},r.prototype.open=function(){var t;if(this.rememberUpgrade&&r.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)t="websocket";else{if(0===this.transports.length){var e=this;return void setTimeout(function(){e.emit("error","No transports available")},0)}t=this.transports[0]}this.readyState="opening";try{t=this.createTransport(t)}catch(n){return this.transports.shift(),void this.open()}t.open(),this.setTransport(t)},r.prototype.setTransport=function(t){a("setting transport %s",t.name);var e=this;this.transport&&(a("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=t,t.on("drain",function(){e.onDrain()}).on("packet",function(t){e.onPacket(t)}).on("error",function(t){e.onError(t)}).on("close",function(){e.onClose("transport close")})},r.prototype.probe=function(t){function e(){if(f.onlyBinaryUpgrades){var e=!this.supportsBinary&&f.transport.supportsBinary;h=h||e}h||(a('probe transport "%s" opened',t),u.send([{type:"ping",data:"probe"}]),u.once("packet",function(e){if(!h)if("pong"===e.type&&"probe"===e.data){if(a('probe transport "%s" pong',t),f.upgrading=!0,f.emit("upgrading",u),!u)return;r.priorWebsocketSuccess="websocket"===u.name,a('pausing current transport "%s"',f.transport.name),f.transport.pause(function(){h||"closed"!==f.readyState&&(a("changing transport and sending upgrade packet"),p(),f.setTransport(u),u.send([{type:"upgrade"}]),f.emit("upgrade",u),u=null,f.upgrading=!1,f.flush())})}else{a('probe transport "%s" failed',t);var n=new Error("probe error");n.transport=u.name,f.emit("upgradeError",n)}}))}function n(){h||(h=!0,p(),u.close(),u=null)}function o(e){var r=new Error("probe error: "+e);r.transport=u.name,n(),a('probe transport "%s" failed because of error: %s',t,e),f.emit("upgradeError",r)}function i(){o("transport closed")}function s(){o("socket closed")}function c(t){u&&t.name!==u.name&&(a('"%s" works - aborting "%s"',t.name,u.name),n())}function p(){u.removeListener("open",e),u.removeListener("error",o),u.removeListener("close",i),f.removeListener("close",s),f.removeListener("upgrading",c)}a('probing transport "%s"',t);var u=this.createTransport(t,{probe:1}),h=!1,f=this;r.priorWebsocketSuccess=!1,u.once("open",e),u.once("error",o),u.once("close",i),this.once("close",s),this.once("upgrading",c),u.open()},r.prototype.onOpen=function(){if(a("socket open"),this.readyState="open",r.priorWebsocketSuccess="websocket"===this.transport.name,this.emit("open"),this.flush(),"open"===this.readyState&&this.upgrade&&this.transport.pause){a("starting upgrade probes");for(var t=0,e=this.upgrades.length;t<e;t++)this.probe(this.upgrades[t])}},r.prototype.onPacket=function(t){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(a('socket receive: type "%s", data "%s"',t.type,t.data),this.emit("packet",t),this.emit("heartbeat"),t.type){case"open":this.onHandshake(h(t.data));break;case"pong":this.setPing(),this.emit("pong");break;case"error":var e=new Error("server error");e.code=t.data,this.onError(e);break;case"message":this.emit("data",t.data),this.emit("message",t.data)}else a('packet received with socket readyState "%s"',this.readyState)},r.prototype.onHandshake=function(t){this.emit("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this.upgrades=this.filterUpgrades(t.upgrades),this.pingInterval=t.pingInterval,this.pingTimeout=t.pingTimeout,this.onOpen(),"closed"!==this.readyState&&(this.setPing(),this.removeListener("heartbeat",this.onHeartbeat),this.on("heartbeat",this.onHeartbeat))},r.prototype.onHeartbeat=function(t){clearTimeout(this.pingTimeoutTimer);var e=this;e.pingTimeoutTimer=setTimeout(function(){"closed"!==e.readyState&&e.onClose("ping timeout")},t||e.pingInterval+e.pingTimeout)},r.prototype.setPing=function(){var t=this;clearTimeout(t.pingIntervalTimer),t.pingIntervalTimer=setTimeout(function(){a("writing ping packet - expecting pong within %sms",t.pingTimeout),t.ping(),t.onHeartbeat(t.pingTimeout)},t.pingInterval)},r.prototype.ping=function(){var t=this;this.sendPacket("ping",function(){t.emit("ping")})},r.prototype.onDrain=function(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,0===this.writeBuffer.length?this.emit("drain"):this.flush()},r.prototype.flush=function(){"closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length&&(a("flushing %d packets in socket",this.writeBuffer.length),this.transport.send(this.writeBuffer),this.prevBufferLen=this.writeBuffer.length,this.emit("flush"))},r.prototype.write=r.prototype.send=function(t,e,n){return this.sendPacket("message",t,e,n),this},r.prototype.sendPacket=function(t,e,n,r){if("function"==typeof e&&(r=e,e=void 0),"function"==typeof n&&(r=n,n=null),"closing"!==this.readyState&&"closed"!==this.readyState){n=n||{},n.compress=!1!==n.compress;var o={type:t,data:e,options:n};this.emit("packetCreate",o),this.writeBuffer.push(o),r&&this.once("flush",r),this.flush()}},r.prototype.close=function(){function t(){r.onClose("forced close"),a("socket closing - telling transport to close"),r.transport.close()}function e(){r.removeListener("upgrade",e),r.removeListener("upgradeError",e),t()}function n(){r.once("upgrade",e),r.once("upgradeError",e)}if("opening"===this.readyState||"open"===this.readyState){this.readyState="closing";var r=this;this.writeBuffer.length?this.once("drain",function(){this.upgrading?n():t()}):this.upgrading?n():t()}return this},r.prototype.onError=function(t){a("socket error %j",t),r.priorWebsocketSuccess=!1,this.emit("error",t),this.onClose("transport error",t)},r.prototype.onClose=function(t,e){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState){a('socket close with reason: "%s"',t);var n=this;clearTimeout(this.pingIntervalTimer),clearTimeout(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),this.readyState="closed",this.id=null,this.emit("close",t,e),n.writeBuffer=[],n.prevBufferLen=0}},r.prototype.filterUpgrades=function(t){for(var e=[],n=0,r=t.length;n<r;n++)~c(this.transports,t[n])&&e.push(t[n]);return e}}).call(e,function(){return this}())},function(t,e,n){(function(t){function r(e){var n,r=!1,a=!1,c=!1!==e.jsonp;if(t.location){var p="https:"===location.protocol,u=location.port;u||(u=p?443:80),r=e.hostname!==location.hostname||u!==e.port,a=e.secure!==p}if(e.xdomain=r,e.xscheme=a,n=new o(e),"open"in n&&!e.forceJSONP)return new i(e);if(!c)throw new Error("JSONP disabled");return new s(e)}var o=n(18),i=n(20),s=n(34),a=n(35);e.polling=r,e.websocket=a}).call(e,function(){return this}())},function(t,e,n){(function(e){var r=n(19);t.exports=function(t){var n=t.xdomain,o=t.xscheme,i=t.enablesXDR;try{if("undefined"!=typeof XMLHttpRequest&&(!n||r))return new XMLHttpRequest}catch(s){}try{if("undefined"!=typeof XDomainRequest&&!o&&i)return new XDomainRequest}catch(s){}if(!n)try{
77
return new(e[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(s){}}}).call(e,function(){return this}())},function(t,e){try{t.exports="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(n){t.exports=!1}},function(t,e,n){(function(e){function r(){}function o(t){if(c.call(this,t),this.requestTimeout=t.requestTimeout,this.extraHeaders=t.extraHeaders,e.location){var n="https:"===location.protocol,r=location.port;r||(r=n?443:80),this.xd=t.hostname!==e.location.hostname||r!==t.port,this.xs=t.secure!==n}}function i(t){this.method=t.method||"GET",this.uri=t.uri,this.xd=!!t.xd,this.xs=!!t.xs,this.async=!1!==t.async,this.data=void 0!==t.data?t.data:null,this.agent=t.agent,this.isBinary=t.isBinary,this.supportsBinary=t.supportsBinary,this.enablesXDR=t.enablesXDR,this.requestTimeout=t.requestTimeout,this.pfx=t.pfx,this.key=t.key,this.passphrase=t.passphrase,this.cert=t.cert,this.ca=t.ca,this.ciphers=t.ciphers,this.rejectUnauthorized=t.rejectUnauthorized,this.extraHeaders=t.extraHeaders,this.create()}function s(){for(var t in i.requests)i.requests.hasOwnProperty(t)&&i.requests[t].abort()}var a=n(18),c=n(21),p=n(8),u=n(32),h=n(3)("engine.io-client:polling-xhr");t.exports=o,t.exports.Request=i,u(o,c),o.prototype.supportsBinary=!0,o.prototype.request=function(t){return t=t||{},t.uri=this.uri(),t.xd=this.xd,t.xs=this.xs,t.agent=this.agent||!1,t.supportsBinary=this.supportsBinary,t.enablesXDR=this.enablesXDR,t.pfx=this.pfx,t.key=this.key,t.passphrase=this.passphrase,t.cert=this.cert,t.ca=this.ca,t.ciphers=this.ciphers,t.rejectUnauthorized=this.rejectUnauthorized,t.requestTimeout=this.requestTimeout,t.extraHeaders=this.extraHeaders,new i(t)},o.prototype.doWrite=function(t,e){var n="string"!=typeof t&&void 0!==t,r=this.request({method:"POST",data:t,isBinary:n}),o=this;r.on("success",e),r.on("error",function(t){o.onError("xhr post error",t)}),this.sendXhr=r},o.prototype.doPoll=function(){h("xhr poll");var t=this.request(),e=this;t.on("data",function(t){e.onData(t)}),t.on("error",function(t){e.onError("xhr poll error",t)}),this.pollXhr=t},p(i.prototype),i.prototype.create=function(){var t={agent:this.agent,xdomain:this.xd,xscheme:this.xs,enablesXDR:this.enablesXDR};t.pfx=this.pfx,t.key=this.key,t.passphrase=this.passphrase,t.cert=this.cert,t.ca=this.ca,t.ciphers=this.ciphers,t.rejectUnauthorized=this.rejectUnauthorized;var n=this.xhr=new a(t),r=this;try{h("xhr open %s: %s",this.method,this.uri),n.open(this.method,this.uri,this.async);try{if(this.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(var o in this.extraHeaders)this.extraHeaders.hasOwnProperty(o)&&n.setRequestHeader(o,this.extraHeaders[o])}}catch(s){}if("POST"===this.method)try{this.isBinary?n.setRequestHeader("Content-type","application/octet-stream"):n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(s){}try{n.setRequestHeader("Accept","*/*")}catch(s){}"withCredentials"in n&&(n.withCredentials=!0),this.requestTimeout&&(n.timeout=this.requestTimeout),this.hasXDR()?(n.onload=function(){r.onLoad()},n.onerror=function(){r.onError(n.responseText)}):n.onreadystatechange=function(){if(2===n.readyState){var t;try{t=n.getResponseHeader("Content-Type")}catch(e){}"application/octet-stream"===t&&(n.responseType="arraybuffer")}4===n.readyState&&(200===n.status||1223===n.status?r.onLoad():setTimeout(function(){r.onError(n.status)},0))},h("xhr data %s",this.data),n.send(this.data)}catch(s){return void setTimeout(function(){r.onError(s)},0)}e.document&&(this.index=i.requestsCount++,i.requests[this.index]=this)},i.prototype.onSuccess=function(){this.emit("success"),this.cleanup()},i.prototype.onData=function(t){this.emit("data",t),this.onSuccess()},i.prototype.onError=function(t){this.emit("error",t),this.cleanup(!0)},i.prototype.cleanup=function(t){if("undefined"!=typeof this.xhr&&null!==this.xhr){if(this.hasXDR()?this.xhr.onload=this.xhr.onerror=r:this.xhr.onreadystatechange=r,t)try{this.xhr.abort()}catch(n){}e.document&&delete i.requests[this.index],this.xhr=null}},i.prototype.onLoad=function(){var t;try{var e;try{e=this.xhr.getResponseHeader("Content-Type")}catch(n){}t="application/octet-stream"===e?this.xhr.response||this.xhr.responseText:this.xhr.responseText}catch(n){this.onError(n)}null!=t&&this.onData(t)},i.prototype.hasXDR=function(){return"undefined"!=typeof e.XDomainRequest&&!this.xs&&this.enablesXDR},i.prototype.abort=function(){this.cleanup()},i.requestsCount=0,i.requests={},e.document&&(e.attachEvent?e.attachEvent("onunload",s):e.addEventListener&&e.addEventListener("beforeunload",s,!1))}).call(e,function(){return this}())},function(t,e,n){function r(t){var e=t&&t.forceBase64;u&&!e||(this.supportsBinary=!1),o.call(this,t)}var o=n(22),i=n(31),s=n(23),a=n(32),c=n(33),p=n(3)("engine.io-client:polling");t.exports=r;var u=function(){var t=n(18),e=new t({xdomain:!1});return null!=e.responseType}();a(r,o),r.prototype.name="polling",r.prototype.doOpen=function(){this.poll()},r.prototype.pause=function(t){function e(){p("paused"),n.readyState="paused",t()}var n=this;if(this.readyState="pausing",this.polling||!this.writable){var r=0;this.polling&&(p("we are currently polling - waiting to pause"),r++,this.once("pollComplete",function(){p("pre-pause polling complete"),--r||e()})),this.writable||(p("we are currently writing - waiting to pause"),r++,this.once("drain",function(){p("pre-pause writing complete"),--r||e()}))}else e()},r.prototype.poll=function(){p("polling"),this.polling=!0,this.doPoll(),this.emit("poll")},r.prototype.onData=function(t){var e=this;p("polling got data %s",t);var n=function(t,n,r){return"opening"===e.readyState&&e.onOpen(),"close"===t.type?(e.onClose(),!1):void e.onPacket(t)};s.decodePayload(t,this.socket.binaryType,n),"closed"!==this.readyState&&(this.polling=!1,this.emit("pollComplete"),"open"===this.readyState?this.poll():p('ignoring poll - transport state "%s"',this.readyState))},r.prototype.doClose=function(){function t(){p("writing close packet"),e.write([{type:"close"}])}var e=this;"open"===this.readyState?(p("transport open - closing"),t()):(p("transport not open - deferring close"),this.once("open",t))},r.prototype.write=function(t){var e=this;this.writable=!1;var n=function(){e.writable=!0,e.emit("drain")};s.encodePayload(t,this.supportsBinary,function(t){e.doWrite(t,n)})},r.prototype.uri=function(){var t=this.query||{},e=this.secure?"https":"http",n="";!1!==this.timestampRequests&&(t[this.timestampParam]=c()),this.supportsBinary||t.sid||(t.b64=1),t=i.encode(t),this.port&&("https"===e&&443!==Number(this.port)||"http"===e&&80!==Number(this.port))&&(n=":"+this.port),t.length&&(t="?"+t);var r=this.hostname.indexOf(":")!==-1;return e+"://"+(r?"["+this.hostname+"]":this.hostname)+n+this.path+t}},function(t,e,n){function r(t){this.path=t.path,this.hostname=t.hostname,this.port=t.port,this.secure=t.secure,this.query=t.query,this.timestampParam=t.timestampParam,this.timestampRequests=t.timestampRequests,this.readyState="",this.agent=t.agent||!1,this.socket=t.socket,this.enablesXDR=t.enablesXDR,this.pfx=t.pfx,this.key=t.key,this.passphrase=t.passphrase,this.cert=t.cert,this.ca=t.ca,this.ciphers=t.ciphers,this.rejectUnauthorized=t.rejectUnauthorized,this.forceNode=t.forceNode,this.extraHeaders=t.extraHeaders,this.localAddress=t.localAddress}var o=n(23),i=n(8);t.exports=r,i(r.prototype),r.prototype.onError=function(t,e){var n=new Error(t);return n.type="TransportError",n.description=e,this.emit("error",n),this},r.prototype.open=function(){return"closed"!==this.readyState&&""!==this.readyState||(this.readyState="opening",this.doOpen()),this},r.prototype.close=function(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this},r.prototype.send=function(t){if("open"!==this.readyState)throw new Error("Transport not open");this.write(t)},r.prototype.onOpen=function(){this.readyState="open",this.writable=!0,this.emit("open")},r.prototype.onData=function(t){var e=o.decodePacket(t,this.socket.binaryType);this.onPacket(e)},r.prototype.onPacket=function(t){this.emit("packet",t)},r.prototype.onClose=function(){this.readyState="closed",this.emit("close")}},function(t,e,n){(function(t){function r(t,n){var r="b"+e.packets[t.type]+t.data.data;return n(r)}function o(t,n,r){if(!n)return e.encodeBase64Packet(t,r);var o=t.data,i=new Uint8Array(o),s=new Uint8Array(1+o.byteLength);s[0]=v[t.type];for(var a=0;a<i.length;a++)s[a+1]=i[a];return r(s.buffer)}function i(t,n,r){if(!n)return e.encodeBase64Packet(t,r);var o=new FileReader;return o.onload=function(){t.data=o.result,e.encodePacket(t,n,!0,r)},o.readAsArrayBuffer(t.data)}function s(t,n,r){if(!n)return e.encodeBase64Packet(t,r);if(g)return i(t,n,r);var o=new Uint8Array(1);o[0]=v[t.type];var s=new k([o.buffer,t.data]);return r(s)}function a(t){try{t=d.decode(t,{strict:!1})}catch(e){return!1}return t}function c(t,e,n){for(var r=new Array(t.length),o=l(t.length,n),i=function(t,n,o){e(n,function(e,n){r[t]=n,o(e,r)})},s=0;s<t.length;s++)i(s,t[s],o)}var p,u=n(24),h=n(9),f=n(25),l=n(26),d=n(27);t&&t.ArrayBuffer&&(p=n(29));var y="undefined"!=typeof navigator&&/Android/i.test(navigator.userAgent),m="undefined"!=typeof navigator&&/PhantomJS/i.test(navigator.userAgent),g=y||m;e.protocol=3;var v=e.packets={open:0,close:1,ping:2,pong:3,message:4,upgrade:5,noop:6},b=u(v),w={type:"error",data:"parser error"},k=n(30);e.encodePacket=function(e,n,i,a){"function"==typeof n&&(a=n,n=!1),"function"==typeof i&&(a=i,i=null);var c=void 0===e.data?void 0:e.data.buffer||e.data;if(t.ArrayBuffer&&c instanceof ArrayBuffer)return o(e,n,a);if(k&&c instanceof t.Blob)return s(e,n,a);if(c&&c.base64)return r(e,a);var p=v[e.type];return void 0!==e.data&&(p+=i?d.encode(String(e.data),{strict:!1}):String(e.data)),a(""+p)},e.encodeBase64Packet=function(n,r){var o="b"+e.packets[n.type];if(k&&n.data instanceof t.Blob){var i=new FileReader;return i.onload=function(){var t=i.result.split(",")[1];r(o+t)},i.readAsDataURL(n.data)}var s;try{s=String.fromCharCode.apply(null,new Uint8Array(n.data))}catch(a){for(var c=new Uint8Array(n.data),p=new Array(c.length),u=0;u<c.length;u++)p[u]=c[u];s=String.fromCharCode.apply(null,p)}return o+=t.btoa(s),r(o)},e.decodePacket=function(t,n,r){if(void 0===t)return w;if("string"==typeof t){if("b"===t.charAt(0))return e.decodeBase64Packet(t.substr(1),n);if(r&&(t=a(t),t===!1))return w;var o=t.charAt(0);return Number(o)==o&&b[o]?t.length>1?{type:b[o],data:t.substring(1)}:{type:b[o]}:w}var i=new Uint8Array(t),o=i[0],s=f(t,1);return k&&"blob"===n&&(s=new k([s])),{type:b[o],data:s}},e.decodeBase64Packet=function(t,e){var n=b[t.charAt(0)];if(!p)return{type:n,data:{base64:!0,data:t.substr(1)}};var r=p.decode(t.substr(1));return"blob"===e&&k&&(r=new k([r])),{type:n,data:r}},e.encodePayload=function(t,n,r){function o(t){return t.length+":"+t}function i(t,r){e.encodePacket(t,!!s&&n,!1,function(t){r(null,o(t))})}"function"==typeof n&&(r=n,n=null);var s=h(t);return n&&s?k&&!g?e.encodePayloadAsBlob(t,r):e.encodePayloadAsArrayBuffer(t,r):t.length?void c(t,i,function(t,e){return r(e.join(""))}):r("0:")},e.decodePayload=function(t,n,r){if("string"!=typeof t)return e.decodePayloadAsBinary(t,n,r);"function"==typeof n&&(r=n,n=null);var o;if(""===t)return r(w,0,1);for(var i,s,a="",c=0,p=t.length;c<p;c++){var u=t.charAt(c);if(":"===u){if(""===a||a!=(i=Number(a)))return r(w,0,1);if(s=t.substr(c+1,i),a!=s.length)return r(w,0,1);if(s.length){if(o=e.decodePacket(s,n,!1),w.type===o.type&&w.data===o.data)return r(w,0,1);var h=r(o,c+i,p);if(!1===h)return}c+=i,a=""}else a+=u}return""!==a?r(w,0,1):void 0},e.encodePayloadAsArrayBuffer=function(t,n){function r(t,n){e.encodePacket(t,!0,!0,function(t){return n(null,t)})}return t.length?void c(t,r,function(t,e){var r=e.reduce(function(t,e){var n;return n="string"==typeof e?e.length:e.byteLength,t+n.toString().length+n+2},0),o=new Uint8Array(r),i=0;return e.forEach(function(t){var e="string"==typeof t,n=t;if(e){for(var r=new Uint8Array(t.length),s=0;s<t.length;s++)r[s]=t.charCodeAt(s);n=r.buffer}e?o[i++]=0:o[i++]=1;for(var a=n.byteLength.toString(),s=0;s<a.length;s++)o[i++]=parseInt(a[s]);o[i++]=255;for(var r=new Uint8Array(n),s=0;s<r.length;s++)o[i++]=r[s]}),n(o.buffer)}):n(new ArrayBuffer(0))},e.encodePayloadAsBlob=function(t,n){function r(t,n){e.encodePacket(t,!0,!0,function(t){var e=new Uint8Array(1);if(e[0]=1,"string"==typeof t){for(var r=new Uint8Array(t.length),o=0;o<t.length;o++)r[o]=t.charCodeAt(o);t=r.buffer,e[0]=0}for(var i=t instanceof ArrayBuffer?t.byteLength:t.size,s=i.toString(),a=new Uint8Array(s.length+1),o=0;o<s.length;o++)a[o]=parseInt(s[o]);if(a[s.length]=255,k){var c=new k([e.buffer,a.buffer,t]);n(null,c)}})}c(t,r,function(t,e){return n(new k(e))})},e.decodePayloadAsBinary=function(t,n,r){"function"==typeof n&&(r=n,n=null);for(var o=t,i=[];o.byteLength>0;){for(var s=new Uint8Array(o),a=0===s[0],c="",p=1;255!==s[p];p++){if(c.length>310)return r(w,0,1);c+=s[p]}o=f(o,2+c.length),c=parseInt(c);var u=f(o,0,c);if(a)try{u=String.fromCharCode.apply(null,new Uint8Array(u))}catch(h){var l=new Uint8Array(u);u="";for(var p=0;p<l.length;p++)u+=String.fromCharCode(l[p])}i.push(u),o=f(o,c)}var d=i.length;i.forEach(function(t,o){r(e.decodePacket(t,n,!0),o,d)})}}).call(e,function(){return this}())},function(t,e){t.exports=Object.keys||function(t){var e=[],n=Object.prototype.hasOwnProperty;for(var r in t)n.call(t,r)&&e.push(r);return e}},function(t,e){t.exports=function(t,e,n){var r=t.byteLength;if(e=e||0,n=n||r,t.slice)return t.slice(e,n);if(e<0&&(e+=r),n<0&&(n+=r),n>r&&(n=r),e>=r||e>=n||0===r)return new ArrayBuffer(0);for(var o=new Uint8Array(t),i=new Uint8Array(n-e),s=e,a=0;s<n;s++,a++)i[a]=o[s];return i.buffer}},function(t,e){function n(t,e,n){function o(t,r){if(o.count<=0)throw new Error("after called too many times");--o.count,t?(i=!0,e(t),e=n):0!==o.count||i||e(null,r)}var i=!1;return n=n||r,o.count=t,0===t?e():o}function r(){}t.exports=n},function(t,e,n){var r;(function(t,o){!function(i){function s(t){for(var e,n,r=[],o=0,i=t.length;o<i;)e=t.charCodeAt(o++),e>=55296&&e<=56319&&o<i?(n=t.charCodeAt(o++),56320==(64512&n)?r.push(((1023&e)<<10)+(1023&n)+65536):(r.push(e),o--)):r.push(e);return r}function a(t){for(var e,n=t.length,r=-1,o="";++r<n;)e=t[r],e>65535&&(e-=65536,o+=w(e>>>10&1023|55296),e=56320|1023&e),o+=w(e);return o}function c(t,e){if(t>=55296&&t<=57343){if(e)throw Error("Lone surrogate U+"+t.toString(16).toUpperCase()+" is not a scalar value");return!1}return!0}function p(t,e){return w(t>>e&63|128)}function u(t,e){if(0==(4294967168&t))return w(t);var n="";return 0==(4294965248&t)?n=w(t>>6&31|192):0==(4294901760&t)?(c(t,e)||(t=65533),n=w(t>>12&15|224),n+=p(t,6)):0==(4292870144&t)&&(n=w(t>>18&7|240),n+=p(t,12),n+=p(t,6)),n+=w(63&t|128)}function h(t,e){e=e||{};for(var n,r=!1!==e.strict,o=s(t),i=o.length,a=-1,c="";++a<i;)n=o[a],c+=u(n,r);return c}function f(){if(b>=v)throw Error("Invalid byte index");var t=255&g[b];if(b++,128==(192&t))return 63&t;throw Error("Invalid continuation byte")}function l(t){var e,n,r,o,i;if(b>v)throw Error("Invalid byte index");if(b==v)return!1;if(e=255&g[b],b++,0==(128&e))return e;if(192==(224&e)){if(n=f(),i=(31&e)<<6|n,i>=128)return i;throw Error("Invalid continuation byte")}if(224==(240&e)){if(n=f(),r=f(),i=(15&e)<<12|n<<6|r,i>=2048)return c(i,t)?i:65533;throw Error("Invalid continuation byte")}if(240==(248&e)&&(n=f(),r=f(),o=f(),i=(7&e)<<18|n<<12|r<<6|o,i>=65536&&i<=1114111))return i;throw Error("Invalid UTF-8 detected")}function d(t,e){e=e||{};var n=!1!==e.strict;g=s(t),v=g.length,b=0;for(var r,o=[];(r=l(n))!==!1;)o.push(r);return a(o)}var y="object"==typeof e&&e,m=("object"==typeof t&&t&&t.exports==y&&t,"object"==typeof o&&o);m.global!==m&&m.window!==m||(i=m);var g,v,b,w=String.fromCharCode,k={version:"2.1.2",encode:h,decode:d};r=function(){return k}.call(e,n,e,t),!(void 0!==r&&(t.exports=r))}(this)}).call(e,n(28)(t),function(){return this}())},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children=[],t.webpackPolyfill=1),t}},function(t,e){!function(){"use strict";for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n=new Uint8Array(256),r=0;r<t.length;r++)n[t.charCodeAt(r)]=r;e.encode=function(e){var n,r=new Uint8Array(e),o=r.length,i="";for(n=0;n<o;n+=3)i+=t[r[n]>>2],i+=t[(3&r[n])<<4|r[n+1]>>4],i+=t[(15&r[n+1])<<2|r[n+2]>>6],i+=t[63&r[n+2]];return o%3===2?i=i.substring(0,i.length-1)+"=":o%3===1&&(i=i.substring(0,i.length-2)+"=="),i},e.decode=function(t){var e,r,o,i,s,a=.75*t.length,c=t.length,p=0;"="===t[t.length-1]&&(a--,"="===t[t.length-2]&&a--);var u=new ArrayBuffer(a),h=new Uint8Array(u);for(e=0;e<c;e+=4)r=n[t.charCodeAt(e)],o=n[t.charCodeAt(e+1)],i=n[t.charCodeAt(e+2)],s=n[t.charCodeAt(e+3)],h[p++]=r<<2|o>>4,h[p++]=(15&o)<<4|i>>2,h[p++]=(3&i)<<6|63&s;return u}}()},function(t,e){(function(e){function n(t){for(var e=0;e<t.length;e++){var n=t[e];if(n.buffer instanceof ArrayBuffer){var r=n.buffer;if(n.byteLength!==r.byteLength){var o=new Uint8Array(n.byteLength);o.set(new Uint8Array(r,n.byteOffset,n.byteLength)),r=o.buffer}t[e]=r}}}function r(t,e){e=e||{};var r=new i;n(t);for(var o=0;o<t.length;o++)r.append(t[o]);return e.type?r.getBlob(e.type):r.getBlob()}function o(t,e){return n(t),new Blob(t,e||{})}var i=e.BlobBuilder||e.WebKitBlobBuilder||e.MSBlobBuilder||e.MozBlobBuilder,s=function(){try{var t=new Blob(["hi"]);return 2===t.size}catch(e){return!1}}(),a=s&&function(){try{var t=new Blob([new Uint8Array([1,2])]);return 2===t.size}catch(e){return!1}}(),c=i&&i.prototype.append&&i.prototype.getBlob;t.exports=function(){return s?a?e.Blob:o:c?r:void 0}()}).call(e,function(){return this}())},function(t,e){e.encode=function(t){var e="";for(var n in t)t.hasOwnProperty(n)&&(e.length&&(e+="&"),e+=encodeURIComponent(n)+"="+encodeURIComponent(t[n]));return e},e.decode=function(t){for(var e={},n=t.split("&"),r=0,o=n.length;r<o;r++){var i=n[r].split("=");e[decodeURIComponent(i[0])]=decodeURIComponent(i[1])}return e}},function(t,e){t.exports=function(t,e){var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}},function(t,e){"use strict";function n(t){var e="";do e=s[t%a]+e,t=Math.floor(t/a);while(t>0);return e}function r(t){var e=0;for(u=0;u<t.length;u++)e=e*a+c[t.charAt(u)];return e}function o(){var t=n(+new Date);return t!==i?(p=0,i=t):t+"."+n(p++)}for(var i,s="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),a=64,c={},p=0,u=0;u<a;u++)c[s[u]]=u;o.encode=n,o.decode=r,t.exports=o},function(t,e,n){(function(e){function r(){}function o(t){i.call(this,t),this.query=this.query||{},a||(e.___eio||(e.___eio=[]),a=e.___eio),this.index=a.length;var n=this;a.push(function(t){n.onData(t)}),this.query.j=this.index,e.document&&e.addEventListener&&e.addEventListener("beforeunload",function(){n.script&&(n.script.onerror=r)},!1)}var i=n(21),s=n(32);t.exports=o;var a,c=/\n/g,p=/\\n/g;s(o,i),o.prototype.supportsBinary=!1,o.prototype.doClose=function(){this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),this.form&&(this.form.parentNode.removeChild(this.form),this.form=null,this.iframe=null),i.prototype.doClose.call(this)},o.prototype.doPoll=function(){var t=this,e=document.createElement("script");this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),e.async=!0,e.src=this.uri(),e.onerror=function(e){t.onError("jsonp poll error",e)};var n=document.getElementsByTagName("script")[0];n?n.parentNode.insertBefore(e,n):(document.head||document.body).appendChild(e),this.script=e;var r="undefined"!=typeof navigator&&/gecko/i.test(navigator.userAgent);r&&setTimeout(function(){var t=document.createElement("iframe");document.body.appendChild(t),document.body.removeChild(t)},100)},o.prototype.doWrite=function(t,e){function n(){r(),e()}function r(){if(o.iframe)try{o.form.removeChild(o.iframe)}catch(t){o.onError("jsonp polling iframe removal error",t)}try{var e='<iframe src="javascript:0" name="'+o.iframeId+'">';i=document.createElement(e)}catch(t){i=document.createElement("iframe"),i.name=o.iframeId,i.src="javascript:0"}i.id=o.iframeId,o.form.appendChild(i),o.iframe=i}var o=this;if(!this.form){var i,s=document.createElement("form"),a=document.createElement("textarea"),u=this.iframeId="eio_iframe_"+this.index;s.className="socketio",s.style.position="absolute",s.style.top="-1000px",s.style.left="-1000px",s.target=u,s.method="POST",s.setAttribute("accept-charset","utf-8"),a.name="d",s.appendChild(a),document.body.appendChild(s),this.form=s,this.area=a}this.form.action=this.uri(),r(),t=t.replace(p,"\\\n"),this.area.value=t.replace(c,"\\n");try{this.form.submit()}catch(h){}this.iframe.attachEvent?this.iframe.onreadystatechange=function(){"complete"===o.iframe.readyState&&n()}:this.iframe.onload=n}}).call(e,function(){return this}())},function(t,e,n){(function(e){function r(t){var e=t&&t.forceBase64;e&&(this.supportsBinary=!1),this.perMessageDeflate=t.perMessageDeflate,this.usingBrowserWebSocket=h&&!t.forceNode,this.protocols=t.protocols,this.usingBrowserWebSocket||(l=o),i.call(this,t)}var o,i=n(22),s=n(23),a=n(31),c=n(32),p=n(33),u=n(3)("engine.io-client:websocket"),h=e.WebSocket||e.MozWebSocket;if("undefined"==typeof window)try{o=n(36)}catch(f){}var l=h;l||"undefined"!=typeof window||(l=o),t.exports=r,c(r,i),r.prototype.name="websocket",r.prototype.supportsBinary=!0,r.prototype.doOpen=function(){if(this.check()){var t=this.uri(),e=this.protocols,n={agent:this.agent,perMessageDeflate:this.perMessageDeflate};n.pfx=this.pfx,n.key=this.key,n.passphrase=this.passphrase,n.cert=this.cert,n.ca=this.ca,n.ciphers=this.ciphers,n.rejectUnauthorized=this.rejectUnauthorized,this.extraHeaders&&(n.headers=this.extraHeaders),this.localAddress&&(n.localAddress=this.localAddress);try{this.ws=this.usingBrowserWebSocket?e?new l(t,e):new l(t):new l(t,e,n)}catch(r){return this.emit("error",r)}void 0===this.ws.binaryType&&(this.supportsBinary=!1),this.ws.supports&&this.ws.supports.binary?(this.supportsBinary=!0,this.ws.binaryType="nodebuffer"):this.ws.binaryType="arraybuffer",this.addEventListeners()}},r.prototype.addEventListeners=function(){var t=this;this.ws.onopen=function(){t.onOpen()},this.ws.onclose=function(){t.onClose()},this.ws.onmessage=function(e){t.onData(e.data)},this.ws.onerror=function(e){t.onError("websocket error",e)}},r.prototype.write=function(t){function n(){r.emit("flush"),setTimeout(function(){r.writable=!0,r.emit("drain")},0)}var r=this;this.writable=!1;for(var o=t.length,i=0,a=o;i<a;i++)!function(t){s.encodePacket(t,r.supportsBinary,function(i){if(!r.usingBrowserWebSocket){var s={};if(t.options&&(s.compress=t.options.compress),r.perMessageDeflate){var a="string"==typeof i?e.Buffer.byteLength(i):i.length;a<r.perMessageDeflate.threshold&&(s.compress=!1)}}try{r.usingBrowserWebSocket?r.ws.send(i):r.ws.send(i,s)}catch(c){u("websocket closed before onclose event")}--o||n()})}(t[i])},r.prototype.onClose=function(){i.prototype.onClose.call(this)},r.prototype.doClose=function(){"undefined"!=typeof this.ws&&this.ws.close()},r.prototype.uri=function(){var t=this.query||{},e=this.secure?"wss":"ws",n="";this.port&&("wss"===e&&443!==Number(this.port)||"ws"===e&&80!==Number(this.port))&&(n=":"+this.port),this.timestampRequests&&(t[this.timestampParam]=p()),this.supportsBinary||(t.b64=1),t=a.encode(t),t.length&&(t="?"+t);var r=this.hostname.indexOf(":")!==-1;return e+"://"+(r?"["+this.hostname+"]":this.hostname)+n+this.path+t},r.prototype.check=function(){return!(!l||"__initialize"in l&&this.name===r.prototype.name)}}).call(e,function(){return this}())},function(t,e){},function(t,e){var n=[].indexOf;t.exports=function(t,e){if(n)return t.indexOf(e);for(var r=0;r<t.length;++r)if(t[r]===e)return r;return-1}},function(t,e){(function(e){var n=/^[\],:{}\s]*$/,r=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,o=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,i=/(?:^|:|,)(?:\s*\[)+/g,s=/^\s+/,a=/\s+$/;t.exports=function(t){return"string"==typeof t&&t?(t=t.replace(s,"").replace(a,""),e.JSON&&JSON.parse?JSON.parse(t):n.test(t.replace(r,"@").replace(o,"]").replace(i,""))?new Function("return "+t)():void 0):null}}).call(e,function(){return this}())},function(t,e,n){"use strict";function r(t,e,n){this.io=t,this.nsp=e,this.json=this,this.ids=0,this.acks={},this.receiveBuffer=[],this.sendBuffer=[],this.connected=!1,this.disconnected=!0,n&&n.query&&(this.query=n.query),this.io.autoConnect&&this.open()}var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=n(7),s=n(8),a=n(40),c=n(41),p=n(42),u=n(3)("socket.io-client:socket"),h=n(31);t.exports=e=r;var f={connect:1,connect_error:1,connect_timeout:1,connecting:1,disconnect:1,error:1,reconnect:1,reconnect_attempt:1,reconnect_failed:1,reconnect_error:1,reconnecting:1,ping:1,pong:1},l=s.prototype.emit;s(r.prototype),r.prototype.subEvents=function(){if(!this.subs){var t=this.io;this.subs=[c(t,"open",p(this,"onopen")),c(t,"packet",p(this,"onpacket")),c(t,"close",p(this,"onclose"))]}},r.prototype.open=r.prototype.connect=function(){return this.connected?this:(this.subEvents(),this.io.open(),"open"===this.io.readyState&&this.onopen(),this.emit("connecting"),this)},r.prototype.send=function(){var t=a(arguments);return t.unshift("message"),this.emit.apply(this,t),this},r.prototype.emit=function(t){if(f.hasOwnProperty(t))return l.apply(this,arguments),this;var e=a(arguments),n={type:i.EVENT,data:e};return n.options={},n.options.compress=!this.flags||!1!==this.flags.compress,"function"==typeof e[e.length-1]&&(u("emitting packet with ack id %d",this.ids),this.acks[this.ids]=e.pop(),n.id=this.ids++),this.connected?this.packet(n):this.sendBuffer.push(n),delete this.flags,this},r.prototype.packet=function(t){t.nsp=this.nsp,this.io.packet(t)},r.prototype.onopen=function(){if(u("transport is open - connecting"),"/"!==this.nsp)if(this.query){var t="object"===o(this.query)?h.encode(this.query):this.query;u("sending connect packet with query %s",t),this.packet({type:i.CONNECT,query:t})}else this.packet({type:i.CONNECT})},r.prototype.onclose=function(t){u("close (%s)",t),this.connected=!1,this.disconnected=!0,delete this.id,this.emit("disconnect",t)},r.prototype.onpacket=function(t){if(t.nsp===this.nsp)switch(t.type){case i.CONNECT:this.onconnect();break;case i.EVENT:this.onevent(t);break;case i.BINARY_EVENT:this.onevent(t);break;case i.ACK:this.onack(t);break;case i.BINARY_ACK:this.onack(t);break;case i.DISCONNECT:this.ondisconnect();break;case i.ERROR:this.emit("error",t.data)}},r.prototype.onevent=function(t){var e=t.data||[];u("emitting event %j",e),null!=t.id&&(u("attaching ack callback to event"),e.push(this.ack(t.id))),this.connected?l.apply(this,e):this.receiveBuffer.push(e)},r.prototype.ack=function(t){var e=this,n=!1;return function(){if(!n){n=!0;var r=a(arguments);u("sending ack %j",r),e.packet({type:i.ACK,id:t,data:r})}}},r.prototype.onack=function(t){var e=this.acks[t.id];"function"==typeof e?(u("calling ack %s with %j",t.id,t.data),e.apply(this,t.data),delete this.acks[t.id]):u("bad ack %s",t.id)},r.prototype.onconnect=function(){this.connected=!0,this.disconnected=!1,this.emit("connect"),this.emitBuffered()},r.prototype.emitBuffered=function(){var t;for(t=0;t<this.receiveBuffer.length;t++)l.apply(this,this.receiveBuffer[t]);for(this.receiveBuffer=[],t=0;t<this.sendBuffer.length;t++)this.packet(this.sendBuffer[t]);this.sendBuffer=[]},r.prototype.ondisconnect=function(){u("server disconnect (%s)",this.nsp),this.destroy(),this.onclose("io server disconnect")},r.prototype.destroy=function(){if(this.subs){for(var t=0;t<this.subs.length;t++)this.subs[t].destroy();this.subs=null}this.io.destroy(this)},r.prototype.close=r.prototype.disconnect=function(){return this.connected&&(u("performing disconnect (%s)",this.nsp),this.packet({type:i.DISCONNECT})),this.destroy(),this.connected&&this.onclose("io client disconnect"),this},r.prototype.compress=function(t){return this.flags=this.flags||{},this.flags.compress=t,this}},function(t,e){function n(t,e){var n=[];e=e||0;for(var r=e||0;r<t.length;r++)n[r-e]=t[r];return n}t.exports=n},function(t,e){"use strict";function n(t,e,n){return t.on(e,n),{destroy:function(){t.removeListener(e,n)}}}t.exports=n},function(t,e){var n=[].slice;t.exports=function(t,e){if("string"==typeof e&&(e=t[e]),"function"!=typeof e)throw new Error("bind() requires a function");var r=n.call(arguments,2);return function(){return e.apply(t,r.concat(n.call(arguments)))}}},function(t,e){function n(t){t=t||{},this.ms=t.min||100,this.max=t.max||1e4,this.factor=t.factor||2,this.jitter=t.jitter>0&&t.jitter<=1?t.jitter:0,this.attempts=0}t.exports=n,n.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),n=Math.floor(e*this.jitter*t);t=0==(1&Math.floor(10*e))?t-n:t+n}return 0|Math.min(t,this.max)},n.prototype.reset=function(){this.attempts=0},n.prototype.setMin=function(t){this.ms=t},n.prototype.setMax=function(t){this.max=t},n.prototype.setJitter=function(t){this.jitter=t}}])});
78
//# sourceMappingURL=socket.io.js.map
79
/*----------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
80
81
/*! paytmOauth 2020-02-11 */
82
83
!function(e,t,n){"use strict";function r(e,t){return t=t||Error,function(){var n,r,o,i=arguments[0],a=arguments;for(n=(n="["+(e?e+":":"")+i+"] "+arguments[1].replace(/\{\d+\}/g,function(e){var t,n=+e.slice(1,-1);return n+2<a.length?"function"==typeof(t=a[n+2])?t.toString().replace(/ ?\{[\s\S]*$/,""):void 0===t?"undefined":"string"!=typeof t?re(t):t:e}))+"\nhttp://errors.angularjs.org/1.3.0/"+(e?e+"/":"")+i,r=2;r<arguments.length;r++)n=n+(2==r?"?":"&")+"p"+(r-2)+"="+encodeURIComponent("function"==typeof(o=arguments[r])?o.toString().replace(/ \{[\s\S]*$/,""):void 0===o?"undefined":"string"!=typeof o?JSON.stringify(o):o);return new t(n)}}var o=/^\/(.+)\/([a-z]*)$/,i="validity",a=function(e){return I(e)?e.toLowerCase():e},s=Object.prototype.hasOwnProperty,l=function(e){return I(e)?e.toUpperCase():e};"i"!=="I".toLowerCase()&&(a=function(e){return I(e)?e.replace(/[A-Z]/g,function(e){return String.fromCharCode(32|e.charCodeAt(0))}):e},l=function(e){return I(e)?e.replace(/[a-z]/g,function(e){return String.fromCharCode(-33&e.charCodeAt(0))}):e});var c,d,u,m,f=[].slice,p=[].splice,h=[].push,g=Object.prototype.toString,v=r("ng"),b=e.angular||(e.angular={}),$=0;function E(e){if(null==e||B(e))return!1;var t=e.length;return!(e.nodeType!==xe||!t)||(I(e)||R(e)||0===t||"number"==typeof t&&t>0&&t-1 in e)}function y(e,t,n){var r,o;if(e)if(F(e))for(r in e)"prototype"==r||"length"==r||"name"==r||e.hasOwnProperty&&!e.hasOwnProperty(r)||t.call(n,e[r],r,e);else if(R(e)||E(e)){var i="object"!=typeof e;for(r=0,o=e.length;r<o;r++)(i||r in e)&&t.call(n,e[r],r,e)}else if(e.forEach&&e.forEach!==y)e.forEach(t,n,e);else for(r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r,e);return e}function w(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t.sort()}function C(e){return function(t,n){e(n,t)}}function M(){return++$}function T(e,t){t?e.$$hashKey=t:delete e.$$hashKey}function x(e){for(var t=e.$$hashKey,n=1,r=arguments.length;n<r;n++){var o=arguments[n];if(o)for(var i=Object.keys(o),a=0,s=i.length;a<s;a++){var l=i[a];e[l]=o[l]}}return T(e,t),e}function k(e){return parseInt(e,10)}function A(e,t){return x(new(x(function(){},{prototype:e})),t)}function S(){}function _(e){return e}function P(e){return function(){return e}}function N(e){return void 0===e}function D(e){return void 0!==e}function L(e){return null!==e&&"object"==typeof e}function I(e){return"string"==typeof e}function O(e){return"number"==typeof e}function H(e){return"[object Date]"===g.call(e)}c=t.documentMode,S.$inject=[],_.$inject=[];var R=Array.isArray;function F(e){return"function"==typeof e}function V(e){return"[object RegExp]"===g.call(e)}function B(e){return e&&e.window===e}function U(e){return e&&e.$evalAsync&&e.$watch}function j(e){return"boolean"==typeof e}function q(e){return e&&F(e.then)}var W=function(e){return I(e)?e.trim():e};function K(e){return!(!e||!(e.nodeName||e.prop&&e.attr&&e.find))}function z(e){return a(e.nodeName||e[0].nodeName)}function Y(e,t){var n=e.indexOf(t);return n>=0&&e.splice(n,1),t}function G(e,t,n,r){if(B(e)||U(e))throw v("cpws","Can't copy! Making copies of Window or Scope instances is not supported.");if(t){if(e===t)throw v("cpi","Can't copy! Source and destination are identical.");if(n=n||[],r=r||[],L(e)){var o=n.indexOf(e);if(-1!==o)return r[o];n.push(e),r.push(t)}var i;if(R(e)){t.length=0;for(var a=0;a<e.length;a++)i=G(e[a],null,n,r),L(e[a])&&(n.push(e[a]),r.push(i)),t.push(i)}else{var s=t.$$hashKey;for(var l in R(t)?t.length=0:y(t,function(e,n){delete t[n]}),e)e.hasOwnProperty(l)&&(i=G(e[l],null,n,r),L(e[l])&&(n.push(e[l]),r.push(i)),t[l]=i);T(t,s)}}else if(t=e,e)if(R(e))t=G(e,[],n,r);else if(H(e))t=new Date(e.getTime());else if(V(e))(t=new RegExp(e.source,e.toString().match(/[^\/]*$/)[0])).lastIndex=e.lastIndex;else if(L(e)){var c=Object.create(Object.getPrototypeOf(e));t=G(e,c,n,r)}return t}function Q(e,t){if(R(e)){t=t||[];for(var n=0,r=e.length;n<r;n++)t[n]=e[n]}else if(L(e))for(var o in t=t||{},e)"$"===o.charAt(0)&&"$"===o.charAt(1)||(t[o]=e[o]);return t||e}function Z(e,t){if(e===t)return!0;if(null===e||null===t)return!1;if(e!=e&&t!=t)return!0;var r,o,i,a=typeof e;if(a==typeof t&&"object"==a){if(!R(e)){if(H(e))return!!H(t)&&Z(e.getTime(),t.getTime());if(V(e)&&V(t))return e.toString()==t.toString();if(U(e)||U(t)||B(e)||B(t)||R(t))return!1;for(o in i={},e)if("$"!==o.charAt(0)&&!F(e[o])){if(!Z(e[o],t[o]))return!1;i[o]=!0}for(o in t)if(!i.hasOwnProperty(o)&&"$"!==o.charAt(0)&&t[o]!==n&&!F(t[o]))return!1;return!0}if(!R(t))return!1;if((r=e.length)==t.length){for(o=0;o<r;o++)if(!Z(e[o],t[o]))return!1;return!0}}return!1}var X=function(){if(D(X.isActive_))return X.isActive_;var e=!(!t.querySelector("[ng-csp]")&&!t.querySelector("[data-ng-csp]"));if(!e)try{new Function("")}catch(t){e=!0}return X.isActive_=e};function J(e,t,n){return e.concat(f.call(t,n))}function ee(e,t){return f.call(e,t||0)}function te(e,t){var n=arguments.length>2?ee(arguments,2):[];return!F(t)||t instanceof RegExp?t:n.length?function(){return arguments.length?t.apply(e,n.concat(f.call(arguments,0))):t.apply(e,n)}:function(){return arguments.length?t.apply(e,arguments):t.call(e)}}function ne(e,r){var o=r;return"string"==typeof e&&"$"===e.charAt(0)&&"$"===e.charAt(1)?o=n:B(r)?o="$WINDOW":r&&t===r?o="$DOCUMENT":U(r)&&(o="$SCOPE"),o}function re(e,t){return void 0===e?n:JSON.stringify(e,ne,t?" ":null)}function oe(e){return I(e)?JSON.parse(e):e}function ie(e){e=d(e).clone();try{e.empty()}catch(e){}var t=d("<div>").append(e).html();try{return e[0].nodeType===ke?a(t):t.match(/^(<[^>]+>)/)[1].replace(/^<([\w\-]+)/,function(e,t){return"<"+a(t)})}catch(e){return a(t)}}function ae(e){try{return decodeURIComponent(e)}catch(e){}}function se(e){var t,n,r={};return y((e||"").split("&"),function(e){if(e&&(t=e.replace(/\+/g,"%20").split("="),D(n=ae(t[0])))){var o=!D(t[1])||ae(t[1]);s.call(r,n)?R(r[n])?r[n].push(o):r[n]=[r[n],o]:r[n]=o}}),r}function le(e){var t=[];return y(e,function(e,n){R(e)?y(e,function(e){t.push(de(n,!0)+(!0===e?"":"="+de(e,!0)))}):t.push(de(n,!0)+(!0===e?"":"="+de(e,!0)))}),t.length?t.join("&"):""}function ce(e){return de(e,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function de(e,t){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%20/g,t?"%20":"+")}var ue=["ng-","data-ng-","ng:","x-ng-"];function me(e,t){var n,r,o={};y(ue,function(t){var o=t+"app";!n&&e.hasAttribute&&e.hasAttribute(o)&&(n=e,r=e.getAttribute(o))}),y(ue,function(t){var o,i=t+"app";!n&&(o=e.querySelector("["+i.replace(":","\\:")+"]"))&&(n=o,r=o.getAttribute(i))}),n&&(o.strictDi=null!==function(e,t){var n,r,o=ue.length;for(e=d(e),r=0;r<o;++r)if(n=ue[r]+t,I(n=e.attr(n)))return n;return null}(n,"strict-di"),t(n,r?[r]:[],o))}function fe(n,r,o){L(o)||(o={});o=x({strictDi:!1},o);var i=function(){if((n=d(n)).injector()){var e=n[0]===t?"document":ie(n);throw v("btstrpd","App Already Bootstrapped with this Element '{0}'",e.replace(/</,"&lt;").replace(/>/,"&gt;"))}(r=r||[]).unshift(["$provide",function(e){e.value("$rootElement",n)}]),o.debugInfoEnabled&&r.push(["$compileProvider",function(e){e.debugInfoEnabled(!0)}]),r.unshift("ng");var i=Ct(r,o.strictDi);return i.invoke(["$rootScope","$rootElement","$compile","$injector",function(e,t,n,r){e.$apply(function(){t.data("$injector",r),n(t)(e)})}]),i},a=/^NG_ENABLE_DEBUG_INFO!/,s=/^NG_DEFER_BOOTSTRAP!/;if(e&&a.test(e.name)&&(o.debugInfoEnabled=!0,e.name=e.name.replace(a,"")),e&&!s.test(e.name))return i();e.name=e.name.replace(s,""),b.resumeBootstrap=function(e){y(e,function(e){r.push(e)}),i()}}function pe(){e.name="NG_ENABLE_DEBUG_INFO!"+e.name,e.location.reload()}function he(e){return b.element(e).injector().get("$$testability")}var ge=/[A-Z]/g;function ve(e,t){return t=t||"_",e.replace(ge,function(e,n){return(n?t:"")+e.toLowerCase()})}var be,$e=!1;function Ee(e,t,n){if(!e)throw v("areq","Argument '{0}' is {1}",t||"?",n||"required");return e}function ye(e,t,n){return n&&R(e)&&(e=e[e.length-1]),Ee(F(e),t,"not a function, got "+(e&&"object"==typeof e?e.constructor.name||"Object":typeof e)),e}function we(e,t){if("hasOwnProperty"===e)throw v("badname","hasOwnProperty is not a valid {0} name",t)}function Ce(e,t,n){if(!t)return e;for(var r,o=t.split("."),i=e,a=o.length,s=0;s<a;s++)r=o[s],e&&(e=(i=e)[r]);return!n&&F(e)?te(i,e):e}function Me(e){var t=e[0],n=e[e.length-1],r=[t];do{if(!(t=t.nextSibling))break;r.push(t)}while(t!==n);return d(r)}function Te(){return Object.create(null)}var xe=1,ke=3,Ae=8,Se=9,_e=11;var Pe={full:"1.3.0",major:1,minor:3,dot:0,codeName:"superluminal-nudge"};Ge.expando="ng339";var Ne=Ge.cache={},De=1,Le=function(e,t,n){e.addEventListener(t,n,!1)},Ie=function(e,t,n){e.removeEventListener(t,n,!1)};Ge._data=function(e){return this.cache[e[this.expando]]||{}};var Oe=/([\:\-\_]+(.))/g,He=/^moz([A-Z])/,Re={mouseleave:"mouseout",mouseenter:"mouseover"},Fe=r("jqLite");function Ve(e){return e.replace(Oe,function(e,t,n,r){return r?n.toUpperCase():n}).replace(He,"Moz$1")}var Be=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,Ue=/<|&#?\w+;/,je=/<([\w:]+)/,qe=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,We={option:[1,'<select multiple="multiple">',"</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function Ke(e){return!Ue.test(e)}function ze(e){var t=e.nodeType;return t===xe||!t||t===Se}function Ye(e,t){var n,r,o,i,a=t.createDocumentFragment(),s=[];if(Ke(e))s.push(t.createTextNode(e));else{for(n=n||a.appendChild(t.createElement("div")),r=(je.exec(e)||["",""])[1].toLowerCase(),o=We[r]||We._default,n.innerHTML=o[1]+e.replace(qe,"<$1></$2>")+o[2],i=o[0];i--;)n=n.lastChild;s=J(s,n.childNodes),(n=a.firstChild).textContent=""}return a.textContent="",a.innerHTML="",y(s,function(e){a.appendChild(e)}),a}function Ge(e){if(e instanceof Ge)return e;var n,r,o,i;if(I(e)&&(e=W(e),n=!0),!(this instanceof Ge)){if(n&&"<"!=e.charAt(0))throw Fe("nosel","Looking up elements via selectors is not supported by jqLite! See: http://docs.angularjs.org/api/angular.element");return new Ge(e)}it(this,n?(r=e,o=o||t,(i=Be.exec(r))?[o.createElement(i[1])]:(i=Ye(r,o))?i.childNodes:[]):e)}function Qe(e){return e.cloneNode(!0)}function Ze(e,t){if(t||Je(e),e.querySelectorAll)for(var n=e.querySelectorAll("*"),r=0,o=n.length;r<o;r++)Je(n[r])}function Xe(e,t,n,r){if(D(r))throw Fe("offargs","jqLite#off() does not support the `selector` argument");var o=et(e),i=o&&o.events,a=o&&o.handle;if(a)if(t)y(t.split(" "),function(t){if(D(n)){var r=i[t];if(Y(r||[],n),r&&r.length>0)return}Ie(e,t,a),delete i[t]});else for(t in i)"$destroy"!==t&&Ie(e,t,a),delete i[t]}function Je(e,t){var r=e.ng339,o=r&&Ne[r];if(o){if(t)return void delete o.data[t];o.handle&&(o.events.$destroy&&o.handle({},"$destroy"),Xe(e)),delete Ne[r],e.ng339=n}}function et(e,t){var r=e.ng339,o=r&&Ne[r];return t&&!o&&(e.ng339=r=++De,o=Ne[r]={events:{},data:{},handle:n}),o}function tt(e,t,n){if(ze(e)){var r=D(n),o=!r&&t&&!L(t),i=!t,a=et(e,!o),s=a&&a.data;if(r)s[t]=n;else{if(i)return s;if(o)return s&&s[t];x(s,t)}}}function nt(e,t){return!!e.getAttribute&&(" "+(e.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").indexOf(" "+t+" ")>-1}function rt(e,t){t&&e.setAttribute&&y(t.split(" "),function(t){e.setAttribute("class",W((" "+(e.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").replace(" "+W(t)+" "," ")))})}function ot(e,t){if(t&&e.setAttribute){var n=(" "+(e.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ");y(t.split(" "),function(e){e=W(e),-1===n.indexOf(" "+e+" ")&&(n+=e+" ")}),e.setAttribute("class",W(n))}}function it(e,t){if(t)if(t.nodeType)e[e.length++]=t;else{var n=t.length;if("number"==typeof n&&t.window!==t){if(n)for(var r=0;r<n;r++)e[e.length++]=t[r]}else e[e.length++]=t}}function at(e,t){return st(e,"$"+(t||"ngController")+"Controller")}function st(e,t,r){e.nodeType==Se&&(e=e.documentElement);for(var o=R(t)?t:[t];e;){for(var i=0,a=o.length;i<a;i++)if((r=d.data(e,o[i]))!==n)return r;e=e.parentNode||e.nodeType===_e&&e.host}}function lt(e){for(Ze(e,!0);e.firstChild;)e.removeChild(e.firstChild)}function ct(e,t){t||Ze(e);var n=e.parentNode;n&&n.removeChild(e)}We.optgroup=We.option,We.tbody=We.tfoot=We.colgroup=We.caption=We.thead,We.th=We.td;var dt=Ge.prototype={ready:function(n){var r=!1;function o(){r||(r=!0,n())}"complete"===t.readyState?setTimeout(o):(this.on("DOMContentLoaded",o),Ge(e).on("load",o),this.on("DOMContentLoaded",o))},toString:function(){var e=[];return y(this,function(t){e.push(""+t)}),"["+e.join(", ")+"]"},eq:function(e){return d(e>=0?this[e]:this[this.length+e])},length:0,push:h,sort:[].sort,splice:[].splice},ut={};y("multiple,selected,checked,disabled,readOnly,required,open".split(","),function(e){ut[a(e)]=e});var mt={};y("input,select,option,textarea,button,form,details".split(","),function(e){mt[e]=!0});var ft={ngMinlength:"minlength",ngMaxlength:"maxlength",ngMin:"min",ngMax:"max",ngPattern:"pattern"};function pt(e,t){var n=ut[t.toLowerCase()];return n&&mt[z(e)]&&n}function ht(e,t){var n=e&&e.$$hashKey;if(n)return"function"==typeof n&&(n=e.$$hashKey()),n;var r=typeof e;return n="function"==r||"object"==r&&null!==e?e.$$hashKey=r+":"+(t||M)():r+":"+e}function gt(e,t){if(t){var n=0;this.nextUid=function(){return++n}}y(e,this.put,this)}y({data:tt,removeData:Je},function(e,t){Ge[t]=e}),y({data:tt,inheritedData:st,scope:function(e){return d.data(e,"$scope")||st(e.parentNode||e,["$isolateScope","$scope"])},isolateScope:function(e){return d.data(e,"$isolateScope")||d.data(e,"$isolateScopeNoTemplate")},controller:at,injector:function(e){return st(e,"$injector")},removeAttr:function(e,t){e.removeAttribute(t)},hasClass:nt,css:function(e,t,n){if(t=Ve(t),!D(n))return e.style[t];e.style[t]=n},attr:function(e,t,r){var o=a(t);if(ut[o]){if(!D(r))return e[t]||(e.attributes.getNamedItem(t)||S).specified?o:n;r?(e[t]=!0,e.setAttribute(t,o)):(e[t]=!1,e.removeAttribute(o))}else if(D(r))e.setAttribute(t,r);else if(e.getAttribute){var i=e.getAttribute(t,2);return null===i?n:i}},prop:function(e,t,n){if(!D(n))return e[t];e[t]=n},text:function(){return e.$dv="",e;function e(e,t){if(N(t)){var n=e.nodeType;return n===xe||n===ke?e.textContent:""}e.textContent=t}}(),val:function(e,t){if(N(t)){if(e.multiple&&"select"===z(e)){var n=[];return y(e.options,function(e){e.selected&&n.push(e.value||e.text)}),0===n.length?null:n}return e.value}e.value=t},html:function(e,t){if(N(t))return e.innerHTML;Ze(e,!0),e.innerHTML=t},empty:lt},function(e,t){Ge.prototype[t]=function(t,r){var o,i,a=this.length;if(e!==lt&&(2==e.length&&e!==nt&&e!==at?t:r)===n){if(L(t)){for(o=0;o<a;o++)if(e===tt)e(this[o],t);else for(i in t)e(this[o],i,t[i]);return this}for(var s=e.$dv,l=s===n?Math.min(a,1):a,c=0;c<l;c++){var d=e(this[c],t,r);s=s?s+d:d}return s}for(o=0;o<a;o++)e(this[o],t,r);return this}}),y({removeData:Je,on:function e(t,n,r,o){if(D(o))throw Fe("onargs","jqLite#on() does not support the `selector` or `eventData` parameters");if(ze(t)){var i=et(t,!0),a=i.events,s=i.handle;s||(s=i.handle=function(e,t){var n=function(n,r){n.isDefaultPrevented=function(){return n.defaultPrevented};var o=t[r||n.type],i=o?o.length:0;if(i){if(N(n.immediatePropagationStopped)){var a=n.stopImmediatePropagation;n.stopImmediatePropagation=function(){n.immediatePropagationStopped=!0,n.stopPropagation&&n.stopPropagation(),a&&a.call(n)}}n.isImmediatePropagationStopped=function(){return!0===n.immediatePropagationStopped},i>1&&(o=Q(o));for(var s=0;s<i;s++)n.isImmediatePropagationStopped()||o[s].call(e,n)}};return n.elem=e,n}(t,a));for(var l=n.indexOf(" ")>=0?n.split(" "):[n],c=l.length;c--;){var d=a[n=l[c]];d||(a[n]=[],"mouseenter"===n||"mouseleave"===n?e(t,Re[n],function(e){var t=e.relatedTarget;t&&(t===this||this.contains(t))||s(e,n)}):"$destroy"!==n&&Le(t,n,s),d=a[n]),d.push(r)}}},off:Xe,one:function(e,t,n){(e=d(e)).on(t,function r(){e.off(t,n),e.off(t,r)}),e.on(t,n)},replaceWith:function(e,t){var n,r=e.parentNode;Ze(e),y(new Ge(t),function(t){n?r.insertBefore(t,n.nextSibling):r.replaceChild(t,e),n=t})},children:function(e){var t=[];return y(e.childNodes,function(e){e.nodeType===xe&&t.push(e)}),t},contents:function(e){return e.contentDocument||e.childNodes||[]},append:function(e,t){var n=e.nodeType;if(n===xe||n===_e)for(var r=0,o=(t=new Ge(t)).length;r<o;r++){var i=t[r];e.appendChild(i)}},prepend:function(e,t){if(e.nodeType===xe){var n=e.firstChild;y(new Ge(t),function(t){e.insertBefore(t,n)})}},wrap:function(e,t){t=d(t).eq(0).clone()[0];var n=e.parentNode;n&&n.replaceChild(t,e),t.appendChild(e)},remove:ct,detach:function(e){ct(e,!0)},after:function(e,t){for(var n=e,r=e.parentNode,o=0,i=(t=new Ge(t)).length;o<i;o++){var a=t[o];r.insertBefore(a,n.nextSibling),n=a}},addClass:ot,removeClass:rt,toggleClass:function(e,t,n){t&&y(t.split(" "),function(t){var r=n;N(r)&&(r=!nt(e,t)),(r?ot:rt)(e,t)})},parent:function(e){var t=e.parentNode;return t&&t.nodeType!==_e?t:null},next:function(e){return e.nextElementSibling},find:function(e,t){return e.getElementsByTagName?e.getElementsByTagName(t):[]},clone:Qe,triggerHandler:function(e,t,n){var r,o,i,a=t.type||t,s=et(e),l=s&&s.events,c=l&&l[a];c&&(r={preventDefault:function(){this.defaultPrevented=!0},isDefaultPrevented:function(){return!0===this.defaultPrevented},stopImmediatePropagation:function(){this.immediatePropagationStopped=!0},isImmediatePropagationStopped:function(){return!0===this.immediatePropagationStopped},stopPropagation:S,type:a,target:e},t.type&&(r=x(r,t)),o=Q(c),i=n?[r].concat(n):[r],y(o,function(t){r.isImmediatePropagationStopped()||t.apply(e,i)}))}},function(e,t){Ge.prototype[t]=function(t,n,r){for(var o,i=0,a=this.length;i<a;i++)N(o)?D(o=e(this[i],t,n,r))&&(o=d(o)):it(o,e(this[i],t,n,r));return D(o)?o:this},Ge.prototype.bind=Ge.prototype.on,Ge.prototype.unbind=Ge.prototype.off}),gt.prototype={put:function(e,t){this[ht(e,this.nextUid)]=t},get:function(e){return this[ht(e,this.nextUid)]},remove:function(e){var t=this[e=ht(e,this.nextUid)];return delete this[e],t}};var vt=/^function\s*[^\(]*\(\s*([^\)]*)\)/m,bt=/,/,$t=/^\s*(_?)(\S+?)\1\s*$/,Et=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm,yt=r("$injector");function wt(e,t,n){var r,o;if("function"==typeof e){if(!(r=e.$inject)){if(r=[],e.length){if(t)throw I(n)&&n||(n=e.name||function(e){var t=e.toString().replace(Et,"").match(vt);return t?"function("+(t[1]||"").replace(/[\s\r\n]+/," ")+")":"fn"}(e)),yt("strictdi","{0} is not using explicit annotation and cannot be invoked in strict mode",n);y(e.toString().replace(Et,"").match(vt)[1].split(bt),function(e){e.replace($t,function(e,t,n){r.push(n)})})}e.$inject=r}}else R(e)?(ye(e[o=e.length-1],"fn"),r=e.slice(0,o)):ye(e,"fn",!0);return r}function Ct(e,t){t=!0===t;var r={},o="Provider",i=[],a=new gt([],!0),s={$provide:{provider:u(f),factory:u(p),service:u(function(e,t){return p(e,["$injector",function(e){return e.instantiate(t)}])}),value:u(function(e,t){return p(e,P(t),!1)}),constant:u(function(e,t){we(e,"constant"),s[e]=t,c[e]=t}),decorator:function(e,t){var n=l.get(e+o),r=n.$get;n.$get=function(){var e=d.invoke(r,n);return d.invoke(t,null,{$delegate:e})}}}},l=s.$injector=h(s,function(){throw yt("unpr","Unknown provider: {0}",i.join(" <- "))}),c={},d=c.$injector=h(c,function(e){var t=l.get(e+o);return d.invoke(t.$get,t,n,e)});return y(function e(t){var n,r=[];y(t,function(t){if(!a.get(t)){a.put(t,!0);try{I(t)?(n=m(t),r=r.concat(e(n.requires)).concat(n._runBlocks),o(n._invokeQueue),o(n._configBlocks)):F(t)?r.push(l.invoke(t)):R(t)?r.push(l.invoke(t)):ye(t,"module")}catch(e){throw R(t)&&(t=t[t.length-1]),e.message&&e.stack&&-1==e.stack.indexOf(e.message)&&(e=e.message+"\n"+e.stack),yt("modulerr","Failed to instantiate module {0} due to:\n{1}",t,e.stack||e.message||e)}}function o(e){var t,n;for(t=0,n=e.length;t<n;t++){var r=e[t],o=l.get(r[0]);o[r[1]].apply(o,r[2])}}});return r}(e),function(e){d.invoke(e||S)}),d;function u(e){return function(t,n){if(!L(t))return e(t,n);y(t,C(e))}}function f(e,t){if(we(e,"service"),(F(t)||R(t))&&(t=l.instantiate(t)),!t.$get)throw yt("pget","Provider '{0}' must define $get factory method.",e);return s[e+o]=t}function p(e,t,r){return f(e,{$get:!1!==r?function(e,t){return function(){var r=d.invoke(t,this,n,e);if(N(r))throw yt("undef","Provider '{0}' must return a value from $get factory method.",e);return r}}(e,t):t})}function h(e,n){function a(t){if(e.hasOwnProperty(t)){if(e[t]===r)throw yt("cdep","Circular dependency found: {0}",t+" <- "+i.join(" <- "));return e[t]}try{return i.unshift(t),e[t]=r,e[t]=n(t)}catch(n){throw e[t]===r&&delete e[t],n}finally{i.shift()}}function l(e,n,r,o){"string"==typeof r&&(o=r,r=null);var i,s,l,c=[],d=wt(e,t,o);for(s=0,i=d.length;s<i;s++){if("string"!=typeof(l=d[s]))throw yt("itkn","Incorrect injection token! Expected service name as string, got {0}",l);c.push(r&&r.hasOwnProperty(l)?r[l]:a(l))}return R(e)&&(e=e[i]),e.apply(n,c)}return{invoke:l,instantiate:function(e,t,n){var r,o,i=function(){};return i.prototype=(R(e)?e[e.length-1]:e).prototype,L(o=l(e,r=new i,t,n))||F(o)?o:r},get:a,annotate:wt,has:function(t){return s.hasOwnProperty(t+o)||e.hasOwnProperty(t)}}}}function Mt(){var t=!0;this.disableAutoScrolling=function(){t=!1},this.$get=["$window","$location","$rootScope",function(n,r,o){var i=n.document;function a(e){if(e){e.scrollIntoView();var t=function(){var e=s.yOffset;if(F(e))e=e();else if(K(e)){var t=e[0];e="fixed"!==n.getComputedStyle(t).position?0:t.getBoundingClientRect().bottom}else O(e)||(e=0);return e}();if(t){var r=e.getBoundingClientRect().top;n.scrollBy(0,r-t)}}else n.scrollTo(0,0)}function s(){var e,t,n,o=r.hash();o?(e=i.getElementById(o))?a(e):(t=i.getElementsByName(o),n=null,Array.prototype.some.call(t,function(e){if("a"===z(e))return n=e,!0}),(e=n)?a(e):"top"===o&&a(null)):a(null)}return t&&o.$watch(function(){return r.hash()},function(t,n){var r,i;t===n&&""===t||(r=function(){o.$evalAsync(s)},"complete"===(i=i||e).document.readyState?i.setTimeout(r):d(i).on("load",r))}),s}]}Ct.$$annotate=wt;var Tt=r("$animate"),xt=["$provide",function(e){this.$$selectors={},this.register=function(t,n){var r=t+"-animation";if(t&&"."!=t.charAt(0))throw Tt("notcsel","Expecting class selector starting with '.' got '{0}'.",t);this.$$selectors[t.substr(1)]=r,e.factory(r,n)},this.classNameFilter=function(e){return 1===arguments.length&&(this.$$classNameFilter=e instanceof RegExp?e:null),this.$$classNameFilter},this.$get=["$$q","$$asyncCallback","$rootScope",function(e,t,n){var r;function o(e,t,n){for(var r=0,o=t.length;r<o;++r){e[t[r]]=n}}function i(){return r||(r=e.defer(),t(function(){r.resolve(),r=null})),r.promise}function a(e,t){if(b.isObject(t)){var n=x(t.from||{},t.to||{});e.css(n)}}return{animate:function(e,t,n){return a(e,{from:t,to:n}),i()},enter:function(e,t,n,r){return a(e,r),n?n.after(e):t.prepend(e),i()},leave:function(e,t){return e.remove(),i()},move:function(e,t,n,r){return this.enter(e,t,n,r)},addClass:function(e,t,n){return this.setClass(e,t,[],n)},$$addClassImmediately:function(e,t,n){return e=d(e),t=I(t)?t:R(t)?t.join(" "):"",y(e,function(e){ot(e,t)}),a(e,n),i()},removeClass:function(e,t,n){return this.setClass(e,[],t,n)},$$removeClassImmediately:function(e,t,n){return e=d(e),t=I(t)?t:R(t)?t.join(" "):"",y(e,function(e){rt(e,t)}),a(e,n),i()},setClass:function(t,r,i,a){var s=this,l=!1,c=(t=d(t)).data("$$animateClasses");c?a&&c.options&&(c.options=b.extend(c.options||{},a)):(c={classes:{},options:a},l=!0);var u,m,f,p=c.classes;return r=R(r)?r:r.split(" "),i=R(i)?i:i.split(" "),o(p,r,!0),o(p,i,!1),l&&(c.promise=(u=function(e){var n=t.data("$$animateClasses");if(t.removeData("$$animateClasses"),n){var r=function(e,t){var n=[],r=[],o=Te();return y((e.attr("class")||"").split(/\s+/),function(e){o[e]=!0}),y(t,function(e,t){var i=o[t];!1===e&&i?r.push(t):!0!==e||i||n.push(t)}),n.length+r.length>0&&[n.length?n:null,r.length?r:null]}(t,n.classes);r&&s.$$setClassImmediately(t,r[0],r[1],n.options)}e()},(f=e.defer()).promise.$$cancelFn=function(){m&&m()},n.$$postDigest(function(){m=u(function(){f.resolve()})}),f.promise),t.data("$$animateClasses",c)),c.promise},$$setClassImmediately:function(e,t,n,r){return t&&this.$$addClassImmediately(e,t),n&&this.$$removeClassImmediately(e,n),a(e,r),i()},enabled:S,cancel:S}}]}];function kt(){this.$get=["$$rAF","$timeout",function(e,t){return e.supported?function(t){return e(t)}:function(e){return t(e,0,!1)}}]}function At(e,t,r,o){var i=this,a=t[0],s=e.location,l=e.history,c=e.setTimeout,u=e.clearTimeout,m={};i.isMock=!1;var f=0,p=[];function h(e){try{e.apply(null,ee(arguments,1))}finally{if(0===--f)for(;p.length;)try{p.pop()()}catch(e){r.error(e)}}}i.$$completeOutstandingRequest=h,i.$$incOutstandingRequestCount=function(){f++},i.notifyWhenNoOutstandingRequests=function(e){y(v,function(e){e()}),0===f?e():p.push(e)};var g,v=[];i.addPollFn=function(e){return N(g)&&function(e,t){!function n(){y(v,function(e){e()}),g=t(n,e)}()}(100,c),v.push(e),e};var b,$,E=s.href,w=t.find("base"),C=null;A(),$=b,i.url=function(t,n,r){if(N(r)&&(r=null),s!==e.location&&(s=e.location),l!==e.history&&(l=e.history),t){var a=$===r;if(E===t&&(!o.history||a))return;var c=E&&an(E)===an(t);return E=t,$=r,!o.history||c&&a?(c||(C=t),n?s.replace(t):s.href=t):(l[n?"replaceState":"pushState"](r,"",t),A(),$=b),i}return C||s.href.replace(/%27/g,"'")},i.state=function(){return b};var M=[],T=!1;function x(){A(),_()}var k=null;function A(){Z(b=N(b=e.history.state)?null:b,k)&&(b=k),k=b}function _(){E===i.url()&&$===b||(E=i.url(),$=b,y(M,function(e){e(i.url(),b)}))}i.onUrlChange=function(t){return T||(o.history&&d(e).on("popstate",x),d(e).on("hashchange",x),T=!0),M.push(t),t},i.$$checkUrlChange=_,i.baseHref=function(){var e=w.attr("href");return e?e.replace(/^(https?\:)?\/\/[^\/]*/,""):""};var P={},D="",L=i.baseHref();function O(e){try{return decodeURIComponent(e)}catch(t){return e}}i.cookies=function(e,t){var o,i,s,l,c;if(!e){if(a.cookie!==D)for(i=(D=a.cookie).split("; "),P={},l=0;l<i.length;l++)(c=(s=i[l]).indexOf("="))>0&&(e=O(s.substring(0,c)),P[e]===n&&(P[e]=O(s.substring(c+1))));return P}t===n?a.cookie=encodeURIComponent(e)+"=;path="+L+";expires=Thu, 01 Jan 1970 00:00:00 GMT":I(t)&&(o=(a.cookie=encodeURIComponent(e)+"="+encodeURIComponent(t)+";path="+L).length+1)>4096&&r.warn("Cookie '"+e+"' possibly not set or overflowed because it was too large ("+o+" > 4096 bytes)!")},i.defer=function(e,t){var n;return f++,n=c(function(){delete m[n],h(e)},t||0),m[n]=!0,n},i.defer.cancel=function(e){return!!m[e]&&(delete m[e],u(e),h(S),!0)}}function St(){this.$get=["$window","$log","$sniffer","$document",function(e,t,n,r){return new At(e,r,t,n)}]}function _t(){this.$get=function(){var e={};function t(t,n){if(t in e)throw r("$cacheFactory")("iid","CacheId '{0}' is already taken!",t);var o=0,i=x({},n,{id:t}),a={},s=n&&n.capacity||Number.MAX_VALUE,l={},c=null,d=null;return e[t]={put:function(e,t){s<Number.MAX_VALUE&&u(l[e]||(l[e]={key:e}));if(!N(t))return e in a||o++,a[e]=t,o>s&&this.remove(d.key),t},get:function(e){if(s<Number.MAX_VALUE){var t=l[e];if(!t)return;u(t)}return a[e]},remove:function(e){if(s<Number.MAX_VALUE){var t=l[e];if(!t)return;t==c&&(c=t.p),t==d&&(d=t.n),m(t.n,t.p),delete l[e]}delete a[e],o--},removeAll:function(){a={},o=0,l={},c=d=null},destroy:function(){a=null,i=null,l=null,delete e[t]},info:function(){return x({},i,{size:o})}};function u(e){e!=c&&(d?d==e&&(d=e.n):d=e,m(e.n,e.p),m(e,c),(c=e).n=null)}function m(e,t){e!=t&&(e&&(e.p=t),t&&(t.n=e))}}return t.info=function(){var t={};return y(e,function(e,n){t[n]=e.info()}),t},t.get=function(t){return e[t]},t}}function Pt(){this.$get=["$cacheFactory",function(e){return e("templates")}]}var Nt=r("$compile");function Dt(e,r){var o={},i="Directive",s=/^\s*directive\:\s*([\d\w_\-]+)\s+(.*)$/,l=/(([\d\w_\-]+)(?:\:([^;]+))?;?)/,c=function(e){var t,n={},r=e.split(",");for(t=0;t<r.length;t++)n[r[t]]=!0;return n}("ngSrc,ngSrcset,src,srcset"),m=/^(?:(\^\^?)?(\?)?(\^\^?)?)?/,f=/^(on[a-z]+|formaction)$/;this.directive=function t(n,r){return we(n,"directive"),I(n)?(Ee(r,"directiveFactory"),o.hasOwnProperty(n)||(o[n]=[],e.factory(n+i,["$injector","$exceptionHandler",function(e,t){var r=[];return y(o[n],function(o,i){try{var a=e.invoke(o);F(a)?a={compile:P(a)}:!a.compile&&a.link&&(a.compile=P(a.link)),a.priority=a.priority||0,a.index=i,a.name=a.name||n,a.require=a.require||a.controller&&a.name,a.restrict=a.restrict||"EA",L(a.scope)&&(a.$$isolateBindings=(s=a.scope,l=a.name,c=/^\s*([@=&])(\??)\s*(\w*)\s*$/,d={},y(s,function(e,t){var n=e.match(c);if(!n)throw Nt("iscp","Invalid isolate scope definition for directive '{0}'. Definition: {... {1}: '{2}' ...}",l,t,e);d[t]={attrName:n[3]||t,mode:n[1],optional:"?"===n[2]}}),d)),r.push(a)}catch(e){t(e)}var s,l,c,d}),r}])),o[n].push(r)):y(n,C(t)),this},this.aHrefSanitizationWhitelist=function(e){return D(e)?(r.aHrefSanitizationWhitelist(e),this):r.aHrefSanitizationWhitelist()},this.imgSrcSanitizationWhitelist=function(e){return D(e)?(r.imgSrcSanitizationWhitelist(e),this):r.imgSrcSanitizationWhitelist()};var p=!0;this.debugInfoEnabled=function(e){return D(e)?(p=e,this):p},this.$get=["$injector","$interpolate","$exceptionHandler","$templateRequest","$parse","$controller","$rootScope","$document","$sce","$animate","$$sanitizeUri",function(e,r,h,g,v,b,$,E,w,C,M){var T=function(e,t){if(t){var n,r,o,i=Object.keys(t);for(n=0,r=i.length;n<r;n++)this[o=i[n]]=t[o]}else this.$attr={};this.$$element=e};function k(e,t){try{e.addClass(t)}catch(e){}}T.prototype={$normalize:It,$addClass:function(e){e&&e.length>0&&C.addClass(this.$$element,e)},$removeClass:function(e){e&&e.length>0&&C.removeClass(this.$$element,e)},$updateClass:function(e,t){var n=Ot(e,t);n&&n.length&&C.addClass(this.$$element,n);var r=Ot(t,e);r&&r.length&&C.removeClass(this.$$element,r)},$set:function(e,t,r,o){var i,a=this.$$element[0],s=pt(a,e),l=function(e,t){var n=e.nodeName;return("INPUT"===n||"TEXTAREA"===n)&&ft[t]}(a,e),c=e;if(s?(this.$$element.prop(e,t),o=s):l&&(this[l]=t,c=l),this[e]=t,o?this.$attr[e]=o:(o=this.$attr[e])||(this.$attr[e]=o=ve(e,"-")),"a"===(i=z(this.$$element))&&"href"===e||"img"===i&&"src"===e)this[e]=t=M(t,"src"===e);else if("img"===i&&"srcset"===e){for(var d="",u=W(t),m=/\s/.test(u)?/(\s+\d+x\s*,|\s+\d+w\s*,|\s+,|,\s+)/:/(,)/,f=u.split(m),p=Math.floor(f.length/2),g=0;g<p;g++){var v=2*g;d+=M(W(f[v]),!0),d+=" "+W(f[v+1])}var b=W(f[2*g]).split(/\s/);d+=M(W(b[0]),!0),2===b.length&&(d+=" "+W(b[1])),this[e]=t=d}!1!==r&&(null===t||t===n?this.$$element.removeAttr(o):this.$$element.attr(o,t));var $=this.$$observers;$&&y($[c],function(e){try{e(t)}catch(e){h(e)}})},$observe:function(e,t){var n=this,r=n.$$observers||(n.$$observers=Te()),o=r[e]||(r[e]=[]);return o.push(t),$.$evalAsync(function(){o.$$inter||t(n[e])}),function(){Y(o,t)}}};var P=r.startSymbol(),N=r.endSymbol(),D="{{"==P||"}}"==N?_:function(e){return e.replace(/\{\{/g,P).replace(/}}/g,N)},O=/^ngAttr[A-Z]/;return H.$$addBindingInfo=p?function(e,t){var n=e.data("$binding")||[];R(t)?n=n.concat(t):n.push(t),e.data("$binding",n)}:S,H.$$addBindingClass=p?function(e){k(e,"ng-binding")}:S,H.$$addScopeInfo=p?function(e,t,n,r){var o=n?r?"$isolateScopeNoTemplate":"$isolateScope":"$scope";e.data(o,t)}:S,H.$$addScopeClass=p?function(e,t){k(e,t?"ng-isolate-scope":"ng-scope")}:S,H;function H(e,t,n,r,o){e instanceof d||(e=d(e)),y(e,function(t,n){t.nodeType==ke&&t.nodeValue.match(/\S+/)&&(e[n]=d(t).wrap("<span></span>").parent()[0])});var i=V(e,t,e,n,r,o);H.$$addScopeClass(e);var a=null;return function(t,n,r,o,s){var l,c,u;if(Ee(t,"scope"),a||(c=(l=s)&&l[0],a=c&&"foreignobject"!==z(c)&&c.toString().match(/SVG/)?"svg":"html"),u="html"!==a?d(ae(a,d("<div>").append(e).html())):n?dt.clone.call(e):e,r)for(var m in r)u.data("$"+m+"Controller",r[m].instance);return H.$$addScopeInfo(u,t),n&&n(u,t),i&&i(t,u,u,o),u}}function V(e,t,r,o,i,a){for(var s,l,c,u,m,f,p,h=[],g=0;g<e.length;g++)s=new T,(c=(l=j(e[g],[],s,0===g?o:n,i)).length?G(l,e[g],s,t,r,null,[],[],a):null)&&c.scope&&H.$$addScopeClass(s.$$element),m=c&&c.terminal||!(u=e[g].childNodes)||!u.length?null:V(u,c?(c.transcludeOnThisElement||!c.templateOnThisElement)&&c.transclude:t),(c||m)&&(h.push(g,c,m),f=!0,p=p||c),a=null;return f?function(e,r,o,i){var a,s,l,c,u,m,f,g,v;if(p){var b=r.length;for(v=new Array(b),u=0;u<h.length;u+=3)f=h[u],v[f]=r[f]}else v=r;for(u=0,m=h.length;u<m;)l=v[h[u++]],a=h[u++],s=h[u++],a?(a.scope?(c=e.$new(),H.$$addScopeInfo(d(l),c)):c=e,g=a.transcludeOnThisElement?B(e,a.transclude,i,a.elementTranscludeOnThisElement):!a.templateOnThisElement&&i?i:!i&&t?B(e,t):null,a(s,c,l,o,g)):s&&s(e,l.childNodes,n,i)}:null}function B(e,t,n,r){return function(r,o,i,a,s){return r||((r=e.$new(!1,s)).$$transcluded=!0),t(r,o,i,n,a)}}function j(e,t,n,o,i){var a,c,d=e.nodeType,u=n.$attr;switch(d){case xe:X(t,It(z(e)),"E",o,i);for(var m,f,p,h,g,v,b=e.attributes,$=0,E=b&&b.length;$<E;$++){var y=!1,w=!1;f=(m=b[$]).name,g=W(m.value),h=It(f),(v=O.test(h))&&(f=ve(h.substr(6),"-"));var C=h.replace(/(Start|End)$/,"");J(C)&&h===C+"Start"&&(y=f,w=f.substr(0,f.length-5)+"end",f=f.substr(0,f.length-6)),u[p=It(f.toLowerCase())]=f,!v&&n.hasOwnProperty(p)||(n[p]=g,pt(e,p)&&(n[p]=!0)),se(e,t,g,p,v),X(t,p,"A",o,i,y,w)}if(I(c=e.className)&&""!==c)for(;a=l.exec(c);)X(t,p=It(a[2]),"C",o,i)&&(n[p]=W(a[3])),c=c.substr(a.index+a[0].length);break;case ke:!function(e,t){var n=r(t,!0);n&&e.push({priority:0,compile:function(e){var t=e.parent(),r=!!t.length;return r&&H.$$addBindingClass(t),function(e,t){var o=t.parent();r||H.$$addBindingClass(o),H.$$addBindingInfo(o,n.expressions),e.$watch(n,function(e){t[0].nodeValue=e})}}})}(t,e.nodeValue);break;case Ae:try{(a=s.exec(e.nodeValue))&&X(t,p=It(a[1]),"M",o,i)&&(n[p]=W(a[2]))}catch(e){}}return t.sort(re),t}function q(e,t,n){var r=[],o=0;if(t&&e.hasAttribute&&e.hasAttribute(t)){do{if(!e)throw Nt("uterdir","Unterminated attribute, found '{0}' but no matching '{1}' found.",t,n);e.nodeType==xe&&(e.hasAttribute(t)&&o++,e.hasAttribute(n)&&o--),r.push(e),e=e.nextSibling}while(o>0)}else r.push(e);return d(r)}function K(e,t,n){return function(r,o,i,a,s){return o=q(o[0],t,n),e(r,o,i,a,s)}}function G(e,o,i,a,s,l,c,u,f){f=f||{};for(var p,g,$,E,w,C,M,x=-Number.MAX_VALUE,k=f.controllerDirectives,A=f.newIsolateScopeDirective,S=f.templateDirective,_=f.nonTlbTranscludeDirective,P=!1,N=!1,O=f.hasElementTranscludeDirective,V=i.$$element=d(o),B=l,z=a,Y=0,G=e.length;Y<G;Y++){var X=($=e[Y]).$$start,J=$.$$end;if(X&&(V=q(o,X,J)),w=n,x>$.priority)break;if((M=$.scope)&&($.templateUrl||(L(M)?(oe("new/isolated scope",A||p,$,V),A=$):oe("new/isolated scope",A,$,V)),p=p||$),E=$.name,!$.templateUrl&&$.controller&&(M=$.controller,oe("'"+E+"' controller",(k=k||{})[E],$,V),k[E]=$),(M=$.transclude)&&(P=!0,$.$$tlb||(oe("transclusion",_,$,V),_=$),"element"==M?(O=!0,x=$.priority,w=V,V=i.$$element=d(t.createComment(" "+E+": "+i[E]+" ")),o=V[0],le(s,ee(w),o),z=H(w,a,x,B&&B.name,{nonTlbTranscludeDirective:_})):(w=d(Qe(o)).contents(),V.empty(),z=H(w,a))),$.template)if(N=!0,oe("template",S,$,V),S=$,M=F($.template)?$.template(V,i):$.template,M=D(M),$.replace){if(B=$,w=Ke(M)?[]:Ht(ae($.templateNamespace,W(M))),o=w[0],1!=w.length||o.nodeType!==xe)throw Nt("tplrt","Template for directive '{0}' must have exactly one root element. {1}",E,"");le(s,V,o);var re={$attr:{}},se=j(o,[],re),ue=e.splice(Y+1,e.length-(Y+1));A&&Q(se),e=e.concat(se).concat(ue),te(i,re),G=e.length}else V.html(M);if($.templateUrl)N=!0,oe("template",S,$,V),S=$,$.replace&&(B=$),pe=ne(e.splice(Y,e.length-Y),V,i,s,P&&z,c,u,{controllerDirectives:k,newIsolateScopeDirective:A,templateDirective:S,nonTlbTranscludeDirective:_}),G=e.length;else if($.compile)try{F(C=$.compile(V,i,z))?me(null,C,X,J):C&&me(C.pre,C.post,X,J)}catch(e){h(e,ie(V))}$.terminal&&(pe.terminal=!0,x=Math.max(x,$.priority))}return pe.scope=p&&!0===p.scope,pe.transcludeOnThisElement=P,pe.elementTranscludeOnThisElement=O,pe.templateOnThisElement=N,pe.transclude=z,f.hasElementTranscludeDirective=O,pe;function me(e,t,n,r){e&&(n&&(e=K(e,n,r)),e.require=$.require,e.directiveName=E,(A===$||$.$$isolateScope)&&(e=ce(e,{isolateScope:!0})),c.push(e)),t&&(n&&(t=K(t,n,r)),t.require=$.require,t.directiveName=E,(A===$||$.$$isolateScope)&&(t=ce(t,{isolateScope:!0})),u.push(t))}function fe(e,t,n,r){var o,i,a="data",s=!1,l=n;if(I(t)){if(i=t.match(m),t=t.substring(i[0].length),i[3]&&(i[1]?i[3]=null:i[1]=i[3]),"^"===i[1]?a="inheritedData":"^^"===i[1]&&(a="inheritedData",l=n.parent()),"?"===i[2]&&(s=!0),o=null,r&&"data"===a&&(o=r[t])&&(o=o.instance),!(o=o||l[a]("$"+t+"Controller"))&&!s)throw Nt("ctreq","Controller '{0}', required by directive '{1}', can't be found!",t,e);return o}return R(t)&&(o=[],y(t,function(t){o.push(fe(e,t,n,r))})),o}function pe(e,t,a,s,l){var m,f,p,h,$,E,w,C,M;if(o===a?(M=i,C=i.$$element):(C=d(a),M=new T(C,i)),A&&($=t.$new(!0)),w=l&&function(e,t,r){var o;U(e)||(r=t,t=e,e=n);O&&(o=E);r||(r=O?C.parent():C);return l(e,t,o,r,P)},k&&(g={},E={},y(k,function(e){var n,r={$scope:e===A||e.$$isolateScope?$:t,$element:C,$attrs:M,$transclude:w};"@"==(h=e.controller)&&(h=M[e.name]),n=b(h,r,!0,e.controllerAs),E[e.name]=n,O||C.data("$"+e.name+"Controller",n.instance),g[e.name]=n})),A){H.$$addScopeInfo(C,$,!0,!(S&&(S===A||S===A.$$originalDirective))),H.$$addScopeClass(C,!0);var x=g&&g[A.name],_=$;x&&x.identifier&&!0===A.bindToController&&(_=x.instance),y($.$$isolateBindings=A.$$isolateBindings,function(e,n){var o,i,a,s,l=e.attrName,c=e.optional;switch(e.mode){case"@":M.$observe(l,function(e){_[n]=e}),M.$$observers[l].$$scope=t,M[l]&&(_[n]=r(M[l])(t));break;case"=":if(c&&!M[l])return;i=v(M[l]),s=i.literal?Z:function(e,t){return e===t||e!=e&&t!=t},a=i.assign||function(){throw o=_[n]=i(t),Nt("nonassign","Expression '{0}' used with directive '{1}' is non-assignable!",M[l],A.name)},o=_[n]=i(t);var d=function(e){return s(e,_[n])||(s(e,o)?a(t,e=_[n]):_[n]=e),o=e};d.$stateful=!0;var u=t.$watch(v(M[l],d),null,i.literal);$.$on("$destroy",u);break;case"&":i=v(M[l]),_[n]=function(e){return i(t,e)}}})}for(g&&(y(g,function(e){e()}),g=null),m=0,f=c.length;m<f;m++)de(p=c[m],p.isolateScope?$:t,C,M,p.require&&fe(p.directiveName,p.require,C,E),w);var P=t;for(A&&(A.template||null===A.templateUrl)&&(P=$),e&&e(P,a.childNodes,n,l),m=u.length-1;m>=0;m--)de(p=u[m],p.isolateScope?$:t,C,M,p.require&&fe(p.directiveName,p.require,C,E),w)}}function Q(e){for(var t=0,n=e.length;t<n;t++)e[t]=A(e[t],{$$isolateScope:!0})}function X(t,r,a,s,l,c,d){if(r===l)return null;var u=null;if(o.hasOwnProperty(r))for(var m,f=e.get(r+i),p=0,g=f.length;p<g;p++)try{m=f[p],(s===n||s>m.priority)&&-1!=m.restrict.indexOf(a)&&(c&&(m=A(m,{$$start:c,$$end:d})),t.push(m),u=m)}catch(e){h(e)}return u}function J(t){if(o.hasOwnProperty(t))for(var n=e.get(t+i),r=0,a=n.length;r<a;r++)if(n[r].multiElement)return!0;return!1}function te(e,t){var n=t.$attr,r=e.$attr,o=e.$$element;y(e,function(r,o){"$"!=o.charAt(0)&&(t[o]&&t[o]!==r&&(r+=("style"===o?";":" ")+t[o]),e.$set(o,r,!0,n[o]))}),y(t,function(t,i){"class"==i?(k(o,t),e.class=(e.class?e.class+" ":"")+t):"style"==i?(o.attr("style",o.attr("style")+";"+t),e.style=(e.style?e.style+";":"")+t):"$"==i.charAt(0)||e.hasOwnProperty(i)||(e[i]=t,r[i]=n[i])})}function ne(e,t,n,r,o,i,a,s){var l,c,u=[],m=t[0],f=e.shift(),p=x({},f,{templateUrl:null,transclude:null,replace:null,$$originalDirective:f}),h=F(f.templateUrl)?f.templateUrl(t,n):f.templateUrl,v=f.templateNamespace;return t.empty(),g(w.getTrustedResourceUrl(h)).then(function(g){var b,$,E,w;if(g=D(g),f.replace){if(E=Ke(g)?[]:Ht(ae(v,W(g))),b=E[0],1!=E.length||b.nodeType!==xe)throw Nt("tplrt","Template for directive '{0}' must have exactly one root element. {1}",f.name,h);$={$attr:{}},le(r,t,b);var C=j(b,[],$);L(f.scope)&&Q(C),e=C.concat(e),te(n,$)}else b=m,t.html(g);for(e.unshift(p),l=G(e,b,n,o,t,f,i,a,s),y(r,function(e,n){e==b&&(r[n]=t[0])}),c=V(t[0].childNodes,o);u.length;){var M=u.shift(),T=u.shift(),x=u.shift(),A=u.shift(),S=t[0];if(!M.$$destroyed){if(T!==m){var _=T.className;s.hasElementTranscludeDirective&&f.replace||(S=Qe(b)),le(x,d(T),S),k(d(S),_)}w=l.transcludeOnThisElement?B(M,l.transclude,A):A,l(c,M,S,r,w)}}u=null}),function(e,t,n,r,o){var i=o;t.$$destroyed||(u?(u.push(t),u.push(n),u.push(r),u.push(i)):(l.transcludeOnThisElement&&(i=B(t,l.transclude,o)),l(c,t,n,r,i)))}}function re(e,t){var n=t.priority-e.priority;return 0!==n?n:e.name!==t.name?e.name<t.name?-1:1:e.index-t.index}function oe(e,t,n,r){if(t)throw Nt("multidir","Multiple directives [{0}, {1}] asking for {2} on: {3}",t.name,n.name,e,ie(r))}function ae(e,n){switch(e=a(e||"html")){case"svg":case"math":var r=t.createElement("div");return r.innerHTML="<"+e+">"+n+"</"+e+">",r.childNodes[0].childNodes;default:return n}}function se(e,t,n,o,i){var a=r(n,!0);if(a){if("multiple"===o&&"select"===z(e))throw Nt("selmulti","Binding to the 'multiple' attribute is not supported. Element: {0}",ie(e));t.push({priority:100,compile:function(){return{pre:function(t,n,s){var l=s.$$observers||(s.$$observers={});if(f.test(o))throw Nt("nodomevents","Interpolations for HTML DOM event attributes are disallowed. Please use the ng- versions (such as ng-click instead of onclick) instead.");s[o]&&(a=r(s[o],!0,function(e,t){if("srcdoc"==t)return w.HTML;var n=z(e);return"xlinkHref"==t||"form"==n&&"action"==t||"img"!=n&&("src"==t||"ngSrc"==t)?w.RESOURCE_URL:void 0}(e,o),c[o]||i))&&(s[o]=a(t),(l[o]||(l[o]=[])).$$inter=!0,(s.$$observers&&s.$$observers[o].$$scope||t).$watch(a,function(e,t){"class"===o&&e!=t?s.$updateClass(e,t):s.$set(o,e)}))}}}})}}function le(e,n,r){var o,i,a=n[0],s=n.length,l=a.parentNode;if(e)for(o=0,i=e.length;o<i;o++)if(e[o]==a){e[o++]=r;for(var c=o,m=c+s-1,f=e.length;c<f;c++,m++)m<f?e[c]=e[m]:delete e[c];e.length-=s-1,e.context===a&&(e.context=r);break}l&&l.replaceChild(r,a);var p=t.createDocumentFragment();p.appendChild(a),d(r).data(d(a).data()),u?(be=!0,u.cleanData([a])):delete d.cache[a[d.expando]];for(var h=1,g=n.length;h<g;h++){var v=n[h];d(v).remove(),p.appendChild(v),delete n[h]}n[0]=r,n.length=1}function ce(e,t){return x(function(){return e.apply(null,arguments)},e,t)}function de(e,t,n,r,o,i){try{e(t,n,r,o,i)}catch(e){h(e,ie(n))}}}]}Dt.$inject=["$provide","$$sanitizeUriProvider"];var Lt=/^(x[\:\-_]|data[\:\-_])/i;function It(e){return Ve(e.replace(Lt,""))}function Ot(e,t){var n="",r=e.split(/\s+/),o=t.split(/\s+/);e:for(var i=0;i<r.length;i++){for(var a=r[i],s=0;s<o.length;s++)if(a==o[s])continue e;n+=(n.length>0?" ":"")+a}return n}function Ht(e){var t=(e=d(e)).length;if(t<=1)return e;for(;t--;){e[t].nodeType===Ae&&p.call(e,t,1)}return e}function Rt(){var e={},t=!1,o=/^(\S+)(\s+as\s+(\w+))?$/;this.register=function(t,n){we(t,"controller"),L(t)?x(e,t):e[t]=n},this.allowGlobals=function(){t=!0},this.$get=["$injector","$window",function(i,a){return function(r,l,c,d){var u,m,f,p;if(c=!0===c,d&&I(d)&&(p=d),I(r)&&(m=r.match(o),f=m[1],p=p||m[3],ye(r=e.hasOwnProperty(f)?e[f]:Ce(l.$scope,f,!0)||(t?Ce(a,f,!0):n),f,!0)),c){var h=function(){};return h.prototype=(R(r)?r[r.length-1]:r).prototype,u=new h,p&&s(l,p,u,f||r.name),x(function(){return i.invoke(r,u,l,f),u},{instance:u,identifier:p})}return u=i.instantiate(r,l,f),p&&s(l,p,u,f||r.name),u};function s(e,t,n,o){if(!e||!L(e.$scope))throw r("$controller")("noscp","Cannot export controller '{0}' as '{1}'! No $scope object provided via `locals`.",o,t);e.$scope[t]=n}}]}function Ft(){this.$get=["$window",function(e){return d(e.document)}]}function Vt(){this.$get=["$log",function(e){return function(t,n){e.error.apply(e,arguments)}}]}function Bt(e){var t,n,r,o={};return e?(y(e.split("\n"),function(e){r=e.indexOf(":"),t=a(W(e.substr(0,r))),n=W(e.substr(r+1)),t&&(o[t]=o[t]?o[t]+", "+n:n)}),o):o}function Ut(e){var t=L(e)?e:n;return function(n){return t||(t=Bt(e)),n?t[a(n)]||null:t}}function jt(e,t,n){return F(n)?n(e,t):(y(n,function(n){e=n(e,t)}),e)}function qt(e){return 200<=e&&e<300}function Wt(){var e=/^\s*(\[|\{[^\{])/,t=/[\}\]]\s*$/,r=/^\)\]\}',?\n/,o={"Content-Type":"application/json;charset=utf-8"},i=this.defaults={transformResponse:[function(n,o){if(I(n)){n=n.replace(r,"");var i=o("Content-Type");(i&&0===i.indexOf("application/json")||e.test(n)&&t.test(n))&&(n=oe(n))}return n}],transformRequest:[function(e){return L(e)&&(t=e,"[object File]"!==g.call(t))&&!function(e){return"[object Blob]"===g.call(e)}(e)?re(e):e;var t}],headers:{common:{Accept:"application/json, text/plain, */*"},post:Q(o),put:Q(o),patch:Q(o)},xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN"},s=!1;this.useApplyAsync=function(e){return D(e)?(s=!!e,this):s};var c=this.interceptors=[];this.$get=["$httpBackend","$browser","$cacheFactory","$rootScope","$q","$injector",function(e,t,r,o,d,u){var m=r("$http"),f=[];function p(r){var c={method:"get",transformRequest:i.transformRequest,transformResponse:i.transformResponse},u=function(e){var t,n,r,o=i.headers,s=x({},e.headers);o=x({},o.common,o[a(e.method)]);e:for(t in o){for(r in n=a(t),s)if(a(r)===n)continue e;s[t]=o[t]}return l=s,y(l,function(e,t){F(e)&&(null!=(c=e())?l[t]=c:delete l[t])}),s;var l,c}(r);x(c,r),c.headers=u,c.method=l(c.method);var h=[function(r){u=r.headers;var l=jt(r.data,Ut(u),r.transformRequest);return N(l)&&y(u,function(e,t){"content-type"===a(t)&&delete u[t]}),N(r.withCredentials)&&!N(i.withCredentials)&&(r.withCredentials=i.withCredentials),function(r,a,l){var c,u,f=d.defer(),h=f.promise,g=function(e,t){if(!t)return e;var n=[];return function(e,t,n){for(var r=w(e),o=0;o<r.length;o++)t.call(n,e[r[o]],r[o])}(t,function(e,t){null===e||N(e)||(R(e)||(e=[e]),y(e,function(e){L(e)&&(e=H(e)?e.toISOString():re(e)),n.push(de(t)+"="+de(e))}))}),n.length>0&&(e+=(-1==e.indexOf("?")?"?":"&")+n.join("&")),e}(r.url,r.params);if(p.pendingRequests.push(r),h.then($,$),!r.cache&&!i.cache||!1===r.cache||"GET"!==r.method&&"JSONP"!==r.method||(c=L(r.cache)?r.cache:L(i.cache)?i.cache:m),c)if(D(u=c.get(g))){if(q(u))return u.then($,$),u;R(u)?b(u[1],u[0],Q(u[2]),u[3]):b(u,200,{},"OK")}else c.put(g,h);if(N(u)){var v=Zn(r.url)?t.cookies()[r.xsrfCookieName||i.xsrfCookieName]:n;v&&(l[r.xsrfHeaderName||i.xsrfHeaderName]=v),e(r.method,g,a,function(e,t,n,r){function i(){b(t,e,n,r)}c&&(qt(e)?c.put(g,[e,t,Bt(n),r]):c.remove(g)),s?o.$applyAsync(i):(i(),o.$$phase||o.$apply())},l,r.timeout,r.withCredentials,r.responseType)}return h;function b(e,t,n,o){(qt(t=Math.max(t,0))?f.resolve:f.reject)({data:e,status:t,headers:Ut(n),config:r,statusText:o})}function $(){var e=p.pendingRequests.indexOf(r);-1!==e&&p.pendingRequests.splice(e,1)}}(r,l,u).then($,$)},n],g=d.when(c);for(y(f,function(e){(e.request||e.requestError)&&h.unshift(e.request,e.requestError),(e.response||e.responseError)&&h.push(e.response,e.responseError)});h.length;){var v=h.shift(),b=h.shift();g=g.then(v,b)}return g.success=function(e){return g.then(function(t){e(t.data,t.status,t.headers,c)}),g},g.error=function(e){return g.then(null,function(t){e(t.data,t.status,t.headers,c)}),g},g;function $(e){var t=x({},e);return e.data?t.data=jt(e.data,e.headers,c.transformResponse):t.data=e.data,qt(e.status)?t:d.reject(t)}}return y(c,function(e){f.unshift(I(e)?u.get(e):u.invoke(e))}),p.pendingRequests=[],function(e){y(arguments,function(e){p[e]=function(t,n){return p(x(n||{},{method:e,url:t}))}})}("get","delete","head","jsonp"),function(e){y(arguments,function(e){p[e]=function(t,n,r){return p(x(r||{},{method:e,url:t,data:n}))}})}("post","put","patch"),p.defaults=i,p}]}function Kt(){return new e.XMLHttpRequest}function zt(){this.$get=["$browser","$window","$document",function(e,t,n){return function(e,t,n,r,o){return function(i,s,l,c,d,u,m,f){if(e.$$incOutstandingRequestCount(),s=s||e.url(),"jsonp"==a(i)){var p="_"+(r.counter++).toString(36);r[p]=function(e){r[p].data=e,r[p].called=!0};var h=function(e,t,n){var i=o.createElement("script"),a=null;return i.type="text/javascript",i.src=e,i.async=!0,a=function(e){Ie(i,"load",a),Ie(i,"error",a),o.body.removeChild(i),i=null;var s=-1,l="unknown";e&&("load"!==e.type||r[t].called||(e={type:"error"}),l=e.type,s="error"===e.type?404:200),n&&n(s,l)},Le(i,"load",a),Le(i,"error",a),o.body.appendChild(i),a}(s.replace("JSON_CALLBACK","angular.callbacks."+p),p,function(e,t){E(c,e,r[p].data,"",t),r[p]=S})}else{var g=t();g.open(i,s,!0),y(d,function(e,t){D(e)&&g.setRequestHeader(t,e)}),g.onload=function(){var e=g.statusText||"",t="response"in g?g.response:g.responseText,n=1223===g.status?204:g.status;0===n&&(n=t?200:"file"==Qn(s).protocol?404:0),E(c,n,t,g.getAllResponseHeaders(),e)};var v=function(){E(c,-1,null,null,"")};if(g.onerror=v,g.onabort=v,m&&(g.withCredentials=!0),f)try{g.responseType=f}catch(e){if("json"!==f)throw e}g.send(l||null)}if(u>0)var b=n($,u);else q(u)&&u.then($);function $(){h&&h(),g&&g.abort()}function E(t,r,o,i,a){b&&n.cancel(b),h=g=null,t(r,o,i,a),e.$$completeOutstandingRequest(S)}}}(e,Kt,e.defer,t.angular.callbacks,n[0])}]}var Yt=r("$interpolate");function Gt(){var e="{{",t="}}";this.startSymbol=function(t){return t?(e=t,this):e},this.endSymbol=function(e){return e?(t=e,this):t},this.$get=["$parse","$exceptionHandler","$sce",function(n,r,o){var i=e.length,a=t.length,s=new RegExp(e.replace(/./g,c),"g"),l=new RegExp(t.replace(/./g,c),"g");function c(e){return"\\\\\\"+e}function d(c,d,u,m){m=!!m;for(var f,p,h,g=0,v=[],b=[],$=c.length,E=[],y=[];g<$;){if(-1==(f=c.indexOf(e,g))||-1==(p=c.indexOf(t,f+i))){g!==$&&E.push(T(c.substring(g)));break}g!==f&&E.push(T(c.substring(g,f))),h=c.substring(f+i,p),v.push(h),b.push(n(h,k)),g=p+a,y.push(E.length),E.push("")}if(u&&E.length>1)throw Yt("noconcat","Error while interpolating: {0}\nStrict Contextual Escaping disallows interpolations that concatenate multiple expressions when a trusted value is required. See http://docs.angularjs.org/api/ng.$sce",c);if(!d||v.length){var w=function(e){for(var t=0,n=v.length;t<n;t++){if(m&&N(e[t]))return;E[y[t]]=e[t]}return E.join("")},C=function(e){return u?o.getTrusted(u,e):o.valueOf(e)},M=function(e){if(null==e)return"";switch(typeof e){case"string":break;case"number":e=""+e;break;default:e=re(e)}return e};return x(function(e){var t=0,n=v.length,o=new Array(n);try{for(;t<n;t++)o[t]=b[t](e);return w(o)}catch(e){var i=Yt("interr","Can't interpolate: {0}\n{1}",c,e.toString());r(i)}},{exp:c,expressions:v,$$watchDelegate:function(e,t,n){var r;return e.$watchGroup(b,function(n,o){var i=w(n);F(t)&&t.call(this,i,n!==o?r:i,e),r=i},n)}})}function T(n){return n.replace(s,e).replace(l,t)}function k(e){try{return M(C(e))}catch(e){var t=Yt("interr","Can't interpolate: {0}\n{1}",c,e.toString());r(t)}}}return d.startSymbol=function(){return e},d.endSymbol=function(){return t},d}]}function Qt(){this.$get=["$rootScope","$window","$q","$$q",function(e,t,n,r){var o={};function i(i,a,s,l){var c=t.setInterval,d=t.clearInterval,u=0,m=D(l)&&!l,f=(m?r:n).defer(),p=f.promise;return s=D(s)?s:0,p.then(null,null,i),p.$$intervalId=c(function(){f.notify(u++),s>0&&u>=s&&(f.resolve(u),d(p.$$intervalId),delete o[p.$$intervalId]),m||e.$apply()},a),o[p.$$intervalId]=f,p}return i.cancel=function(e){return!!(e&&e.$$intervalId in o)&&(o[e.$$intervalId].reject("canceled"),t.clearInterval(e.$$intervalId),delete o[e.$$intervalId],!0)},i}]}function Zt(){this.$get=function(){return{id:"en-us",NUMBER_FORMATS:{DECIMAL_SEP:".",GROUP_SEP:",",PATTERNS:[{minInt:1,minFrac:0,maxFrac:3,posPre:"",posSuf:"",negPre:"-",negSuf:"",gSize:3,lgSize:3},{minInt:1,minFrac:2,maxFrac:2,posPre:"¤",posSuf:"",negPre:"(¤",negSuf:")",gSize:3,lgSize:3}],CURRENCY_SYM:"$"},DATETIME_FORMATS:{MONTH:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),SHORTMONTH:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),DAY:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),SHORTDAY:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(","),AMPMS:["AM","PM"],medium:"MMM d, y h:mm:ss a",short:"M/d/yy h:mm a",fullDate:"EEEE, MMMM d, y",longDate:"MMMM d, y",mediumDate:"MMM d, y",shortDate:"M/d/yy",mediumTime:"h:mm:ss a",shortTime:"h:mm a"},pluralCat:function(e){return 1===e?"one":"other"}}}}var Xt=/^([^\?#]*)(\?([^#]*))?(#(.*))?$/,Jt={http:80,https:443,ftp:21},en=r("$location");function tn(e){for(var t=e.split("/"),n=t.length;n--;)t[n]=ce(t[n]);return t.join("/")}function nn(e,t,n){var r=Qn(e,n);t.$$protocol=r.protocol,t.$$host=r.hostname,t.$$port=k(r.port)||Jt[r.protocol]||null}function rn(e,t,n){var r="/"!==e.charAt(0);r&&(e="/"+e);var o=Qn(e,n);t.$$path=decodeURIComponent(r&&"/"===o.pathname.charAt(0)?o.pathname.substring(1):o.pathname),t.$$search=se(o.search),t.$$hash=decodeURIComponent(o.hash),t.$$path&&"/"!=t.$$path.charAt(0)&&(t.$$path="/"+t.$$path)}function on(e,t){if(0===t.indexOf(e))return t.substr(e.length)}function an(e){var t=e.indexOf("#");return-1==t?e:e.substr(0,t)}function sn(e){return e.substr(0,an(e).lastIndexOf("/")+1)}function ln(e,t){this.$$html5=!0,t=t||"";var r=sn(e);nn(e,this,e),this.$$parse=function(t){var n=on(r,t);if(!I(n))throw en("ipthprfx",'Invalid url "{0}", missing path prefix "{1}".',t,r);rn(n,this,e),this.$$path||(this.$$path="/"),this.$$compose()},this.$$compose=function(){var e=le(this.$$search),t=this.$$hash?"#"+ce(this.$$hash):"";this.$$url=tn(this.$$path)+(e?"?"+e:"")+t,this.$$absUrl=r+this.$$url.substr(1)},this.$$parseLinkUrl=function(o,i){return i&&"#"===i[0]?(this.hash(i.slice(1)),!0):((a=on(e,o))!==n?(s=a,l=(a=on(t,a))!==n?r+(on("/",a)||a):e+s):(a=on(r,o))!==n?l=r+a:r==o+"/"&&(l=r),l&&this.$$parse(l),!!l);var a,s,l}}function cn(e,t){var n=sn(e);nn(e,this,e),this.$$parse=function(r){var o=on(e,r)||on(n,r),i="#"==o.charAt(0)?on(t,o):this.$$html5?o:"";if(!I(i))throw en("ihshprfx",'Invalid url "{0}", missing hash prefix "{1}".',r,t);rn(i,this,e),this.$$path=function(e,t,n){var r,o=/^\/[A-Z]:(\/.*)/;0===t.indexOf(n)&&(t=t.replace(n,""));if(o.exec(t))return e;return(r=o.exec(e))?r[1]:e}(this.$$path,i,e),this.$$compose()},this.$$compose=function(){var n=le(this.$$search),r=this.$$hash?"#"+ce(this.$$hash):"";this.$$url=tn(this.$$path)+(n?"?"+n:"")+r,this.$$absUrl=e+(this.$$url?t+this.$$url:"")},this.$$parseLinkUrl=function(t,n){return an(e)==an(t)&&(this.$$parse(t),!0)}}function dn(e,t){this.$$html5=!0,cn.apply(this,arguments);var n=sn(e);this.$$parseLinkUrl=function(r,o){return o&&"#"===o[0]?(this.hash(o.slice(1)),!0):(e==an(r)?i=r:(a=on(n,r))?i=e+t+a:n===r+"/"&&(i=n),i&&this.$$parse(i),!!i);var i,a},this.$$compose=function(){var n=le(this.$$search),r=this.$$hash?"#"+ce(this.$$hash):"";this.$$url=tn(this.$$path)+(n?"?"+n:"")+r,this.$$absUrl=e+t+this.$$url}}var un={$$html5:!1,$$replace:!1,absUrl:mn("$$absUrl"),url:function(e){if(N(e))return this.$$url;var t=Xt.exec(e);return t[1]&&this.path(decodeURIComponent(t[1])),(t[2]||t[1])&&this.search(t[3]||""),this.hash(t[5]||""),this},protocol:mn("$$protocol"),host:mn("$$host"),port:mn("$$port"),path:fn("$$path",function(e){return"/"==(e=null!==e?e.toString():"").charAt(0)?e:"/"+e}),search:function(e,t){switch(arguments.length){case 0:return this.$$search;case 1:if(I(e)||O(e))e=e.toString(),this.$$search=se(e);else{if(!L(e))throw en("isrcharg","The first argument of the `$location#search()` call must be a string or an object.");y(e=G(e,{}),function(t,n){null==t&&delete e[n]}),this.$$search=e}break;default:N(t)||null===t?delete this.$$search[e]:this.$$search[e]=t}return this.$$compose(),this},hash:fn("$$hash",function(e){return null!==e?e.toString():""}),replace:function(){return this.$$replace=!0,this}};function mn(e){return function(){return this[e]}}function fn(e,t){return function(n){return N(n)?this[e]:(this[e]=t(n),this.$$compose(),this)}}function pn(){var t="",n={enabled:!1,requireBase:!0,rewriteLinks:!0};this.hashPrefix=function(e){return D(e)?(t=e,this):t},this.html5Mode=function(e){return j(e)?(n.enabled=e,this):L(e)?(j(e.enabled)&&(n.enabled=e.enabled),j(e.requireBase)&&(n.requireBase=e.requireBase),j(e.rewriteLinks)&&(n.rewriteLinks=e.rewriteLinks),this):n},this.$get=["$rootScope","$browser","$sniffer","$rootElement",function(r,o,i,a){var s,l,c,u,m=o.baseHref(),f=o.url();if(n.enabled){if(!m&&n.requireBase)throw en("nobase","$location in HTML5 mode requires a <base> tag to be present!");c=(u=f).substring(0,u.indexOf("/",u.indexOf("//")+2))+(m||"/"),l=i.history?ln:dn}else c=an(f),l=cn;(s=new l(c,"#"+t)).$$parseLinkUrl(f,f),s.$$state=o.state();var p=/^\s*(javascript|mailto):/i;function h(e,t,n){var r=s.url(),i=s.$$state;try{o.url(e,t,n),s.$$state=o.state()}catch(e){throw s.url(r),s.$$state=i,e}}a.on("click",function(t){if(n.rewriteLinks&&!t.ctrlKey&&!t.metaKey&&2!=t.which){for(var i=d(t.target);"a"!==z(i[0]);)if(i[0]===a[0]||!(i=i.parent())[0])return;var l=i.prop("href"),c=i.attr("href")||i.attr("xlink:href");L(l)&&"[object SVGAnimatedString]"===l.toString()&&(l=Qn(l.animVal).href),p.test(l)||!l||i.attr("target")||t.isDefaultPrevented()||s.$$parseLinkUrl(l,c)&&(t.preventDefault(),s.absUrl()!=o.url()&&(r.$apply(),e.angular["ff-684208-preventDefault"]=!0))}}),s.absUrl()!=f&&o.url(s.absUrl(),!0);var g=!0;return o.onUrlChange(function(e,t){r.$evalAsync(function(){var n=s.absUrl(),o=s.$$state;s.$$parse(e),s.$$state=t,r.$broadcast("$locationChangeStart",e,n,t,o).defaultPrevented?(s.$$parse(n),s.$$state=o,h(n,!1,o)):(g=!1,v(n,o))}),r.$$phase||r.$digest()}),r.$watch(function(){var e=o.url(),t=o.state(),n=s.$$replace,a=e!==s.absUrl()||s.$$html5&&i.history&&t!==s.$$state;(g||a)&&(g=!1,r.$evalAsync(function(){r.$broadcast("$locationChangeStart",s.absUrl(),e,s.$$state,t).defaultPrevented?(s.$$parse(e),s.$$state=t):(a&&h(s.absUrl(),n,t===s.$$state?null:s.$$state),v(e,t))})),s.$$replace=!1}),s;function v(e,t){r.$broadcast("$locationChangeSuccess",s.absUrl(),e,s.$$state,t)}}]}function hn(){var e=!0,t=this;this.debugEnabled=function(t){return D(t)?(e=t,this):e},this.$get=["$window",function(n){return{log:o("log"),info:o("info"),warn:o("warn"),error:o("error"),debug:(r=o("debug"),function(){e&&r.apply(t,arguments)})};var r;function o(e){var t=n.console||{},r=t[e]||t.log||S,o=!1;try{o=!!r.apply}catch(e){}return o?function(){var e=[];return y(arguments,function(t){e.push(function(e){return e instanceof Error&&(e.stack?e=e.message&&-1===e.stack.indexOf(e.message)?"Error: "+e.message+"\n"+e.stack:e.stack:e.sourceURL&&(e=e.message+"\n"+e.sourceURL+":"+e.line)),e}(t))}),r.apply(t,e)}:function(e,t){r(e,null==t?"":t)}}}]}y([dn,cn,ln],function(e){e.prototype=Object.create(un),e.prototype.state=function(t){if(!arguments.length)return this.$$state;if(e!==ln||!this.$$html5)throw en("nostate","History API state support is available only in HTML5 mode and only in browsers supporting HTML5 History API");return this.$$state=N(t)?null:t,this}});var gn=r("$parse");function vn(e,t){if("__defineGetter__"===e||"__defineSetter__"===e||"__lookupGetter__"===e||"__lookupSetter__"===e||"__proto__"===e)throw gn("isecfld","Attempting to access a disallowed field in Angular expressions! Expression: {0}",t);return e}function bn(e,t){if(e){if(e.constructor===e)throw gn("isecfn","Referencing Function in Angular expressions is disallowed! Expression: {0}",t);if(e.window===e)throw gn("isecwindow","Referencing the Window in Angular expressions is disallowed! Expression: {0}",t);if(e.children&&(e.nodeName||e.prop&&e.attr&&e.find))throw gn("isecdom","Referencing DOM nodes in Angular expressions is disallowed! Expression: {0}",t);if(e===Object)throw gn("isecobj","Referencing Object in Angular expressions is disallowed! Expression: {0}",t)}return e}var $n=Function.prototype.call,En=Function.prototype.apply,yn=Function.prototype.bind;var wn=Te();y({null:function(){return null},true:function(){return!0},false:function(){return!1},undefined:function(){}},function(e,t){e.constant=e.literal=e.sharedGetter=!0,wn[t]=e}),wn.this=function(e){return e},wn.this.sharedGetter=!0;var Cn=x(Te(),{"+":function(e,t,r,o){return r=r(e,t),o=o(e,t),D(r)?D(o)?r+o:r:D(o)?o:n},"-":function(e,t,n,r){return n=n(e,t),r=r(e,t),(D(n)?n:0)-(D(r)?r:0)},"*":function(e,t,n,r){return n(e,t)*r(e,t)},"/":function(e,t,n,r){return n(e,t)/r(e,t)},"%":function(e,t,n,r){return n(e,t)%r(e,t)},"===":function(e,t,n,r){return n(e,t)===r(e,t)},"!==":function(e,t,n,r){return n(e,t)!==r(e,t)},"==":function(e,t,n,r){return n(e,t)==r(e,t)},"!=":function(e,t,n,r){return n(e,t)!=r(e,t)},"<":function(e,t,n,r){return n(e,t)<r(e,t)},">":function(e,t,n,r){return n(e,t)>r(e,t)},"<=":function(e,t,n,r){return n(e,t)<=r(e,t)},">=":function(e,t,n,r){return n(e,t)>=r(e,t)},"&&":function(e,t,n,r){return n(e,t)&&r(e,t)},"||":function(e,t,n,r){return n(e,t)||r(e,t)},"!":function(e,t,n){return!n(e,t)},"=":!0,"|":!0}),Mn={n:"\n",f:"\f",r:"\r",t:"\t",v:"\v","'":"'",'"':'"'},Tn=function(e){this.options=e};function xn(e){return e.constant}Tn.prototype={constructor:Tn,lex:function(e){for(this.text=e,this.index=0,this.ch=n,this.tokens=[];this.index<this.text.length;)if(this.ch=this.text.charAt(this.index),this.is("\"'"))this.readString(this.ch);else if(this.isNumber(this.ch)||this.is(".")&&this.isNumber(this.peek()))this.readNumber();else if(this.isIdent(this.ch))this.readIdent();else if(this.is("(){}[].,;:?"))this.tokens.push({index:this.index,text:this.ch}),this.index++;else if(this.isWhitespace(this.ch))this.index++;else{var t=this.ch+this.peek(),r=t+this.peek(2),o=Cn[this.ch],i=Cn[t],a=Cn[r];a?(this.tokens.push({index:this.index,text:r,fn:a}),this.index+=3):i?(this.tokens.push({index:this.index,text:t,fn:i}),this.index+=2):o?(this.tokens.push({index:this.index,text:this.ch,fn:o}),this.index+=1):this.throwError("Unexpected next character ",this.index,this.index+1)}return this.tokens},is:function(e){return-1!==e.indexOf(this.ch)},peek:function(e){var t=e||1;return this.index+t<this.text.length&&this.text.charAt(this.index+t)},isNumber:function(e){return"0"<=e&&e<="9"},isWhitespace:function(e){return" "===e||"\r"===e||"\t"===e||"\n"===e||"\v"===e||" "===e},isIdent:function(e){return"a"<=e&&e<="z"||"A"<=e&&e<="Z"||"_"===e||"$"===e},isExpOperator:function(e){return"-"===e||"+"===e||this.isNumber(e)},throwError:function(e,t,n){n=n||this.index;var r=D(t)?"s "+t+"-"+this.index+" ["+this.text.substring(t,n)+"]":" "+n;throw gn("lexerr","Lexer Error: {0} at column{1} in expression [{2}].",e,r,this.text)},readNumber:function(){for(var e="",t=this.index;this.index<this.text.length;){var n=a(this.text.charAt(this.index));if("."==n||this.isNumber(n))e+=n;else{var r=this.peek();if("e"==n&&this.isExpOperator(r))e+=n;else if(this.isExpOperator(n)&&r&&this.isNumber(r)&&"e"==e.charAt(e.length-1))e+=n;else{if(!this.isExpOperator(n)||r&&this.isNumber(r)||"e"!=e.charAt(e.length-1))break;this.throwError("Invalid exponent")}}this.index++}e*=1,this.tokens.push({index:t,text:e,constant:!0,fn:function(){return e}})},readIdent:function(){for(var e,t,r,o,i=this.text,a="",s=this.index;this.index<this.text.length&&("."===(o=this.text.charAt(this.index))||this.isIdent(o)||this.isNumber(o));)"."===o&&(e=this.index),a+=o,this.index++;if(e&&"."===a[a.length-1]&&(this.index--,-1===(e=(a=a.slice(0,-1)).lastIndexOf("."))&&(e=n)),e)for(t=this.index;t<this.text.length;){if("("===(o=this.text.charAt(t))){r=a.substr(e-s+1),a=a.substr(0,e-s),this.index=t;break}if(!this.isWhitespace(o))break;t++}this.tokens.push({index:s,text:a,fn:wn[a]||Pn(a,this.options,i)}),r&&(this.tokens.push({index:e,text:"."}),this.tokens.push({index:e+1,text:r}))},readString:function(e){var t=this.index;this.index++;for(var n="",r=e,o=!1;this.index<this.text.length;){var i=this.text.charAt(this.index);if(r+=i,o){if("u"===i){var a=this.text.substring(this.index+1,this.index+5);a.match(/[\da-f]{4}/i)||this.throwError("Invalid unicode escape [\\u"+a+"]"),this.index+=4,n+=String.fromCharCode(parseInt(a,16))}else{n+=Mn[i]||i}o=!1}else if("\\"===i)o=!0;else{if(i===e)return this.index++,void this.tokens.push({index:t,text:r,string:n,constant:!0,fn:function(){return n}});n+=i}this.index++}this.throwError("Unterminated quote",t)}};var kn=function(e,t,n){this.lexer=e,this.$filter=t,this.options=n};function An(e,t,n,r){bn(e,r);for(var o,i=t.split("."),a=0;i.length>1;a++){var s=bn(e[o=vn(i.shift(),r)],r);s||(s={},e[o]=s),e=s}return bn(e[o=vn(i.shift(),r)],r),e[o]=n,n}kn.ZERO=x(function(){return 0},{sharedGetter:!0,constant:!0}),kn.prototype={constructor:kn,parse:function(e){this.text=e,this.tokens=this.lexer.lex(e);var t=this.statements();return 0!==this.tokens.length&&this.throwError("is an unexpected token",this.tokens[0]),t.literal=!!t.literal,t.constant=!!t.constant,t},primary:function(){var e,t,n;if(this.expect("("))e=this.filterChain(),this.consume(")");else if(this.expect("["))e=this.arrayDeclaration();else if(this.expect("{"))e=this.object();else{var r=this.expect();(e=r.fn)||this.throwError("not a primary expression",r),r.constant&&(e.constant=!0,e.literal=!0)}for(;t=this.expect("(","[",".");)"("===t.text?(e=this.functionCall(e,n),n=null):"["===t.text?(n=e,e=this.objectIndex(e)):"."===t.text?(n=e,e=this.fieldAccess(e)):this.throwError("IMPOSSIBLE");return e},throwError:function(e,t){throw gn("syntax","Syntax Error: Token '{0}' {1} at column {2} of the expression [{3}] starting at [{4}].",t.text,e,t.index+1,this.text,this.text.substring(t.index))},peekToken:function(){if(0===this.tokens.length)throw gn("ueoe","Unexpected end of expression: {0}",this.text);return this.tokens[0]},peek:function(e,t,n,r){if(this.tokens.length>0){var o=this.tokens[0],i=o.text;if(i===e||i===t||i===n||i===r||!e&&!t&&!n&&!r)return o}return!1},expect:function(e,t,n,r){var o=this.peek(e,t,n,r);return!!o&&(this.tokens.shift(),o)},consume:function(e){this.expect(e)||this.throwError("is unexpected, expecting ["+e+"]",this.peek())},unaryFn:function(e,t){return x(function(n,r){return e(n,r,t)},{constant:t.constant,inputs:[t]})},binaryFn:function(e,t,n,r){return x(function(r,o){return t(r,o,e,n)},{constant:e.constant&&n.constant,inputs:!r&&[e,n]})},statements:function(){for(var e=[];;)if(this.tokens.length>0&&!this.peek("}",")",";","]")&&e.push(this.filterChain()),!this.expect(";"))return 1===e.length?e[0]:function(t,n){for(var r,o=0,i=e.length;o<i;o++)r=e[o](t,n);return r}},filterChain:function(){for(var e=this.expression();this.expect("|");)e=this.filter(e);return e},filter:function(e){var t,r,o=this.expect(),i=this.$filter(o.text);if(this.peek(":"))for(t=[],r=[];this.expect(":");)t.push(this.expression());var a=[e].concat(t||[]);return x(function(o,a){var s=e(o,a);if(r){r[0]=s;for(var l=t.length;l--;)r[l+1]=t[l](o,a);return i.apply(n,r)}return i(s)},{constant:!i.$stateful&&a.every(xn),inputs:!i.$stateful&&a})},expression:function(){return this.assignment()},assignment:function(){var e,t,n=this.ternary();return(t=this.expect("="))?(n.assign||this.throwError("implies assignment but ["+this.text.substring(0,t.index)+"] can not be assigned to",t),e=this.ternary(),x(function(t,r){return n.assign(t,e(t,r),r)},{inputs:[n,e]})):n},ternary:function(){var e,t,n=this.logicalOR();if(t=this.expect("?")){if(e=this.assignment(),t=this.expect(":")){var r=this.assignment();return x(function(t,o){return n(t,o)?e(t,o):r(t,o)},{constant:n.constant&&e.constant&&r.constant})}this.throwError("expected :",t)}return n},logicalOR:function(){for(var e,t=this.logicalAND();e=this.expect("||");)t=this.binaryFn(t,e.fn,this.logicalAND(),!0);return t},logicalAND:function(){var e,t=this.equality();return(e=this.expect("&&"))&&(t=this.binaryFn(t,e.fn,this.logicalAND(),!0)),t},equality:function(){var e,t=this.relational();return(e=this.expect("==","!=","===","!=="))&&(t=this.binaryFn(t,e.fn,this.equality())),t},relational:function(){var e,t=this.additive();return(e=this.expect("<",">","<=",">="))&&(t=this.binaryFn(t,e.fn,this.relational())),t},additive:function(){for(var e,t=this.multiplicative();e=this.expect("+","-");)t=this.binaryFn(t,e.fn,this.multiplicative());return t},multiplicative:function(){for(var e,t=this.unary();e=this.expect("*","/","%");)t=this.binaryFn(t,e.fn,this.unary());return t},unary:function(){var e;return this.expect("+")?this.primary():(e=this.expect("-"))?this.binaryFn(kn.ZERO,e.fn,this.unary()):(e=this.expect("!"))?this.unaryFn(e.fn,this.unary()):this.primary()},fieldAccess:function(e){var t=this.text,n=this.expect().text,r=Pn(n,this.options,t);return x(function(t,n,o){return r(o||e(t,n))},{assign:function(r,o,i){var a=e(r,i);return a||e.assign(r,a={}),An(a,n,o,t)}})},objectIndex:function(e){var t=this.text,r=this.expression();return this.consume("]"),x(function(o,i){var a=e(o,i),s=r(o,i);return vn(s,t),a?bn(a[s],t):n},{assign:function(n,o,i){var a=vn(r(n,i),t),s=bn(e(n,i),t);return s||e.assign(n,s={}),s[a]=o}})},functionCall:function(e,t){var n=[];if(")"!==this.peekToken().text)do{n.push(this.expression())}while(this.expect(","));this.consume(")");var r=this.text,o=n.length?[]:null;return function(i,a){var s=t?t(i,a):i,l=e(i,a,s)||S;if(o)for(var c=n.length;c--;)o[c]=bn(n[c](i,a),r);return bn(s,r),function(e,t){if(e){if(e.constructor===e)throw gn("isecfn","Referencing Function in Angular expressions is disallowed! Expression: {0}",t);if(e===$n||e===En||e===yn)throw gn("isecff","Referencing call, apply or bind in Angular expressions is disallowed! Expression: {0}",t)}}(l,r),bn(l.apply?l.apply(s,o):l(o[0],o[1],o[2],o[3],o[4]),r)}},arrayDeclaration:function(){var e=[];if("]"!==this.peekToken().text)do{if(this.peek("]"))break;var t=this.expression();e.push(t)}while(this.expect(","));return this.consume("]"),x(function(t,n){for(var r=[],o=0,i=e.length;o<i;o++)r.push(e[o](t,n));return r},{literal:!0,constant:e.every(xn),inputs:e})},object:function(){var e=[],t=[];if("}"!==this.peekToken().text)do{if(this.peek("}"))break;var n=this.expect();e.push(n.string||n.text),this.consume(":");var r=this.expression();t.push(r)}while(this.expect(","));return this.consume("}"),x(function(n,r){for(var o={},i=0,a=t.length;i<a;i++)o[e[i]]=t[i](n,r);return o},{literal:!0,constant:t.every(xn),inputs:t})}};var Sn=Te();function _n(e,t,r,o,i,a){return vn(e,a),vn(t,a),vn(r,a),vn(o,a),vn(i,a),function(a,s){var l=s&&s.hasOwnProperty(e)?s:a;return null==l?l:(l=l[e],t?null==l?n:(l=l[t],r?null==l?n:(l=l[r],o?null==l?n:(l=l[o],i?null==l?n:l=l[i]:l):l):l):l)}}function Pn(e,t,r){var o=Sn[e];if(o)return o;var i=e.split("."),a=i.length;if(t.csp)o=a<6?_n(i[0],i[1],i[2],i[3],i[4],r):function(e,t){var o,s=0;do{o=_n(i[s++],i[s++],i[s++],i[s++],i[s++],r)(e,t),t=n,e=o}while(s<a);return o};else{var s="";y(i,function(e,t){vn(e,r),s+="if(s == null) return undefined;\ns="+(t?"s":'((l&&l.hasOwnProperty("'+e+'"))?l:s)')+"."+e+";\n"}),s+="return s;";var l=new Function("s","l",s);l.toString=P(s),o=l}return o.sharedGetter=!0,o.assign=function(t,n){return An(t,e,n,e)},Sn[e]=o,o}function Nn(){var e=Te(),t={csp:!1};this.$get=["$filter","$sniffer",function(n,r){return t.csp=r.csp,function(r,o){var d,u,m;switch(typeof r){case"string":if(m=r=r.trim(),!(d=e[m])){":"===r.charAt(0)&&":"===r.charAt(1)&&(u=!0,r=r.substring(2));var f=new Tn(t);(d=new kn(f,n,t).parse(r)).constant?d.$$watchDelegate=l:u?(d=function(e){var t=e;return e.sharedGetter&&((t=function(t,n){return e(t,n)}).literal=e.literal,t.constant=e.constant,t.assign=e.assign),t}(d)).$$watchDelegate=d.literal?s:a:d.inputs&&(d.$$watchDelegate=i),e[m]=d}return c(d,o);case"function":return c(r,o);default:return c(S,o)}};function o(e,t){return null==e||null==t?e===t:("object"!=typeof e||"object"!=typeof(e=e.valueOf()))&&(e===t||e!=e&&t!=t)}function i(e,t,n,r){var i,a=r.$$inputs||(r.$$inputs=function e(t,n){for(var r=0,o=t.length;r<o;r++){var i=t[r];i.constant||(i.inputs?e(i.inputs,n):-1===n.indexOf(i)&&n.push(i))}return n}(r.inputs,[]));if(1===a.length){var s=o;return a=a[0],e.$watch(function(e){var t=a(e);return o(t,s)||(i=r(e),s=t&&t.valueOf()),i},t,n)}for(var l=[],c=0,d=a.length;c<d;c++)l[c]=o;return e.$watch(function(e){for(var t=!1,n=0,s=a.length;n<s;n++){var c=a[n](e);(t||(t=!o(c,l[n])))&&(l[n]=c&&c.valueOf())}return t&&(i=r(e)),i},t,n)}function a(e,t,n,r){var o,i;return o=e.$watch(function(e){return r(e)},function(e,n,r){i=e,F(t)&&t.apply(this,arguments),D(e)&&r.$$postDigest(function(){D(i)&&o()})},n)}function s(e,t,n,r){var o,i;return o=e.$watch(function(e){return r(e)},function(e,n,r){i=e,F(t)&&t.call(this,e,n,r),a(e)&&r.$$postDigest(function(){a(i)&&o()})},n);function a(e){var t=!0;return y(e,function(e){D(e)||(t=!1)}),t}}function l(e,t,n,r){var o;return o=e.$watch(function(e){return r(e)},function(e,n,r){F(t)&&t.apply(this,arguments),o()},n)}function c(e,t){if(!t)return e;var n=function(n,r){var o=e(n,r),i=t(o,n,r);return D(o)?i:o};return e.$$watchDelegate&&e.$$watchDelegate!==i?n.$$watchDelegate=e.$$watchDelegate:t.$stateful||(n.$$watchDelegate=i,n.inputs=[e]),n}}]}function Dn(){this.$get=["$rootScope","$exceptionHandler",function(e,t){return In(function(t){e.$evalAsync(t)},t)}]}function Ln(){this.$get=["$browser","$exceptionHandler",function(e,t){return In(function(t){e.defer(t)},t)}]}function In(e,t){var o=r("$q",TypeError);function i(){this.$$state={status:0}}function a(e,t){return function(n){t.call(e,n)}}function s(r){!r.processScheduled&&r.pending&&(r.processScheduled=!0,e(function(){!function(e){var r,o,i;i=e.pending,e.processScheduled=!1,e.pending=n;for(var a=0,s=i.length;a<s;++a){o=i[a][0],r=i[a][e.status];try{F(r)?o.resolve(r(e.value)):1===e.status?o.resolve(e.value):o.reject(e.value)}catch(e){o.reject(e),t(e)}}}(r)}))}function l(){this.promise=new i,this.resolve=a(this,this.resolve),this.reject=a(this,this.reject),this.notify=a(this,this.notify)}i.prototype={then:function(e,t,n){var r=new l;return this.$$state.pending=this.$$state.pending||[],this.$$state.pending.push([r,e,t,n]),this.$$state.status>0&&s(this.$$state),r.promise},catch:function(e){return this.then(null,e)},finally:function(e,t){return this.then(function(t){return d(t,!0,e)},function(t){return d(t,!1,e)},t)}},l.prototype={resolve:function(e){this.promise.$$state.status||(e===this.promise?this.$$reject(o("qcycle","Expected promise to be resolved with value other than itself '{0}'",e)):this.$$resolve(e))},$$resolve:function(e){var n,r;r=function(e,t,n){var r=!1;function o(t){return function(n){r||(r=!0,t.call(e,n))}}return[o(t),o(n)]}(this,this.$$resolve,this.$$reject);try{(L(e)||F(e))&&(n=e&&e.then),F(n)?(this.promise.$$state.status=-1,n.call(e,r[0],r[1],this.notify)):(this.promise.$$state.value=e,this.promise.$$state.status=1,s(this.promise.$$state))}catch(e){r[1](e),t(e)}},reject:function(e){this.promise.$$state.status||this.$$reject(e)},$$reject:function(e){this.promise.$$state.value=e,this.promise.$$state.status=2,s(this.promise.$$state)},notify:function(n){var r=this.promise.$$state.pending;this.promise.$$state.status<=0&&r&&r.length&&e(function(){for(var e,o,i=0,a=r.length;i<a;i++){o=r[i][0],e=r[i][3];try{o.notify(F(e)?e(n):n)}catch(e){t(e)}}})}};var c=function(e,t){var n=new l;return t?n.resolve(e):n.reject(e),n.promise},d=function(e,t,n){var r=null;try{F(n)&&(r=n())}catch(e){return c(e,!1)}return q(r)?r.then(function(){return c(e,t)},function(e){return c(e,!1)}):c(e,t)},u=function(e,t,n,r){var o=new l;return o.resolve(e),o.promise.then(t,n,r)};var m=function e(t){if(!F(t))throw o("norslvr","Expected resolverFn, got '{0}'",t);if(!(this instanceof e))return new e(t);var n=new l;return t(function(e){n.resolve(e)},function(e){n.reject(e)}),n.promise};return m.defer=function(){return new l},m.reject=function(e){var t=new l;return t.reject(e),t.promise},m.when=u,m.all=function(e){var t=new l,n=0,r=R(e)?[]:{};return y(e,function(e,o){n++,u(e).then(function(e){r.hasOwnProperty(o)||(r[o]=e,--n||t.resolve(r))},function(e){r.hasOwnProperty(o)||t.reject(e)})}),0===n&&t.resolve(r),t.promise},m}function On(){this.$get=["$window","$timeout",function(e,t){var n=e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame,r=e.cancelAnimationFrame||e.webkitCancelAnimationFrame||e.mozCancelAnimationFrame||e.webkitCancelRequestAnimationFrame,o=!!n,i=o?function(e){var t=n(e);return function(){r(t)}}:function(e){var n=t(e,16.66,!1);return function(){t.cancel(n)}};return i.supported=o,i}]}function Hn(){var e=10,t=r("$rootScope"),n=null,o=null;this.digestTtl=function(t){return arguments.length&&(e=t),e},this.$get=["$injector","$exceptionHandler","$parse","$browser",function(r,i,a,l){function c(){this.$id=M(),this.$$phase=this.$parent=this.$$watchers=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null,this.$root=this,this.$$destroyed=!1,this.$$listeners={},this.$$listenerCount={},this.$$isolateBindings=null}c.prototype={constructor:c,$new:function(e,t){var n;return t=t||this,e?(n=new c).$root=this.$root:(this.$$ChildScope||(this.$$ChildScope=function(){this.$$watchers=this.$$nextSibling=this.$$childHead=this.$$childTail=null,this.$$listeners={},this.$$listenerCount={},this.$id=M(),this.$$ChildScope=null},this.$$ChildScope.prototype=this),n=new this.$$ChildScope),n.$parent=t,n.$$prevSibling=t.$$childTail,t.$$childHead?(t.$$childTail.$$nextSibling=n,t.$$childTail=n):t.$$childHead=t.$$childTail=n,(e||t!=this)&&n.$on("$destroy",function(){n.$$destroyed=!0}),n},$watch:function(e,t,r){var o=a(e);if(o.$$watchDelegate)return o.$$watchDelegate(this,t,r,o);var i=this.$$watchers,s={fn:t,last:v,get:o,exp:e,eq:!!r};return n=null,F(t)||(s.fn=S),i||(i=this.$$watchers=[]),i.unshift(s),function(){Y(i,s),n=null}},$watchGroup:function(e,t){var n=new Array(e.length),r=new Array(e.length),o=[],i=this,a=!1,s=!0;if(!e.length){var l=!0;return i.$evalAsync(function(){l&&t(r,r,i)}),function(){l=!1}}if(1===e.length)return this.$watch(e[0],function(e,o,i){r[0]=e,n[0]=o,t(r,e===o?r:n,i)});function c(){a=!1,s?(s=!1,t(r,r,i)):t(r,n,i)}return y(e,function(e,t){var s=i.$watch(e,function(e,o){r[t]=e,n[t]=o,a||(a=!0,i.$evalAsync(c))});o.push(s)}),function(){for(;o.length;)o.shift()()}},$watchCollection:function(e,t){h.$stateful=!0;var n,r,o,i=this,l=t.length>1,c=0,d=a(e,h),u=[],m={},f=!0,p=0;function h(e){var t,o,i,a;if(L(n=e))if(E(n)){r!==u&&(p=(r=u).length=0,c++),t=n.length,p!==t&&(c++,r.length=p=t);for(var s=0;s<t;s++)a=r[s],i=n[s],a!=a&&i!=i||a===i||(c++,r[s]=i)}else{for(o in r!==m&&(r=m={},p=0,c++),t=0,n)n.hasOwnProperty(o)&&(t++,i=n[o],a=r[o],o in r?a!=a&&i!=i||a===i||(c++,r[o]=i):(p++,r[o]=i,c++));if(p>t)for(o in c++,r)n.hasOwnProperty(o)||(p--,delete r[o])}else r!==n&&(r=n,c++);return c}return this.$watch(d,function(){if(f?(f=!1,t(n,n,i)):t(n,o,i),l)if(L(n))if(E(n)){o=new Array(n.length);for(var e=0;e<n.length;e++)o[e]=n[e]}else for(var r in o={},n)s.call(n,r)&&(o[r]=n[r]);else o=n})},$digest:function(){var r,a,s,c,f,g,$,E,y,w,C,M=e,T=[];p("$digest"),l.$$checkUrlChange(),this===d&&null!==o&&(l.defer.cancel(o),b()),n=null;do{for(g=!1,E=this;u.length;){try{(C=u.shift()).scope.$eval(C.expression)}catch(e){i(e)}n=null}e:do{if(c=E.$$watchers)for(f=c.length;f--;)try{if(r=c[f])if((a=r.get(E))===(s=r.last)||(r.eq?Z(a,s):"number"==typeof a&&"number"==typeof s&&isNaN(a)&&isNaN(s))){if(r===n){g=!1;break e}}else g=!0,n=r,r.last=r.eq?G(a,null):a,r.fn(a,s===v?a:s,E),M<5&&(T[y=4-M]||(T[y]=[]),w=F(r.exp)?"fn: "+(r.exp.name||r.exp.toString()):r.exp,w+="; newVal: "+re(a)+"; oldVal: "+re(s),T[y].push(w))}catch(e){i(e)}if(!($=E.$$childHead||E!==this&&E.$$nextSibling))for(;E!==this&&!($=E.$$nextSibling);)E=E.$parent}while(E=$);if((g||u.length)&&!M--)throw h(),t("infdig","{0} $digest() iterations reached. Aborting!\nWatchers fired in the last 5 iterations: {1}",e,re(T))}while(g||u.length);for(h();m.length;)try{m.shift()()}catch(e){i(e)}},$destroy:function(){if(!this.$$destroyed){var e=this.$parent;if(this.$broadcast("$destroy"),this.$$destroyed=!0,this!==d){for(var t in this.$$listenerCount)g(this,this.$$listenerCount[t],t);e.$$childHead==this&&(e.$$childHead=this.$$nextSibling),e.$$childTail==this&&(e.$$childTail=this.$$prevSibling),this.$$prevSibling&&(this.$$prevSibling.$$nextSibling=this.$$nextSibling),this.$$nextSibling&&(this.$$nextSibling.$$prevSibling=this.$$prevSibling),this.$destroy=this.$digest=this.$apply=this.$evalAsync=this.$applyAsync=S,this.$on=this.$watch=this.$watchGroup=function(){return S},this.$$listeners={},this.$parent=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=this.$root=this.$$watchers=null}}},$eval:function(e,t){return a(e)(this,t)},$evalAsync:function(e){d.$$phase||u.length||l.defer(function(){u.length&&d.$digest()}),u.push({scope:this,expression:e})},$$postDigest:function(e){m.push(e)},$apply:function(e){try{return p("$apply"),this.$eval(e)}catch(e){i(e)}finally{h();try{d.$digest()}catch(e){throw i(e),e}}},$applyAsync:function(e){var t=this;e&&f.push(function(){t.$eval(e)}),null===o&&(o=l.defer(function(){d.$apply(b)}))},$on:function(e,t){var n=this.$$listeners[e];n||(this.$$listeners[e]=n=[]),n.push(t);var r=this;do{r.$$listenerCount[e]||(r.$$listenerCount[e]=0),r.$$listenerCount[e]++}while(r=r.$parent);var o=this;return function(){n[n.indexOf(t)]=null,g(o,1,e)}},$emit:function(e,t){var n,r,o,a=[],s=this,l=!1,c={name:e,targetScope:s,stopPropagation:function(){l=!0},preventDefault:function(){c.defaultPrevented=!0},defaultPrevented:!1},d=J([c],arguments,1);do{for(n=s.$$listeners[e]||a,c.currentScope=s,r=0,o=n.length;r<o;r++)if(n[r])try{n[r].apply(null,d)}catch(e){i(e)}else n.splice(r,1),r--,o--;if(l)return c.currentScope=null,c;s=s.$parent}while(s);return c.currentScope=null,c},$broadcast:function(e,t){var n=this,r=this,o={name:e,targetScope:this,preventDefault:function(){o.defaultPrevented=!0},defaultPrevented:!1};if(!this.$$listenerCount[e])return o;for(var a,s,l,c=J([o],arguments,1);n=r;){for(o.currentScope=n,s=0,l=(a=n.$$listeners[e]||[]).length;s<l;s++)if(a[s])try{a[s].apply(null,c)}catch(e){i(e)}else a.splice(s,1),s--,l--;if(!(r=n.$$listenerCount[e]&&n.$$childHead||n!==this&&n.$$nextSibling))for(;n!==this&&!(r=n.$$nextSibling);)n=n.$parent}return o.currentScope=null,o}};var d=new c,u=d.$$asyncQueue=[],m=d.$$postDigestQueue=[],f=d.$$applyAsyncQueue=[];return d;function p(e){if(d.$$phase)throw t("inprog","{0} already in progress",d.$$phase);d.$$phase=e}function h(){d.$$phase=null}function g(e,t,n){do{e.$$listenerCount[n]-=t,0===e.$$listenerCount[n]&&delete e.$$listenerCount[n]}while(e=e.$parent)}function v(){}function b(){for(;f.length;)try{f.shift()()}catch(e){i(e)}o=null}}]}function Rn(){var e=/^\s*(https?|ftp|mailto|tel|file):/,t=/^\s*((https?|ftp|file|blob):|data:image\/)/;this.aHrefSanitizationWhitelist=function(t){return D(t)?(e=t,this):e},this.imgSrcSanitizationWhitelist=function(e){return D(e)?(t=e,this):t},this.$get=function(){return function(n,r){var o,i=r?t:e;return""===(o=Qn(n).href)||o.match(i)?n:"unsafe:"+o}}}var Fn=r("$sce"),Vn={HTML:"html",CSS:"css",URL:"url",RESOURCE_URL:"resourceUrl",JS:"js"};function Bn(e){var t=[];return D(e)&&y(e,function(e){t.push(function(e){if("self"===e)return e;if(I(e)){if(e.indexOf("***")>-1)throw Fn("iwcard","Illegal sequence *** in string matcher. String: {0}",e);return e=(t=e,t.replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08")).replace("\\*\\*",".*").replace("\\*","[^:/.?&;]*"),new RegExp("^"+e+"$")}if(V(e))return new RegExp("^"+e.source+"$");throw Fn("imatcher",'Matchers may only be "self", string patterns or RegExp objects');var t}(e))}),t}function Un(){this.SCE_CONTEXTS=Vn;var e=["self"],t=[];this.resourceUrlWhitelist=function(t){return arguments.length&&(e=Bn(t)),e},this.resourceUrlBlacklist=function(e){return arguments.length&&(t=Bn(e)),t},this.$get=["$injector",function(r){var o=function(e){throw Fn("unsafe","Attempting to use an unsafe value in a safe context.")};function i(e,t){return"self"===e?Zn(t):!!e.exec(t.href)}function a(e){var t=function(e){this.$$unwrapTrustedValue=function(){return e}};return e&&(t.prototype=new e),t.prototype.valueOf=function(){return this.$$unwrapTrustedValue()},t.prototype.toString=function(){return this.$$unwrapTrustedValue().toString()},t}r.has("$sanitize")&&(o=r.get("$sanitize"));var s=a(),l={};return l[Vn.HTML]=a(s),l[Vn.CSS]=a(s),l[Vn.URL]=a(s),l[Vn.JS]=a(s),l[Vn.RESOURCE_URL]=a(l[Vn.URL]),{trustAs:function(e,t){var r=l.hasOwnProperty(e)?l[e]:null;if(!r)throw Fn("icontext","Attempted to trust a value in invalid context. Context: {0}; Value: {1}",e,t);if(null===t||t===n||""===t)return t;if("string"!=typeof t)throw Fn("itype","Attempted to trust a non-string value in a content requiring a string: Context: {0}",e);return new r(t)},getTrusted:function(r,a){if(null===a||a===n||""===a)return a;var s=l.hasOwnProperty(r)?l[r]:null;if(s&&a instanceof s)return a.$$unwrapTrustedValue();if(r===Vn.RESOURCE_URL){if(function(n){var r,o,a=Qn(n.toString()),s=!1;for(r=0,o=e.length;r<o;r++)if(i(e[r],a)){s=!0;break}if(s)for(r=0,o=t.length;r<o;r++)if(i(t[r],a)){s=!1;break}return s}(a))return a;throw Fn("insecurl","Blocked loading resource from url not allowed by $sceDelegate policy. URL: {0}",a.toString())}if(r===Vn.HTML)return o(a);throw Fn("unsafe","Attempting to use an unsafe value in a safe context.")},valueOf:function(e){return e instanceof s?e.$$unwrapTrustedValue():e}}}]}function jn(){var e=!0;this.enabled=function(t){return arguments.length&&(e=!!t),e},this.$get=["$document","$parse","$sceDelegate",function(t,n,r){if(e&&t[0].documentMode<8)throw Fn("iequirks","Strict Contextual Escaping does not support Internet Explorer version < 11 in quirks mode. You can fix this by adding the text <!doctype html> to the top of your HTML document. See http://docs.angularjs.org/api/ng.$sce for more information.");var o=Q(Vn);o.isEnabled=function(){return e},o.trustAs=r.trustAs,o.getTrusted=r.getTrusted,o.valueOf=r.valueOf,e||(o.trustAs=o.getTrusted=function(e,t){return t},o.valueOf=_),o.parseAs=function(e,t){var r=n(t);return r.literal&&r.constant?r:n(t,function(t){return o.getTrusted(e,t)})};var i=o.parseAs,s=o.getTrusted,l=o.trustAs;return y(Vn,function(e,t){var n=a(t);o[Ve("parse_as_"+n)]=function(t){return i(e,t)},o[Ve("get_trusted_"+n)]=function(t){return s(e,t)},o[Ve("trust_as_"+n)]=function(t){return l(e,t)}}),o}]}function qn(){this.$get=["$window","$document",function(e,t){var n,r,o={},i=k((/android (\d+)/.exec(a((e.navigator||{}).userAgent))||[])[1]),s=/Boxee/i.test((e.navigator||{}).userAgent),l=t[0]||{},d=/^(Moz|webkit|O|ms)(?=[A-Z])/,u=l.body&&l.body.style,m=!1,f=!1;if(u){for(var p in u)if(r=d.exec(p)){n=(n=r[0]).substr(0,1).toUpperCase()+n.substr(1);break}n||(n="WebkitOpacity"in u&&"webkit"),m=!!("transition"in u||n+"Transition"in u),f=!!("animation"in u||n+"Animation"in u),!i||m&&f||(m=I(l.body.style.webkitTransition),f=I(l.body.style.webkitAnimation))}return{history:!(!e.history||!e.history.pushState||i<4||s),hasEvent:function(e){if("input"==e&&9==c)return!1;if(N(o[e])){var t=l.createElement("div");o[e]="on"+e in t}return o[e]},csp:X(),vendorPrefix:n,transitions:m,animations:f,android:i}}]}Nt=r("$compile");function Wn(){this.$get=["$templateCache","$http","$q",function(e,t,n){function r(o,i){var a=r;return a.totalPendingRequests++,t.get(o,{cache:e}).then(function(t){var n=t.data;return n&&0!==n.length?(a.totalPendingRequests--,e.put(o,n),n):s()},s);function s(){if(a.totalPendingRequests--,!i)throw Nt("tpload","Failed to load template: {0}",o);return n.reject()}}return r.totalPendingRequests=0,r}]}function Kn(){this.$get=["$rootScope","$browser","$location",function(e,t,n){var r={findBindings:function(e,t,n){var r=[];return y(e.getElementsByClassName("ng-binding"),function(e){var o=b.element(e).data("$binding");o&&y(o,function(o){n?new RegExp("(^|\\s)"+t+"(\\s|\\||$)").test(o)&&r.push(e):-1!=o.indexOf(t)&&r.push(e)})}),r},findModels:function(e,t,n){for(var r=["ng-","data-ng-","ng\\:"],o=0;o<r.length;++o){var i="["+r[o]+"model"+(n?"=":"*=")+'"'+t+'"]',a=e.querySelectorAll(i);if(a.length)return a}},getLocation:function(){return n.url()},setLocation:function(t){t!==n.url()&&(n.url(t),e.$digest())},whenStable:function(e){t.notifyWhenNoOutstandingRequests(e)}};return r}]}function zn(){this.$get=["$rootScope","$browser","$q","$$q","$exceptionHandler",function(e,t,n,r,o){var i={};function a(a,s,l){var c,d=D(l)&&!l,u=(d?r:n).defer(),m=u.promise;return c=t.defer(function(){try{u.resolve(a())}catch(e){u.reject(e),o(e)}finally{delete i[m.$$timeoutId]}d||e.$apply()},s),m.$$timeoutId=c,i[c]=u,m}return a.cancel=function(e){return!!(e&&e.$$timeoutId in i)&&(i[e.$$timeoutId].reject("canceled"),delete i[e.$$timeoutId],t.defer.cancel(e.$$timeoutId))},a}]}var Yn=t.createElement("a"),Gn=Qn(e.location.href,!0);function Qn(e,t){var n=e;return c&&(Yn.setAttribute("href",n),n=Yn.href),Yn.setAttribute("href",n),{href:Yn.href,protocol:Yn.protocol?Yn.protocol.replace(/:$/,""):"",host:Yn.host,search:Yn.search?Yn.search.replace(/^\?/,""):"",hash:Yn.hash?Yn.hash.replace(/^#/,""):"",hostname:Yn.hostname,port:Yn.port,pathname:"/"===Yn.pathname.charAt(0)?Yn.pathname:"/"+Yn.pathname}}function Zn(e){var t=I(e)?Qn(e):e;return t.protocol===Gn.protocol&&t.host===Gn.host}function Xn(){this.$get=P(e)}function Jn(e){var t="Filter";function n(r,o){if(L(r)){var i={};return y(r,function(e,t){i[t]=n(t,e)}),i}return e.factory(r+t,o)}this.register=n,this.$get=["$injector",function(e){return function(n){return e.get(n+t)}}],n("currency",tr),n("date",fr),n("filter",er),n("json",pr),n("limitTo",vr),n("lowercase",hr),n("number",nr),n("orderBy",br),n("uppercase",gr)}function er(){return function(e,t,n){if(!R(e))return e;var r=typeof n,o=[];o.check=function(e,t){for(var n=0;n<o.length;n++)if(!o[n](e,t))return!1;return!0},"function"!==r&&(n="boolean"===r&&n?function(e,t){return b.equals(e,t)}:function(e,t){if(e&&t&&"object"==typeof e&&"object"==typeof t){for(var r in e)if("$"!==r.charAt(0)&&s.call(e,r)&&n(e[r],t[r]))return!0;return!1}return t=(""+t).toLowerCase(),(""+e).toLowerCase().indexOf(t)>-1});var i=function(e,t){if("string"==typeof t&&"!"===t.charAt(0))return!i(e,t.substr(1));switch(typeof e){case"boolean":case"number":case"string":return n(e,t);case"object":switch(typeof t){case"object":return n(e,t);default:for(var r in e)if("$"!==r.charAt(0)&&i(e[r],t))return!0}return!1;case"array":for(var o=0;o<e.length;o++)if(i(e[o],t))return!0;return!1;default:return!1}};switch(typeof t){case"boolean":case"number":case"string":t={$:t};case"object":for(var a in t)!function(e){void 0!==t[e]&&o.push(function(n){return i("$"==e?n:n&&n[e],t[e])})}(a);break;case"function":o.push(t);break;default:return e}for(var l=[],c=0;c<e.length;c++){var d=e[c];o.check(d,c)&&l.push(d)}return l}}function tr(e){var t=e.NUMBER_FORMATS;return function(e,n,r){return N(n)&&(n=t.CURRENCY_SYM),N(r)&&(r=2),null==e?e:or(e,t.PATTERNS[1],t.GROUP_SEP,t.DECIMAL_SEP,r).replace(/\u00A4/g,n)}}function nr(e){var t=e.NUMBER_FORMATS;return function(e,n){return null==e?e:or(e,t.PATTERNS[0],t.GROUP_SEP,t.DECIMAL_SEP,n)}}Jn.$inject=["$provide"],tr.$inject=["$locale"],nr.$inject=["$locale"];var rr=".";function or(e,t,n,r,o){if(!isFinite(e)||L(e))return"";var i=e<0,a=(e=Math.abs(e))+"",s="",l=[],c=!1;if(-1!==a.indexOf("e")){var d=a.match(/([\d\.]+)e(-?)(\d+)/);d&&"-"==d[2]&&d[3]>o+1?(a="0",e=0):(s=a,c=!0)}if(c)o>0&&e>-1&&e<1&&(s=e.toFixed(o));else{var u=(a.split(rr)[1]||"").length;N(o)&&(o=Math.min(Math.max(t.minFrac,u),t.maxFrac)),0===(e=+(Math.round(+(e.toString()+"e"+o)).toString()+"e"+-o))&&(i=!1);var m=(""+e).split(rr),f=m[0];m=m[1]||"";var p,h=0,g=t.lgSize,v=t.gSize;if(f.length>=g+v)for(h=f.length-g,p=0;p<h;p++)(h-p)%v==0&&0!==p&&(s+=n),s+=f.charAt(p);for(p=h;p<f.length;p++)(f.length-p)%g==0&&0!==p&&(s+=n),s+=f.charAt(p);for(;m.length<o;)m+="0";o&&"0"!==o&&(s+=r+m.substr(0,o))}return l.push(i?t.negPre:t.posPre),l.push(s),l.push(i?t.negSuf:t.posSuf),l.join("")}function ir(e,t,n){var r="";for(e<0&&(r="-",e=-e),e=""+e;e.length<t;)e="0"+e;return n&&(e=e.substr(e.length-t)),r+e}function ar(e,t,n,r){return n=n||0,function(o){var i=o["get"+e]();return(n>0||i>-n)&&(i+=n),0===i&&-12==n&&(i=12),ir(i,t,r)}}function sr(e,t){return function(n,r){var o=n["get"+e]();return r[l(t?"SHORT"+e:e)][o]}}function lr(e){var t=new Date(e,0,1).getDay();return new Date(e,0,(t<=4?5:12)-t)}function cr(e){return function(t){var n,r=lr(t.getFullYear()),o=+(n=t,new Date(n.getFullYear(),n.getMonth(),n.getDate()+(4-n.getDay())))-+r;return ir(1+Math.round(o/6048e5),e)}}var dr={yyyy:ar("FullYear",4),yy:ar("FullYear",2,0,!0),y:ar("FullYear",1),MMMM:sr("Month"),MMM:sr("Month",!0),MM:ar("Month",2,1),M:ar("Month",1,1),dd:ar("Date",2),d:ar("Date",1),HH:ar("Hours",2),H:ar("Hours",1),hh:ar("Hours",2,-12),h:ar("Hours",1,-12),mm:ar("Minutes",2),m:ar("Minutes",1),ss:ar("Seconds",2),s:ar("Seconds",1),sss:ar("Milliseconds",3),EEEE:sr("Day"),EEE:sr("Day",!0),a:function(e,t){return e.getHours()<12?t.AMPMS[0]:t.AMPMS[1]},Z:function(e){var t=-1*e.getTimezoneOffset(),n=t>=0?"+":"";return n+=ir(Math[t>0?"floor":"ceil"](t/60),2)+ir(Math.abs(t%60),2)},ww:cr(2),w:cr(1)},ur=/((?:[^yMdHhmsaZEw']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z|w+))(.*)/,mr=/^\-?\d+$/;function fr(e){var t=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;return function(n,r,o){var i,a,s="",l=[];if(r=r||"mediumDate",r=e.DATETIME_FORMATS[r]||r,I(n)&&(n=mr.test(n)?k(n):function(e){var n;if(n=e.match(t)){var r=new Date(0),o=0,i=0,a=n[8]?r.setUTCFullYear:r.setFullYear,s=n[8]?r.setUTCHours:r.setHours;n[9]&&(o=k(n[9]+n[10]),i=k(n[9]+n[11])),a.call(r,k(n[1]),k(n[2])-1,k(n[3]));var l=k(n[4]||0)-o,c=k(n[5]||0)-i,d=k(n[6]||0),u=Math.round(1e3*parseFloat("0."+(n[7]||0)));return s.call(r,l,c,d,u),r}return e}(n)),O(n)&&(n=new Date(n)),!H(n))return n;for(;r;)(a=ur.exec(r))?r=(l=J(l,a,1)).pop():(l.push(r),r=null);return o&&"UTC"===o&&(n=new Date(n.getTime())).setMinutes(n.getMinutes()+n.getTimezoneOffset()),y(l,function(t){i=dr[t],s+=i?i(n,e.DATETIME_FORMATS):t.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),s}}function pr(){return function(e){return re(e,!0)}}fr.$inject=["$locale"];var hr=P(a),gr=P(l);function vr(){return function(e,t){if(O(e)&&(e=e.toString()),!R(e)&&!I(e))return e;if(t=Math.abs(Number(t))===1/0?Number(t):k(t),I(e))return t?t>=0?e.slice(0,t):e.slice(t,e.length):"";var n,r,o=[];for(t>e.length?t=e.length:t<-e.length&&(t=-e.length),t>0?(n=0,r=t):(n=e.length+t,r=e.length);n<r;n++)o.push(e[n]);return o}}function br(e){return function(t,n,r){if(!E(t))return t;0===(n=R(n)?n:[n]).length&&(n=["+"]),n=n.map(function(t){var n=!1,r=t||_;if(I(t)){if("+"!=t.charAt(0)&&"-"!=t.charAt(0)||(n="-"==t.charAt(0),t=t.substring(1)),""===t)return a(function(e,t){return s(e,t)},n);if((r=e(t)).constant){var o=r();return a(function(e,t){return s(e[o],t[o])},n)}}return a(function(e,t){return s(r(e),r(t))},n)});for(var o=[],i=0;i<t.length;i++)o.push(t[i]);return o.sort(a(function(e,t){for(var r=0;r<n.length;r++){var o=n[r](e,t);if(0!==o)return o}return 0},r));function a(e,t){return t?function(t,n){return e(n,t)}:e}function s(e,t){var n=typeof e,r=typeof t;return n==r?(H(e)&&H(t)&&(e=e.valueOf(),t=t.valueOf()),"string"==n&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t?0:e<t?-1:1):n<r?-1:1}}}function $r(e){return F(e)&&(e={link:e}),e.restrict=e.restrict||"AC",P(e)}br.$inject=["$parse"];var Er=P({restrict:"E",compile:function(e,t){if(!t.href&&!t.xlinkHref&&!t.name)return function(e,t){var n="[object SVGAnimatedString]"===g.call(t.prop("href"))?"xlink:href":"href";t.on("click",function(e){t.attr(n)||e.preventDefault()})}}}),yr={};y(ut,function(e,t){if("multiple"!=e){var n=It("ng-"+t);yr[n]=function(){return{restrict:"A",priority:100,link:function(e,r,o){e.$watch(o[n],function(e){o.$set(t,!!e)})}}}}}),y(ft,function(e,t){yr[t]=function(){return{priority:100,link:function(e,n,r){if("ngPattern"===t&&"/"==r.ngPattern.charAt(0)){var i=r.ngPattern.match(o);if(i)return void r.$set("ngPattern",new RegExp(i[1],i[2]))}e.$watch(r[t],function(e){r.$set(t,e)})}}}}),y(["src","srcset","href"],function(e){var t=It("ng-"+e);yr[t]=function(){return{priority:99,link:function(n,r,o){var i=e,a=e;"href"===e&&"[object SVGAnimatedString]"===g.call(r.prop("href"))&&(a="xlinkHref",o.$attr[a]="xlink:href",i=null),o.$observe(t,function(t){t?(o.$set(a,t),c&&i&&r.prop(i,o[a])):"href"===e&&o.$set(a,null)})}}}});var wr={$addControl:S,$$renameControl:function(e,t){e.$name=t},$removeControl:S,$setValidity:S,$setDirty:S,$setPristine:S,$setSubmitted:S},Cr="ng-submitted";function Mr(e,t,r,o,i){var a=this,s=[],l=a.$$parentForm=e.parent().controller("form")||wr;a.$error={},a.$$success={},a.$pending=n,a.$name=i(t.name||t.ngForm||"")(r),a.$dirty=!1,a.$pristine=!0,a.$valid=!0,a.$invalid=!1,a.$submitted=!1,l.$addControl(a),a.$rollbackViewValue=function(){y(s,function(e){e.$rollbackViewValue()})},a.$commitViewValue=function(){y(s,function(e){e.$commitViewValue()})},a.$addControl=function(e){we(e.$name,"input"),s.push(e),e.$name&&(a[e.$name]=e)},a.$$renameControl=function(e,t){var n=e.$name;a[n]===e&&delete a[n],a[t]=e,e.$name=t},a.$removeControl=function(e){e.$name&&a[e.$name]===e&&delete a[e.$name],y(a.$pending,function(t,n){a.$setValidity(n,null,e)}),y(a.$error,function(t,n){a.$setValidity(n,null,e)}),Y(s,e)},co({ctrl:this,$element:e,set:function(e,t,n){var r=e[t];r?-1===r.indexOf(n)&&r.push(n):e[t]=[n]},unset:function(e,t,n){var r=e[t];r&&(Y(r,n),0===r.length&&delete e[t])},parentForm:l,$animate:o}),a.$setDirty=function(){o.removeClass(e,Gr),o.addClass(e,Qr),a.$dirty=!0,a.$pristine=!1,l.$setDirty()},a.$setPristine=function(){o.setClass(e,Gr,Qr+" "+Cr),a.$dirty=!1,a.$pristine=!0,a.$submitted=!1,y(s,function(e){e.$setPristine()})},a.$setUntouched=function(){y(s,function(e){e.$setUntouched()})},a.$setSubmitted=function(){o.addClass(e,Cr),a.$submitted=!0,l.$setSubmitted()}}Mr.$inject=["$element","$attrs","$scope","$animate","$interpolate"];var Tr=function(e){return["$timeout",function(t){return{name:"form",restrict:e?"EAC":"E",controller:Mr,compile:function(e){return e.addClass(Gr).addClass(zr),{pre:function(e,r,o,i){if(!("action"in o)){var a=function(t){e.$apply(function(){i.$commitViewValue(),i.$setSubmitted()}),t.preventDefault?t.preventDefault():t.returnValue=!1};Le(r[0],"submit",a),r.on("$destroy",function(){t(function(){Ie(r[0],"submit",a)},0,!1)})}var s=i.$$parentForm,l=i.$name;l&&(An(e,l,i,l),o.$observe(o.name?"name":"ngForm",function(t){l!==t&&(An(e,l,n,l),An(e,l=t,i,l),s.$$renameControl(i,l))})),r.on("$destroy",function(){s.$removeControl(i),l&&An(e,l,n,l),x(i,wr)})}}}}}]},xr=Tr(),kr=Tr(!0),Ar=/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z)/,Sr=/^(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?$/,_r=/^[a-z0-9!#$%&'*+\/=?^_`{|}~.-]+@[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/i,Pr=/^\s*(\-|\+)?(\d+|(\d*(\.\d*)))\s*$/,Nr=/^(\d{4})-(\d{2})-(\d{2})$/,Dr=/^(\d{4})-(\d\d)-(\d\d)T(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,Lr=/^(\d{4})-W(\d\d)$/,Ir=/^(\d{4})-(\d\d)$/,Or=/^(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,Hr=/(\s+|^)default(\s+|$)/,Rr=new r("ngModel"),Fr={text:function(e,t,n,r,o,i){Br(e,t,n,r,o,i),Vr(r)},date:jr("date",Nr,Ur(Nr,["yyyy","MM","dd"]),"yyyy-MM-dd"),"datetime-local":jr("datetimelocal",Dr,Ur(Dr,["yyyy","MM","dd","HH","mm","ss","sss"]),"yyyy-MM-ddTHH:mm:ss.sss"),time:jr("time",Or,Ur(Or,["HH","mm","ss","sss"]),"HH:mm:ss.sss"),week:jr("week",Lr,function(e,t){if(H(e))return e;if(I(e)){Lr.lastIndex=0;var n=Lr.exec(e);if(n){var r=+n[1],o=+n[2],i=0,a=0,s=0,l=0,c=lr(r),d=7*(o-1);return t&&(i=t.getHours(),a=t.getMinutes(),s=t.getSeconds(),l=t.getMilliseconds()),new Date(r,0,c.getDate()+d,i,a,s,l)}}return NaN},"yyyy-Www"),month:jr("month",Ir,Ur(Ir,["yyyy","MM"]),"yyyy-MM"),number:function(e,t,r,o,i,a){if(qr(e,t,r,o),Br(e,t,r,o,i,a),o.$$parserName="number",o.$parsers.push(function(e){return o.$isEmpty(e)?null:Pr.test(e)?parseFloat(e):n}),o.$formatters.push(function(e){if(!o.$isEmpty(e)){if(!O(e))throw Rr("numfmt","Expected `{0}` to be a number",e);e=e.toString()}return e}),r.min||r.ngMin){var s;o.$validators.min=function(e){return o.$isEmpty(e)||N(s)||e>=s},r.$observe("min",function(e){D(e)&&!O(e)&&(e=parseFloat(e,10)),s=O(e)&&!isNaN(e)?e:n,o.$validate()})}if(r.max||r.ngMax){var l;o.$validators.max=function(e){return o.$isEmpty(e)||N(l)||e<=l},r.$observe("max",function(e){D(e)&&!O(e)&&(e=parseFloat(e,10)),l=O(e)&&!isNaN(e)?e:n,o.$validate()})}},url:function(e,t,n,r,o,i){Br(e,t,n,r,o,i),Vr(r),r.$$parserName="url",r.$validators.url=function(e){return r.$isEmpty(e)||Sr.test(e)}},email:function(e,t,n,r,o,i){Br(e,t,n,r,o,i),Vr(r),r.$$parserName="email",r.$validators.email=function(e){return r.$isEmpty(e)||_r.test(e)}},radio:function(e,t,n,r){N(n.name)&&t.attr("name",M());t.on("click",function(e){t[0].checked&&r.$setViewValue(n.value,e&&e.type)}),r.$render=function(){var e=n.value;t[0].checked=e==r.$viewValue},n.$observe("value",r.$render)},checkbox:function(e,t,n,r,o,i,a,s){var l=Wr(s,e,"ngTrueValue",n.ngTrueValue,!0),c=Wr(s,e,"ngFalseValue",n.ngFalseValue,!1);t.on("click",function(e){r.$setViewValue(t[0].checked,e&&e.type)}),r.$render=function(){t[0].checked=r.$viewValue},r.$isEmpty=function(e){return e!==l},r.$formatters.push(function(e){return Z(e,l)}),r.$parsers.push(function(e){return e?l:c})},hidden:S,button:S,submit:S,reset:S,file:S};function Vr(e){e.$formatters.push(function(t){return e.$isEmpty(t)?t:t.toString()})}function Br(e,t,n,r,o,s){t.prop(i);var l=t[0].placeholder,d={},u=a(t[0].type);if(!o.android){var m=!1;t.on("compositionstart",function(e){m=!0}),t.on("compositionend",function(){m=!1,f()})}var f=function(e){if(!m){var o=t.val(),i=e&&e.type;c&&"input"===(e||d).type&&t[0].placeholder!==l?l=t[0].placeholder:("password"===u||n.ngTrim&&"false"===n.ngTrim||(o=W(o)),(r.$viewValue!==o||""===o&&r.$$hasNativeValidators)&&r.$setViewValue(o,i))}};if(o.hasEvent("input"))t.on("input",f);else{var p,h=function(e){p||(p=s.defer(function(){f(e),p=null}))};t.on("keydown",function(e){var t=e.keyCode;91===t||15<t&&t<19||37<=t&&t<=40||h(e)}),o.hasEvent("paste")&&t.on("paste cut",h)}t.on("change",f),r.$render=function(){t.val(r.$isEmpty(r.$modelValue)?"":r.$viewValue)}}function Ur(e,t){return function(n,r){var o,i;if(H(n))return n;if(I(n)){if('"'==n.charAt(0)&&'"'==n.charAt(n.length-1)&&(n=n.substring(1,n.length-1)),Ar.test(n))return new Date(n);if(e.lastIndex=0,o=e.exec(n))return o.shift(),i=r?{yyyy:r.getFullYear(),MM:r.getMonth()+1,dd:r.getDate(),HH:r.getHours(),mm:r.getMinutes(),ss:r.getSeconds(),sss:r.getMilliseconds()/1e3}:{yyyy:1970,MM:1,dd:1,HH:0,mm:0,ss:0,sss:0},y(o,function(e,n){n<t.length&&(i[t[n]]=+e)}),new Date(i.yyyy,i.MM-1,i.dd,i.HH,i.mm,i.ss||0,1e3*i.sss||0)}return NaN}}function jr(e,t,r,o){return function(i,a,s,l,c,d,u){qr(i,a,s,l),Br(0,a,s,l,c,d);var m,f,p,h=l&&l.$options&&l.$options.timezone;(l.$$parserName=e,l.$parsers.push(function(e){if(l.$isEmpty(e))return null;if(t.test(e)){var o=r(e,m);return"UTC"===h&&o.setMinutes(o.getMinutes()-o.getTimezoneOffset()),o}return n}),l.$formatters.push(function(e){if(!l.$isEmpty(e)){if(!H(e))throw Rr("datefmt","Expected `{0}` to be a date",e);if((m=e)&&"UTC"===h){var t=6e4*m.getTimezoneOffset();m=new Date(m.getTime()+t)}return u("date")(e,o,h)}return m=null,""}),D(s.min)||s.ngMin)&&(l.$validators.min=function(e){return l.$isEmpty(e)||N(f)||r(e)>=f},s.$observe("min",function(e){f=g(e),l.$validate()}));(D(s.max)||s.ngMax)&&(l.$validators.max=function(e){return l.$isEmpty(e)||N(p)||r(e)<=p},s.$observe("max",function(e){p=g(e),l.$validate()}));function g(e){return D(e)?H(e)?e:r(e):n}l.$isEmpty=function(e){return!e||e.getTime&&e.getTime()!=e.getTime()}}}function qr(e,t,r,o){var a=t[0];(o.$$hasNativeValidators=L(a.validity))&&o.$parsers.push(function(e){var r=t.prop(i)||{};return r.badInput&&!r.typeMismatch?n:e})}function Wr(e,t,n,o,i){var a;if(D(o)){if(!(a=e(o)).constant)throw r("ngModel")("constexpr","Expected constant expression for `{0}`, but saw `{1}`.",n,o);return a(t)}return i}var Kr=["$browser","$sniffer","$filter","$parse",function(e,t,n,r){return{restrict:"E",require:["?ngModel"],link:{pre:function(o,i,s,l){l[0]&&(Fr[a(s.type)]||Fr.text)(o,i,s,l[0],t,e,n,r)}}}}],zr="ng-valid",Yr="ng-invalid",Gr="ng-pristine",Qr="ng-dirty",Zr="ng-pending",Xr=["$scope","$exceptionHandler","$attrs","$element","$parse","$animate","$timeout","$rootScope","$q","$interpolate",function(e,t,r,o,i,a,s,l,c,d){this.$viewValue=Number.NaN,this.$modelValue=Number.NaN,this.$validators={},this.$asyncValidators={},this.$parsers=[],this.$formatters=[],this.$viewChangeListeners=[],this.$untouched=!0,this.$touched=!1,this.$pristine=!0,this.$dirty=!1,this.$valid=!0,this.$invalid=!1,this.$error={},this.$$success={},this.$pending=n,this.$name=d(r.name||"",!1)(e);var u=i(r.ngModel),m=null,f=this,p=function(){var t=u(e);return f.$options&&f.$options.getterSetter&&F(t)&&(t=t()),t};this.$$setOptions=function(e){if(f.$options=e,!(u.assign||e&&e.getterSetter))throw Rr("nonassign","Expression '{0}' is non-assignable. Element: {1}",r.ngModel,ie(o))},this.$render=S,this.$isEmpty=function(e){return N(e)||""===e||null===e||e!=e};var h=o.inheritedData("$formController")||wr,g=0;co({ctrl:this,$element:o,set:function(e,t){e[t]=!0},unset:function(e,t){delete e[t]},parentForm:h,$animate:a}),this.$setPristine=function(){f.$dirty=!1,f.$pristine=!0,a.removeClass(o,Qr),a.addClass(o,Gr)},this.$setUntouched=function(){f.$touched=!1,f.$untouched=!0,a.setClass(o,"ng-untouched","ng-touched")},this.$setTouched=function(){f.$touched=!0,f.$untouched=!1,a.setClass(o,"ng-touched","ng-untouched")},this.$rollbackViewValue=function(){s.cancel(m),f.$viewValue=f.$$lastCommittedViewValue,f.$render()},this.$validate=function(){O(f.$modelValue)&&isNaN(f.$modelValue)||this.$$parseAndValidate()},this.$$runValidators=function(e,t,r,o){var i,a,s=++g;(function(e){var t=f.$$parserName||"parse";if(e===n)l(t,null);else if(l(t,e),!e)return y(f.$validators,function(e,t){l(t,null)}),y(f.$asyncValidators,function(e,t){l(t,null)}),!1;return!0})(e)?!function(){var e=!0;if(y(f.$validators,function(n,o){var i=n(t,r);e=e&&i,l(o,i)}),!e)return y(f.$asyncValidators,function(e,t){l(t,null)}),!1;return!0}()?d(!1):(i=[],a=!0,y(f.$asyncValidators,function(e,o){var s=e(t,r);if(!q(s))throw Rr("$asyncValidators","Expected asynchronous validator to return a promise but got '{0}' instead.",s);l(o,n),i.push(s.then(function(){l(o,!0)},function(e){a=!1,l(o,!1)}))}),i.length?c.all(i).then(function(){d(a)},S):d(!0)):d(!1);function l(e,t){s===g&&f.$setValidity(e,t)}function d(e){s===g&&o(e)}},this.$commitViewValue=function(){var e=f.$viewValue;s.cancel(m),(f.$$lastCommittedViewValue!==e||""===e&&f.$$hasNativeValidators)&&(f.$$lastCommittedViewValue=e,f.$pristine&&(f.$dirty=!0,f.$pristine=!1,a.removeClass(o,Gr),a.addClass(o,Qr),h.$setDirty()),this.$$parseAndValidate())},this.$$parseAndValidate=function(){var e=f.$$lastCommittedViewValue,t=e,r=!N(t)||n;if(r)for(var o=0;o<f.$parsers.length;o++)if(N(t=f.$parsers[o](t))){r=!1;break}O(f.$modelValue)&&isNaN(f.$modelValue)&&(f.$modelValue=p());var i=f.$modelValue,a=f.$options&&f.$options.allowInvalid;function s(){f.$modelValue!==i&&f.$$writeModelToScope()}a&&(f.$modelValue=t,s()),f.$$runValidators(r,t,e,function(e){a||(f.$modelValue=e?t:n,s())})},this.$$writeModelToScope=function(){var n;f.$modelValue,f.$options&&f.$options.getterSetter&&F(n=u(e))?n(f.$modelValue):u.assign(e,f.$modelValue),y(f.$viewChangeListeners,function(e){try{e()}catch(e){t(e)}})},this.$setViewValue=function(e,t){f.$viewValue=e,f.$options&&!f.$options.updateOnDefault||f.$$debounceViewValueCommit(t)},this.$$debounceViewValueCommit=function(t){var n,r=0,o=f.$options;o&&D(o.debounce)&&(O(n=o.debounce)?r=n:O(n[t])?r=n[t]:O(n.default)&&(r=n.default)),s.cancel(m),r?m=s(function(){f.$commitViewValue()},r):l.$$phase?f.$commitViewValue():e.$apply(function(){f.$commitViewValue()})},e.$watch(function(){var e=p();if(e!==f.$modelValue){f.$modelValue=e;for(var t=f.$formatters,r=t.length,o=e;r--;)o=t[r](o);f.$viewValue!==o&&(f.$viewValue=f.$$lastCommittedViewValue=o,f.$render(),f.$$runValidators(n,e,o,S))}return e})}],Jr=function(){return{restrict:"A",require:["ngModel","^?form","^?ngModelOptions"],controller:Xr,priority:1,compile:function(e){return e.addClass(Gr).addClass("ng-untouched").addClass(zr),{pre:function(e,t,n,r){var o=r[0],i=r[1]||wr;o.$$setOptions(r[2]&&r[2].$options),i.$addControl(o),n.$observe("name",function(e){o.$name!==e&&i.$$renameControl(o,e)}),e.$on("$destroy",function(){i.$removeControl(o)})},post:function(e,t,n,r){var o=r[0];o.$options&&o.$options.updateOn&&t.on(o.$options.updateOn,function(e){o.$$debounceViewValueCommit(e&&e.type)}),t.on("blur",function(t){o.$touched||e.$apply(function(){o.$setTouched()})})}}}}},eo=P({restrict:"A",require:"ngModel",link:function(e,t,n,r){r.$viewChangeListeners.push(function(){e.$eval(n.ngChange)})}}),to=function(){return{restrict:"A",require:"?ngModel",link:function(e,t,n,r){r&&(n.required=!0,r.$validators.required=function(e){return!n.required||!r.$isEmpty(e)},n.$observe("required",function(){r.$validate()}))}}},no=function(){return{restrict:"A",require:"?ngModel",link:function(e,t,o,i){if(i){var a,s=o.ngPattern||o.pattern;o.$observe("pattern",function(e){if(I(e)&&e.length>0&&(e=new RegExp(e)),e&&!e.test)throw r("ngPattern")("noregexp","Expected {0} to be a RegExp but was {1}. Element: {2}",s,e,ie(t));a=e||n,i.$validate()}),i.$validators.pattern=function(e){return i.$isEmpty(e)||N(a)||a.test(e)}}}}},ro=function(){return{restrict:"A",require:"?ngModel",link:function(e,t,n,r){if(r){var o=0;n.$observe("maxlength",function(e){o=k(e)||0,r.$validate()}),r.$validators.maxlength=function(e,t){return r.$isEmpty(e)||t.length<=o}}}}},oo=function(){return{restrict:"A",require:"?ngModel",link:function(e,t,n,r){if(r){var o=0;n.$observe("minlength",function(e){o=k(e)||0,r.$validate()}),r.$validators.minlength=function(e,t){return r.$isEmpty(e)||t.length>=o}}}}},io=function(){return{restrict:"A",priority:100,require:"ngModel",link:function(e,t,r,o){var i=t.attr(r.$attr.ngList)||", ",a="false"!==r.ngTrim,s=a?W(i):i;o.$parsers.push(function(e){if(!N(e)){var t=[];return e&&y(e.split(s),function(e){e&&t.push(a?W(e):e)}),t}}),o.$formatters.push(function(e){return R(e)?e.join(i):n}),o.$isEmpty=function(e){return!e||!e.length}}}},ao=/^(true|false|\d+)$/,so=function(){return{restrict:"A",priority:100,compile:function(e,t){return ao.test(t.ngValue)?function(e,t,n){n.$set("value",e.$eval(n.ngValue))}:function(e,t,n){e.$watch(n.ngValue,function(e){n.$set("value",e)})}}}},lo=function(){return{restrict:"A",controller:["$scope","$attrs",function(e,t){var r=this;this.$options=e.$eval(t.ngModelOptions),this.$options.updateOn!==n?(this.$options.updateOnDefault=!1,this.$options.updateOn=W(this.$options.updateOn.replace(Hr,function(){return r.$options.updateOnDefault=!0," "}))):this.$options.updateOnDefault=!0}]}};function co(e){var t=e.ctrl,r=e.$element,o={},i=e.set,a=e.unset,s=e.parentForm,l=e.$animate;function c(e,t){t&&!o[e]?(l.addClass(r,e),o[e]=!0):!t&&o[e]&&(l.removeClass(r,e),o[e]=!1)}function d(e,t){e=e?"-"+ve(e,"-"):"",c(zr+e,!0===t),c(Yr+e,!1===t)}o[Yr]=!(o[zr]=r.hasClass(zr)),t.$setValidity=function(e,r,o){r===n?function(e,n,r){t[e]||(t[e]={});i(t[e],n,r)}("$pending",e,o):function(e,r,o){t[e]&&a(t[e],r,o);uo(t[e])&&(t[e]=n)}("$pending",e,o);j(r)?r?(a(t.$error,e,o),i(t.$$success,e,o)):(i(t.$error,e,o),a(t.$$success,e,o)):(a(t.$error,e,o),a(t.$$success,e,o));t.$pending?(c(Zr,!0),t.$valid=t.$invalid=n,d("",null)):(c(Zr,!1),t.$valid=uo(t.$error),t.$invalid=!t.$valid,d("",t.$valid));var l;l=t.$pending&&t.$pending[e]?n:!t.$error[e]&&(!!t.$$success[e]||null);d(e,l),s.$setValidity(e,l,t)}}function uo(e){if(e)for(var t in e)return!1;return!0}var mo=["$compile",function(e){return{restrict:"AC",compile:function(t){return e.$$addBindingClass(t),function(t,r,o){e.$$addBindingInfo(r,o.ngBind),r=r[0],t.$watch(o.ngBind,function(e){r.textContent=e===n?"":e})}}}}],fo=["$interpolate","$compile",function(e,t){return{compile:function(r){return t.$$addBindingClass(r),function(r,o,i){var a=e(o.attr(i.$attr.ngBindTemplate));t.$$addBindingInfo(o,a.expressions),o=o[0],i.$observe("ngBindTemplate",function(e){o.textContent=e===n?"":e})}}}}],po=["$sce","$parse","$compile",function(e,t,n){return{restrict:"A",compile:function(r,o){var i=t(o.ngBindHtml),a=t(o.ngBindHtml,function(e){return(e||"").toString()});return n.$$addBindingClass(r),function(t,r,o){n.$$addBindingInfo(r,o.ngBindHtml),t.$watch(a,function(){r.html(e.getTrustedHtml(i(t))||"")})}}}}];function ho(e,t){return e="ngClass"+e,["$animate",function(n){return{restrict:"AC",link:function(i,a,s){var l;function c(e){var t=d(e,1);s.$addClass(t)}function d(e,t){var n=a.data("$classCounts")||{},r=[];return y(e,function(e){(t>0||n[e])&&(n[e]=(n[e]||0)+t,n[e]===+(t>0)&&r.push(e))}),a.data("$classCounts",n),r.join(" ")}function u(e){if(!0===t||i.$index%2===t){var s=o(e||[]);if(l){if(!Z(e,l)){!function(e,t){var o=r(t,e),i=r(e,t);o=d(o,1),i=d(i,-1),o&&o.length&&n.addClass(a,o),i&&i.length&&n.removeClass(a,i)}(o(l),s)}}else c(s)}l=Q(e)}i.$watch(s[e],u,!0),s.$observe("class",function(t){u(i.$eval(s[e]))}),"ngClass"!==e&&i.$watch("$index",function(n,r){var a=1&n;if(a!==(1&r)){var l=o(i.$eval(s[e]));a===t?c(l):function(e){var t=d(e,-1);s.$removeClass(t)}(l)}})}};function r(e,t){var n=[];e:for(var r=0;r<e.length;r++){for(var o=e[r],i=0;i<t.length;i++)if(o==t[i])continue e;n.push(o)}return n}function o(e){if(R(e))return e;if(I(e))return e.split(" ");if(L(e)){var t=[];return y(e,function(e,n){e&&(t=t.concat(n.split(" ")))}),t}return e}}]}var go=ho("",!0),vo=ho("Odd",0),bo=ho("Even",1),$o=$r({compile:function(e,t){t.$set("ngCloak",n),e.removeClass("ng-cloak")}}),Eo=[function(){return{restrict:"A",scope:!0,controller:"@",priority:500}}],yo={},wo={blur:!0,focus:!0};y("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "),function(e){var t=It("ng-"+e);yo[t]=["$parse","$rootScope",function(n,r){return{restrict:"A",compile:function(o,i){var a=n(i[t]);return function(t,n){n.on(e,function(n){var o=function(){a(t,{$event:n})};wo[e]&&r.$$phase?t.$evalAsync(o):t.$apply(o)})}}}}]});var Co,Mo=["$animate",function(e){return{multiElement:!0,transclude:"element",priority:600,terminal:!0,restrict:"A",$$tlb:!0,link:function(n,r,o,i,a){var s,l,c;n.$watch(o.ngIf,function(n){n?l||a(function(n,i){l=i,n[n.length++]=t.createComment(" end ngIf: "+o.ngIf+" "),s={clone:n},e.enter(n,r.parent(),r)}):(c&&(c.remove(),c=null),l&&(l.$destroy(),l=null),s&&(c=Me(s.clone),e.leave(c).then(function(){c=null}),s=null))})}}}],To=["$templateRequest","$anchorScroll","$animate","$sce",function(e,t,n,r){return{restrict:"ECA",priority:400,terminal:!0,transclude:"element",controller:b.noop,compile:function(o,i){var a=i.ngInclude||i.src,s=i.onload||"",l=i.autoscroll;return function(o,i,c,d,u){var m,f,p,h=0,g=function(){f&&(f.remove(),f=null),m&&(m.$destroy(),m=null),p&&(n.leave(p).then(function(){f=null}),f=p,p=null)};o.$watch(r.parseAsResourceUrl(a),function(r){var a=function(){!D(l)||l&&!o.$eval(l)||t()},c=++h;r?(e(r,!0).then(function(e){if(c===h){var t=o.$new();d.template=e;var l=u(t,function(e){g(),n.enter(e,null,i).then(a)});p=l,(m=t).$emit("$includeContentLoaded",r),o.$eval(s)}},function(){c===h&&(g(),o.$emit("$includeContentError",r))}),o.$emit("$includeContentRequested",r)):(g(),d.template=null)})}}}}],xo=["$compile",function(e){return{restrict:"ECA",priority:-400,require:"ngInclude",link:function(r,o,i,a){if(/SVG/.test(o[0].toString()))return o.empty(),void e(Ye(a.template,t).childNodes)(r,function(e){o.append(e)},n,n,o);o.html(a.template),e(o.contents())(r)}}}],ko=$r({priority:450,compile:function(){return{pre:function(e,t,n){e.$eval(n.ngInit)}}}}),Ao=$r({terminal:!0,priority:1e3}),So=["$locale","$interpolate",function(e,t){var n=/{}/g;return{restrict:"EA",link:function(r,o,i){var s=i.count,l=i.$attr.when&&o.attr(i.$attr.when),c=i.offset||0,d=r.$eval(l)||{},u={},m=t.startSymbol(),f=t.endSymbol(),p=/^when(Minus)?(.+)$/;y(i,function(e,t){p.test(t)&&(d[a(t.replace("when","").replace("Minus","-"))]=o.attr(i.$attr[t]))}),y(d,function(e,r){u[r]=t(e.replace(n,m+s+"-"+c+f))}),r.$watch(function(){var t=parseFloat(r.$eval(s));return isNaN(t)?"":(t in d||(t=e.pluralCat(t-c)),u[t](r))},function(e){o.text(e)})}}}],_o=["$parse","$animate",function(e,o){var i=r("ngRepeat"),a=function(e,t,n,r,o,i,a){e[n]=r,o&&(e[o]=i),e.$index=t,e.$first=0===t,e.$last=t===a-1,e.$middle=!(e.$first||e.$last),e.$odd=!(e.$even=0==(1&t))},s=function(e){return e.clone[0]},l=function(e){return e.clone[e.clone.length-1]};return{restrict:"A",multiElement:!0,transclude:"element",priority:1e3,terminal:!0,$$tlb:!0,compile:function(r,c){var u=c.ngRepeat,m=t.createComment(" end ngRepeat: "+u+" "),f=u.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+track\s+by\s+([\s\S]+?))?\s*$/);if(!f)throw i("iexp","Expected expression in form of '_item_ in _collection_[ track by _id_]' but got '{0}'.",u);var p=f[1],h=f[2],g=f[3],v=f[4];if(!(f=p.match(/^(?:([\$\w]+)|\(([\$\w]+)\s*,\s*([\$\w]+)\))$/)))throw i("iidexp","'_item_' in '_item_ in _collection_' should be an identifier or '(_key_, _value_)' expression, but got '{0}'.",p);var b,$,w,C,M=f[3]||f[1],T=f[2];if(g&&(!/^[$a-zA-Z_][$a-zA-Z0-9_]*$/.test(g)||/^(null|undefined|this|\$index|\$first|\$middle|\$last|\$even|\$odd|\$parent)$/.test(g)))throw i("badident","alias '{0}' is invalid --- must be a valid JS identifier which is not a reserved name.",g);var x={$id:ht};return v?b=e(v):(w=function(e,t){return ht(t)},C=function(e){return e}),function(e,t,r,c,f){b&&($=function(t,n,r){return T&&(x[T]=t),x[M]=n,x.$index=r,b(e,x)});var p=Te();e.$watchCollection(h,function(r){var c,h,v,b,x,k,A,S,_,P,N,D,L=t[0],I=Te();if(g&&(e[g]=r),E(r))_=r,S=$||w;else{for(var O in S=$||C,_=[],r)r.hasOwnProperty(O)&&"$"!=O.charAt(0)&&_.push(O);_.sort()}for(b=_.length,N=new Array(b),c=0;c<b;c++)if(x=r===_?c:_[c],k=r[x],A=S(x,k,c),p[A])P=p[A],delete p[A],I[A]=P,N[c]=P;else{if(I[A])throw y(N,function(e){e&&e.scope&&(p[e.id]=e)}),i("dupes","Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: {0}, Duplicate key: {1}, Duplicate value: {2}",u,A,re(k));N[c]={id:A,scope:n,clone:n},I[A]=!0}for(var H in p){if(D=Me((P=p[H]).clone),o.leave(D),D[0].parentNode)for(c=0,h=D.length;c<h;c++)D[c].$$NG_REMOVED=!0;P.scope.$destroy()}for(c=0;c<b;c++)if(x=r===_?c:_[c],k=r[x],(P=N[c]).scope){v=L;do{v=v.nextSibling}while(v&&v.$$NG_REMOVED);s(P)!=v&&o.move(Me(P.clone),null,d(L)),L=l(P),a(P.scope,c,M,k,T,x,b)}else f(function(e,t){P.scope=t;var n=m.cloneNode(!1);e[e.length++]=n,o.enter(e,null,d(L)),L=n,P.clone=e,I[P.id]=P,a(P.scope,c,M,k,T,x,b)});p=I})}}}}],Po=["$animate",function(e){return{restrict:"A",multiElement:!0,link:function(t,n,r){t.$watch(r.ngShow,function(t){e[t?"removeClass":"addClass"](n,"ng-hide",{tempClasses:"ng-hide-animate"})})}}}],No=["$animate",function(e){return{restrict:"A",multiElement:!0,link:function(t,n,r){t.$watch(r.ngHide,function(t){e[t?"addClass":"removeClass"](n,"ng-hide",{tempClasses:"ng-hide-animate"})})}}}],Do=$r(function(e,t,n){e.$watch(n.ngStyle,function(e,n){n&&e!==n&&y(n,function(e,n){t.css(n,"")}),e&&t.css(e)},!0)}),Lo=["$animate",function(e){return{restrict:"EA",require:"ngSwitch",controller:["$scope",function(){this.cases={}}],link:function(n,r,o,i){var a=o.ngSwitch||o.on,s=[],l=[],c=[],d=[],u=function(e,t){return function(){e.splice(t,1)}};n.$watch(a,function(n){var r,o;for(r=0,o=c.length;r<o;++r)e.cancel(c[r]);for(c.length=0,r=0,o=d.length;r<o;++r){var a=Me(l[r].clone);d[r].$destroy(),(c[r]=e.leave(a)).then(u(c,r))}l.length=0,d.length=0,(s=i.cases["!"+n]||i.cases["?"])&&y(s,function(n){n.transclude(function(r,o){d.push(o);var i=n.element;r[r.length++]=t.createComment(" end ngSwitchWhen: ");var a={clone:r};l.push(a),e.enter(r,i.parent(),i)})})})}}}],Io=$r({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(e,t,n,r,o){r.cases["!"+n.ngSwitchWhen]=r.cases["!"+n.ngSwitchWhen]||[],r.cases["!"+n.ngSwitchWhen].push({transclude:o,element:t})}}),Oo=$r({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(e,t,n,r,o){r.cases["?"]=r.cases["?"]||[],r.cases["?"].push({transclude:o,element:t})}}),Ho=$r({restrict:"EAC",link:function(e,t,n,o,i){if(!i)throw r("ngTransclude")("orphan","Illegal use of ngTransclude directive in the template! No parent directive that requires a transclusion found. Element: {0}",ie(t));i(function(e){t.empty(),t.append(e)})}}),Ro=["$templateCache",function(e){return{restrict:"E",terminal:!0,compile:function(t,n){if("text/ng-template"==n.type){var r=n.id,o=t[0].text;e.put(r,o)}}}}],Fo=r("ngOptions"),Vo=P({restrict:"A",terminal:!0}),Bo=["$compile","$parse",function(e,r){var o=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+group\s+by\s+([\s\S]+?))?\s+for\s+(?:([\$\w][\$\w]*)|(?:\(\s*([\$\w][\$\w]*)\s*,\s*([\$\w][\$\w]*)\s*\)))\s+in\s+([\s\S]+?)(?:\s+track\s+by\s+([\s\S]+?))?$/,i={$setViewValue:S};return{restrict:"E",require:["select","?ngModel"],controller:["$element","$scope","$attrs",function(e,t,n){var r,o=this,a={},s=i;o.databound=n.ngModel,o.init=function(e,t,n){s=e,t,r=n},o.addOption=function(t,n){we(t,'"option value"'),a[t]=!0,s.$viewValue==t&&(e.val(t),r.parent()&&r.remove()),n&&n[0].hasAttribute("selected")&&(n[0].selected=!0)},o.removeOption=function(e){this.hasOption(e)&&(delete a[e],s.$viewValue==e&&this.renderUnknownOption(e))},o.renderUnknownOption=function(t){var n="? "+ht(t)+" ?";r.val(n),e.prepend(r),e.val(n),r.prop("selected",!0)},o.hasOption=function(e){return a.hasOwnProperty(e)},t.$on("$destroy",function(){o.renderUnknownOption=S})}],link:function(i,a,s,l){if(l[1]){for(var u,m=l[0],f=l[1],p=s.multiple,h=s.ngOptions,g=!1,v=!1,b=d(t.createElement("option")),$=d(t.createElement("optgroup")),E=b.clone(),C=0,M=a.children(),T=M.length;C<T;C++)if(""===M[C].value){u=g=M.eq(C);break}m.init(f,g,E),p&&(f.$isEmpty=function(e){return!e||0===e.length}),h?function(t,i,a){var s;if(!(s=h.match(o)))throw Fo("iexp","Expected expression in form of '_select_ (as _label_)? for (_key_,)?_value_ in _collection_' but got '{0}'. Element: {1}",h,ie(i));var l=r(s[2]||s[1]),d=s[4]||s[6],u=/ as /.test(s[0])&&s[1],f=u?r(u):null,E=s[5],C=r(s[3]||""),M=r(s[2]?s[1]:d),T=r(s[7]),x=s[8]?r(s[8]):null,k=[[{element:i,label:""}]],A={};g&&(e(g)(t),g.removeClass("ng-scope"),g.remove());i.empty(),i.on("change",function(){t.$apply(function(){var e,n=T(t)||[];if(p)e=[],y(i.val(),function(t){e.push(_(t,n[t]))});else{var r=i.val();e=_(r,n[r])}a.$setViewValue(e),L()})}),a.$render=L,t.$watchCollection(T,P),t.$watchCollection(function(){var e,n=T(t);if(n&&R(n)){e=new Array(n.length);for(var r=0,o=n.length;r<o;r++)e[r]=S(l,r,n[r]);return e}if(n)for(var i in e={},n)n.hasOwnProperty(i)&&(e[i]=S(l,i,n[i]));return e},P),p&&t.$watchCollection(function(){return a.$modelValue},P);function S(e,n,r){return A[d]=r,E&&(A[E]=n),e(t,A)}function _(e,t){if("?"===e)return n;if(""===e)return null;var r=f||M;return S(r,e,t)}function P(){v||(t.$$postDigest(L),v=!0)}function N(e,t,n){e[t]=e[t]||0,e[t]+=n?1:-1}function L(){v=!1;var e,n,r,o,s,d,u,h,A,_,P,L,I,O,H,F,V={"":[]},B=[""],U=a.$viewValue,j=T(t)||[],q=E?w(j):j,W={},K=function(e){var t;if(p)if(x&&R(e)){t=new gt([]);for(var n=0;n<e.length;n++)t.put(S(x,null,e[n]),!0)}else t=new gt(e);else x&&(e=S(x,null,e));return function(n,r){var o;return o=x||(f||M),p?D(t.remove(S(o,n,r))):e==S(o,n,r)}}(U),z=!1;for(L=0;_=q.length,L<_;L++)u=L,E&&"$"===(u=q[L]).charAt(0)||(h=j[u],e=S(C,u,h)||"",(n=V[e])||(n=V[e]=[],B.push(e)),I=K(u,h),z=z||I,F=D(F=S(l,u,h))?F:"",n.push({id:E?q[L]:L,label:F,selected:I}));for(p||(g||null===U?V[""].unshift({id:"",label:"",selected:!z}):z||V[""].unshift({id:"?",label:"",selected:!0})),P=0,A=B.length;P<A;P++){for(e=B[P],n=V[e],k.length<=P?(o={element:$.clone().attr("label",e),label:n.label},s=[o],k.push(s),i.append(o.element)):(s=k[P],(o=s[0]).label!=e&&o.element.attr("label",o.label=e)),O=null,L=0,_=n.length;L<_;L++)r=n[L],(d=s[L+1])?(O=d.element,d.label!==r.label&&(N(W,d.label,!1),N(W,r.label,!0),O.text(d.label=r.label)),d.id!==r.id&&O.val(d.id=r.id),O[0].selected!==r.selected&&(O.prop("selected",d.selected=r.selected),c&&O.prop("selected",d.selected))):(""===r.id&&g?H=g:(H=b.clone()).val(r.id).prop("selected",r.selected).attr("selected",r.selected).text(r.label),s.push(d={element:H,label:r.label,id:r.id,selected:r.selected}),N(W,r.label,!0),O?O.after(H):o.element.append(H),O=H);for(L++;s.length>L;)r=s.pop(),N(W,r.label,!1),r.element.remove();y(W,function(e,t){e>0?m.addOption(t):e<0&&m.removeOption(t)})}for(;k.length>P;)k.pop()[0].element.remove()}}(i,a,f):p?function(e,t,n){var r;n.$render=function(){var e=new gt(n.$viewValue);y(t.find("option"),function(t){t.selected=D(e.get(t.value))})},e.$watch(function(){Z(r,n.$viewValue)||(r=Q(n.$viewValue),n.$render())}),t.on("change",function(){e.$apply(function(){var e=[];y(t.find("option"),function(t){t.selected&&e.push(t.value)}),n.$setViewValue(e)})})}(i,a,f):function(e,t,n,r){n.$render=function(){var e=n.$viewValue;r.hasOption(e)?(E.parent()&&E.remove(),t.val(e),""===e&&u.prop("selected",!0)):N(e)&&u?t.val(""):r.renderUnknownOption(e)},t.on("change",function(){e.$apply(function(){E.parent()&&E.remove(),n.$setViewValue(t.val())})})}(i,a,f,m)}}}}],Uo=["$interpolate",function(e){var t={addOption:S,removeOption:S};return{restrict:"E",priority:100,compile:function(n,r){if(N(r.value)){var o=e(n.text(),!0);o||r.$set("value",n.text())}return function(e,n,r){var i=n.parent(),a=i.data("$selectController")||i.parent().data("$selectController");a&&a.databound||(a=t),o?e.$watch(o,function(e,t){r.$set("value",e),t!==e&&a.removeOption(t),a.addOption(e,n)}):a.addOption(r.value,n),n.on("$destroy",function(){a.removeOption(r.value)})}}}}],jo=P({restrict:"E",terminal:!1});e.angular.bootstrap?console.log("WARNING: Tried to load angular more than once."):($e||((u=e.jQuery)&&u.fn.on?(d=u,x(u.fn,{scope:dt.scope,isolateScope:dt.isolateScope,controller:dt.controller,injector:dt.injector,inheritedData:dt.inheritedData}),Co=u.cleanData,u.cleanData=function(e){var t;if(be)be=!1;else for(var n,r=0;null!=(n=e[r]);r++)(t=u._data(n,"events"))&&t.$destroy&&u(n).triggerHandler("$destroy");Co(e)}):d=Ge,b.element=d,$e=!0),function(t){x(t,{bootstrap:fe,copy:G,extend:x,equals:Z,element:d,forEach:y,injector:Ct,noop:S,bind:te,toJson:re,fromJson:oe,identity:_,isUndefined:N,isDefined:D,isString:I,isFunction:F,isObject:L,isNumber:O,isElement:K,isArray:R,version:Pe,isDate:H,lowercase:a,uppercase:l,callbacks:{counter:0},getTestability:he,$$minErr:r,$$csp:X,reloadWithDebugInfo:pe}),m=function(e){var t=r("$injector"),n=r("ng");function o(e,t,n){return e[t]||(e[t]=n())}var i=o(e,"angular",Object);return i.$$minErr=i.$$minErr||r,o(i,"module",function(){var e={};return function(r,i,a){return function(e,t){if("hasOwnProperty"===e)throw n("badname","hasOwnProperty is not a valid {0} name",t)}(r,"module"),i&&e.hasOwnProperty(r)&&(e[r]=null),o(e,r,function(){if(!i)throw t("nomod","Module '{0}' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.",r);var e=[],n=[],o=[],s=c("$injector","invoke","push",n),l={_invokeQueue:e,_configBlocks:n,_runBlocks:o,requires:i,name:r,provider:c("$provide","provider"),factory:c("$provide","factory"),service:c("$provide","service"),value:c("$provide","value"),constant:c("$provide","constant","unshift"),animation:c("$animateProvider","register"),filter:c("$filterProvider","register"),controller:c("$controllerProvider","register"),directive:c("$compileProvider","directive"),config:s,run:function(e){return o.push(e),this}};return a&&s(a),l;function c(t,n,r,o){return o||(o=e),function(){return o[r||"push"]([t,n,arguments]),l}}})}})}(e);try{m("ngLocale")}catch(e){m("ngLocale",[]).provider("$locale",Zt)}m("ng",["ngLocale"],["$provide",function(e){e.provider({$$sanitizeUri:Rn}),e.provider("$compile",Dt).directive({a:Er,input:Kr,textarea:Kr,form:xr,script:Ro,select:Bo,style:jo,option:Uo,ngBind:mo,ngBindHtml:po,ngBindTemplate:fo,ngClass:go,ngClassEven:bo,ngClassOdd:vo,ngCloak:$o,ngController:Eo,ngForm:kr,ngHide:No,ngIf:Mo,ngInclude:To,ngInit:ko,ngNonBindable:Ao,ngPluralize:So,ngRepeat:_o,ngShow:Po,ngStyle:Do,ngSwitch:Lo,ngSwitchWhen:Io,ngSwitchDefault:Oo,ngOptions:Vo,ngTransclude:Ho,ngModel:Jr,ngList:io,ngChange:eo,pattern:no,ngPattern:no,required:to,ngRequired:to,minlength:oo,ngMinlength:oo,maxlength:ro,ngMaxlength:ro,ngValue:so,ngModelOptions:lo}).directive({ngInclude:xo}).directive(yr).directive(yo),e.provider({$anchorScroll:Mt,$animate:xt,$browser:St,$cacheFactory:_t,$controller:Rt,$document:Ft,$exceptionHandler:Vt,$filter:Jn,$interpolate:Gt,$interval:Qt,$http:Wt,$httpBackend:zt,$location:pn,$log:hn,$parse:Nn,$rootScope:Hn,$q:Dn,$$q:Ln,$sce:jn,$sceDelegate:Un,$sniffer:qn,$templateCache:Pt,$templateRequest:Wn,$$testability:Kn,$timeout:zn,$window:Xn,$$rAF:On,$$asyncCallback:kt})}])}(b),d(t).ready(function(){me(t,fe)}))}(window,document),!window.angular.$$csp()&&window.angular.element(document).find("head").prepend('<style type="text/css">@charset "UTF-8";[ng\\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak,.ng-hide:not(.ng-hide-animate){display:none !important;}ng\\:form{display:block;}</style>'),function(e,t,n){"use strict";var r=t.module("ngRoute",["ng"]).provider("$route",function(){function e(e,n){return t.extend(new(t.extend(function(){},{prototype:e})),n)}var n={};function r(e,t){var n=t.caseInsensitiveMatch,r={originalPath:e,regexp:e},o=r.keys=[];return e=e.replace(/([().])/g,"\\$1").replace(/(\/)?:(\w+)([\?|\*])?/g,function(e,t,n,r){var i="?"===r?r:null,a="*"===r?r:null;return o.push({name:n,optional:!!i}),t=t||"",(i?"":t)+"(?:"+(i?t:"")+(a?"(.+?)":"([^/]+)")+(i||"")+")"+(i||"")}).replace(/([\/$\*])/g,"\\$1"),r.regexp=new RegExp("^"+e+"$",n?"i":""),r}this.when=function(e,o){if(n[e]=t.extend({reloadOnSearch:!0},o,e&&r(e,o)),e){var i="/"==e[e.length-1]?e.substr(0,e.length-1):e+"/";n[i]=t.extend({redirectTo:e},r(i,o))}return this},this.otherwise=function(e){return this.when(null,e),this},this.$get=["$rootScope","$location","$routeParams","$q","$injector","$http","$templateCache","$sce",function(r,o,i,a,s,l,c,d){var u=!1,m={routes:n,reload:function(){u=!0,r.$evalAsync(f)}};return r.$on("$locationChangeSuccess",f),m;function f(){var f,p,h=(t.forEach(n,function(n,r){!p&&(f=function(e,t){var n=t.keys,r={};if(!t.regexp)return null;var o=t.regexp.exec(e);if(!o)return null;for(var i=1,a=o.length;i<a;++i){var s=n[i-1],l="string"==typeof o[i]?decodeURIComponent(o[i]):o[i];s&&l&&(r[s.name]=l)}return r}(o.path(),n))&&((p=e(n,{params:t.extend({},o.search(),f),pathParams:f})).$$route=n)}),p||n.null&&e(n.null,{params:{},pathParams:{}})),g=m.current;h&&g&&h.$$route===g.$$route&&t.equals(h.pathParams,g.pathParams)&&!h.reloadOnSearch&&!u?(g.params=h.params,t.copy(g.params,i),r.$broadcast("$routeUpdate",g)):(h||g)&&(u=!1,r.$broadcast("$routeChangeStart",h,g),m.current=h,h&&h.redirectTo&&(t.isString(h.redirectTo)?o.path(function(e,n){var r=[];return t.forEach((e||"").split(":"),function(e,t){if(0===t)r.push(e);else{var o=e.match(/(\w+)(.*)/),i=o[1];r.push(n[i]),r.push(o[2]||""),delete n[i]}}),r.join("")}(h.redirectTo,h.params)).search(h.params).replace():o.url(h.redirectTo(h.pathParams,o.path(),o.search())).replace()),a.when(h).then(function(){if(h){var e,n,r=t.extend({},h.resolve);return t.forEach(r,function(e,n){r[n]=t.isString(e)?s.get(e):s.invoke(e)}),t.isDefined(e=h.template)?t.isFunction(e)&&(e=e(h.params)):t.isDefined(n=h.templateUrl)&&(t.isFunction(n)&&(n=n(h.params)),n=d.getTrustedResourceUrl(n),t.isDefined(n)&&(h.loadedTemplateUrl=n,e=l.get(n,{cache:c}).then(function(e){return e.data}))),t.isDefined(e)&&(r.$template=e),a.all(r)}}).then(function(e){h==m.current&&(h&&(h.locals=e,t.copy(h.params,i)),r.$broadcast("$routeChangeSuccess",h,g))},function(e){h==m.current&&r.$broadcast("$routeChangeError",h,g,e)}))}}]});function o(e,n,r){return{restrict:"ECA",terminal:!0,priority:400,transclude:"element",link:function(o,i,a,s,l){var c,d,u=a.autoscroll,m=a.onload||"";function f(){c&&(c.$destroy(),c=null),d&&(r.leave(d),d=null)}function p(){var a=e.current&&e.current.locals,s=a&&a.$template;if(t.isDefined(s)){var p=o.$new(),h=e.current,g=l(p,function(e){r.enter(e,null,d||i,function(){!t.isDefined(u)||u&&!o.$eval(u)||n()}),f()});d=g,(c=h.scope=p).$emit("$viewContentLoaded"),c.$eval(m)}else f()}o.$on("$routeChangeSuccess",p),p()}}}function i(e,t,n){return{restrict:"ECA",priority:-400,link:function(r,o){var i=n.current,a=i.locals;o.html(a.$template);var s=e(o.contents());if(i.controller){a.$scope=r;var l=t(i.controller,a);i.controllerAs&&(r[i.controllerAs]=l),o.data("$ngControllerController",l),o.children().data("$ngControllerController",l)}s(r)}}}r.provider("$routeParams",function(){this.$get=function(){return{}}}),r.directive("ngView",o),r.directive("ngView",i),o.$inject=["$route","$anchorScroll","$animate"],i.$inject=["$compile","$controller","$route"]}(window,window.angular),angular.module("ngProgress.provider",["ngProgress.directive"]).provider("ngProgress",function(){"use strict";this.autoStyle=!0,this.count=0,this.height="2px",this.color="firebrick",this.$get=["$document","$window","$compile","$rootScope","$timeout",function(e,t,n,r,o){var i=this.count,a=this.height,s=this.color,l=r,c=e.find("body")[0],d=n("<ng-progress></ng-progress>")(l);c.appendChild(d[0]),l.count=i,void 0!==a&&d.eq(0).children().css("height",a),void 0!==s&&(d.eq(0).children().css("background-color",s),d.eq(0).children().css("color",s));var u,m=0;return{start:function(){this.show();var e=this;clearInterval(m),m=setInterval(function(){if(isNaN(i))clearInterval(m),i=0,e.hide();else{var t=100-i;i+=.15*Math.pow(1-Math.sqrt(t),2),e.updateCount(i)}},200)},updateCount:function(e){l.count=e,l.$$phase||l.$apply()},height:function(e){return void 0!==e&&(a=e,l.height=a,l.$$phase||l.$apply()),a},color:function(e){return void 0!==e&&(s=e,l.color=s,l.$$phase||l.$apply()),s},hide:function(){d.children().css("opacity","0");var e=this;e.animate(function(){d.children().css("width","0%"),e.animate(function(){e.show()},500)},500)},show:function(){this.animate(function(){d.children().css("opacity","1")},100)},animate:function(e,t){u&&o.cancel(u),u=o(e,t)},status:function(){return i},stop:function(){clearInterval(m)},set:function(e){return this.show(),this.updateCount(e),i=e,clearInterval(m),i},css:function(e){return d.children().css(e)},reset:function(){return clearInterval(m),i=0,this.updateCount(i),0},complete:function(){i=100,this.updateCount(i);var e=this;return clearInterval(m),o(function(){e.hide(),o(function(){i=0,e.updateCount(i)},500)},1e3),i},setParent:function(e){if(null===e||void 0===e)throw new Error("Provide a valid parent of type HTMLElement");null!==c&&void 0!==c&&c.removeChild(d[0]),(c=e).appendChild(d[0])},getDomElement:function(){return d}}}],this.setColor=function(e){return void 0!==e&&(this.color=e),this.color},this.setHeight=function(e){return void 0!==e&&(this.height=e),this.height}}),angular.module("ngProgress.directive",[]).directive("ngProgress",["$window","$rootScope",function(e,t){return{replace:!0,restrict:"E",link:function(e,n,r,o){t.$watch("count",function(t){void 0===t&&null===t||(e.counter=t,n.eq(0).children().css("width",t+"%"))}),t.$watch("color",function(t){void 0===t&&null===t||(e.color=t,n.eq(0).children().css("background-color",t),n.eq(0).children().css("color",t))}),t.$watch("height",function(t){void 0===t&&null===t||(e.height=t,n.eq(0).children().css("height",t))})},template:'<div id="ngProgress-container"><div id="ngProgress"></div></div>'}}]),angular.module("ngProgress",["ngProgress.directive","ngProgress.provider"]),function(e,t,n){"use strict";t.module("ngAnimate",["ng"]).directive("ngAnimateChildren",function(){return function(e,n,r){var o=r.ngAnimateChildren;t.isString(o)&&0===o.length?n.data("$$ngAnimateChildren",!0):e.$watch(o,function(e){n.data("$$ngAnimateChildren",!!e)})}}).factory("$$animateReflow",["$$rAF","$document",function(e,t){var n=t[0].body;return function(t){return e(function(){n.offsetWidth;t()})}}]).config(["$provide","$animateProvider",function(n,r){var o=t.noop,i=t.forEach,a=r.$$selectors,s=t.isArray,l=t.isString,c=t.isObject,d=1,u="$$ngAnimateState",m="$$ngAnimateChildren",f="ng-animate",p={running:!0};function h(e){for(var t=0;t<e.length;t++){var n=e[t];if(n.nodeType==d)return n}}function g(e){return e&&t.element(e)}function v(e){return t.element(h(e))}function b(e,t){return h(e)==h(t)}n.decorator("$animate",["$delegate","$$q","$injector","$sniffer","$rootElement","$$asyncCallback","$rootScope","$document","$templateRequest",function(e,n,d,$,E,y,w,C,M){E.data(u,p);var T=w.$watch(function(){return M.totalPendingRequests},function(e,t){0===e&&(T(),w.$$postDigest(function(){w.$$postDigest(function(){p.running=!1})}))}),x=0,k=r.classNameFilter(),A=k?function(e){return k.test(e)}:function(){return!0};function S(e,t){var n=e.data(u)||{};return t&&(n.running=!0,n.structural=!0,e.data(u,n)),n.disabled||n.running&&n.structural}function _(e){var t,r=n.defer();return r.promise.$$cancelFn=function(){t&&t()},w.$$postDigest(function(){t=e(function(){r.resolve()})}),r.promise}function P(e){if(c(e))return e.tempClasses&&l(e.tempClasses)&&(e.tempClasses=e.tempClasses.split(/\s+/)),e}function N(e,n,r,l){var c=e[0];if(c){var u,m;l&&(l.to=l.to||{},l.from=l.from||{}),s(r)&&(u=r[0],m=r[1],u?m?r=u+" "+m:(r=u,n="addClass"):(r=m,n="removeClass"));var f="setClass"==n,p=f||"addClass"==n||"removeClass"==n||"animate"==n,h=e.attr("class")+" "+r;if(A(h)){var g=o,v=[],b=[],E=o,y=[],w=[],C=(" "+h).replace(/\s+/g,".");return i(function(e){if(e){var t=[],n={},r=e.substr(1).split(".");($.transitions||$.animations)&&t.push(d.get(a[""]));for(var o=0;o<r.length;o++){var i=r[o],s=a[i];s&&!n[i]&&(t.push(d.get(s)),n[i]=!0)}return t}}(C),function(e){!M(e,n)&&f&&(M(e,"addClass"),M(e,"removeClass"))}),{node:c,event:n,className:r,isClassBased:p,isSetClassOperation:f,applyStyles:function(){l&&e.css(t.extend(l.from||{},l.to||{}))},before:function(e){g=e,T(b,v,function(){g=o,e()})},after:function(e){E=e,T(w,y,function(){E=o,e()})},cancel:function(){v&&(i(v,function(e){(e||o)(!0)}),g(!0)),y&&(i(y,function(e){(e||o)(!0)}),E(!0))}}}}function M(e,t){var n=e[t],r=e["before"+t.charAt(0).toUpperCase()+t.substr(1)];if(n||r)return"leave"==t&&(r=n,n=null),w.push({event:t,fn:n}),b.push({event:t,fn:r}),!0}function T(t,n,a){var s=[];i(t,function(e){e.fn&&s.push(e)});var c=0;i(s,function(t,i){var d=function(){!function(e){if(n){if((n[e]||o)(),++c<s.length)return;n=null}a()}(i)};switch(t.event){case"setClass":n.push(t.fn(e,u,m,d,l));break;case"animate":n.push(t.fn(e,r,l.from,l.to,d));break;case"addClass":n.push(t.fn(e,u||r,d,l));break;case"removeClass":n.push(t.fn(e,m||r,d,l));break;default:n.push(t.fn(e,d,l))}}),n&&0===n.length&&a()}}return{animate:function(e,t,n,r,i){return r=r||"ng-inline-animate",(i=P(i)||{}).from=n?t:null,i.to=n||t,_(function(t){return D("animate",r,v(e),null,null,o,i,t)})},enter:function(n,r,i,a){return a=P(a),n=t.element(n),r=g(r),i=g(i),S(n,!0),e.enter(n,r,i),_(function(e){return D("enter","ng-enter",v(n),r,i,o,a,e)})},leave:function(n,r){return r=P(r),L(n=t.element(n)),S(n,!0),_(function(t){return D("leave","ng-leave",v(n),null,null,function(){e.leave(n)},r,t)})},move:function(n,r,i,a){return a=P(a),n=t.element(n),r=g(r),i=g(i),L(n),S(n,!0),e.move(n,r,i),_(function(e){return D("move","ng-move",v(n),r,i,o,a,e)})},addClass:function(e,t,n){return this.setClass(e,t,[],n)},removeClass:function(e,t,n){return this.setClass(e,[],t,n)},setClass:function(n,r,o,a){a=P(a);if(S(n=v(n=t.element(n))))return e.$$setClassImmediately(n,r,o,a);var l,c=n.data("$$animateClasses"),d=!!c;return c||((c={}).classes={}),l=c.classes,r=s(r)?r:r.split(" "),i(r,function(e){e&&e.length&&(l[e]=!0)}),o=s(o)?o:o.split(" "),i(o,function(e){e&&e.length&&(l[e]=!1)}),d?(a&&c.options&&(c.options=t.extend(c.options||{},a)),c.promise):(n.data("$$animateClasses",c={classes:l,options:a}),c.promise=_(function(t){var r=n.parent(),o=h(n),a=o.parentNode;if(a&&!a.$$NG_REMOVED&&!o.$$NG_REMOVED){var s=n.data("$$animateClasses");n.removeData("$$animateClasses");var l=n.data(u)||{},c=function(e,t,n){var r={};i(n=n||{},function(e,t){i(t.split(" "),function(t){r[t]=e})});var o=Object.create(null);i((e.attr("class")||"").split(/\s+/),function(e){o[e]=!0});var a=[],s=[];return i(t.classes,function(e,t){var n=o[t],i=r[t]||{};!1===e?(n||"addClass"==i.event)&&s.push(t):!0===e&&(n&&"removeClass"!=i.event||a.push(t))}),a.length+s.length>0&&[a.join(" "),s.join(" ")]}(n,s,l.active);return c?D("setClass",c,n,r,null,function(){c[0]&&e.$$addClassImmediately(n,c[0]),c[1]&&e.$$removeClassImmediately(n,c[1])},s.options,t):t()}t()}))},cancel:function(e){e.$$cancelFn()},enabled:function(e,t){switch(arguments.length){case 2:if(e)I(t);else{var n=t.data(u)||{};n.disabled=!0,t.data(u,n)}break;case 1:p.disabled=!e;break;default:e=!p.disabled}return!!e}};function D(e,n,r,a,s,l,c,d){var h=o,g=N(r,e,n,c);if(!g)return H(),D(),L(),R(),h;e=g.event,n=g.className;var v=t.element._data(g.node);if(v=v&&v.events,a||(a=s?s.parent():r.parent()),function(e,n){if(p.disabled)return!0;if(b(e,E))return p.running;var r,o,i;do{if(0===n.length)break;var a=b(n,E),s=a?p:n.data(u)||{};if(s.disabled)return!0;if(a&&(i=!0),!1!==r){var l=n.data(m);t.isDefined(l)&&(r=l)}o=o||s.running||s.last&&!s.last.isClassBased}while(n=n.parent());return!i||!r&&o}(r,a))return H(),D(),L(),R(),h;var $=r.data(u)||{},w=$.active||{},C=$.totalActive||0,M=$.last,T=!1;if(C>0){var k=[];if(g.isClassBased){if("setClass"==M.event)k.push(M),I(r,n);else if(w[n]){var A=w[n];A.event==e?T=!0:(k.push(A),I(r,n))}}else if("leave"==e&&w["ng-leave"])T=!0;else{for(var S in w)k.push(w[S]);$={},I(r,!0)}k.length>0&&i(k,function(e){e.cancel()})}if(!g.isClassBased||g.isSetClassOperation||"animate"==e||T||(T="addClass"==e==r.hasClass(n)),T)return H(),D(),L(),O(),h;w=$.active||{},C=$.totalActive||0,"leave"==e&&r.one("$destroy",function(e){var n=t.element(this),r=n.data(u);if(r){var o=r.active["ng-leave"];o&&(o.cancel(),I(n,"ng-leave"))}}),r.addClass(f),c&&c.tempClasses&&i(c.tempClasses,function(e){r.addClass(e)});var _=x++;return C++,w[n]=g,r.data(u,{last:g,active:w,index:_,totalActive:C}),D(),g.before(function(t){var o=r.data(u);t=t||!o||!o.active[n]||g.isClassBased&&o.active[n].event!=e,H(),!0===t?R():(L(),g.after(R))}),g.cancel;function P(t){var o="$animate:"+t;v&&v[o]&&v[o].length>0&&y(function(){r.triggerHandler(o,{event:e,className:n})})}function D(){P("before")}function L(){P("after")}function O(){P("close"),d()}function H(){H.hasBeenRun||(H.hasBeenRun=!0,l())}function R(){if(!R.hasBeenRun){g&&g.applyStyles(),R.hasBeenRun=!0,c&&c.tempClasses&&i(c.tempClasses,function(e){r.removeClass(e)});var e=r.data(u);e&&(g&&g.isClassBased?I(r,n):(y(function(){var e=r.data(u)||{};_==e.index&&I(r,n)}),r.data(u,e))),O()}}}function L(e){var n=h(e);if(n){var r=t.isFunction(n.getElementsByClassName)?n.getElementsByClassName(f):n.querySelectorAll("."+f);i(r,function(e){var n=(e=t.element(e)).data(u);n&&n.active&&i(n.active,function(e){e.cancel()})})}}function I(e,t){if(b(e,E))p.disabled||(p.running=!1,p.structural=!1);else if(t){var n=e.data(u)||{},r=!0===t;!r&&n.active&&n.active[t]&&(n.totalActive--,delete n.active[t]),!r&&n.totalActive||(e.removeClass(f),e.removeData(u))}}}]),r.register("",["$window","$sniffer","$timeout","$$animateReflow",function(n,r,a,c){var u,m,f,p,g="";void 0===e.ontransitionend&&void 0!==e.onwebkittransitionend?(g="-webkit-",u="WebkitTransition",m="webkitTransitionEnd transitionend"):(u="transition",m="transitionend"),void 0===e.onanimationend&&void 0!==e.onwebkitanimationend?(g="-webkit-",f="WebkitAnimation",p="webkitAnimationEnd animationend"):(f="animation",p="animationend");var v,b="Duration",$="Property",E="Delay",y="IterationCount",w="PlayState",C="$$ngAnimateKey",M="$$ngAnimateCSS3Data",T=3,x=1.5,k=1e3,A={},S=0,_=[];function P(){v||(v=c(function(){_=[],v=null,A={}}))}function N(e,t){v&&v(),_.push(t),v=c(function(){i(_,function(e){e()}),_=[],v=null,A={}})}var D=null,L=0,I=[];function O(e,n){var r=h(e);e=t.element(r),I.push(e);var o=Date.now()+n;o<=L||(a.cancel(D),L=o,D=a(function(){i(I,function(e){var t=e.data(M);t&&i(t.closeAnimationFns,function(e){e()})}),I=[]},n,!1))}function H(e,t){var r=t?A[t]:null;if(!r){var o=0,a=0,s=0,l=0;i(e,function(e){if(e.nodeType==d){var t=n.getComputedStyle(e)||{},r=t[u+b];o=Math.max(R(r),o);var i=t[u+E];a=Math.max(R(i),a);t[f+E];l=Math.max(R(t[f+E]),l);var c=R(t[f+b]);c>0&&(c*=parseInt(t[f+y],10)||1),s=Math.max(c,s)}}),r={total:0,transitionDelay:a,transitionDuration:o,animationDelay:l,animationDuration:s},t&&(A[t]=r)}return r}function R(e){var t=0,n=l(e)?e.split(/\s*,\s*/):[];return i(n,function(e){t=Math.max(parseFloat(e)||0,t)}),t}function F(e,t,n,r){var o=["ng-enter","ng-leave","ng-move"].indexOf(n)>=0,i=function(e){var t=e.parent(),n=t.data(C);return n||(t.data(C,++S),n=S),n+"-"+h(e).getAttribute("class")}(t),a=i+" "+n,s=A[a]?++A[a].total:0,l={};if(s>0){var c=n+"-stagger",d=i+" "+c,u=!A[d];u&&t.addClass(c),l=H(t,d),u&&t.removeClass(c)}t.addClass(n);var m=t.data(M)||{},f=H(t,a),p=f.transitionDuration,g=f.animationDuration;if(o&&0===p&&0===g)return t.removeClass(n),!1;var v=r||o&&p>0,b=g>0&&l.animationDelay>0&&0===l.animationDuration,$=m.closeAnimationFns||[];t.data(M,{stagger:l,cacheKey:a,running:m.running||0,itemIndex:s,blockTransition:v,closeAnimationFns:$});var E=h(t);return v&&(V(E,!0),r&&t.css(r)),b&&B(E,!0),!0}function V(e,t){e.style[u+$]=t?"none":""}function B(e,t){e.style[f+w]=t?"paused":""}function U(e,t,n,r){if(F(0,t,n,r))return function(e){e&&W(t,n)}}function j(e,t,n,r,o){if(t.data(M))return function(e,t,n,r,o){var s=h(t),l=t.data(M);if(-1!=s.getAttribute("class").indexOf(n)&&l){var c="",d="";i(n.split(" "),function(e,t){var n=(t>0?" ":"")+e;c+=n+"-active",d+=n+"-pending"});var u=[],f=l.itemIndex,v=l.stagger,b=0;if(f>0){var $=0;v.transitionDelay>0&&0===v.transitionDuration&&($=v.transitionDelay*f);var E=0;v.animationDelay>0&&0===v.animationDuration&&(E=v.animationDelay*f,u.push(g+"animation-play-state")),b=Math.round(100*Math.max($,E))/100}b||(t.addClass(c),l.blockTransition&&V(s,!1));var y=l.cacheKey+" "+c,w=H(t,y),C=Math.max(w.transitionDuration,w.animationDuration);if(0===C)return t.removeClass(c),W(t,n),void r();!b&&o&&(w.transitionDuration||(t.css("transition",w.animationDuration+"s linear all"),u.push("transition")),t.css(o));var A=Math.max(w.transitionDelay,w.animationDelay),S=A*k;if(u.length>0){var _=s.getAttribute("style")||"";";"!==_.charAt(_.length-1)&&(_+=";"),s.setAttribute("style",_+" ")}var P,N=Date.now(),D=p+" "+m,L=(b+(A+C)*x)*k;return b>0&&(t.addClass(d),P=a(function(){P=null,w.transitionDuration>0&&V(s,!1),w.animationDuration>0&&B(s,!1),t.addClass(c),t.removeClass(d),o&&(0===w.transitionDuration&&t.css("transition",w.animationDuration+"s linear all"),t.css(o),u.push("transition"))},b*k,!1)),t.on(D,R),l.closeAnimationFns.push(function(){I(),r()}),l.running++,O(t,L),I}function I(){t.off(D,R),t.removeClass(c),t.removeClass(d),P&&a.cancel(P),W(t,n);var e=h(t);for(var r in u)e.style.removeProperty(u[r])}function R(e){e.stopPropagation();var t=e.originalEvent||e,n=t.$manualTimeStamp||t.timeStamp||Date.now(),o=parseFloat(t.elapsedTime.toFixed(T));Math.max(n-N,0)>=S&&o>=C&&r()}r()}(0,t,n,r,o);W(t,n),r()}function q(e,t,n,r,i){var a=U(0,t,n,i.from);if(!a)return P(),void r();var s=a;return N(0,function(){s=j(0,t,n,r,i.to)}),function(e){(s||o)(e)}}function W(e,t){e.removeClass(t);var n=e.data(M);n&&(n.running&&n.running--,n.running&&0!==n.running||e.removeData(M))}return{animate:function(e,t,n,r,o,i){return(i=i||{}).from=n,i.to=r,q(0,e,t,o,i)},enter:function(e,t,n){return q(0,e,"ng-enter",t,n=n||{})},leave:function(e,t,n){return q(0,e,"ng-leave",t,n=n||{})},move:function(e,t,n){return q(0,e,"ng-move",t,n=n||{})},beforeSetClass:function(e,t,n,r,o){o=o||{};var i=U(0,e,K(n,"-remove")+" "+K(t,"-add"),o.from);if(i)return N(0,r),i;P(),r()},beforeAddClass:function(e,t,n,r){r=r||{};var o=U(0,e,K(t,"-add"),r.from);if(o)return N(0,n),o;P(),n()},beforeRemoveClass:function(e,t,n,r){r=r||{};var o=U(0,e,K(t,"-remove"),r.from);if(o)return N(0,n),o;P(),n()},setClass:function(e,t,n,r,o){return o=o||{},j(0,e,(n=K(n,"-remove"))+" "+(t=K(t,"-add")),r,o.to)},addClass:function(e,t,n,r){return r=r||{},j(0,e,K(t,"-add"),n,r.to)},removeClass:function(e,t,n,r){return r=r||{},j(0,e,K(t,"-remove"),n,r.to)}};function K(e,t){var n="";return e=s(e)?e:e.split(/\s+/),i(e,function(e,r){e&&e.length>0&&(n+=(r>0?" ":"")+e+t)}),n}}])}])}(window,window.angular),function(e,t,n){"use strict";var r=["$aria",function(e){return function(t,n,r){e.config("tabindex")&&!n.attr("tabindex")&&n.attr("tabindex",0)}}];t.module("ngAria",["ng"]).provider("$aria",function(){var e={ariaHidden:!0,ariaChecked:!0,ariaDisabled:!0,ariaRequired:!0,ariaInvalid:!0,ariaMultiline:!0,ariaValue:!0,tabindex:!0};function n(e){return e.replace(/-./g,function(e,t){return e[1].toUpperCase()})}function r(t,r,o){var i=n(r);return function(n,a,s){e[i]&&!s[i]&&n.$watch(s[t],function(e){o&&(e=!e),a.attr(r,e)})}}this.config=function(n){e=t.extend(e,n)},this.$get=function(){return{config:function(t){return e[n(t)]},$$watchExpr:r}}}).directive("ngShow",["$aria",function(e){return e.$$watchExpr("ngShow","aria-hidden",!0)}]).directive("ngHide",["$aria",function(e){return e.$$watchExpr("ngHide","aria-hidden",!1)}]).directive("ngModel",["$aria",function(e){function t(t,n){return e.config(t)&&!n.attr(t)}return{restrict:"A",require:"?ngModel",link:function(n,r,o,i){var a=function(e,t){var n=e.type,r=e.role;return"checkbox"===(n||r)||"menuitemcheckbox"===r?"checkbox":"radio"===(n||r)||"menuitemradio"===r?"radio":"range"===n||"progressbar"===r||"slider"===r?"range":"textbox"===(n||r)||"TEXTAREA"===t[0].nodeName?"multiline":""}(o,r),s=t("tabindex",r);function l(){return i.$modelValue}switch(a){case"radio":case"checkbox":t("aria-checked",r)&&n.$watch(l,"radio"===a?s?(s=!1,function(e){var t=e===o.value;r.attr("aria-checked",t),r.attr("tabindex",0-!t)}):function(e){r.attr("aria-checked",e===o.value)}:function(e){r.attr("aria-checked",!!e)});break;case"range":e.config("ariaValue")&&(o.min&&!r.attr("aria-valuemin")&&r.attr("aria-valuemin",o.min),o.max&&!r.attr("aria-valuemax")&&r.attr("aria-valuemax",o.max),r.attr("aria-valuenow")||n.$watch(l,function(e){r.attr("aria-valuenow",e)}));break;case"multiline":t("aria-multiline",r)&&r.attr("aria-multiline",!0)}s&&r.attr("tabindex",0),i.$validators.required&&t("aria-required",r)&&n.$watch(function(){return i.$error.required},function(e){r.attr("aria-required",!!e)}),t("aria-invalid",r)&&n.$watch(function(){return i.$invalid},function(e){r.attr("aria-invalid",!!e)})}}}]).directive("ngDisabled",["$aria",function(e){return e.$$watchExpr("ngDisabled","aria-disabled")}]).directive("ngClick",r).directive("ngDblclick",r)}(window,window.angular),function(e,t,n){"use strict";var r;t.module("ngMaterial",["ng","ngAnimate","ngAria","material.core","material.core.gestures","material.core.theming.palette","material.core.theming","material.components.autocomplete","material.components.backdrop","material.components.button","material.components.bottomSheet","material.components.card","material.components.checkbox","material.components.content","material.components.chips","material.components.dialog","material.components.divider","material.components.fabActions","material.components.fabSpeedDial","material.components.fabToolbar","material.components.fabTrigger","material.components.gridList","material.components.icon","material.components.list","material.components.input","material.components.menu","material.components.progressCircular","material.components.progressLinear","material.components.radioButton","material.components.select","material.components.slider","material.components.sticky","material.components.sidenav","material.components.subheader","material.components.swipe","material.components.switch","material.components.tabs","material.components.toast","material.components.toolbar","material.components.tooltip","material.components.whiteframe"]),function(){function e(e,t){e.decorator("$$rAF",["$delegate",n]),t.theme("default").primaryPalette("indigo").accentPalette("pink").warnPalette("red").backgroundPalette("grey")}function n(e){return e.throttle=function(t){var n,r,o,i;return function(){n=arguments,i=this,o=t,r||(r=!0,e(function(){o.apply(i,n),r=!1}))}},e}t.module("material.core",["material.core.gestures","material.core.theming"]).config(e),e.$inject=["$provide","$mdThemingProvider"]}(),function(){function e(e,t){var n=/webkit/i.test(t.vendorPrefix);function r(e){return n?"webkit"+e.charAt(0).toUpperCase()+e.substring(1):e}return{KEY_CODE:{ENTER:13,ESCAPE:27,SPACE:32,LEFT_ARROW:37,UP_ARROW:38,RIGHT_ARROW:39,DOWN_ARROW:40,TAB:9,BACKSPACE:8,DELETE:46},CSS:{TRANSITIONEND:"transitionend"+(n?" webkitTransitionEnd":""),ANIMATIONEND:"animationend"+(n?" webkitAnimationEnd":""),TRANSFORM:r("transform"),TRANSFORM_ORIGIN:r("transformOrigin"),TRANSITION:r("transition"),TRANSITION_DURATION:r("transitionDuration"),ANIMATION_PLAY_STATE:r("animationPlayState"),ANIMATION_DURATION:r("animationDuration"),ANIMATION_NAME:r("animationName"),ANIMATION_TIMING:r("animationTimingFunction"),ANIMATION_DIRECTION:r("animationDirection")},MEDIA:{sm:"(max-width: 600px)","gt-sm":"(min-width: 600px)",md:"(min-width: 600px) and (max-width: 960px)","gt-md":"(min-width: 960px)",lg:"(min-width: 960px) and (max-width: 1200px)","gt-lg":"(min-width: 1200px)"},MEDIA_PRIORITY:["gt-lg","lg","gt-md","md","gt-sm","sm"]}}t.module("material.core").factory("$mdConstant",e),e.$inject=["$$rAF","$sniffer"]}(),function(){function e(e,n){var r=function(){return!0};e&&!t.isArray(e)&&(e=Array.prototype.slice.call(e)),n=!!n;var o=e||[];return{items:function(){return[].concat(o)},count:function(){return o.length},inRange:i,contains:s,indexOf:a,itemAt:function(e){return i(e)?o[e]:null},findBy:function(e,t){return o.filter(function(n){return n[e]===t})},add:function(e,n){if(!e)return-1;t.isNumber(n)||(n=o.length);return o.splice(n,0,e),a(e)},remove:function(e){s(e)&&o.splice(a(e),1)},first:l,last:c,next:t.bind(null,d,!1),previous:t.bind(null,d,!0),hasPrevious:function(e){return!!e&&i(a(e)-1)},hasNext:function(e){return!!e&&i(a(e)+1)}};function i(e){return o.length&&e>-1&&e<o.length}function a(e){return o.indexOf(e)}function s(e){return e&&a(e)>-1}function l(){return o.length?o[0]:null}function c(){return o.length?o[o.length-1]:null}function d(e,s,d,u){d=d||r;for(var m=a(s);;){if(!i(m))return null;var f=m+(e?-1:1),p=null;if(i(f)?p=o[f]:n&&(f=a(p=e?c():l())),null===p||f===u)return null;if(d(p))return p;t.isUndefined(u)&&(u=f),m=f}}}t.module("material.core").config(["$provide",function(t){t.decorator("$mdUtil",["$delegate",function(t){return t.iterator=e,t}])}])}(),function(){function e(e,n,r){var o={},i={},a={},s={};return l.getResponsiveAttribute=function(t,n){for(var r=0;r<e.MEDIA_PRIORITY.length;r++){var a=e.MEDIA_PRIORITY[r];if(i[o[a]].matches){var s=d(t,n+"-"+a);if(t[s])return t[s]}}return t[d(t,n)]},l.getQuery=function(e){return i[e]},l.watchResponsiveAttributes=function(n,r,o){var i=[];return n.forEach(function(n){var a=d(r,n);for(var s in r[a]&&i.push(r.$observe(a,t.bind(void 0,o,null))),e.MEDIA){if(a=d(r,n+"-"+s),!r[a])return;i.push(r.$observe(a,t.bind(void 0,o,s)))}}),function(){i.forEach(function(e){e()})}},l;function l(n){var s=o[n];t.isUndefined(s)&&(s=o[n]=function(t){return e.MEDIA[t]||("("!==t.charAt(0)?"("+t+")":t)}(n));var l=a[s];return t.isUndefined(l)&&(l=function(e){var t=i[e]=r.matchMedia(e);return t.addListener(c),a[t.media]=!!t.matches}(s)),l}function c(e){n.$evalAsync(function(){a[e.media]=!!e.matches})}function d(e,t){return s[t]||(s[t]=e.$normalize(t))}}t.module("material.core").factory("$mdMedia",e),e.$inject=["$mdConstant","$rootScope","$window"]}(),r=0,t.module("material.core").factory("$mdUtil",["$cacheFactory","$document","$timeout","$q","$window","$mdConstant",function(o,i,a,s,l,c){var d;function u(e){return e[0]||e}return d={now:e.performance?t.bind(e.performance,e.performance.now):Date.now,clientRect:function(e,t,n){var r=u(e);t=u(t||r.offsetParent||document.body);var o=r.getBoundingClientRect(),i=n?t.getBoundingClientRect():{left:0,top:0,width:0,height:0};return{left:o.left-i.left,top:o.top-i.top,width:o.width,height:o.height}},offsetRect:function(e,t){return d.clientRect(e,t,!0)},nodesToArray:function(e){for(var t=[],n=0;n<e.length;++n)t.push(e.item(n));return t},disableScrollAround:function(e){if(d.disableScrollAround._enableScrolling)return d.disableScrollAround._enableScrolling;e=t.element(e);var n,r,o=i[0].body,a=(n=o.getAttribute("style")||"",r=o.scrollTop+o.parentElement.scrollTop,function(e,t){for(var n in t)e.style[n]=t[n]}(o,{position:"fixed",width:"100%",overflowY:"scroll",top:-r+"px"}),function(){o.setAttribute("style",n),o.scrollTop=r}),s=function(){var n=l.getComputedStyle(e[0]).zIndex-1;isNaN(n)&&(n=99);var r=t.element('<div class="md-scroll-mask" style="z-index: '+n+'"> <div class="md-scroll-mask-bar"></div></div>');return o.appendChild(r[0]),r.on("wheel",s),r.on("touchmove",s),i.on("keydown",a),function(){r.off("wheel"),r.off("touchmove"),r[0].parentNode.removeChild(r[0]),i.off("keydown",a),delete d.disableScrollAround._enableScrolling};function a(e){}function s(e){e.preventDefault()}}();return d.disableScrollAround._enableScrolling=function(){a(),s(),delete d.disableScrollAround._enableScrolling}},enableScrolling:function(){var e=this.disableScrollAround._enableScrolling;e&&e()},floatingScrollbars:function(){if(this.floatingScrollbars.cached===n){var e=t.element('<div style="width: 100%; z-index: -1; position: absolute; height: 35px; overflow-y: scroll"><div style="height: 60;"></div></div>');i[0].body.appendChild(e[0]),this.floatingScrollbars.cached=e[0].offsetWidth==e[0].childNodes[0].offsetWidth,e.remove()}return this.floatingScrollbars.cached},forceFocus:function(t){var n=t[0]||t;document.addEventListener("click",function e(t){t.target===n&&t.$focus&&(n.focus(),t.stopImmediatePropagation(),t.preventDefault(),n.removeEventListener("click",e))},!0);var r=document.createEvent("MouseEvents");r.initMouseEvent("click",!1,!0,e,{},0,0,0,0,!1,!1,!1,!1,0,null),r.$material=!0,r.$focus=!0,n.dispatchEvent(r)},transitionEndPromise:function(e,t){t=t||{};var n=s.defer();function r(t){t&&t.target!==e[0]||(e.off(c.CSS.TRANSITIONEND,r),n.resolve())}return e.on(c.CSS.TRANSITIONEND,r),t.timeout&&a(r,t.timeout),n.promise},fakeNgModel:function(){return{$fake:!0,$setTouched:t.noop,$setViewValue:function(e){this.$viewValue=e,this.$render(e),this.$viewChangeListeners.forEach(function(e){e()})},$isEmpty:function(e){return 0===(""+e).length},$parsers:[],$formatters:[],$viewChangeListeners:[],$render:t.noop}},debounce:function(e,t,r,o){var i;return function(){var s=r,l=Array.prototype.slice.call(arguments);a.cancel(i),i=a(function(){i=n,e.apply(s,l)},t||10,o)}},throttle:function(e,t){var n;return function(){var r=arguments,o=d.now();(!n||o-n>t)&&(e.apply(this,r),n=o)}},time:function(e){var t=d.now();return e(),d.now()-t},nextUid:function(){return""+r++},disconnectScope:function(e){if(e&&e.$root!==e&&!e.$$destroyed){var t=e.$parent;e.$$disconnected=!0,t.$$childHead===e&&(t.$$childHead=e.$$nextSibling),t.$$childTail===e&&(t.$$childTail=e.$$prevSibling),e.$$prevSibling&&(e.$$prevSibling.$$nextSibling=e.$$nextSibling),e.$$nextSibling&&(e.$$nextSibling.$$prevSibling=e.$$prevSibling),e.$$nextSibling=e.$$prevSibling=null}},reconnectScope:function(e){if(e&&e.$root!==e&&e.$$disconnected){var t=e,n=t.$parent;t.$$disconnected=!1,t.$$prevSibling=n.$$childTail,n.$$childHead?(n.$$childTail.$$nextSibling=t,n.$$childTail=t):n.$$childHead=n.$$childTail=t}},getClosest:function(e,n,r){if(e instanceof t.element&&(e=e[0]),n=n.toUpperCase(),r&&(e=e.parentNode),!e)return null;do{if(e.nodeName===n)return e}while(e=e.parentNode);return null},extractElementByName:function(e,n){for(var r=0,o=e.length;r<o;r++)if(e[r].nodeName.toLowerCase()===n)return t.element(e[r]);return e},initOptionalProperties:function(e,n,r){r=r||{},t.forEach(e.$$isolateBindings,function(o,i){if(o.optional&&t.isUndefined(e[i])){var a=n.hasOwnProperty(n.$normalize(o.attrName));e[i]=t.isDefined(r[i])?r[i]:a}})}}}]),t.element.prototype.focus=t.element.prototype.focus||function(){return this.length&&this[0].focus(),this},t.element.prototype.blur=t.element.prototype.blur||function(){return this.length&&this[0].blur(),this},function(){function e(e,n,r){return{expect:o,expectAsync:i,expectWithText:function(e,t){i(e,t,function(){return function(e){return e.text().trim()}(e)})}};function o(e,o,i){var a=e[0]||e;!a||a.hasAttribute(o)&&0!==a.getAttribute(o).length||function(e,t){var n=!1;if(e.hasChildNodes())for(var o=e.childNodes,i=0;i<o.length;i++){var a=o[i];1===a.nodeType&&a.hasAttribute(t)&&(void 0,"none"!==((s=a).currentStyle?s.currentStyle:r.getComputedStyle(s)).display&&(n=!0))}var s;return n}(a,o)||((i=t.isString(i)?i.trim():"").length?e.attr(o,i):n.warn('ARIA: Attribute "',o,'", required for accessibility, is missing on node:',a))}function i(t,n,r){e(function(){o(t,n,r())})}}t.module("material.core").service("$mdAria",e),e.$inject=["$$rAF","$log","$window"]}(),function(){function e(e,n,r,o,i,a){this.compile=function(s){var l=s.templateUrl,c=s.template||"",d=s.controller,u=s.controllerAs,m=s.resolve||{},f=s.locals||{},p=s.transformTemplate||t.identity,h=s.bindToController;return t.forEach(m,function(e,n){t.isString(e)?m[n]=r.get(e):m[n]=r.invoke(e)}),t.extend(m,f),m.$template=l?n.get(l,{cache:a}).then(function(e){return e.data}):e.when(c),e.all(m).then(function(e){var n=p(e.$template),r=s.element||t.element("<div>").html(n.trim()).contents(),a=o(r);return{locals:e,element:r,link:function(n){if(e.$scope=n,d){var o=i(d,e,!0);h&&t.extend(o.instance,e);var s=o();r.data("$ngControllerController",s),r.children().data("$ngControllerController",s),u&&(n[u]=s)}return a(n)}}})}}t.module("material.core").service("$mdCompiler",e),e.$inject=["$q","$http","$injector","$compile","$controller","$templateCache"]}(),function(){var n,r,o={},i=!1,a=!1;function s(){}function l(n,r,a){var s=navigator.userAgent||navigator.vendor||e.opera,l=s.match(/ipad|iphone|ipod/i),c=s.match(/android/i),d=void 0!==e.jQuery&&t.element===e.jQuery,m={handler:function(e,r){var i=new n(e);return t.extend(i,r),o[e]=i,m},register:function(e,t,n){var r=o[t.replace(/^\$md./,"")];if(!r)throw new Error("Failed to register element with handler "+t+". Available handlers: "+Object.keys(o).join(", "));return r.registerElement(e,n)},isHijackingClicks:(l||c)&&!d&&!i};return m.isHijackingClicks&&m.handler("click",{options:{maxDistance:6},onEnd:function(e,t){t.distance<this.state.options.maxDistance&&this.dispatchEvent(e,"click")}}),m.handler("press",{onStart:function(e,t){this.dispatchEvent(e,"$md.pressdown")},onEnd:function(e,t){this.dispatchEvent(e,"$md.pressup")}}).handler("hold",{options:{maxDistance:6,delay:500},onCancel:function(){a.cancel(this.state.timeout)},onStart:function(e,n){if(!this.state.registeredParent)return this.cancel();this.state.pos={x:n.x,y:n.y},this.state.timeout=a(t.bind(this,function(){this.dispatchEvent(e,"$md.hold"),this.cancel()}),this.state.options.delay,!1)},onMove:function(e,t){e.preventDefault();var n=this.state.pos.x-t.x,r=this.state.pos.y-t.y;Math.sqrt(n*n+r*r)>this.options.maxDistance&&this.cancel()},onEnd:function(){this.onCancel()}}).handler("drag",{options:{minDistance:6,horizontal:!0,cancelMultiplier:1.5},onStart:function(e){this.state.registeredParent||this.cancel()},onMove:function(e,t){var n,r;e.preventDefault(),this.state.dragPointer?this.dispatchDragMove(e):(this.state.options.horizontal?(n=Math.abs(t.distanceX)>this.state.options.minDistance,r=Math.abs(t.distanceY)>this.state.options.minDistance*this.state.options.cancelMultiplier):(n=Math.abs(t.distanceY)>this.state.options.minDistance,r=Math.abs(t.distanceX)>this.state.options.minDistance*this.state.options.cancelMultiplier),n?(this.state.dragPointer=u(e),f(e,this.state.dragPointer),this.dispatchEvent(e,"$md.dragstart",this.state.dragPointer)):r&&this.cancel())},dispatchDragMove:r.throttle(function(e){this.state.isRunning&&(f(e,this.state.dragPointer),this.dispatchEvent(e,"$md.drag",this.state.dragPointer))}),onEnd:function(e,t){this.state.dragPointer&&(f(e,this.state.dragPointer),this.dispatchEvent(e,"$md.dragend",this.state.dragPointer))}}).handler("swipe",{options:{minVelocity:.65,minDistance:10},onEnd:function(e,t){if(Math.abs(t.velocityX)>this.state.options.minVelocity&&Math.abs(t.distanceX)>this.state.options.minDistance){var n="left"==t.directionX?"$md.swipeleft":"$md.swiperight";this.dispatchEvent(e,n)}}})}function c(e){this.name=e,this.state={}}function d(e,i){document.contains||(document.contains=function(e){return document.body.contains(e)}),!a&&e.isHijackingClicks&&(document.addEventListener("click",function(e){0===e.clientX&&0===e.clientY||e.$material||e.isIonicTap||(e.preventDefault(),e.stopPropagation())},!0),a=!0);function s(e,t){var r;for(var a in o)(r=o[a])instanceof i&&("start"===e&&r.cancel(),r[e](t,n))}t.element(document).on("mousedown touchstart pointerdown",function(e){if(n)return;var t=+Date.now();if(r&&!m(e,r)&&t-r.endTime<1500)return;n=u(e),s("start",e)}).on("mousemove touchmove pointermove",function(e){if(!n||!m(e,n))return;f(e,n),s("move",e)}).on("mouseup mouseleave touchend touchcancel pointerup pointercancel",function(e){if(!n||!m(e,n))return;f(e,n),n.endTime=+Date.now(),s("end",e),r=n,n=null}).on("$$mdGestureReset",function(){r=n=null})}function u(e){var t=p(e),n={startTime:+Date.now(),target:e.target,type:e.type.charAt(0)};return n.startX=n.x=t.pageX,n.startY=n.y=t.pageY,n}function m(e,t){return e&&t&&e.type.charAt(0)===t.type}function f(e,t){var n=p(e),r=t.x=n.pageX,o=t.y=n.pageY;t.distanceX=r-t.startX,t.distanceY=o-t.startY,t.distance=Math.sqrt(t.distanceX*t.distanceX+t.distanceY*t.distanceY),t.directionX=t.distanceX>0?"right":t.distanceX<0?"left":"",t.directionY=t.distanceY>0?"up":t.distanceY<0?"down":"",t.duration=+Date.now()-t.startTime,t.velocityX=t.distanceX/t.duration,t.velocityY=t.distanceY/t.duration}function p(e){return(e=e.originalEvent||e).touches&&e.touches[0]||e.changedTouches&&e.changedTouches[0]||e}t.module("material.core.gestures",[]).provider("$mdGesture",s).factory("$$MdGestureHandler",function(){var r=void 0!==e.jQuery&&t.element===e.jQuery;return c.prototype={options:{},dispatchEvent:r?function(e,r,o){o=o||n;var i=new t.element.Event(r);i.$material=!0,i.pointer=o,i.srcEvent=e,t.extend(i,{clientX:o.x,clientY:o.y,screenX:o.x,screenY:o.y,pageX:o.x,pageY:o.y,ctrlKey:e.ctrlKey,altKey:e.altKey,shiftKey:e.shiftKey,metaKey:e.metaKey}),t.element(o.target).trigger(i)}:function(t,r,o){var i;o=o||n,"click"===r?(i=document.createEvent("MouseEvents")).initMouseEvent("click",!0,!0,e,t.detail,o.x,o.y,o.x,o.y,t.ctrlKey,t.altKey,t.shiftKey,t.metaKey,t.button,t.relatedTarget||null):(i=document.createEvent("CustomEvent")).initCustomEvent(r,!0,!0,{}),i.$material=!0,i.pointer=o,i.srcEvent=t,o.target.dispatchEvent(i)},onStart:t.noop,onMove:t.noop,onEnd:t.noop,onCancel:t.noop,start:function(e,n){if(!this.state.isRunning){var r=this.getNearestParent(e.target),o=r&&r.$mdGesture[this.name]||{};this.state={isRunning:!0,options:t.extend({},this.options,o),registeredParent:r},this.onStart(e,n)}},move:function(e,t){this.state.isRunning&&this.onMove(e,t)},end:function(e,t){this.state.isRunning&&(this.onEnd(e,t),this.state.isRunning=!1)},cancel:function(e,t){this.onCancel(e,t),this.state={}},getNearestParent:function(e){for(var t=e;t;){if((t.$mdGesture||{})[this.name])return t;t=t.parentNode}return null},registerElement:function(e,t){var n=this;return e[0].$mdGesture=e[0].$mdGesture||{},e[0].$mdGesture[this.name]=t||{},e.on("$destroy",r),r;function r(){delete e[0].$mdGesture[n.name],e.off("$destroy",r)}}},c}).run(d),s.prototype={skipClickHijack:function(){return i=!0},$get:["$$MdGestureHandler","$$rAF","$timeout",function(e,t,n){return new l(e,t,n)}]},l.$inject=["$$MdGestureHandler","$$rAF","$timeout"],d.$inject=["$mdGesture","$$MdGestureHandler"]}(),function(){t.module("material.core").provider("$$interimElement",function(){return e.$get=r,r.$inject=["$document","$q","$rootScope","$timeout","$rootElement","$animate","$interpolate","$mdCompiler","$mdTheming"],e;function e(e){var n=["onHide","onShow","onRemove"],r={},o={presets:{}},i={setDefaults:function(e){return o.optionsFactory=e.options,o.methods=(e.methods||[]).concat(n),i},addPreset:function(t,r){if((r=r||{}).methods=r.methods||[],r.options=r.options||function(){return{}},/^cancel|hide|show$/.test(t))throw new Error("Preset '"+t+"' in "+e+" is reserved!");if(r.methods.indexOf("_options")>-1)throw new Error("Method '_options' in "+e+" is reserved!");return o.presets[t]={methods:r.methods.concat(n),optionsFactory:r.options,argOption:r.argOption},i},addMethod:function(e,t){return r[e]=t,i},$get:a};return i.addPreset("build",{methods:["controller","controllerAs","resolve","template","templateUrl","themable","transformTemplate","parent"]}),a.$inject=["$$interimElement","$animate","$injector"],i;function a(n,i,a){var s,l,c=n(),d={hide:c.hide,cancel:c.cancel,show:function(e){e&&e._options&&(e=e._options);return c.show(t.extend({},l,e))}};return s=o.methods||[],l=u(o.optionsFactory,{}),t.forEach(r,function(e,t){d[t]=e}),t.forEach(o.presets,function(e,n){var r=u(e.optionsFactory,{}),o=(e.methods||[]).concat(s);function i(e){this._options=t.extend({},r,e)}if(t.extend(r,{$type:n}),t.forEach(o,function(e){i.prototype[e]=function(t){return this._options[e]=t,this}}),e.argOption){var a="show"+n.charAt(0).toUpperCase()+n.slice(1);d[a]=function(e){var t=d[n](e);return d.show(t)}}d[n]=function(n){return arguments.length&&e.argOption&&!t.isObject(n)&&!t.isArray(n)?(new i)[e.argOption](n):new i(n)}}),d;function u(t,n){var r={};return r[e]=d,a.invoke(t||function(){return n},{},r)}}}function r(e,r,o,i,a,s,l,c,d){var u=l.startSymbol(),m=l.endSymbol(),f="{{"===u&&"}}"===m,p=f?t.identity:function(e){return e&&t.isString(e)?e.replace(/\{\{/g,u).replace(/}}/g,m):e};return function(){var l,u=[];return l={show:function m(f){if(u.length)return l.cancel().then(function(){return m(f)});var h=new function(u){var m,f,h,g;u=u||{},(u=t.extend({preserveScope:!1,scope:u.scope||o.$new(u.isolateScope),onShow:function(e,t,n){return s.enter(t,n.parent)},onRemove:function(e,t,n){return t&&s.leave(t)||r.when()}},u)).template&&(u.template=p(u.template));return m={options:u,deferred:r.defer(),show:function(){var n;return n=u.skipCompile?r(function(e){e({locals:{},link:function(){return u.element}})}):c.compile(u),g=n.then(function(n){var o;(t.extend(n.locals,m.options),h=n.link(u.scope),t.isFunction(u.parent)?u.parent=u.parent(u.scope,h,u):t.isString(u.parent)&&(u.parent=t.element(e[0].querySelector(u.parent))),(u.parent||{}).length)||(a[0]&&a[0].querySelector&&(o=a[0].querySelector(":not(svg) > body")),o||(o=a[0]),"#comment"==o.nodeName&&(o=e[0].body),u.parent=t.element(o));u.themable&&d(h);var s=u.onShow(u.scope,h,u);return r.when(s).then(function(){(u.onComplete||t.noop)(u.scope,h,u),u.hideDelay&&(f=i(l.cancel,u.hideDelay))})},function(e){g=!0,m.deferred.reject(e)})},cancelTimeout:function(){f&&(i.cancel(f),f=n)},remove:function(){return m.cancelTimeout(),r.when(g).then(function(){var e=!h||u.onRemove(u.scope,h,u);return r.when(e).then(function(){u.preserveScope||u.scope.$destroy(),!0})})}}}(f);return u.push(h),h.show().then(function(){return h.deferred.promise})},hide:function(e){var t=u.shift();return t&&t.remove().then(function(){t.deferred.resolve(e)})},cancel:function(e){var t=u.shift();return r.when(t&&t.remove().then(function(){t.deferred.reject(e)}))}}}}})}(),function(){function e(e,n){var r,o=[],i={};return r={notFoundError:function(t){e.error("No instance found for handle",t)},getInstances:function(){return o},get:function(e){if(!a(e))return null;var t,n,r;for(t=0,n=o.length;t<n;t++)if((r=o[t]).$$mdHandle===e)return r;return null},register:function(e,n){return n?(e.$$mdHandle=n,o.push(e),(r=i[n])&&(r.resolve(e),delete i[n]),function(){var t=o.indexOf(e);-1!==t&&o.splice(t,1)}):t.noop;var r},when:function(e){if(a(e)){var t=n.defer(),o=r.get(e);return o?t.resolve(o):i[e]=t,t.promise}return n.reject("Invalid `md-component-id` value.")}};function a(e){return e&&""!==e}}t.module("material.core").factory("$mdComponentRegistry",e),e.$inject=["$log","$q"]}(),function(){function e(e){return{attach:function(n,r,o){var i=function(e){return e.hasClass("md-icon-button")?{isMenuItem:e.hasClass("md-menu-item"),fitRipple:!0,center:!0}:{isMenuItem:e.hasClass("md-menu-item"),dimBackground:!0}}(r);return e.attach(n,r,t.extend(i,o))}}}t.module("material.core").factory("$mdButtonInkRipple",e),e.$inject=["$mdInkRipple"]}(),function(){function e(e){return{attach:function(n,r,o){return e.attach(n,r,t.extend({center:!0,dimBackground:!1,fitRipple:!0},o))}}}t.module("material.core").factory("$mdCheckboxInkRipple",e),e.$inject=["$mdInkRipple"]}(),function(){function e(e){return{attach:function(n,r,o){return e.attach(n,r,t.extend({center:!1,dimBackground:!0,outline:!1,rippleSize:"full"},o))}}}t.module("material.core").factory("$mdListInkRipple",e),e.$inject=["$mdInkRipple"]}(),function(){function e(e,n){return{controller:t.noop,link:function(t,r,o){o.hasOwnProperty("mdInkRippleCheckbox")?n.attach(t,r):e.attach(t,r)}}}function n(e,n){return{attach:function(r,o,i){if(o.controller("mdNoInk"))return t.noop;i=t.extend({colorElement:o,mousedown:!0,hover:!0,focus:!0,center:!1,mousedownPauseTime:150,dimBackground:!1,outline:!1,fullRipple:!0,isMenuItem:!1,fitRipple:!1},i);var a,s=o.controller("mdInkRipple")||{},l=0,c=[],d=[],u=o.attr("md-highlight"),m=!1,f=!1,p=o[0],h=o.attr("md-ripple-size"),g=b(o.attr("md-ink-ripple"))||b(i.colorElement.length&&e.getComputedStyle(i.colorElement[0]).color||"rgb(0, 0, 0)");switch(h){case"full":i.fullRipple=!0;break;case"partial":i.fullRipple=!1}i.mousedown&&o.on("$md.pressdown",y).on("$md.pressup",w);s.createRipple=E,u&&r.$watch(u,function(e){(m=e)&&!c.length&&n(function(){E(0,0)},0,!1),t.forEach(c,$)});return function(){o.off("$md.pressdown",y).off("$md.pressup",w),v().remove()};function v(){var e=o.data("$mdRippleContainer");return e||(e=t.element('<div class="md-ripple-container">'),o.append(e),o.data("$mdRippleContainer",e),e)}function b(e){if(e){if(0===e.indexOf("rgba"))return e.replace(/\d?\.?\d*\s*\)\s*$/,"0.1)");if(0===e.indexOf("rgb"))return function(e){return e.replace(")",", 0.1)").replace("(","a(")}(e);if(0===e.indexOf("#"))return function(e){var t="#"===e.charAt(0)?e.substr(1):e,n=t.length/3,r=t.substr(0,n),o=t.substr(n,n),i=t.substr(2*n);1===n&&(r+=r,o+=o,i+=i);return"rgba("+parseInt(r,16)+","+parseInt(o,16)+","+parseInt(i,16)+",0.1)"}(e)}}function $(e){var t=c.indexOf(e),r=d[t]||{},o=!(c.length>1)&&m,s=!(c.length>1)&&f;o||r.animating||s?e.addClass("md-ripple-visible"):e&&(e.removeClass("md-ripple-visible"),i.outline&&e.css({width:a+"px",height:a+"px",marginLeft:-1*a+"px",marginTop:-1*a+"px"}),function(e,t){c.splice(c.indexOf(e),1),0===c.length&&v().css({backgroundColor:""});n(function(){e.remove()},t,!1)}(e,i.outline?450:650))}function E(r,s){g=b(o.attr("md-ink-ripple"))||b(e.getComputedStyle(i.colorElement[0]).color||"rgb(0, 0, 0)");var u=v(),m=function(e,t){var n,r,o,a=u.prop("offsetWidth"),s=u.prop("offsetHeight");i.isMenuItem?r=Math.sqrt(Math.pow(a,2)+Math.pow(s,2)):i.outline?(o=p.getBoundingClientRect(),e-=o.left,t-=o.top,a=Math.max(e,a-e),s=Math.max(t,s-t),r=2*Math.sqrt(Math.pow(a,2)+Math.pow(s,2))):(n=i.fullRipple?1.1:.8,r=Math.sqrt(Math.pow(a,2)+Math.pow(s,2))*n,i.fitRipple&&(r=Math.min(s,a,r)));return r}(r,s),f=function(e,t,n){var r=p.getBoundingClientRect(),o={backgroundColor:a(g),borderColor:a(g),width:e+"px",height:e+"px"};i.outline?(o.width=0,o.height=0):o.marginLeft=o.marginTop=-.5*e+"px";i.center?o.left=o.top="50%":(o.left=Math.round((t-r.left)/u.prop("offsetWidth")*100)+"%",o.top=Math.round((n-r.top)/u.prop("offsetHeight")*100)+"%");return o;function a(e){return e.replace("rgba","rgb").replace(/,[^\),]+\)/,")")}}(m,r,s),h=function(e){var n=t.element('<div class="md-ripple" data-counter="'+l+++'">');return c.unshift(n),d.unshift({animating:!0}),u.append(n),e&&n.css(e),n}(f),E=c.indexOf(h),y=d[E]||{};return a=m,y.animating=!0,n(function(){i.dimBackground&&u.css({backgroundColor:g}),h.addClass("md-ripple-placed md-ripple-scaled"),i.outline?h.css({borderWidth:.5*m+"px",marginLeft:-.5*m+"px",marginTop:-.5*m+"px"}):h.css({left:"50%",top:"50%"}),$(h),n(function(){y.animating=!1,$(h)},i.outline?450:225,!1)},0,!1),h}function y(e){(function(){var e=p.parentNode,t=e&&e.parentNode,n=t&&t.parentNode;return!(r(p)||r(e)||r(t)||r(n));function r(e){return e&&e.hasAttribute&&e.hasAttribute("disabled")}})()&&(E(e.pointer.x,e.pointer.y),f=!0)}function w(){f=!1;var e=c[c.length-1];n(function(){$(e)},0,!1)}}}}function r(){return function(){return{controller:t.noop}}}t.module("material.core").factory("$mdInkRipple",n).directive("mdInkRipple",e).directive("mdNoInk",r()).directive("mdNoBar",r()).directive("mdNoStretch",r()),e.$inject=["$mdButtonInkRipple","$mdCheckboxInkRipple"],n.$inject=["$window","$timeout"]}(),function(){function e(e){return{attach:function(n,r,o){return e.attach(n,r,t.extend({center:!1,dimBackground:!0,outline:!1,rippleSize:"full"},o))}}}t.module("material.core").factory("$mdTabInkRipple",e),e.$inject=["$mdInkRipple"]}(),t.module("material.core.theming.palette",[]).constant("$mdColorPalette",{red:{50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000",contrastDefaultColor:"light",contrastDarkColors:"50 100 200 300 400 A100",contrastStrongLightColors:"500 600 700 A200 A400 A700"},pink:{50:"#fce4ec",100:"#f8bbd0",200:"#f48fb1",300:"#f06292",400:"#ec407a",500:"#e91e63",600:"#d81b60",700:"#c2185b",800:"#ad1457",900:"#880e4f",A100:"#ff80ab",A200:"#ff4081",A400:"#f50057",A700:"#c51162",contrastDefaultColor:"light",contrastDarkColors:"50 100 200 300 400 A100",contrastStrongLightColors:"500 600 A200 A400 A700"},purple:{50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff",contrastDefaultColor:"light",contrastDarkColors:"50 100 200 A100",contrastStrongLightColors:"300 400 A200 A400 A700"},"deep-purple":{50:"#ede7f6",100:"#d1c4e9",200:"#b39ddb",300:"#9575cd",400:"#7e57c2",500:"#673ab7",600:"#5e35b1",700:"#512da8",800:"#4527a0",900:"#311b92",A100:"#b388ff",A200:"#7c4dff",A400:"#651fff",A700:"#6200ea",contrastDefaultColor:"light",contrastDarkColors:"50 100 200 A100",contrastStrongLightColors:"300 400 A200"},indigo:{50:"#e8eaf6",100:"#c5cae9",200:"#9fa8da",300:"#7986cb",400:"#5c6bc0",500:"#3f51b5",600:"#3949ab",700:"#303f9f",800:"#283593",900:"#1a237e",A100:"#8c9eff",A200:"#536dfe",A400:"#3d5afe",A700:"#304ffe",contrastDefaultColor:"light",contrastDarkColors:"50 100 200 A100",contrastStrongLightColors:"300 400 A200 A400"},blue:{50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff",contrastDefaultColor:"light",contrastDarkColors:"100 200 300 400 A100",contrastStrongLightColors:"500 600 700 A200 A400 A700"},"light-blue":{50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea",contrastDefaultColor:"dark",contrastLightColors:"500 600 700 800 900 A700",contrastStrongLightColors:"500 600 700 800 A700"},cyan:{50:"#e0f7fa",100:"#b2ebf2",200:"#80deea",300:"#4dd0e1",400:"#26c6da",500:"#00bcd4",600:"#00acc1",700:"#0097a7",800:"#00838f",900:"#006064",A100:"#84ffff",A200:"#18ffff",A400:"#00e5ff",A700:"#00b8d4",contrastDefaultColor:"dark",contrastLightColors:"500 600 700 800 900",contrastStrongLightColors:"500 600 700 800"},teal:{50:"#e0f2f1",100:"#b2dfdb",200:"#80cbc4",300:"#4db6ac",400:"#26a69a",500:"#009688",600:"#00897b",700:"#00796b",800:"#00695c",900:"#004d40",A100:"#a7ffeb",A200:"#64ffda",A400:"#1de9b6",A700:"#00bfa5",contrastDefaultColor:"dark",contrastLightColors:"500 600 700 800 900",contrastStrongLightColors:"500 600 700"},green:{50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853",contrastDefaultColor:"dark",contrastLightColors:"500 600 700 800 900",contrastStrongLightColors:"500 600 700"},"light-green":{50:"#f1f8e9",100:"#dcedc8",200:"#c5e1a5",300:"#aed581",400:"#9ccc65",500:"#8bc34a",600:"#7cb342",700:"#689f38",800:"#558b2f",900:"#33691e",A100:"#ccff90",A200:"#b2ff59",A400:"#76ff03",A700:"#64dd17",contrastDefaultColor:"dark",contrastLightColors:"800 900",contrastStrongLightColors:"800 900"},lime:{50:"#f9fbe7",100:"#f0f4c3",200:"#e6ee9c",300:"#dce775",400:"#d4e157",500:"#cddc39",600:"#c0ca33",700:"#afb42b",800:"#9e9d24",900:"#827717",A100:"#f4ff81",A200:"#eeff41",A400:"#c6ff00",A700:"#aeea00",contrastDefaultColor:"dark",contrastLightColors:"900",contrastStrongLightColors:"900"},yellow:{50:"#fffde7",100:"#fff9c4",200:"#fff59d",300:"#fff176",400:"#ffee58",500:"#ffeb3b",600:"#fdd835",700:"#fbc02d",800:"#f9a825",900:"#f57f17",A100:"#ffff8d",A200:"#ffff00",A400:"#ffea00",A700:"#ffd600",contrastDefaultColor:"dark"},amber:{50:"#fff8e1",100:"#ffecb3",200:"#ffe082",300:"#ffd54f",400:"#ffca28",500:"#ffc107",600:"#ffb300",700:"#ffa000",800:"#ff8f00",900:"#ff6f00",A100:"#ffe57f",A200:"#ffd740",A400:"#ffc400",A700:"#ffab00",contrastDefaultColor:"dark"},orange:{50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00",contrastDefaultColor:"dark",contrastLightColors:"800 900",contrastStrongLightColors:"800 900"},"deep-orange":{50:"#fbe9e7",100:"#ffccbc",200:"#ffab91",300:"#ff8a65",400:"#ff7043",500:"#ff5722",600:"#f4511e",700:"#e64a19",800:"#d84315",900:"#bf360c",A100:"#ff9e80",A200:"#ff6e40",A400:"#ff3d00",A700:"#dd2c00",contrastDefaultColor:"light",contrastDarkColors:"50 100 200 300 400 A100 A200",contrastStrongLightColors:"500 600 700 800 900 A400 A700"},brown:{50:"#efebe9",100:"#d7ccc8",200:"#bcaaa4",300:"#a1887f",400:"#8d6e63",500:"#795548",600:"#6d4c41",700:"#5d4037",800:"#4e342e",900:"#3e2723",A100:"#d7ccc8",A200:"#bcaaa4",A400:"#8d6e63",A700:"#5d4037",contrastDefaultColor:"light",contrastDarkColors:"50 100 200",contrastStrongLightColors:"300 400"},grey:{50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",1000:"#000000",A100:"#ffffff",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161",contrastDefaultColor:"dark",contrastLightColors:"600 700 800 900"},"blue-grey":{50:"#eceff1",100:"#cfd8dc",200:"#b0bec5",300:"#90a4ae",400:"#78909c",500:"#607d8b",600:"#546e7a",700:"#455a64",800:"#37474f",900:"#263238",A100:"#cfd8dc",A200:"#b0bec5",A400:"#78909c",A700:"#455a64",contrastDefaultColor:"light",contrastDarkColors:"50 100 200 300",contrastStrongLightColors:"400 500"}}),function(){t.module("material.core.theming",["material.core.theming.palette"]).directive("mdTheme",b).directive("mdThemable",$).provider("$mdTheming",v).run(y);var e,r,o={},i={name:"dark",1:"rgba(0,0,0,0.87)",2:"rgba(0,0,0,0.54)",3:"rgba(0,0,0,0.26)",4:"rgba(0,0,0,0.12)"},a={name:"light",1:"rgba(255,255,255,1.0)",2:"rgba(255,255,255,0.7)",3:"rgba(255,255,255,0.3)",4:"rgba(255,255,255,0.12)"},s="1px 1px 0px rgba(0,0,0,0.4), -1px -1px 0px rgba(0,0,0,0.4)",l="",c=w("rgba(0,0,0,0.87)"),d=w("rgba(255,255,255,0.87"),u=w("rgb(255,255,255)"),m=["primary","accent","warn","background"],f="primary",p={accent:{default:"A200","hue-1":"A100","hue-2":"A400","hue-3":"A700"},background:{default:"A100","hue-1":"300","hue-2":"800","hue-3":"900"}},h={background:{default:"800","hue-1":"300","hue-2":"600","hue-3":"900"}};m.forEach(function(e){var t={default:"500","hue-1":"300","hue-2":"800","hue-3":"A100"};p[e]||(p[e]=t),h[e]||(h[e]=t)});var g=["50","100","200","300","400","500","600","700","800","900","A100","A200","A400","A700"];function v(o){var c;e={},r={};var d="default",u=!1;return t.extend(e,o),v.$inject=["$rootScope","$log"],c={definePalette:function(t,n){return n=n||{},e[t]=f(t,n),c},extendPalette:function(n,r){return f(n,t.extend({},e[n]||{},r))},theme:function(e,n){if(r[e])return r[e];var o="string"==typeof(n=n||"default")?r[n]:n,c=new function(e){var n=this;function r(e){if((e=0===arguments.length||!!e)!==n.isDark){n.isDark=e,n.foregroundPalette=n.isDark?a:i,n.foregroundShadow=n.isDark?s:l;var r=n.isDark?h:p,o=n.isDark?p:h;return t.forEach(r,function(e,t){var r=n.colors[t],i=o[t];if(r)for(var a in r.hues)r.hues[a]===i[a]&&(r.hues[a]=e[a])}),n}}n.name=e,n.colors={},n.dark=r,r(!1),m.forEach(function(e){var r=(n.isDark?h:p)[e];n[e+"Palette"]=function(o,i){var a=n.colors[e]={name:o,hues:t.extend({},r,i)};return Object.keys(a.hues).forEach(function(e){if(!r[e])throw new Error("Invalid hue name '%1' in theme %2's %3 color %4. Available hue names: %4".replace("%1",e).replace("%2",n.name).replace("%3",o).replace("%4",Object.keys(r).join(", ")))}),Object.keys(a.hues).map(function(e){return a.hues[e]}).forEach(function(t){if(-1==g.indexOf(t))throw new Error("Invalid hue value '%1' in theme %2's %3 color %4. Available hue values: %5".replace("%1",t).replace("%2",n.name).replace("%3",e).replace("%4",o).replace("%5",g.join(", ")))}),n},n[e+"Color"]=function(){var t=Array.prototype.slice.call(arguments);return console.warn("$mdThemingProviderTheme."+e+"Color() has been deprecated. Use $mdThemingProviderTheme."+e+"Palette() instead."),n[e+"Palette"].apply(n,t)}})}(e);o&&t.forEach(o.colors,function(e,n){c.colors[n]={name:e.name,hues:t.extend({},e.hues)}});return r[e]=c,c},setDefaultTheme:function(e){d=e},alwaysWatchTheme:function(e){u=e},$get:v,_LIGHT_DEFAULT_HUES:p,_DARK_DEFAULT_HUES:h,_PALETTES:e,_THEMES:r,_parseRules:E,_rgba:C};function f(e,t){var n=g.filter(function(e){return!t[e]});if(n.length)throw new Error("Missing colors %1 in palette %2!".replace("%1",n.join(", ")).replace("%2",e));return t}function v(e,o){return a.inherit=function(n,r){var a=r.controller("mdTheme"),s=n.attr("md-theme-watch");if((u||t.isDefined(s))&&"false"!=s){var l=e.$watch(function(){return a&&a.$mdTheme||d},c);n.on("$destroy",l)}else{c(a&&a.$mdTheme||d)}function c(e){i(e)||o.warn("Attempted to use unregistered theme '"+e+"'. Register it with $mdThemingProvider.theme().");var t=n.data("$mdThemeName");t&&n.removeClass("md-"+t+"-theme"),n.addClass("md-"+e+"-theme"),n.data("$mdThemeName",e)}},a.THEMES=t.extend({},r),a.defaultTheme=function(){return d},a.registered=i,a;function i(e){return e===n||""===e||a.THEMES[e]!==n}function a(t,r){r===n&&(r=t,t=n),t===n&&(t=e),a.inherit(r,r)}}}function b(e,t,n){return{priority:100,link:{pre:function(r,o,i){var a={$setTheme:function(t){e.registered(t)||n.warn("attempted to use unregistered theme '"+t+"'"),a.$mdTheme=t}};o.data("$mdThemeController",a),a.$setTheme(t(i.mdTheme)(r)),i.$observe("mdTheme",a.$setTheme)}}}}function $(e){return e}function E(n,r,o){!function(t,n){if(!e[(t.colors[n]||{}).name])throw new Error("You supplied an invalid color palette for theme %1's %2 palette. Available palettes: %3".replace("%1",t.name).replace("%2",n).replace("%3",Object.keys(e).join(", ")))}(n,r),o=o.replace(/THEME_NAME/g,n.name);var i=[],a=n.colors[r],s=new RegExp(".md-"+n.name+"-theme","g"),l=new RegExp("('|\")?{{\\s*("+r+")-(color|contrast)-?(\\d\\.?\\d*)?\\s*}}(\"|')?","g"),c=e[a.name];return o=o.replace(/'?"?\{\{\s*([a-zA-Z]+)-(A?\d+|hue\-[0-3]|shadow)-?(\d\.?\d*)?\s*\}\}'?"?/g,function(t,r,o,i){return"foreground"===r?"shadow"==o?n.foregroundShadow:n.foregroundPalette[o]||n.foregroundPalette[1]:(0===o.indexOf("hue")&&(o=n.colors[r].hues[o]),C((e[n.colors[r].name][o]||"").value,i))}),t.forEach(a.hues,function(e,t){var r=o.replace(l,function(t,n,r,o,i){return C(c[e]["color"===o?"value":"contrast"],i)});"default"!==t&&(r=r.replace(s,".md-"+n.name+"-theme.md-"+t)),"default"==n.name&&(r=r.replace(/\.md-default-theme/g,"")),i.push(r)}),i}function y(n){var i=document.getElementsByTagName("head")[0],a=i?i.firstElementChild:null,s=n.has("$MD_THEME_CSS")?n.get("$MD_THEME_CSS"):"";if(a&&0!==s.length){t.forEach(e,function(e){var n=e.contrastDefaultColor,r=e.contrastLightColors||[],o=e.contrastStrongLightColors||[],i=e.contrastDarkColors||[];"string"==typeof r&&(r=r.split(" "));"string"==typeof o&&(o=o.split(" "));"string"==typeof i&&(i=i.split(" "));delete e.contrastDefaultColor,delete e.contrastLightColors,delete e.contrastStrongLightColors,delete e.contrastDarkColors,t.forEach(e,function(a,s){if(!t.isObject(a)){var l=w(a);if(!l)throw new Error("Color %1, in palette %2's hue %3, is invalid. Hex or rgb(a) color expected.".replace("%1",a).replace("%2",e.name).replace("%3",s));e[s]={value:l,contrast:"light"===n?i.indexOf(s)>-1?c:o.indexOf(s)>-1?u:d:r.indexOf(s)>-1?o.indexOf(s)>-1?u:d:c}}})});var l={},p=s.split(/\}(?!(\}|'|"|;))/).filter(function(e){return e&&e.length}).map(function(e){return e.trim()+"}"}),h=new RegExp("md-("+m.join("|")+")","g");m.forEach(function(e){l[e]=""}),p.forEach(function(e){e.match(h);for(var t,n=0;t=m[n];n++)if(e.indexOf(".md-"+t)>-1)return l[t]+=e;for(n=0;t=m[n];n++)if(e.indexOf(t)>-1)return l[t]+=e;return l[f]+=e}),t.forEach(r,function(e){o[e.name]||(m.forEach(function(t){for(var n=E(e,t,l[t]);n.length;){var r=document.createElement("style");r.setAttribute("type","text/css"),r.appendChild(document.createTextNode(n.shift())),i.insertBefore(r,a)}}),e.colors.primary.name==e.colors.accent.name&&console.warn("$mdThemingProvider: Using the same palette for primary and accent. This violates the material design spec."),o[e.name]=!0)})}}function w(e){if(t.isArray(e)&&3==e.length)return e;if(/^rgb/.test(e))return e.replace(/(^\s*rgba?\(|\)\s*$)/g,"").split(",").map(function(e,t){return 3==t?parseFloat(e,10):parseInt(e,10)});if("#"==e.charAt(0)&&(e=e.substring(1)),/^([a-fA-F0-9]{3}){1,2}$/g.test(e)){var n=e.length/3,r=e.substr(0,n),o=e.substr(n,n),i=e.substr(2*n);return 1===n&&(r+=r,o+=o,i+=i),[parseInt(r,16),parseInt(o,16),parseInt(i,16)]}}function C(e,n){return e?(4==e.length&&(e=t.copy(e),n?e.pop():n=e.pop()),n&&("number"==typeof n||"string"==typeof n&&n.length)?"rgba("+e.join(",")+","+n+")":"rgb("+e.join(",")+")"):"rgb('0,0,0')"}v.$inject=["$mdColorPalette"],b.$inject=["$mdTheming","$interpolate","$log"],$.$inject=["$mdTheming"],y.$inject=["$injector"]}(),t.module("material.components.autocomplete",["material.core","material.components.icon"]),function(){function e(e){return e}t.module("material.components.backdrop",["material.core"]).directive("mdBackdrop",e),e.$inject=["$mdTheming"]}(),function(){function e(e,n,r,o){return{restrict:"EA",replace:!0,transclude:!0,template:function(e,t){return i(t)?'<a class="md-button" ng-transclude></a>':'<button class="md-button" ng-transclude></button>'},link:function(a,s,l){var c=s[0];n(s),e.attach(a,s),c.textContent.trim()||r.expect(s,"aria-label");i(l)&&t.isDefined(l.ngDisabled)&&a.$watch(l.ngDisabled,function(e){s.attr("tabindex",e?-1:0)});s.on("click",function(e){!0===l.disabled&&(e.preventDefault(),e.stopImmediatePropagation())}),a.mouseActive=!1,s.on("mousedown",function(){a.mouseActive=!0,o(function(){a.mouseActive=!1},100)}).on("focus",function(){!1===a.mouseActive&&s.addClass("md-focused")}).on("blur",function(){s.removeClass("md-focused")})}};function i(e){return t.isDefined(e.href)||t.isDefined(e.ngHref)||t.isDefined(e.ngLink)||t.isDefined(e.uiSref)}}t.module("material.components.button",["material.core"]).directive("mdButton",e),e.$inject=["$mdButtonInkRipple","$mdTheming","$mdAria","$timeout"]}(),function(){function e(e){var n=.5,r=80;return o.$inject=["$animate","$mdConstant","$mdUtil","$timeout","$compile","$mdTheming","$mdBottomSheet","$rootElement","$mdGesture"],e("$mdBottomSheet").setDefaults({methods:["disableParentScroll","escapeToClose","targetEvent"],options:o});function o(e,o,i,a,s,l,c,d,u){var m;return{themable:!0,targetEvent:null,onShow:function(f,p,h){p=i.extractElementByName(p,"md-bottom-sheet"),(m=s('<md-backdrop class="md-opaque md-bottom-sheet-backdrop">')(f)).on("click",function(){a(c.cancel)}),l.inherit(m,h.parent),e.enter(m,h.parent,null);var g=new function(e,t){var i=u.register(t,"drag",{horizontal:!1});return t.on("$md.dragstart",s).on("$md.drag",l).on("$md.dragend",d),{element:e,cleanup:function(){i(),t.off("$md.dragstart",s).off("$md.drag",l).off("$md.dragend",d)}};function s(t){e.css(o.CSS.TRANSITION_DURATION,"0ms")}function l(t){var n=t.pointer.distanceY;n<5&&(n=Math.max(-r,n/2)),e.css(o.CSS.TRANSFORM,"translate3d(0,"+(r+n)+"px,0)")}function d(t){if(t.pointer.distanceY>0&&(t.pointer.distanceY>20||Math.abs(t.pointer.velocityY)>n)){var r=e.prop("offsetHeight")-t.pointer.distanceY,i=Math.min(r/t.pointer.velocityY*.75,500);e.css(o.CSS.TRANSITION_DURATION,i+"ms"),a(c.cancel)}else e.css(o.CSS.TRANSITION_DURATION,""),e.css(o.CSS.TRANSFORM,"")}}(p,h.parent);h.bottomSheet=g,h.targetEvent&&t.element(h.targetEvent.target).blur(),l.inherit(g.element,h.parent),h.disableParentScroll&&(h.lastOverflow=h.parent.css("overflow"),h.parent.css("overflow","hidden"));return e.enter(g.element,h.parent).then(function(){var e=t.element(p[0].querySelector("button")||p[0].querySelector("a")||p[0].querySelector("[ng-click]"));e.focus(),h.escapeToClose&&(h.rootElementKeyupCallback=function(e){e.keyCode===o.KEY_CODE.ESCAPE&&a(c.cancel)},d.on("keyup",h.rootElementKeyupCallback))})},onRemove:function(n,r,o){var i=o.bottomSheet;return e.leave(m),e.leave(i.element).then(function(){o.disableParentScroll&&(o.parent.css("overflow",o.lastOverflow),delete o.lastOverflow),i.cleanup(),o.targetEvent&&t.element(o.targetEvent.target).focus()})},escapeToClose:!0,disableParentScroll:!0}}}t.module("material.components.bottomSheet",["material.core","material.components.backdrop"]).directive("mdBottomSheet",function(){return{restrict:"E"}}).provider("$mdBottomSheet",e),e.$inject=["$$interimElementProvider"]}(),function(){function e(e){return{restrict:"E",link:function(t,n,r){e(n)}}}t.module("material.components.card",["material.core"]).directive("mdCard",e),e.$inject=["$mdTheming"]}(),function(){function e(e,n,r,o,i,a,s){e=e[0];var l="md-checked";return{restrict:"E",transclude:!0,require:"?ngModel",priority:210,template:'<div class="md-container" md-ink-ripple md-ink-ripple-checkbox><div class="md-icon"></div></div><div ng-transclude class="md-label"></div>',compile:function(n,c){return c.type="checkbox",c.tabindex=c.tabindex||"0",n.attr("role",c.type),function(n,c,d,u){var m,f,p;function h(e){c[0].hasAttribute("disabled")||n.$apply(function(){var t=d.ngChecked?d.checked:!u.$viewValue;u.$setViewValue(t,e&&e.type),u.$render()})}u=u||a.fakeNgModel(),i(c),d.ngChecked&&n.$watch(n.$eval.bind(n,d.ngChecked),u.$setViewValue.bind(u)),m="ngDisabled",f="tabindex",p={true:"-1",false:d.tabindex},d[m]&&n.$watch(d[m],function(e){p[e]&&c.attr(f,p[e])}),r.expectWithText(c,"aria-label"),e.link.pre(n,{on:t.noop,0:{}},d,[u]),n.mouseActive=!1,c.on("click",h).on("keypress",function(e){var t=e.which||e.keyCode;t!==o.KEY_CODE.SPACE&&t!==o.KEY_CODE.ENTER||(e.preventDefault(),c.hasClass("md-focused")||c.addClass("md-focused"),h(e))}).on("mousedown",function(){n.mouseActive=!0,s(function(){n.mouseActive=!1},100)}).on("focus",function(){!1===n.mouseActive&&c.addClass("md-focused")}).on("blur",function(){c.removeClass("md-focused")}),u.$render=function(){u.$viewValue?c.addClass(l):c.removeClass(l)}}}}}t.module("material.components.checkbox",["material.core"]).directive("mdCheckbox",e),e.$inject=["inputDirective","$mdInkRipple","$mdAria","$mdConstant","$mdTheming","$mdUtil","$timeout"]}(),function(){function e(e){return{restrict:"E",controller:["$scope","$element",function(e,t){this.$scope=e,this.$element=t}],link:function(n,r,o){r[0];e(r),n.$broadcast("$mdContentLoaded",r),function(e){t.element(e).on("$md.pressdown",function(t){"t"===t.pointer.type&&(t.$materialScrollFixed||(t.$materialScrollFixed=!0,0===e.scrollTop?e.scrollTop=1:e.scrollHeight===e.scrollTop+e.offsetHeight&&(e.scrollTop-=1)))})}(r[0])}}}t.module("material.components.content",["material.core"]).directive("mdContent",e),e.$inject=["$mdTheming"]}(),t.module("material.components.chips",["material.core","material.components.autocomplete"]),function(){function e(e,t){return{restrict:"E",link:function(n,r,o){t(r),e(function(){var e=r[0].querySelector("md-dialog-content");e&&e.scrollHeight>e.clientHeight&&r.addClass("md-content-overflow")})}}}function n(e){return n.$inject=["$mdDialog","$mdTheming"],r.$inject=["$mdAria","$document","$mdUtil","$mdConstant","$mdTheming","$mdDialog","$timeout","$rootElement","$animate","$$rAF","$q"],e("$mdDialog").setDefaults({methods:["disableParentScroll","hasBackdrop","clickOutsideToClose","escapeToClose","targetEvent","parent"],options:r}).addPreset("alert",{methods:["title","content","ariaLabel","ok","theme"],options:n}).addPreset("confirm",{methods:["title","content","ariaLabel","ok","cancel","theme"],options:n});function n(e,t){return{template:['<md-dialog md-theme="{{ dialog.theme }}" aria-label="{{ dialog.ariaLabel }}">','<md-dialog-content role="document" tabIndex="-1">','<h2 class="md-title">{{ dialog.title }}</h2>',"<p>{{ dialog.content }}</p>","</md-dialog-content>",'<div class="md-actions">','<md-button ng-if="dialog.$type == \'confirm\'" ng-click="dialog.abort()" class="md-primary">',"{{ dialog.cancel }}","</md-button>",'<md-button ng-click="dialog.hide()" class="md-primary">',"{{ dialog.ok }}","</md-button>","</div>","</md-dialog>"].join(""),controller:function(){this.hide=function(){e.hide(!0)},this.abort=function(){e.cancel()}},controllerAs:"dialog",bindToController:!0,theme:t.defaultTheme()}}function r(e,n,r,o,i,a,s,l,c,d,u){return{hasBackdrop:!0,isolateScope:!0,onShow:function(u,f,g){t.element(n[0].body).addClass("md-dialog-is-showing"),f=r.extractElementByName(f,"md-dialog"),g.parent=t.element(g.parent),g.popInTarget=t.element((g.targetEvent||{}).target);var v=function(){var e=f[0].querySelector(".dialog-close");if(!e){var n=f[0].querySelectorAll(".md-actions button");e=n[n.length-1]}return t.element(e)}();if(g.hasBackdrop){var b=g.parent[0]==n[0].body&&n[0].documentElement&&n[0].documentElement.scrollTop?t.element(n[0].documentElement):g.parent,$=b.prop("scrollTop");g.backdrop=t.element('<md-backdrop class="md-dialog-backdrop md-opaque">'),g.backdrop.css("top",$+"px"),i.inherit(g.backdrop,g.parent),c.enter(g.backdrop,g.parent),f.css("top",$+"px")}var E="dialog",y=v;"alert"===g.$type&&(E="alertdialog",y=f.find("md-dialog-content"));(function(t,n,o){t.attr({role:n,tabIndex:"-1"});var i=t.find("md-dialog-content");0===i.length&&(i=t);var a=t.attr("id")||"dialog_"+r.nextUid();i.attr("id",a),t.attr("aria-describedby",a),o.ariaLabel?e.expect(t,"aria-label",o.ariaLabel):e.expectAsync(t,"aria-label",function(){var e=i.text().split(/\s+/);return e.length>3&&(e=e.slice(0,3).concat("...")),e.join(" ")})})(f.find("md-dialog"),E,g),document.addEventListener("focus",m,!0),g.disableParentScroll&&(g.lastOverflow=g.parent.css("overflow"),g.parent.css("overflow","hidden"));return(w=f,C=g.parent,M=g.popInTarget&&g.popInTarget.length&&g.popInTarget,T=w.find("md-dialog"),C.append(w),h(T,M),d(function(){T.addClass("transition-in").css(o.CSS.TRANSFORM,"")}),r.transitionEndPromise(T)).then(function(){p(f,!0),g.escapeToClose&&(g.rootElementKeyupCallback=function(e){e.keyCode===o.KEY_CODE.ESCAPE&&s(a.cancel)},l.on("keyup",g.rootElementKeyupCallback)),g.clickOutsideToClose&&(g.dialogClickOutsideCallback=function(e){e.target===f[0]&&s(a.cancel)},f.on("click",g.dialogClickOutsideCallback)),g.focusOnOpen&&y.focus()});var w,C,M,T},onRemove:function(e,o,i){t.element(n[0].body).removeClass("md-dialog-is-showing"),i.backdrop&&c.leave(i.backdrop);i.disableParentScroll&&(i.parent.css("overflow",i.lastOverflow),delete i.lastOverflow);i.escapeToClose&&l.off("keyup",i.rootElementKeyupCallback);i.clickOutsideToClose&&o.off("click",i.dialogClickOutsideCallback);return p(o,!1),document.removeEventListener("focus",m,!0),(a=o,i.parent,s=i.popInTarget&&i.popInTarget.length&&i.popInTarget,d=a.find("md-dialog"),d.addClass("transition-out").removeClass("transition-in"),h(d,s),r.transitionEndPromise(d)).then(function(){o.remove(),i.popInTarget&&i.popInTarget.focus()});var a,s,d},clickOutsideToClose:!1,escapeToClose:!0,targetEvent:null,focusOnOpen:!0,disableParentScroll:!0,transformTemplate:function(e){return'<div class="md-dialog-container">'+e+"</div>"}};function m(e){var t=document.querySelector("md-dialog");t&&!t.contains(e.target)&&(e.stopImmediatePropagation(),t.focus())}function f(e,t){if(-1!==t.indexOf(e.nodeName))return!0}function p(e,t){var n="aria-hidden";(function e(r){for(;r.parentNode;){if(r===document.body)return;for(var o=r.parentNode.children,i=0;i<o.length;i++)r===o[i]||f(o[i],["SCRIPT","STYLE"])||o[i].setAttribute(n,t);e(r=r.parentNode)}})(e=e[0])}function h(e,t){if(t){var n=t[0].getBoundingClientRect(),r=e[0].getBoundingClientRect(),i=Math.min(.5,n.width/r.width),a=Math.min(.5,n.height/r.height);e.css(o.CSS.TRANSFORM,"translate3d("+(-r.left+n.left+n.width/2-r.width/2)+"px,"+(-r.top+n.top+n.height/2-r.height/2)+"px,0) scale("+i+","+a+")")}}}}t.module("material.components.dialog",["material.core","material.components.backdrop"]).directive("mdDialog",e).provider("$mdDialog",n),e.$inject=["$$rAF","$mdTheming"],n.$inject=["$$interimElementProvider"]}(),function(){function e(e){return{restrict:"E",link:e}}t.module("material.components.divider",["material.core"]).directive("mdDivider",e),e.$inject=["$mdTheming"]}(),t.module("material.components.fabActions",["material.core"]).directive("mdFabActions",function(){return{restrict:"E",require:["^?mdFabSpeedDial","^?mdFabToolbar"],link:function(e,n,r,o){var i=o[0]||o[1];i&&t.forEach(n.children(),function(e){t.element(e).on("focus",i.open),t.element(e).on("blur",i.close)}),n.children().wrap('<div class="md-fab-action-item">')}}}),t.module("material.components.fabSpeedDial",["material.core","material.components.fabTrigger","material.components.fabActions"]).directive("mdFabSpeedDial",function(){return e.$inject=["$scope","$element","$animate"],{restrict:"E",scope:{direction:"@?mdDirection",isOpen:"=?mdOpen"},bindToController:!0,controller:e,controllerAs:"vm",link:function(e,t){t.prepend('<div class="md-css-variables"></div>')}};function e(e,t,n){var r=this;r.open=function(){e.$apply("vm.isOpen = true")},r.close=function(){e.$apply("vm.isOpen = false")},r.direction=r.direction||"down",r.isOpen=r.isOpen||!1,t.on("mouseenter",r.open),t.on("mouseleave",r.close),e.$watch("vm.direction",function(e,r){n.removeClass(t,"md-"+r),n.addClass(t,"md-"+e)}),e.$watch("vm.isOpen",function(e){var r=e?"md-is-open":"",o=e?"":"md-is-open";n.setClass(t,r,o)})}}).animation(".md-fling",function(){function e(e){var n=e[0],r=e.controller("mdFabSpeedDial"),o=n.querySelectorAll(".md-fab-action-item"),i=n.querySelector(".md-css-variables"),a=i.style.zIndex;t.forEach(o,function(e,t){var n=e.style;n.transform="",n.transitionDelay="",n.opacity=1,e.style.zIndex=o.length-t+a}),r.isOpen||t.forEach(o,function(e,t){var n,o;switch(r.direction){case"up":n=e.scrollHeight*(t+1),o="Y";break;case"down":n=-e.scrollHeight*(t+1),o="Y";break;case"left":n=e.scrollWidth*(t+1),o="X";break;case"right":n=-e.scrollWidth*(t+1),o="X"}e.style.transform="translate"+o+"("+n+"px)"})}return{addClass:function(t,n,r){t.hasClass("md-fling")&&e(t)},removeClass:function(t,n,r){e(t)}}}).animation(".md-scale",function(){var e=65;function n(n){var r=n[0],o=n.controller("mdFabSpeedDial"),i=r.querySelectorAll(".md-fab-action-item");t.forEach(i,function(t,n){var r=t.style,a=n*e;r.opacity=o.isOpen?1:0,r.transform=o.isOpen?"scale(1)":"scale(0)",r.transitionDelay=(o.isOpen?a:i.length-a)+"ms"})}return{addClass:function(e,t,r){n(e)},removeClass:function(e,t,r){n(e)}}}),t.module("material.components.fabToolbar",["material.core","material.components.fabTrigger","material.components.fabActions"]).directive("mdFabToolbar",function(){return e.$inject=["$scope","$element","$animate"],{restrict:"E",transclude:!0,template:'<div class="md-fab-toolbar-wrapper"> <div class="md-fab-toolbar-content" ng-transclude></div></div>',scope:{isOpen:"=?mdOpen"},bindToController:!0,controller:e,controllerAs:"vm",link:function(e,t,n){t.find("md-fab-trigger").find("button").attr("tabindex","-1"),t.find("md-fab-trigger").find("button").prepend('<div class="md-fab-toolbar-background"></div>')}};function e(e,t,n){var r=this;r.isOpen=r.isOpen||!1,r.open=function(){r.isOpen=!0,e.$apply()},r.close=function(){r.isOpen=!1,e.$apply()},t.addClass("md-fab-toolbar"),t.on("mouseenter",r.open),t.on("mouseleave",r.close),e.$watch("vm.isOpen",function(e){var r=e?"md-is-open":"",o=e?"":"md-is-open";n.setClass(t,r,o)})}}).animation(".md-fab-toolbar",function(){function n(n,r,o){var i=n[0],a=n.controller("mdFabToolbar"),s=i.querySelector(".md-fab-toolbar-background"),l=i.querySelector("md-fab-trigger button"),c=i.querySelector("md-fab-trigger button md-icon"),d=n.find("md-fab-actions").children();if(l&&s){var u=e.getComputedStyle(l).getPropertyValue("background-color"),m=i.offsetWidth,f=(i.offsetHeight,2*m);s.style.backgroundColor=u,s.style.borderRadius=m+"px",a.isOpen?(s.style.width=f+"px",s.style.height=f+"px",s.style.top=-f/2+"px",n.hasClass("md-left")&&(s.style.left=-f/2+"px",s.style.right=null),n.hasClass("md-right")&&(s.style.right=-f/2+"px",s.style.left=null),s.style.transitionDelay="0ms",c.style.transitionDelay=".3s",t.forEach(d,function(e,t){e.style.transitionDelay=25*(d.length-t)+"ms"})):(s.style.width=l.offsetWidth+"px",s.style.height=l.offsetHeight+"px",s.style.top="0px",n.hasClass("md-left")&&(s.style.left="0px",s.style.right=null),n.hasClass("md-right")&&(s.style.right="0px",s.style.left=null),s.style.transitionDelay="200ms",c.style.transitionDelay="0ms",t.forEach(d,function(e,t){e.style.transitionDelay=25*t+"ms"}))}}return{addClass:function(e,t,r){n(e,t,r)},removeClass:function(e,t,r){n(e,t,r)}}}),t.module("material.components.fabTrigger",["material.core"]).directive("mdFabTrigger",function(){return{restrict:"E",require:["^?mdFabSpeedDial","^?mdFabToolbar"],link:function(e,n,r,o){var i=o[0]||o[1];i&&t.forEach(n.children(),function(e){t.element(e).on("focus",i.open),t.element(e).on("blur",i.close)})}}}),function(){function e(e,r,o,i){return{restrict:"E",controller:n,scope:{mdOnLayout:"&"},link:function(n,a,s,l){a.attr("role","list"),l.layoutDelegate=function(e){var r=[].filter.call(a.children(),function(e){return"MD-GRID-TILE"==e.tagName}),l={tileSpans:(d=r,[].map.call(d,function(e){var n=t.element(e).controller("mdGridTile");return{row:parseInt(i.getResponsiveAttribute(n.$attrs,"md-rowspan"),10)||1,col:parseInt(i.getResponsiveAttribute(n.$attrs,"md-colspan"),10)||1}})),colCount:function(){var e=parseInt(i.getResponsiveAttribute(s,"md-cols"),10);if(isNaN(e))throw"md-grid-list: md-cols attribute was not found, or contained a non-numeric value";return e}(),rowMode:$(),rowHeight:function(){var e=i.getResponsiveAttribute(s,"md-row-height");switch($()){case"fixed":return E(e);case"ratio":var t=e.split(":");return parseFloat(t[0])/parseFloat(t[1]);case"fit":return 0}}(),gutter:E(i.getResponsiveAttribute(s,"md-gutter")||1)};var d;if(!e&&t.equals(l,c))return;var u=o(l.colCount,l.tileSpans,r).map(function(e,n){return{grid:{element:a,style:function(e,t,n,r,o){var i={height:"",paddingBottom:""};switch(r){case"fixed":i.height=b({unit:o,span:t,gutter:n});break;case"ratio":var a=1===e?0:(e-1)/e,s=1/e*100,l=s*(1/o),c=g({share:l,gutterShare:a,gutter:n});i.paddingBottom=b({unit:c,span:t,gutter:n})}return i}(l.colCount,n,l.gutter,l.rowMode,l.rowHeight)},tiles:e.map(function(e,n){return{element:t.element(r[n]),style:function(e,t,n,r,o,i,a){var s=1/n*100,l=(n-1)/n,c=g({share:s,gutterShare:l,gutter:o}),d={left:v({unit:c,offset:e.col,gutter:o}),width:b({unit:c,span:t.col,gutter:o}),paddingTop:"",marginTop:"",top:"",height:""};switch(i){case"fixed":d.top=v({unit:a,offset:e.row,gutter:o}),d.height=b({unit:a,span:t.row,gutter:o});break;case"ratio":var u=s/a,m=g({share:u,gutterShare:l,gutter:o});d.paddingTop=b({unit:m,span:t.row,gutter:o}),d.marginTop=v({unit:m,offset:e.row,gutter:o});break;case"fit":var f=(r-1)/r,u=1/r*100,m=g({share:u,gutterShare:f,gutter:o});d.top=v({unit:m,offset:e.row,gutter:o}),d.height=b({unit:m,span:t.row,gutter:o})}return d}(e.position,e.spans,l.colCount,l.rowCount,l.gutter,l.rowMode,l.rowHeight)}})}}).reflow().performance();n.mdOnLayout({$event:{performance:u}}),c=l};var c,d=t.bind(l,l.invalidateLayout),u=function(){for(var e in r.MEDIA)i(e),i.getQuery(r.MEDIA[e]).addListener(d);return i.watchResponsiveAttributes(["md-cols","md-row-height"],s,m)}();function m(e){null==e?l.invalidateLayout():i(e)&&l.invalidateLayout()}n.$on("$destroy",function(){for(var e in l.layoutDelegate=t.noop,u(),r.MEDIA)i.getQuery(r.MEDIA[e]).removeListener(d)});var f=e.startSymbol(),p=e.endSymbol();function h(e){return f+e+p}var g=e(h("share")+"% - ("+h("gutter")+" * "+h("gutterShare")+")"),v=e("calc(("+h("unit")+" + "+h("gutter")+") * "+h("offset")+")"),b=e("calc(("+h("unit")+") * "+h("span")+" + ("+h("span")+" - 1) * "+h("gutter")+")");function $(){var e=i.getResponsiveAttribute(s,"md-row-height");return"fit"==e?"fit":-1!==e.indexOf(":")?"ratio":"fixed"}function E(e){return/\D$/.test(e)?e:e+"px"}}}}function n(e){this.layoutInvalidated=!1,this.tilesInvalidated=!1,this.$timeout_=e,this.layoutDelegate=t.noop}function r(e){var n=o;return r.animateWith=function(e){n=t.isFunction(e)?e:o},r;function r(t,r){var o,i,a,s,l,c;return s=e.time(function(){i=function(e,t){var n=0,r=0,o=function(){for(var t=[],n=0;n<e;n++)t.push(0);return t}();return{positioning:t.map(function(t,l){return{spans:t,position:function(t,l){if(t.col>e)throw"md-grid-list: Tile at position "+l+" has a colspan ("+t.col+") that exceeds the column count ("+e+")";var c=0,d=0;for(;d-c<t.col;)n>=e?i():-1!==(c=o.indexOf(0,n))&&-1!==(d=s(c+1))?n=d+1:(c=d=0,i());return a(c,t.col,t.row),n=c+t.col,{col:c,row:r}}(t,l)}}),rowCount:r+Math.max.apply(Math,o)};function i(){n=0,r++,a(0,e,-1)}function a(e,t,n){for(var r=e;r<e+t;r++)o[r]=Math.max(o[r]+n,0)}function s(e){var t;for(t=e;t<o.length;t++)if(0!==o[t])return t;if(t===o.length)return t}}(t,r)}),o={layoutInfo:function(){return i},map:function(t){return l=e.time(function(){var e=o.layoutInfo();a=t(e.positioning,e.rowCount)}),o},reflow:function(t){return c=e.time(function(){(t||n)(a.grid,a.tiles)}),o},performance:function(){return{tileCount:r.length,layoutTime:s,mapTime:l,reflowTime:c,totalTime:s+l+c}}}}function o(e,t){e.element.css(e.style),t.forEach(function(e){e.element.css(e.style)})}}function o(e){return{restrict:"E",require:"^mdGridList",template:"<figure ng-transclude></figure>",transclude:!0,scope:{},controller:["$attrs",function(e){this.$attrs=e}],link:function(n,r,o,i){r.attr("role","listitem");var a=e.watchResponsiveAttributes(["md-colspan","md-rowspan"],o,t.bind(i,i.invalidateLayout));i.invalidateTiles(),n.$on("$destroy",function(){a(),i.invalidateLayout()}),t.isDefined(n.$parent.$index)&&n.$watch(function(){return n.$parent.$index},function(e,t){e!==t&&i.invalidateTiles()})}}}function i(){return{template:"<figcaption ng-transclude></figcaption>",transclude:!0}}t.module("material.components.gridList",["material.core"]).directive("mdGridList",e).directive("mdGridTile",o).directive("mdGridTileFooter",i).directive("mdGridTileHeader",i).factory("$mdGridLayout",r),e.$inject=["$interpolate","$mdConstant","$mdGridLayout","$mdMedia"],n.$inject=["$timeout"],n.prototype={invalidateTiles:function(){this.tilesInvalidated=!0,this.invalidateLayout()},invalidateLayout:function(){this.layoutInvalidated||(this.layoutInvalidated=!0,this.$timeout_(t.bind(this,this.layout)))},layout:function(){try{this.layoutDelegate(this.tilesInvalidated)}finally{this.layoutInvalidated=!1,this.tilesInvalidated=!1}}},r.$inject=["$mdUtil"],o.$inject=["$mdMedia"]}(),function(){function e(e,t,n,r){return{scope:{fontSet:"@mdFontSet",fontIcon:"@mdFontIcon",svgIcon:"@mdSvgIcon",svgSrc:"@mdSvgSrc"},restrict:"E",link:function(r,o,i){t(o),r.svgIcon||r.svgSrc||(r.fontIcon?(o.addClass("md-font"),o.addClass(r.fontIcon)):o.addClass(e.fontSet(r.fontSet)));var a=i.alt||r.fontIcon||r.svgIcon||o.text(),s=i.$normalize(i.$attr.mdSvgIcon||i.$attr.mdSvgSrc||"");i["aria-label"]||(""==a||function(){var e=o.parent();if(e.attr("aria-label")||e.text())return!0;if(e.parent().attr("aria-label")||e.parent().text())return!0;return!1}()?o.text()||n.expect(o,"aria-hidden","true"):(n.expect(o,"aria-label",a),n.expect(o,"role","img")));s&&i.$observe(s,function(t){o.empty(),t&&e(t).then(function(e){o.append(e)})})}}}t.module("material.components.icon",["material.core"]).directive("mdIcon",e),e.$inject=["$mdIcon","$mdTheming","$mdAria","$interpolate"]}(),function(){t.module("material.components.icon").provider("$mdIcon",n);var e={defaultViewBoxSize:24,defaultFontSet:"material-icons",fontSets:[]};function n(){}function r(t,n){this.url=t,this.viewBoxSize=n||e.defaultViewBoxSize}n.prototype={icon:function(t,n,o){return-1==t.indexOf(":")&&(t="$default:"+t),e[t]=new r(n,o),this},iconSet:function(t,n,o){return e[t]=new r(n,o),this},defaultIconSet:function(t,n){return e.$default||(e.$default=new r(t,n)),e.$default.viewBoxSize=n||e.defaultViewBoxSize,this},defaultViewBoxSize:function(t){return e.defaultViewBoxSize=t,this},fontSet:function(t,n){e.fontSets.push({alias:t,fontSet:n||t})},defaultFontSet:function(t){return e.defaultFontSet=t||"",this},defaultIconSize:function(t){return e.defaultIconSize=t,this},preloadIcons:function(e){var t=this;[{id:"md-tabs-arrow",url:"md-tabs-arrow.svg",svg:'<svg version="1.1" x="0px" y="0px" viewBox="0 0 24 24"><g><polygon points="15.4,7.4 14,6 8,12 14,18 15.4,16.6 10.8,12 "/></g></svg>'},{id:"md-close",url:"md-close.svg",svg:'<svg version="1.1" x="0px" y="0px" viewBox="0 0 24 24"><g><path d="M19 6.41l-1.41-1.41-5.59 5.59-5.59-5.59-1.41 1.41 5.59 5.59-5.59 5.59 1.41 1.41 5.59-5.59 5.59 5.59 1.41-1.41-5.59-5.59z"/></g></svg>'},{id:"md-cancel",url:"md-cancel.svg",svg:'<svg version="1.1" x="0px" y="0px" viewBox="0 0 24 24"><g><path d="M12 2c-5.53 0-10 4.47-10 10s4.47 10 10 10 10-4.47 10-10-4.47-10-10-10zm5 13.59l-1.41 1.41-3.59-3.59-3.59 3.59-1.41-1.41 3.59-3.59-3.59-3.59 1.41-1.41 3.59 3.59 3.59-3.59 1.41 1.41-3.59 3.59 3.59 3.59z"/></g></svg>'},{id:"md-menu",url:"md-menu.svg",svg:'<svg version="1.1" x="0px" y="0px" viewBox="0 0 100 100"><path d="M 50 0 L 100 14 L 92 80 L 50 100 L 8 80 L 0 14 Z" fill="#b2b2b2"></path><path d="M 50 5 L 6 18 L 13.5 77 L 50 94 Z" fill="#E42939"></path><path d="M 50 5 L 94 18 L 86.5 77 L 50 94 Z" fill="#B72833"></path><path d="M 50 7 L 83 75 L 72 75 L 65 59 L 50 59 L 50 50 L 61 50 L 50 26 Z" fill="#b2b2b2"></path><path d="M 50 7 L 17 75 L 28 75 L 35 59 L 50 59 L 50 50 L 39 50 L 50 26 Z" fill="#fff"></path></svg>'},{id:"md-toggle-arrow",url:"md-toggle-arrow-svg",svg:'<svg version="1.1" x="0px" y="0px" viewBox="0 0 48 48"><path d="M24 16l-12 12 2.83 2.83 9.17-9.17 9.17 9.17 2.83-2.83z"/><path d="M0 0h48v48h-48z" fill="none"/></svg>'}].forEach(function(n){t.icon(n.id,n.url),e.put(n.url,n.svg)})},$get:["$http","$q","$log","$templateCache",function(n,r,o,i){return this.preloadIcons(i),function(e,n,r,o,i){var a={},s=/[-a-zA-Z0-9@:%_\+.~#?&//=]{2,256}\.[a-z]{2,4}\b(\/[-a-zA-Z0-9@:%_\+.~#?&//=]*)?/i;return p.prototype={clone:function(){return this.element.cloneNode(!0)},prepare:function(){var n=this.config?this.config.viewBoxSize:e.defaultViewBoxSize;t.forEach({fit:"",height:"100%",width:"100%",preserveAspectRatio:"xMidYMid meet",viewBox:this.element.getAttribute("viewBox")||"0 0 "+n+" "+n},function(e,t){this.element.setAttribute(t,e)},this),t.forEach({"pointer-events":"none",display:"block"},function(e,t){this.element.style[t]=e},this)}},l.fontSet=function(n){if(t.isUndefined(n)||!n||!n.length)return e.defaultFontSet;var r=n;return t.forEach(e.fontSets,function(e){e.alias==n&&(r=e.fontSet||r)}),r},l;function l(t){return a[t=t||""]?r.when(a[t].clone()):s.test(t)?u(t).then(c(t)):(-1==t.indexOf(":")&&(t="$default:"+t),function(t){var n=e[t];return n?u(n.url).then(function(e){return new p(e,n)}):r.reject(t)}(t).catch(d).catch(m).catch(f).then(c(t)))}function c(n){return function(r){var o;return a[n]=(o=r,t.isDefined(o.element)&&t.isDefined(o.config)?r:new p(r,e[n])),a[n].clone()}}function d(t){var n=t.substring(0,t.lastIndexOf(":"))||"$default",o=e[n];return o?u(o.url).then(function(e){var n=t.slice(t.lastIndexOf(":")+1),i=e.querySelector("#"+n);return i?new p(i,o):r.reject(t)}):r.reject(t)}function u(e){return n.get(e,{cache:i}).then(function(e){return t.element("<div>").append(e.data).find("svg")[0]})}function m(e){var n;return t.isString(e)&&(n="icon "+e+" not found",o.warn(n)),r.reject(n||e)}function f(e){var n=t.isString(e)?e:e.message||e.data||e.statusText;return o.warn(n),r.reject(n)}function p(e,n){"svg"!=e.tagName&&(e=t.element('<svg xmlns="http://www.w3.org/2000/svg">').append(e)[0]),e.getAttribute("xmlns")||e.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.element=e,this.config=n,this.prepare()}}(e,n,r,o,i)}]}}(),function(){function e(e){return{restrict:"E",compile:function(t){return t[0].setAttribute("role","list"),e}}}function n(e,n,r){var o=["md-checkbox","md-switch"];return{restrict:"E",controller:"MdListController",compile:function(i,a){var s,l=i[0].querySelector(".md-secondary");if(i[0].setAttribute("role","listitem"),a.ngClick)u("button");else{for(var c,d=0;c=o[d];++d)if(i[0].querySelector(c)){s=!0;break}s?u("div"):i[0].querySelector("md-button")||i.addClass("md-no-proxy")}function u(n){var r,s;if("div"==n)(r=t.element('<div class="md-no-style md-list-item-inner">')).append(i.contents()),i.addClass("md-proxy-focus");else{r=t.element('<md-button class="md-no-style"><div class="md-list-item-inner"></div></md-button>');t.forEach(["ng-click","aria-label","ng-disabled"],function(e){i[0].hasAttribute(e)&&(r[0].setAttribute(e,i[0].getAttribute(e)),i[0].removeAttribute(e))}),r.children().eq(0).append(i.contents())}if(i[0].setAttribute("tabindex","-1"),i.append(r),l&&l.hasAttribute("ng-click")){e.expect(l,"aria-label");var c=t.element('<md-button class="md-secondary-container md-icon-button">');c.attr("ng-click",l.getAttribute("ng-click")),l.removeAttribute("ng-click"),l.setAttribute("tabindex","-1"),l.classList.remove("md-secondary"),c.append(l),l=c[0]}l&&(l.hasAttribute("ng-click")||a.ngClick&&(s=l,-1!=o.indexOf(s.nodeName.toLowerCase())))&&(i.addClass("md-with-secondary"),i.append(l))}return function(){for(var e,t,n=["md-switch","md-checkbox"],r=0;t=n[r];++r)if((e=i.find(t)[0])&&!e.hasAttribute("aria-label")){var o=i.find("p")[0];if(!o)return;e.setAttribute("aria-label","Toggle "+o.textContent)}}(),function(e,i,a,s){var l=[],c=i[0].firstElementChild,d=c&&c.hasAttribute("ng-click");u=i.children(),u.length&&!u[0].hasAttribute("ng-click")&&t.forEach(o,function(e){t.forEach(c.querySelectorAll(e),function(e){l.push(e)})}),(l.length||d)&&(i.addClass("md-clickable"),s.attachRipple(e,t.element(i[0].querySelector(".md-no-style")))),i.hasClass("md-proxy-focus")&&l.length&&t.forEach(l,function(n){n=t.element(n),e.mouseActive=!1,n.on("mousedown",function(){e.mouseActive=!0,r(function(){e.mouseActive=!1},100)}).on("focus",function(){!1===e.mouseActive&&i.addClass("md-focused"),n.on("blur",function e(){i.removeClass("md-focused"),n.off("blur",e)})})});var u;d||l.length||c&&c.addEventListener("keypress",function(e){if("INPUT"!=e.target.nodeName&&"TEXTAREA"!=e.target.nodeName){var t=e.which||e.keyCode;t==n.KEY_CODE.SPACE&&c&&(c.click(),e.preventDefault(),e.stopPropagation())}});i.off("click"),i.off("keypress"),l.length&&c&&i.children().eq(0).on("click",function(e){c.contains(e.target)&&t.forEach(l,function(n){e.target===n||n.contains(e.target)||t.element(n).triggerHandler("click")})})}}}}function r(e,t,n){this.attachRipple=function(e,t){n.attach(e,t,{})}}t.module("material.components.list",["material.core"]).controller("MdListController",r).directive("mdList",e).directive("mdListItem",n),e.$inject=["$mdTheming"],n.$inject=["$mdAria","$mdConstant","$timeout"],r.$inject=["$scope","$element","$mdListInkRipple"]}(),function(){function e(e,t){return n.$inject=["$scope","$element","$attrs"],{restrict:"E",link:function(t,n,r){e(n)},controller:n};function n(e,n,r){var o=this;o.isErrorGetter=r.mdIsError&&t(r.mdIsError),o.delegateClick=function(){o.input.focus()},o.element=n,o.setFocused=function(e){n.toggleClass("md-input-focused",!!e)},o.setHasValue=function(e){n.toggleClass("md-input-has-value",!!e)},o.setInvalid=function(e){n.toggleClass("md-input-invalid",!!e)},e.$watch(function(){return o.label&&o.input},function(e){e&&!o.label.attr("for")&&o.label.attr("for",o.input.attr("id"))})}}function n(e,n,r){return{restrict:"E",require:["^?mdInputContainer","?ngModel"],link:function(o,i,a,s){var l=s[0],c=s[1]||e.fakeNgModel(),d=t.isDefined(a.readonly);if(!l)return;if(l.input)throw new Error("<md-input-container> can only have *one* <input> or <textarea> child element!");l.input=i,l.label||r.expect(i,"aria-label",i.attr("placeholder"));i.addClass("md-input"),i.attr("id")||i.attr("id","input_"+e.nextUid());"textarea"===i[0].tagName.toLowerCase()&&function(){var r=i[0],a=e.debounce(function(){r.style.height="auto",r.scrollTop=0;var e=(t=r.scrollHeight-r.offsetHeight,r.offsetHeight+(t>0?t:0));var t;e&&(r.style.height=e+"px")},1);function s(e){return a(),e}c?(c.$formatters.push(s),c.$viewChangeListeners.push(s)):a();i.on("keydown input",a),i.on("scroll",function(e){r.scrollTop=0;var t=r.scrollHeight-r.offsetHeight,n=r.offsetHeight+t;r.style.height=n+"px"}),t.element(n).on("resize",a),o.$on("$destroy",function(){t.element(n).off("resize",a)})}();var u=l.isErrorGetter||function(){return c.$invalid&&c.$touched};o.$watch(u,l.setInvalid),c.$parsers.push(m),c.$formatters.push(m),i.on("input",f),d||i.on("focus",function(e){l.setFocused(!0)}).on("blur",function(e){l.setFocused(!1),f()});function m(e){return l.setHasValue(!c.$isEmpty(e)),e}function f(){l.setHasValue(i.val().length>0||(i[0].validity||{}).badInput)}o.$on("$destroy",function(){l.setFocused(!1),l.setHasValue(!1),l.input=null})}}}function r(e){return{restrict:"A",require:["ngModel","^mdInputContainer"],link:function(n,r,o,i){var a,s=i[0],l=i[1],c=t.element('<div class="md-char-counter">');function d(e){return c.text((r.val()||e||"").length+"/"+a),e}o.$set("ngTrim","false"),l.element.append(c),s.$formatters.push(d),s.$viewChangeListeners.push(d),r.on("input keydown",function(){d()}),n.$watch(o.mdMaxlength,function(n){a=n,t.isNumber(n)&&n>0?(c.parent().length||e.enter(c,l.element,t.element(l.element[0].lastElementChild)),d()):e.leave(c)}),s.$validators["md-maxlength"]=function(e,n){return!t.isNumber(a)||a<0||(e||r.val()||n||"").length<=a}}}}function o(e){var n=["MD-SELECT"];return{restrict:"A",require:"^^?mdInputContainer",priority:200,link:function(r,o,i,a){if(!a)return;if(-1!=n.indexOf(o[0].nodeName))return;if(t.isDefined(a.element.attr("md-no-float")))return;var s=i.placeholder;if(o.removeAttr("placeholder"),0==a.element.find("label").length){var l='<label ng-click="delegateClick()">'+s+"</label>";a.element.addClass("md-icon-float"),a.element.prepend(l)}else e.warn("The placeholder='"+s+"' will be ignored since this md-input-container has a child label element.")}}}t.module("material.components.input",["material.core"]).directive("mdInputContainer",e).directive("label",function(){return{restrict:"E",require:"^?mdInputContainer",link:function(e,t,n,r){r&&!n.mdNoFloat&&(r.label=t,e.$on("$destroy",function(){r.label=null}))}}}).directive("input",n).directive("textarea",n).directive("mdMaxlength",r).directive("placeholder",o),e.$inject=["$mdTheming","$parse"],n.$inject=["$mdUtil","$window","$mdAria"],r.$inject=["$animate"],o.$inject=["$log"]}(),function(){function e(e){return{restrict:"E",require:"mdMenu",controller:"mdMenuCtrl",scope:!0,compile:function(e){e.addClass("md-menu");var t=e.children()[0];t.hasAttribute("ng-click")||(t=t.querySelector("[ng-click]"));if(t&&t.setAttribute("aria-haspopup","true"),2!=e.children().length)throw Error("Invalid HTML for md-menu. Expected two children elements.");return n}};function n(e,n,r,o){var i=t.element('<div class="md-open-menu-container md-whiteframe-z2"></div>'),a=n.children()[1];i.append(a),o.init(i),e.$on("$destroy",function(){o.isOpen&&(i.remove(),o.close())})}}function n(e,t,n,r){var o,i,a=this;this.init=function(e){o=e,i=n[0].querySelector("[ng-click]")},this.open=function(){a.isOpen=!0,i.setAttribute("aria-expanded","true"),e.show({mdMenuCtrl:a,element:o,target:n[0]})},r.$mdOpenMenu=this.open,this.close=function(t){a.isOpen=!1,i.setAttribute("aria-expanded","false"),e.hide(),t||n.children()[0].focus()},this.positionMode=function(){var e=(t.mdPositionMode||"target").split(" ");return 1==e.length&&e.push(e[0]),{left:e[0],top:e[1]}},this.offsets=function(){var e=(t.mdOffset||"0 0").split(" ").map(parseFloat);if(2==e.length)return{left:e[0],top:e[1]};if(1==e.length)return{top:e[0],left:e[0]};throw Error("Invalid offsets specified. Please follow format <x, y> or <n>")}}t.module("material.components.menu",["material.core","material.components.backdrop"]).directive("mdMenu",e).controller("mdMenuCtrl",n),e.$inject=["$mdMenu"],n.$inject=["$mdMenu","$attrs","$element","$scope"]}(),function(){function e(e){var r=8;return o.$inject=["$$rAF","$window","$mdUtil","$mdTheming","$timeout","$mdConstant","$document"],e("$mdMenu").setDefaults({methods:["target"],options:o});function o(e,o,i,a,s,l,c){return{parent:"body",onShow:function(n,r,c){(function(){if(!c.target)throw Error("$mdMenu.show() expected a target to animate from in options.target");t.extend(c,{alreadyOpen:!1,isRemoved:!1,target:t.element(c.target),parent:t.element(c.parent),menuContentEl:t.element(r[0].querySelector("md-menu-content")),backdrop:c.hasBackdrop&&t.element('<md-backdrop class="md-menu-backdrop md-click-catcher">')})})(),a.inherit(c.menuContentEl,c.target),c.resizeFn=function(){m(r,c)},t.element(o).on("resize",c.resizeFn),t.element(o).on("orientationchange",c.resizeFn),c.disableParentScroll&&(c.restoreScroll=i.disableScrollAround(c.element));s(function(){r.addClass("md-clickable"),c.backdrop&&c.backdrop.on("click",function(e){e.preventDefault(),e.stopPropagation(),c.mdMenuCtrl.close(!0)}),c.menuContentEl.on("keydown",function(e){n.$apply(function(){switch(e.keyCode){case l.KEY_CODE.ESCAPE:c.mdMenuCtrl.close();break;case l.KEY_CODE.UP_ARROW:d(e,c.menuContentEl,c,-1);break;case l.KEY_CODE.DOWN_ARROW:d(e,c.menuContentEl,c,1)}})}),c.menuContentEl.on("click",function(e){var t=e.target;do{if(t&&t.hasAttribute("ng-click")){t.hasAttribute("disabled")||n.$apply(function(){c.mdMenuCtrl.close()});break}}while((t=t.parentNode)&&t!=c.menuContentEl)});var e=c.menuContentEl[0].querySelector("[md-menu-focus-target]");e||(e=c.menuContentEl[0].firstElementChild.firstElementChild),e.focus()},75,!1),c.backdrop&&(a.inherit(c.backdrop,c.parent),c.parent.append(c.backdrop));return c.parent.append(r),r.removeClass("md-leave"),e(function(){e(function(){m(r,c),e(function(){r.addClass("md-active"),c.alreadyOpen=!0,r[0].style[l.CSS.TRANSFORM]=""})})}),i.transitionEndPromise(r,{timeout:350})},onRemove:function(e,r,a){return a.isRemoved=!0,r.addClass("md-leave").removeClass("md-clickable"),t.element(o).off("resize",a.resizeFn),t.element(o).off("orientationchange",a.resizeFn),a.resizeFn=n,i.transitionEndPromise(r,{timeout:350}).then(function(){r.removeClass("md-active"),a.backdrop&&a.backdrop.remove(),r[0].parentNode===a.parent[0]&&a.parent[0].removeChild(r[0]),a.restoreScroll&&a.restoreScroll()})},hasBackdrop:!0,disableParentScroll:!0,skipCompile:!0,themable:!0};function d(e,t,n,r){for(var o=i.getClosest(e.target,"MD-MENU-ITEM"),a=i.nodesToArray(t[0].children),s=a.indexOf(o)+r;s>=0&&s<a.length;s+=r){if(u(a[s].firstElementChild||a[s]))break}}function u(e){if(e&&-1!=e.getAttribute("tabindex"))return e.focus(),c[0].activeElement==e}function m(e,t){if(!t.isRemoved){var n,o,i,a=e[0],s=e[0].firstElementChild,c=s.getBoundingClientRect(),d=t.parent[0].getBoundingClientRect(),u=(t.target[0].querySelector("[md-menu-origin]")||t.target[0]).getBoundingClientRect(),m={left:d.left+r,top:d.top+r,bottom:d.bottom-r,right:d.right-r},f=t.mdMenuCtrl.positionMode();"target"!=f.top&&"target"!=f.left&&"target-right"!=f.left||(o=(n=(n=s.firstElementChild.firstElementChild||s.firstElementChild).querySelector("[md-menu-align-target]")||n).getBoundingClientRect(),i={top:parseFloat(a.style.top||0),left:parseFloat(a.style.left||0)});var p={},h="top ";switch(f.top){case"target":p.top=i.top+u.top-o.top;break;default:throw new Error('Invalid target mode "'+f.top+'" specified for md-menu on Y axis.')}switch(f.left){case"target":p.left=i.left+u.left-o.left,h+="left";break;case"target-right":p.left=u.right-c.width+(c.right-o.right),h+="right";break;default:throw new Error('Invalid target mode "'+f.left+'" specified for md-menu on X axis.')}var g,v=t.mdMenuCtrl.offsets();p.top+=v.top,p.left+=v.left,(g=p).top=Math.max(Math.min(g.top,m.bottom-a.offsetHeight),m.top),g.left=Math.max(Math.min(g.left,m.right-a.offsetWidth),m.left),e.css({top:p.top+"px",left:p.left+"px"}),a.style[l.CSS.TRANSFORM_ORIGIN]=h,t.alreadyOpen||(a.style[l.CSS.TRANSFORM]="scale("+Math.min(u.width/a.offsetWidth,1)+","+Math.min(u.height/a.offsetHeight,1)+")")}}}}t.module("material.components.menu").provider("$mdMenu",e),e.$inject=["$$interimElementProvider"]}(),function(){function e(e,t){return{restrict:"E",template:'<div class="md-spinner-wrapper"><div class="md-inner"><div class="md-gap"></div><div class="md-left"><div class="md-half-circle"></div></div><div class="md-right"><div class="md-half-circle"></div></div></div></div>',compile:function(e){return e.attr("aria-valuemin",0),e.attr("aria-valuemax",100),e.attr("role","progressbar"),n}};function n(n,r,o){t(r);var i=r[0],a=(o.mdDiameter||48)/48;i.style[e.CSS.TRANSFORM]="scale("+a+")",o.$observe("value",function(e){var t=function(e){return Math.max(0,Math.min(e||0,100))}(e);r.attr("aria-valuenow",t)})}}t.module("material.components.progressCircular",["material.core"]).directive("mdProgressCircular",e),e.$inject=["$mdConstant","$mdTheming"]}(),function(){function e(e,r,o){return{restrict:"E",template:'<div class="md-container"><div class="md-dashed"></div><div class="md-bar md-bar1"></div><div class="md-bar md-bar2"></div></div>',compile:function(e,t,n){return e.attr("aria-valuemin",0),e.attr("aria-valuemax",100),e.attr("role","progressbar"),i}};function i(i,s,l){o(s);var c=s[0].querySelector(".md-bar1").style,d=s[0].querySelector(".md-bar2").style,u=t.element(s[0].querySelector(".md-container"));l.$observe("value",function(e){if("query"!=l.mdMode){var t=a(e);s.attr("aria-valuenow",t),d[r.CSS.TRANSFORM]=n[t]}}),l.$observe("mdBufferValue",function(e){c[r.CSS.TRANSFORM]=n[a(e)]}),e(function(){u.addClass("md-ready")})}function a(e){return e>100?100:e<0?0:Math.ceil(e||0)}}t.module("material.components.progressLinear",["material.core"]).directive("mdProgressLinear",e),e.$inject=["$$rAF","$mdConstant","$mdTheming"];var n=function(){for(var e,t,n=new Array(101),r=0;r<101;r++)n[r]=(t=void 0,void 0,t=(e=r)/100,"translateX("+((e-100)/2).toString()+"%) scale("+t.toString()+", 1)");return n}()}(),function(){function e(e,n,r,o){return i.prototype={init:function(e){this._ngModelCtrl=e,this._ngModelCtrl.$render=t.bind(this,this.render)},add:function(e){this._radioButtonRenderFns.push(e)},remove:function(e){var t=this._radioButtonRenderFns.indexOf(e);-1!==t&&this._radioButtonRenderFns.splice(t,1)},render:function(){this._radioButtonRenderFns.forEach(function(e){e()})},setViewValue:function(e,t){this._ngModelCtrl.$setViewValue(e,t),this.render()},getViewValue:function(){return this._ngModelCtrl.$viewValue},selectNext:function(){return a(this.$element,1)},selectPrevious:function(){return a(this.$element,-1)},setActiveDescendant:function(e){this.$element.attr("aria-activedescendant",e)}},{restrict:"E",controller:["$element",i],require:["mdRadioGroup","?ngModel"],link:{pre:function(i,a,s,l){r(a);var c=l[0],d=l[1]||e.fakeNgModel();function u(){a.hasClass("md-focused")||a.addClass("md-focused")}c.init(d),i.mouseActive=!1,a.attr({role:"radiogroup",tabIndex:a.attr("tabindex")||"0"}).on("keydown",function(r){switch(r.which||r.keyCode){case n.KEY_CODE.LEFT_ARROW:case n.KEY_CODE.UP_ARROW:r.preventDefault(),c.selectPrevious(),u();break;case n.KEY_CODE.RIGHT_ARROW:case n.KEY_CODE.DOWN_ARROW:r.preventDefault(),c.selectNext(),u();break;case n.KEY_CODE.ENTER:var o=t.element(e.getClosest(a[0],"form"));o.length>0&&o.triggerHandler("submit")}}).on("mousedown",function(e){i.mouseActive=!0,o(function(){i.mouseActive=!1},100)}).on("focus",function(){!1===i.mouseActive&&c.$element.addClass("md-focused")}).on("blur",function(){c.$element.removeClass("md-focused")})}}};function i(e){this._radioButtonRenderFns=[],this.$element=e}function a(n,r){var o=e.iterator(n[0].querySelectorAll("md-radio-button"),!0);if(o.count()){var i=n[0].querySelector("md-radio-button.md-checked"),a=o[r<0?"previous":"next"](i,function(e){return!t.element(e).attr("disabled")})||o.first();t.element(a).triggerHandler("click")}}}function n(e,t,n){var r="md-checked";return{restrict:"E",require:"^mdRadioGroup",transclude:!0,template:'<div class="md-container" md-ink-ripple md-ink-ripple-checkbox><div class="md-off"></div><div class="md-on"></div></div><div ng-transclude class="md-label"></div>',link:function(o,i,a,s){var l;function c(){var e=s.getViewValue()==a.value;e!==l&&(l=e,i.attr("aria-checked",e),e?(i.addClass(r),s.setActiveDescendant(i.attr("id"))):i.removeClass(r))}n(i),function(n,r){r.ariaId=a.id||"radio_"+t.nextUid(),n.attr({id:r.ariaId,role:"radio","aria-checked":"false"}),e.expectWithText(n,"aria-label")}(i,o),s.add(c),a.$observe("value",c),i.on("click",function(e){if(i[0].hasAttribute("disabled"))return;o.$apply(function(){s.setViewValue(a.value,e&&e.type)})}).on("$destroy",function(){s.remove(c)})}}}t.module("material.components.radioButton",["material.core"]).directive("mdRadioGroup",e).directive("mdRadioButton",n),e.$inject=["$mdUtil","$mdConstant","$mdTheming","$timeout"],n.$inject=["$mdAria","$mdUtil","$mdTheming"]}(),function(){var e=8,r=0;function o(e,r,o,i,a,s,l){return{restrict:"E",require:["mdSelect","ngModel","?^form"],compile:function(a,c){var d=a.find("md-select-label").remove();if(d.length){if(!d[0].firstElementChild){var u=t.element("<span>");u.append(d.contents()),d.append(u)}}else d=t.element("<md-select-label><span></span></md-select-label>");d.append('<span class="md-select-icon" aria-hidden="true"></span>'),d.addClass("md-select-label"),d[0].hasAttribute("id")||d.attr("id","select_label_"+r.nextUid());a.find("md-content").length||a.append(t.element("<md-content>").append(a.contents()));c.mdOnOpen&&a.find("md-content").prepend(t.element("<md-progress-circular>").attr("md-mode","indeterminate").attr("ng-hide","$$loadingAsyncDone").wrap("<div>").parent());if(c.name){var m=t.element('<select class="md-visually-hidden">');m.attr({name:"."+c.name,"ng-model":c.ngModel,"aria-hidden":"true",tabindex:"-1"});var f=a.find("md-option");t.forEach(f,function(e){var n=t.element("<option>"+e.innerHTML+"</option>");e.hasAttribute("ng-value")?n.attr("ng-value",e.getAttribute("ng-value")):e.hasAttribute("value")&&n.attr("value",e.getAttribute("value")),m.append(n)}),a.parent().append(m)}var p='<div class="md-select-menu-container"><md-select-menu '+(t.isDefined(c.multiple)?"multiple":"")+">"+a.html()+"</md-select-menu></div>";return a.empty().append(d),c.tabindex=c.tabindex||"0",function(a,c,d,u){var m,f,h,g,v,b=u[0],$=u[1],E=u[2],y=c.find("md-select-label"),w=0!==y.text().length;if(function(){var e=(h=t.element(p)).find("md-select-menu");e.data("$ngModelController",$),e.data("$mdSelectController",b),g=a.$new(),h=s(h)(g),v=h.find("md-select-menu").controller("mdSelectMenu")}(),o(c),d.name&&E){var C=c.parent()[0].querySelector('select[name=".'+d.name+'"]');E.$removeControl(t.element(C).controller())}var M,T=$.$render;function x(){h&&(v=v||h.find("md-select-menu").controller("mdSelectMenu"),b.setLabelText(v.selectedLabels()))}$.$render=function(){T(),x()},b.setLabelText=function(e){w||(b.setIsPlaceholder(!e),e=e||d.placeholder||"",(w?y:y.children().eq(0)).text(e))},b.setIsPlaceholder=function(e){e?y.addClass("md-placeholder"):y.removeClass("md-placeholder")},b.triggerClose=function(){l(d.mdOnClose)(a)},a.$$postDigest(function(){var e;(e=c.attr("placeholder"))||(e=c.find("md-select-label").text()),i.expect(c,"aria-label",e),x()}),d.$observe("ngMultiple",function(e){M&&M();var t=l(e);M=a.$watch(function(){return t(a)},function(e,t){e===n&&t===n||(e?c.attr("multiple","multiple"):c.removeAttr("multiple"),h&&(v.setMultiple(e),T=$.$render,$.$render=function(){T(),x()},v.refreshViewValue(),$.$render()))})}),d.$observe("disabled",function(e){"string"==typeof e&&(e=!0),f!==n&&f===e||(f=e,e?(c.attr({tabindex:-1,"aria-disabled":"true"}),c.off("click",S),c.off("keydown",A)):(c.attr({tabindex:d.tabindex,"aria-disabled":"false"}),c.on("click",S),c.on("keydown",A)))}),d.disabled||d.ngDisabled||(c.attr({tabindex:d.tabindex,"aria-disabled":"false"}),c.on("click",S),c.on("keydown",A));var k={role:"combobox","aria-expanded":"false"};function A(e){if(-1!=[32,13,38,40].indexOf(e.keyCode))e.preventDefault(),S();else if(e.keyCode<=90&&e.keyCode>=31){e.preventDefault();var n=v.optNodeForKeyboardSearch(e);if(!n)return;var r=t.element(n).controller("mdOption");v.isMultiple||v.deselect(Object.keys(v.selected)[0]),v.select(r.hashKey,r.value),v.refreshViewValue(),$.$render()}}function S(){a.$evalAsync(function(){m=!0,e.show({scope:g,preserveScope:!0,skipCompile:!0,element:h,target:c[0],hasBackdrop:!0,loadingAsync:!!d.mdOnOpen&&(a.$eval(d.mdOnOpen)||!0)}).then(function(e){m=!1})})}c[0].hasAttribute("id")||(k.id="select_"+r.nextUid()),c.attr(k),a.$on("$destroy",function(){m?e.cancel().then(function(){h.remove()}):h.remove()})}},controller:function(){}}}function i(e,o,i){return a.$inject=["$scope","$attrs","$element"],{restrict:"E",require:["mdSelectMenu","?ngModel"],controller:a,link:{pre:function(e,n,r,a){var s=a[0],l=a[1];i(n),n.on("click",c),n.on("keypress",function(e){13!=e.keyCode&&32!=e.keyCode||c(e)}),l&&s.init(l);function c(n){var r=o.getClosest(n.target,"md-option"),i=r&&t.element(r).data("$mdOptionController");if(r&&i){var a=s.hashGetter(i.value),l=t.isDefined(s.selected[a]);e.$apply(function(){s.isMultiple?l?s.deselect(a):s.select(a,i.value):l||(s.deselect(Object.keys(s.selected)[0]),s.select(a,i.value)),s.refreshViewValue()})}}n.attr({id:"select_menu_"+o.nextUid(),role:"listbox","aria-multiselectable":s.isMultiple?"true":"false"})}}};function a(i,a,s){var l=this;l.isMultiple=t.isDefined(a.multiple),l.selected={},l.options={},i.$watch(function(){return l.options},function(){l.ngModel.$render()},!0),l.setMultiple=function(e){var n=l.ngModel;function r(e,n){return t.isArray(e||n||[])}l.isMultiple=e,l.isMultiple?(n.$validators["md-multiple"]=r,n.$render=f,i.$watchCollection(a.ngModel,function(e){r(e)&&f()})):(delete n.$validators["md-multiple"],n.$render=p)};var c,d,u,m="";function f(){var e=l.ngModel.$modelValue||l.ngModel.$viewValue;if(t.isArray(e)){var n=Object.keys(l.selected),r=e.map(l.hashGetter);n.filter(function(e){return-1===r.indexOf(e)}).forEach(l.deselect),r.forEach(function(t,n){l.select(t,e[n])})}}function p(){var e=l.ngModel.$viewValue||l.ngModel.$modelValue;Object.keys(l.selected).forEach(l.deselect),l.select(l.hashGetter(e),e)}l.optNodeForKeyboardSearch=function(e){c&&clearTimeout(c),c=setTimeout(function(){c=n,m="",u=n,d=n},300),m+=String.fromCharCode(e.keyCode);var r=new RegExp("^"+m,"i");d||(d=s.find("md-option"),u=new Array(d.length),t.forEach(d,function(e,t){u[t]=e.textContent.trim()}));for(var o=0;o<u.length;++o)if(r.test(u[o]))return d[o]},l.init=function(n){if(l.ngModel=n,n.$options&&n.$options.trackBy){var o={},a=e(n.$options.trackBy);l.hashGetter=function(e,t){return o.$value=e,a(t||i,o)}}else l.hashGetter=function(e){return t.isObject(e)?"object_"+(e.$$mdSelectId||(e.$$mdSelectId=++r)):e};l.setMultiple(l.isMultiple)},l.selectedLabels=function(){var e=o.nodesToArray(s[0].querySelectorAll("md-option[selected]"));return e.length?e.map(function(e){return e.textContent}).join(", "):""},l.select=function(e,t){var n=l.options[e];n&&n.setSelected(!0),l.selected[e]=t},l.deselect=function(e){var t=l.options[e];t&&t.setSelected(!1),delete l.selected[e]},l.addOption=function(e,n){if(t.isDefined(l.options[e]))throw new Error('Duplicate md-option values are not allowed in a select. Duplicate value "'+n.value+'" found.');l.options[e]=n,t.isDefined(l.selected[e])&&(l.select(e,n.value),l.refreshViewValue())},l.removeOption=function(e){delete l.options[e]},l.refreshViewValue=function(){var e,t=[];for(var n in l.selected)(e=l.options[n])?t.push(e.value):t.push(l.selected[n]);l.ngModel.$setViewValue(l.isMultiple?t:t[0])}}}function a(e,n){return o.$inject=["$element"],{restrict:"E",require:["mdOption","^^mdSelectMenu"],controller:o,compile:function(e,n){return e.append(t.element('<div class="md-text">').append(e.contents())),e.attr("tabindex",n.tabindex||"0"),r}};function r(r,o,i,a){var s=a[0],l=a[1];function c(e,t){var n=l.hashGetter(t,r),o=l.hashGetter(e,r);s.hashKey=o,s.value=e,l.removeOption(n,s),l.addOption(o,s)}t.isDefined(i.ngValue)?r.$watch(i.ngValue,c):t.isDefined(i.value)?c(i.value):r.$watch(function(){return o.text()},c),r.$$postDigest(function(){i.$observe("selected",function(e){t.isDefined(e)&&(e?(l.isMultiple||l.deselect(Object.keys(l.selected)[0]),l.select(s.hashKey,s.value)):l.deselect(s.hashKey),l.refreshViewValue(),l.ngModel.$render())})}),e.attach(r,o),function(){var e={role:"option","aria-selected":"false"};o[0].hasAttribute("id")||(e.id="select_option_"+n.nextUid());o.attr(e)}(),r.$on("$destroy",function(){l.removeOption(s.hashKey,s)})}function o(e){this.selected=!1,this.setSelected=function(t){t&&!this.selected?e.attr({selected:"selected","aria-selected":"true"}):!t&&this.selected&&(e.removeAttr("selected"),e.attr("aria-selected","false")),this.selected=t}}}function s(r){return o.$inject=["$mdSelect","$mdConstant","$$rAF","$mdUtil","$mdTheming","$timeout","$window"],r("$mdSelect").setDefaults({methods:["target"],options:o});function o(r,o,a,s,l,c,d){return{parent:"body",onShow:function(e,n,i){if(!i.target)throw new Error('$mdSelect.show() expected a target element in options.target but got "'+i.target+'"!');t.extend(i,{isRemoved:!1,target:t.element(i.target),parent:t.element(i.parent),selectEl:n.find("md-select-menu"),contentEl:n.find("md-content"),backdrop:i.hasBackdrop&&t.element('<md-backdrop class="md-select-backdrop md-click-catcher">')}),i.resizeFn=function(){a(function(){a(function(){u(e,n,i)})})},t.element(d).on("resize",i.resizeFn),t.element(d).on("orientationchange",i.resizeFn),i.target.attr("aria-expanded","true"),n.removeClass("md-leave");var m=i.selectEl[0].getElementsByTagName("md-option");i.loadingAsync&&i.loadingAsync.then?i.loadingAsync.then(function(){e.$$loadingAsyncDone=!0,a(function(){a(function(){i.isRemoved||u(e,n,i)})})}):i.loadingAsync&&(e.$$loadingAsyncDone=!0);i.disableParentScroll&&!s.getClosest(i.target,"MD-DIALOG")?i.restoreScroll=s.disableScrollAround(i.element):i.disableParentScroll=!1;c(function(){if(!i.isRemoved){var t=i.selectEl.controller("mdSelectMenu")||{};n.addClass("md-clickable"),i.backdrop&&i.backdrop.on("click",function(t){t.preventDefault(),t.stopPropagation(),i.restoreFocus=!1,e.$apply(r.cancel)}),i.selectEl.on("keydown",function(t){switch(t.keyCode){case o.KEY_CODE.SPACE:case o.KEY_CODE.ENTER:var n=s.getClosest(t.target,"md-option");n&&(i.selectEl.triggerHandler({type:"click",target:n}),t.preventDefault());break;case o.KEY_CODE.TAB:case o.KEY_CODE.ESCAPE:t.preventDefault(),i.restoreFocus=!0,e.$apply(r.cancel)}}),i.selectEl.on("keydown",function(e){switch(e.keyCode){case o.KEY_CODE.UP_ARROW:return void a("prev");case o.KEY_CODE.DOWN_ARROW:return void a("next");default:if(e.keyCode>=31&&e.keyCode<=90){var t=i.selectEl.controller("mdSelectMenu").optNodeForKeyboardSearch(e);t&&t.focus()}}}),i.selectEl.on("click",l),i.selectEl.on("keydown",function(e){32!=e.keyCode&&13!=e.keyCode||l()})}function a(e){var t=s.nodesToArray(m),n=t.indexOf(i.focusedNode);-1===n?n=0:"next"===e&&n<t.length-1?n++:"prev"===e&&n>0&&n--;var r=i.focusedNode=t[n];r&&r.focus()}function l(){t.isMultiple||(i.restoreFocus=!0,e.$evalAsync(function(){r.hide(t.ngModel.$viewValue)}))}},75,!1),i.backdrop&&(l.inherit(i.backdrop,i.parent),i.parent.append(i.backdrop));return i.parent.append(n),a(function(){a(function(){i.isRemoved||u(e,n,i)})}),s.transitionEndPromise(i.selectEl,{timeout:350})},onRemove:function(e,r,o){o.isRemoved=!0,r.addClass("md-leave").removeClass("md-clickable"),o.target.attr("aria-expanded","false"),t.element(d).off("resize",o.resizeFn),t.element(d).off("orientationchange",o.resizefn),o.resizeFn=n;var i=o.selectEl.controller("mdSelect");i&&i.setLabelText(o.selectEl.controller("mdSelectMenu").selectedLabels());return s.transitionEndPromise(r,{timeout:350}).then(function(){r.removeClass("md-active"),o.backdrop&&o.backdrop.remove(),r[0].parentNode===o.parent[0]&&o.parent[0].removeChild(r[0]),o.disableParentScroll&&o.restoreScroll(),o.restoreFocus&&o.target.focus(),i&&i.triggerClose()})},hasBackdrop:!0,disableParentScroll:!0,themable:!0};function u(t,n,r){var l,c=n[0],u=r.target[0].firstElementChild.firstElementChild,m=r.parent[0],f=r.selectEl[0],p=r.contentEl[0],h=m.getBoundingClientRect(),g=u.getBoundingClientRect(),v={left:h.left+e,top:e,bottom:h.height-e,right:h.width-e-(s.floatingScrollbars()?16:0)},b=g.top-v.top,$=(g.left,g.left,g.width,v.bottom-(g.top+g.height)),E=h.width-2*e,y=p.scrollHeight>p.offsetHeight,w=f.querySelector("md-option[selected]"),C=f.getElementsByTagName("md-option"),M=f.getElementsByTagName("md-optgroup");l=w||(M.length?M[0]:C.length?C[0]:p.firstElementChild||p),p.offsetWidth>E&&(p.style["max-width"]=E+"px"),y&&f.classList.add("md-overflow");var T,x=f.getBoundingClientRect(),k=(T=l)?{left:T.offsetLeft,top:T.offsetTop,width:T.offsetWidth,height:T.offsetHeight}:{left:0,top:0,width:0,height:0};if(l){var A=d.getComputedStyle(l);k.paddingLeft=parseInt(A.paddingLeft,10)||0,k.paddingRight=parseInt(A.paddingRight,10)||0}var S,_,P,N=l;if("MD-OPTGROUP"===(N.tagName||"").toUpperCase()&&(N=C[0]||p.firstElementChild||p),y){var D=p.offsetHeight/2;p.scrollTop=k.top+k.height/2-D,b<D?p.scrollTop=Math.min(k.top,p.scrollTop+D-b):$<D&&(p.scrollTop=Math.max(k.top+k.height-x.height,p.scrollTop-D+$))}S=g.left+k.left-k.paddingLeft,_=Math.floor(g.top+g.height/2-k.height/2-k.top+p.scrollTop),P=k.left+g.width/2+"px "+(k.top+k.height/2-p.scrollTop)+"px 0px",c.style.minWidth=g.width+k.paddingLeft+k.paddingRight+"px";var L=c.getBoundingClientRect();c.style.left=i(v.left,S,v.right-L.width)+"px",c.style.top=i(v.top,_,v.bottom-L.height)+"px",f.style[o.CSS.TRANSFORM_ORIGIN]=P,f.style[o.CSS.TRANSFORM]="scale("+Math.min(g.width/x.width,1)+","+Math.min(g.height/x.height,1)+")",a(function(){n.addClass("md-active"),f.style[o.CSS.TRANSFORM]="",N&&(r.focusedNode=N,N.focus())})}}function i(e,t,n){return Math.max(e,Math.min(t,n))}}t.module("material.components.select",["material.core","material.components.backdrop"]).directive("mdSelect",o).directive("mdSelectMenu",i).directive("mdOption",a).directive("mdOptgroup",function(){return{restrict:"E",compile:function(e,n){var r=e.find("label");r.length||(r=t.element("<label>"),e.prepend(r));n.label&&r.text(n.label)}}}).provider("$mdSelect",s),o.$inject=["$mdSelect","$mdUtil","$mdTheming","$mdAria","$interpolate","$compile","$parse"],i.$inject=["$parse","$mdUtil","$mdTheming"],a.$inject=["$mdButtonInkRipple","$mdUtil"],s.$inject=["$$interimElementProvider"]}(),function(){function e(e,n,r,o,i,a,s,l){return{scope:{},require:"?ngModel",template:'<div class="md-slider-wrapper"> <div class="md-track-container"> <div class="md-track"></div> <div class="md-track md-track-fill"></div> <div class="md-track-ticks"></div> </div> <div class="md-thumb-container"> <div class="md-thumb"></div> <div class="md-focus-thumb"></div> <div class="md-focus-ring"></div> <div class="md-sign"> <span class="md-thumb-text"></span> </div> <div class="md-disabled-thumb"></div> </div> </div>',compile:function(e,t){return e.attr({tabIndex:0,role:"slider"}),r.expect(e,"aria-label"),c}};function c(r,c,d,u){a(c),u=u||{$setViewValue:function(e){this.$viewValue=e,this.$viewChangeListeners.forEach(function(e){e()})},$parsers:[],$formatters:[],$viewChangeListeners:[]};var m=d.ngDisabled&&l(d.ngDisabled),f=m?function(){return m(r.$parent)}:t.noop,p=t.element(c[0].querySelector(".md-thumb")),h=t.element(c[0].querySelector(".md-thumb-text")),g=p.parent(),v=t.element(c[0].querySelector(".md-track-container")),b=t.element(c[0].querySelector(".md-track-fill")),$=t.element(c[0].querySelector(".md-track-ticks")),E=o.throttle(L,5e3);t.isDefined(d.min)?d.$observe("min",S):S(0),t.isDefined(d.max)?d.$observe("max",_):_(100),t.isDefined(d.step)?d.$observe("step",P):P(1);var y=t.noop;function w(){L(),O(),N()}d.ngDisabled&&(y=r.$parent.$watch(d.ngDisabled,function(e){c.attr("aria-disabled",!!e)})),s.register(c,"drag"),c.on("keydown",function(e){if(c[0].hasAttribute("disabled"))return;var t;e.keyCode===i.KEY_CODE.LEFT_ARROW?t=-T:e.keyCode===i.KEY_CODE.RIGHT_ARROW&&(t=T);t&&((e.metaKey||e.ctrlKey||e.altKey)&&(t*=4),e.preventDefault(),e.stopPropagation(),r.$evalAsync(function(){I(u.$viewValue+t)}))}).on("$md.pressdown",function(e){if(f())return;c.addClass("active"),c[0].focus(),L();var t=H(R(q(j(e.pointer.x))));r.$apply(function(){I(t),F((t-C)/(M-C))})}).on("$md.pressup",function(e){if(f())return;c.removeClass("dragging active");var t=H(R(q(j(e.pointer.x))));r.$apply(function(){I(t),O()})}).on("$md.dragstart",function(e){if(f())return;V=!0,e.stopPropagation(),c.addClass("dragging"),U(e)}).on("$md.drag",function(e){if(!V)return;e.stopPropagation(),U(e)}).on("$md.dragend",function(e){if(!V)return;e.stopPropagation(),V=!1}),setTimeout(w);var C,M,T,x,k,A=e.throttle(w);function S(e){C=parseFloat(e),c.attr("aria-valuemin",e),w()}function _(e){M=parseFloat(e),c.attr("aria-valuemax",e),w()}function P(e){T=parseFloat(e),N()}function N(){if(t.isDefined(d.mdDiscrete)){var e=Math.floor((M-C)/T);if(!x){var r=n.getComputedStyle($[0]);x=t.element('<canvas style="position:absolute;">'),(k=x[0].getContext("2d")).fillStyle=r.backgroundColor||"black",$.append(x)}var o,i=(E(),D);x[0].width=i.width,x[0].height=i.height;for(var a=0;a<=e;a++)o=Math.floor(i.width*(a/e)),k.fillRect(o-1,0,2,i.height)}}t.element(n).on("resize",A),r.$on("$destroy",function(){t.element(n).off("resize",A),y()}),u.$render=O,u.$viewChangeListeners.push(O),u.$formatters.push(H),u.$formatters.push(R);var D={};function L(){D=v[0].getBoundingClientRect()}function I(e){u.$setViewValue(H(R(e)))}function O(){isNaN(u.$viewValue)&&(u.$viewValue=u.$modelValue);var e=(u.$viewValue-C)/(M-C);r.modelValue=u.$viewValue,c.attr("aria-valuenow",u.$viewValue),F(e),h.text(u.$viewValue)}function H(e){if(t.isNumber(e))return Math.max(C,Math.min(M,e))}function R(e){if(t.isNumber(e)){var n=Math.round(e/T)*T;return Math.round(1e3*n)/1e3}}function F(e){b.css("width",100*e+"%"),g.css("left",100*e+"%"),c.toggleClass("md-min",0===e)}L();var V=!1,B=t.isDefined(d.mdDiscrete);function U(e){var t,n;B?(t=e.pointer.x,n=H(R(q(j(t)))),F(j(t)),h.text(n)):function(e){r.$evalAsync(function(){I(q(j(e)))})}(e.pointer.x)}function j(e){return Math.max(0,Math.min(1,(e-D.left)/D.width))}function q(e){return C+e*(M-C)}}}t.module("material.components.slider",["material.core"]).directive("mdSlider",e),e.$inject=["$$rAF","$window","$mdAria","$mdUtil","$mdConstant","$mdTheming","$mdGesture","$parse"]}(),function(){function e(e,r,o,i,a){var s=function(n){var r,o=t.element("<div>");e[0].body.appendChild(o[0]);for(var i=["sticky","-webkit-sticky"],a=0;a<i.length;++a)if(o.css({position:i[a],top:0,"z-index":2}),o.css("position")==i[a]){r=i[a];break}return o.remove(),r}();return function(e,t,o){var l=t.controller("mdContent");if(l)if(s)t.css({position:s,top:0,"z-index":2});else{var c=l.$element.data("$$sticky");c||(c=function(e){var t,o=e.$element,s=i.throttle(c);(function(e){var t,n,r=200;function o(){+a.now()-n>r?(t=!1,e.triggerHandler("$scrollend")):(e.triggerHandler("$scroll"),i(o))}e.on("scroll touchmove",function(){t||(t=!0,i(o),e.triggerHandler("$scrollstart")),e.triggerHandler("$scroll"),n=+a.now()})})(o),o.on("$scrollstart",s),o.on("$scroll",function e(){var n=o.prop("scrollTop");var r=n>(e.prevScrollTop||0);e.prevScrollTop=n;0===n?u(null):r&&t.next?t.next.top-n<=0?u(t.next):t.current&&(t.next.top-n<=t.next.height?f(t.current,t.next.top-t.next.height-n):f(t.current,null)):!r&&t.current&&(n<t.current.top&&u(t.prev),t.current&&t.next&&(n>=t.next.top-t.current.height?f(t.current,t.next.top-n-t.current.height):f(t.current,null)))});var l=o.prop("offsetTop");return t={prev:null,current:null,next:null,items:[],add:function(e,n){n.addClass("md-sticky-clone"),n.css("top",l+"px");var r={element:e,clone:n};return t.items.push(r),o.parent().prepend(r.clone),s(),function(){t.items.forEach(function(n,r){n.element[0]===e[0]&&(t.items.splice(r,1),n.clone.remove())}),s()}},refreshElements:c};function c(){var e;t.items.forEach(d),t.items=t.items.sort(function(e,t){return e.top<t.top?-1:1});for(var n=o.prop("scrollTop"),r=t.items.length-1;r>=0;r--)if(n>t.items[r].top){e=t.items[r];break}u(e)}function d(e){var t=e.element[0];for(e.top=0,e.left=0;t&&t!==o[0];)e.top+=t.offsetTop,e.left+=t.offsetLeft,t=t.offsetParent;e.height=e.element.prop("offsetHeight"),e.clone.css("margin-left",e.left+"px"),a.floatingScrollbars()&&e.clone.css("margin-right","0")}function u(e){if(t.current!==e){t.current&&(f(t.current,null),m(t.current,null)),e&&m(e,"active"),t.current=e;var n=t.items.indexOf(e);t.next=t.items[n+1],t.prev=t.items[n-1],m(t.next,"next"),m(t.prev,"prev")}}function m(e,t){e&&e.state!==t&&(e.state&&(e.clone.attr("sticky-prev-state",e.state),e.element.attr("sticky-prev-state",e.state)),e.clone.attr("sticky-state",t),e.element.attr("sticky-state",t),e.state=t)}function f(e,t){e&&(null===t||t===n?e.translateY&&(e.translateY=null,e.clone.css(r.CSS.TRANSFORM,"")):(e.translateY=t,e.clone.css(r.CSS.TRANSFORM,"translate3d("+e.left+"px,"+t+"px,0)")))}}(l),l.$element.data("$$sticky",c));var d=c.add(t,o||t.clone());e.$on("$destroy",d)}}}t.module("material.components.sticky",["material.core","material.components.content"]).factory("$mdSticky",e),e.$inject=["$document","$mdConstant","$compile","$$rAF","$mdUtil"]}(),function(){function e(e,n){return function(r){var o="SideNav '"+r+"' is not available!",i=e.get(r);return i||e.notFoundError(r),{isOpen:function(){return i&&i.isOpen()},isLockedOpen:function(){return i&&i.isLockedOpen()},toggle:function(){return i?i.toggle():n.reject(o)},open:function(){return i?i.open():n.reject(o)},close:function(){return i?i.close():n.reject(o)},then:function(o){return(i?n.when(i):e.when(r).then(function(e){return i=e,e})).then(o||t.noop)}}}}function r(e,r,o,i,a,s,l,c,d,u){return{restrict:"E",scope:{isOpen:"=?mdIsOpen"},controller:"$mdSidenavController",compile:function(e){return e.addClass("md-closed"),e.attr("tabIndex","-1"),m}};function m(m,f,p,h){var g,v=null,b=d.when(!0),$=o(p.mdIsLockedOpen),E=l('<md-backdrop class="md-sidenav-backdrop md-opaque ng-enter">')(m);function y(e){return e.keyCode===s.KEY_CODE.ESCAPE?w(e):d.when(!0)}function w(e){return e.preventDefault(),e.stopPropagation(),h.close()}f.on("$destroy",h.destroy),c.inherit(E,f),m.$watch(function(){return $(m.$parent,{$media:function(e){return i.warn("$media is deprecated for is-locked-open. Use $mdMedia instead."),a(e)},$mdMedia:a})},function(e,t){m.isLockedOpen=e,e===t?f.toggleClass("md-locked-open",!!e):r[e?"addClass":"removeClass"](f,"md-locked-open");E.toggleClass("md-locked-open",!!e)}),m.$watch("isOpen",function(e){var o=f.parent();o[e?"on":"off"]("keydown",y),E[e?"on":"off"]("click",w),e&&(v=u[0].activeElement);var i=h.focusElement();return function(e){var r=f.parent();e?(g=r.css("overflow"),r.css("overflow","hidden")):t.isDefined(g)&&(r.css("overflow",g),g=n)}(e),b=d.all([e?r.enter(E,o):r.leave(E),r[e?"removeClass":"addClass"](f,"md-closed")]).then(function(){m.isOpen&&i&&i.focus()})}),h.$toggleOpen=function(t){if(m.isOpen==t)return d.when(!0);var n=d.defer();return m.isOpen=t,e(function(){b.then(function(e){m.isOpen||(v&&v.focus(),v=null),n.resolve(e)})},0,!1),n.promise},h.focusElement(h.focusElement()||f)}}function o(e,n,r,o,i){var a,s=this;s.isOpen=function(){return!!e.isOpen},s.isLockedOpen=function(){return!!e.isLockedOpen},s.open=function(){return s.$toggleOpen(!0)},s.close=function(){return s.$toggleOpen(!1)},s.toggle=function(){return s.$toggleOpen(!e.isOpen)},s.focusElement=function(e){return t.isDefined(e)&&(a=e),a},s.$toggleOpen=function(){return i.when(e.isOpen)},s.destroy=o.register(s,r.mdComponentId)}t.module("material.components.sidenav",["material.core","material.components.backdrop"]).factory("$mdSidenav",e).directive("mdSidenav",r).directive("mdSidenavFocus",function(){return{restrict:"A",require:"^mdSidenav",link:function(e,t,n,r){r.focusElement(t)}}}).controller("$mdSidenavController",o),e.$inject=["$mdComponentRegistry","$q"],r.$inject=["$timeout","$animate","$parse","$log","$mdMedia","$mdConstant","$compile","$mdTheming","$q","$document"],o.$inject=["$scope","$element","$attrs","$mdComponentRegistry","$q"]}(),function(){function e(e,n,r){return{restrict:"E",replace:!0,transclude:!0,template:'<h2 class="md-subheader"><div class="md-subheader-inner"><span class="md-subheader-content"></span></div></h2>',compile:function(o,i,a){return function(o,i,s){r(i);var l=i[0].outerHTML;function c(e){return t.element(e[0].querySelector(".md-subheader-content"))}a(o,function(e){c(i).append(e)}),i.hasClass("md-no-sticky")||a(o,function(r){var a=n(t.element(l))(o);c(a).append(r),e(o,i,a)})}}}}t.module("material.components.subheader",["material.core","material.components.sticky"]).directive("mdSubheader",e),e.$inject=["$mdSticky","$compile","$mdTheming"]}(),function(){function e(e){var t="md"+e,n="$md."+e.toLowerCase();return r.$inject=["$parse"],r;function r(e){return{restrict:"A",link:function(r,o,i){var a=e(i[t]);o.on(n,function(e){r.$apply(function(){a(r,{$event:e})})})}}}}t.module("material.components.swipe",["material.core"]).directive("mdSwipeLeft",e("SwipeLeft")).directive("mdSwipeRight",e("SwipeRight"))}(),function(){function e(e,n,r,o,i,a,s,l){var c=e[0];return{restrict:"E",priority:210,transclude:!0,template:'<div class="md-container"><div class="md-bar"></div><div class="md-thumb-container"><div class="md-thumb" md-ink-ripple md-ink-ripple-checkbox></div></div></div><div ng-transclude class="md-label"></div>',require:"?ngModel",compile:function(e,n){var o=c.compile(e,n);return e.addClass("md-dragging"),function(e,n,c,d){d=d||r.fakeNgModel();var u,m=a(c.ngDisabled),f=t.element(n[0].querySelector(".md-thumb-container")),p=t.element(n[0].querySelector(".md-container"));s(function(){n.removeClass("md-dragging")}),o(e,n,c,d),t.isDefined(c.ngDisabled)&&e.$watch(m,function(e){n.attr("tabindex",e?-1:0)}),l.register(p,"drag"),p.on("$md.dragstart",function(t){m(e)||(t.stopPropagation(),n.addClass("md-dragging"),u={width:f.prop("offsetWidth")},n.removeClass("transition"))}).on("$md.drag",function(e){if(u){e.stopPropagation(),e.srcEvent&&e.srcEvent.preventDefault();var t=e.pointer.distanceX/u.width,n=d.$viewValue?1+t:t;n=Math.max(0,Math.min(1,n)),f.css(i.CSS.TRANSFORM,"translate3d("+100*n+"%,0,0)"),u.translate=n}}).on("$md.dragend",function(t){var r;u&&(t.stopPropagation(),n.removeClass("md-dragging"),f.css(i.CSS.TRANSFORM,""),(d.$viewValue?u.translate<.5:u.translate>.5)&&(r=!d.$viewValue,e.$apply(function(){d.$setViewValue(r),d.$render()})),u=null)})}}}}t.module("material.components.switch",["material.core","material.components.checkbox"]).directive("mdSwitch",e),e.$inject=["mdCheckboxDirective","$mdTheming","$mdUtil","$document","$mdConstant","$parse","$$rAF","$mdGesture"]}(),t.module("material.components.tabs",["material.core","material.components.icon"]),function(){function e(e){var t,n=e("$mdToast").setDefaults({methods:["position","hideDelay","capsule"],options:r}).addPreset("simple",{argOption:"content",methods:["content","action","highlightAction","theme","parent"],options:["$mdToast","$mdTheming",function(e,n){return{template:['<md-toast md-theme="{{ toast.theme }}" ng-class="{\'md-capsule\': toast.capsule}">',"<span flex>{{ toast.content }}</span>",'<md-button class="md-action" ng-if="toast.action" ng-click="toast.resolve()" ng-class="{\'md-highlight\': toast.highlightAction}">',"{{ toast.action }}","</md-button>","</md-toast>"].join(""),controller:["$scope",function(n){var r=this;n.$watch(function(){return t},function(){r.content=t}),this.resolve=function(){e.hide()}}],theme:n.defaultTheme(),controllerAs:"toast",bindToController:!0}}]}).addMethod("updateContent",function(e){t=e});return r.$inject=["$timeout","$animate","$mdToast","$mdUtil"],n;function r(e,n,r,o){return{onShow:function(a,s,l){return s=o.extractElementByName(s,"md-toast"),t=l.content,s.addClass(l.position.split(" ").map(function(e){return"md-"+e}).join(" ")),l.parent.addClass(i(l.position)),l.onSwipe=function(t,n){s.addClass("md-"+t.type.replace("$md.","")),e(r.cancel)},s.on("$md.swipeleft $md.swiperight",l.onSwipe),n.enter(s,l.parent)},onRemove:function(e,t,r){return t.off("$md.swipeleft $md.swiperight",r.onSwipe),r.parent.removeClass(i(r.position)),n.leave(t)},position:"bottom left",themable:!0,hideDelay:3e3};function i(e){return"md-toast-open-"+(e.indexOf("top")>-1?"top":"bottom")}}}t.module("material.components.toast",["material.core","material.components.button"]).directive("mdToast",function(){return{restrict:"E"}}).provider("$mdToast",e),e.$inject=["$$interimElementProvider"]}(),function(){function e(e,n,r,o,i,a){return{restrict:"E",controller:t.noop,link:function(s,l,c){o(l),t.isDefined(c.mdScrollShrink)&&function(){var t,o,d=0,u=0,m=c.mdShrinkSpeedFactor||.5,f=e.throttle(g),p=r.debounce(h,5e3);function h(){var e=-(t=l.prop("offsetHeight"))*m+"px";o.css("margin-top",e),o.css("margin-bottom",e),g()}function g(e){var r=e?e.target.scrollTop:u;p(),d=Math.min(t/m,Math.max(0,d+r-u)),l.css(n.CSS.TRANSFORM,"translate3d(0,"+-d*m+"px,0)"),o.css(n.CSS.TRANSFORM,"translate3d(0,"+(t-d)*m+"px,0)"),u=r,l.hasClass("md-whiteframe-z1")?d||a(function(){i.removeClass(l,"md-whiteframe-z1")}):d&&a(function(){i.addClass(l,"md-whiteframe-z1")})}s.$on("$mdContentLoaded",function(t,n){l.parent()[0]===n.parent()[0]&&(o&&o.off("scroll",f),n.on("scroll",f),n.attr("scroll-shrink","true"),o=n,e(h))})}()}}}t.module("material.components.toolbar",["material.core","material.components.content"]).directive("mdToolbar",e),e.$inject=["$$rAF","$mdConstant","$mdUtil","$mdTheming","$animate","$timeout"]}(),function(){function e(e,n,r,o,i,a,s,l,c){var d=300,u=8;return{restrict:"E",transclude:!0,priority:210,template:' <div class="md-background"></div> <div class="md-content" ng-transclude></div>',scope:{visible:"=?mdVisible",delay:"=?mdDelay",autohide:"=?mdAutohide"},link:function(m,f,p){a(f);var h=function(){var e=f.parent();for(;e&&"none"==n.getComputedStyle(e[0])["pointer-events"];)e=e.parent();return e}(),g=t.element(f[0].getElementsByClassName("md-background")[0]),v=t.element(f[0].getElementsByClassName("md-content")[0]),b=p.mdDirection,$=function(){var e=f.parent()[0];for(;e&&e!==s[0]&&e!==document.body;)e=e.parentNode;return e}(),E=t.element($||document.body),y=r.throttle(function(){m.visible&&T()});return t.isDefined(p.mdDelay)||(m.delay=d),f.detach(),f.attr("role","tooltip"),w=!1,h.on("mousedown",function(){w=!0}),h.on("focus mouseenter touchstart",function(){C("pointer-events","none")||M(!0)}),h.on("blur mouseleave touchend touchcancel",function(){((m.hasOwnProperty("autohide")?m.autohide:p.hasOwnProperty("mdAutohide"))||w||o[0].activeElement!==h[0])&&M(!1),w=!1}),t.element(n).on("resize",y),m.$on("$destroy",function(){m.visible=!1,f.remove(),t.element(n).off("resize",y)}),m.$watch("visible",function(e){e?function(){if(E.append(f),C("display","none"))return m.visible=!1,void f.detach();T(),t.forEach([f,g,v],function(e){l.addClass(e,"md-show")})}():c.all([l.removeClass(v,"md-show"),l.removeClass(g,"md-show"),l.removeClass(f,"md-show")]).then(function(){m.visible||f.detach()})}),void(h.attr("aria-label")||h.text().trim()||h.attr("aria-label",f.text().trim()));var w;function C(e,r){var o=n.getComputedStyle(f[0]);return t.isDefined(o[e])&&o[e]==r}function M(t){M.value=!!t,M.queued||(t?(M.queued=!0,e(function(){m.visible=M.value,M.queued=!1},m.delay)):e(function(){m.visible=!1}))}function T(){var e,t,n=i.offsetRect(f,E),r=i.offsetRect(h,E),o=s(b);function a(e){var t={left:e.left,top:e.top};return t.left=Math.min(t.left,E.prop("scrollWidth")-n.width-u),t.left=Math.max(t.left,u),t.top=Math.min(t.top,E.prop("scrollHeight")-n.height-u),t.top=Math.max(t.top,u),t}function s(e){return"left"===e?{left:r.left-n.width-u,top:r.top+r.height/2-n.height/2}:"right"===e?{left:r.left+r.width+u,top:r.top+r.height/2-n.height/2}:"top"===e?{left:r.left+r.width/2-n.width/2,top:r.top-n.height-u}:{left:r.left+r.width/2-n.width/2,top:r.top+r.height+u}}b?o=a(o):o.top>f.prop("offsetParent").scrollHeight-n.height-u&&(o=a(s("top"))),f.css({top:o.top+"px",left:o.left+"px"}),e="left"===b||"right"===b?2*Math.sqrt(Math.pow(n.width,2)+Math.pow(n.height/2,2)):2*Math.sqrt(Math.pow(n.width/2,2)+Math.pow(n.height,2)),t="left"===b?{left:100,top:50}:"right"===b?{left:0,top:50}:"top"===b?{left:50,top:100}:{left:50,top:0},g.css({width:e+"px",height:e+"px",left:t.left+"%",top:t.top+"%"})}}}}t.module("material.components.tooltip",["material.core"]).directive("mdTooltip",e),e.$inject=["$timeout","$window","$$rAF","$document","$mdUtil","$mdTheming","$rootElement","$animate","$q"]}(),t.module("material.components.whiteframe",[]),function(){t.module("material.components.autocomplete").controller("MdAutocompleteCtrl",r);var e=225.5,n=8;function r(r,o,i,a,s,l,c,d,u,m){var f,p,h,g,v=this,b=r.itemsExpr.split(/ in /i),$=b[1],E=null,y=null,w={},C=!1,M=[],T=!1,x=0;return f="hidden",p=function(e,t){!e&&t&&k();e?i.enableScrolling():E&&s(function(){i.disableScrollAround(E.ul)},0,!1)},h=!0,Object.defineProperty(v,f,{get:function(){return h},set:function(e){var t=h;h=e,p(e,t)}}),v.scope=r,v.parent=r.$parent,v.itemName=b[0],v.matches=[],v.loading=!1,v.hidden=!0,v.index=null,v.messages=[],v.id=i.nextUid(),v.isDisabled=null,v.isRequired=null,v.keydown=function(e){switch(e.keyCode){case a.KEY_CODE.DOWN_ARROW:if(v.loading)return;e.preventDefault(),v.index=Math.min(v.index+1,v.matches.length-1),B(),V();break;case a.KEY_CODE.UP_ARROW:if(v.loading)return;e.preventDefault(),v.index=v.index<0?v.matches.length-1:Math.max(0,v.index-1),B(),V();break;case a.KEY_CODE.TAB:case a.KEY_CODE.ENTER:if(v.hidden||v.loading||v.index<0||v.matches.length<1)return;e.preventDefault(),F(v.index);break;case a.KEY_CODE.ESCAPE:v.matches=[],v.hidden=!0,v.index=I()}},v.blur=function(){T=!1,C||(v.hidden=!0)},v.focus=function(){T=!0,t.isString(r.searchText)||(r.searchText="");if(r.minLength>0)return;v.hidden=O(),v.hidden||U()},v.clear=function(){r.searchText="",F(-1);var e=document.createEvent("CustomEvent");e.initCustomEvent("input",!0,!0,{value:r.searchText}),E.input.dispatchEvent(e),E.input.focus()},v.select=F,v.listEnter=function(){C=!0},v.listLeave=function(){C=!1,T||(v.hidden=!0)},v.mouseUp=function(){E.input.focus()},v.getCurrentDisplayValue=H,v.registerSelectedItemWatcher=P,v.unregisterSelectedItemWatcher=function(e){var t=M.indexOf(e);-1!=t&&M.splice(t,1)},i.initOptionalProperties(r,m,{searchText:null,selectedItem:null}),l(o),g=parseInt(r.delay,10)||0,m.$observe("disabled",function(e){v.isDisabled=e}),m.$observe("required",function(e){v.isRequired=null!==e}),r.$watch("searchText",g?i.debounce(N,g):N),P(S),r.$watch("selectedItem",_),t.element(c).on("resize",k),r.$on("$destroy",A),void s(function(){(E={main:o[0],ul:o.find("ul")[0],input:o.find("input")[0],wrap:o.find("md-autocomplete-wrap")[0],root:document.body}).li=E.ul.getElementsByTagName("li"),E.snap=function(){for(var e=o;e.length;e=e.parent())if(t.isDefined(e.attr("md-autocomplete-snap")))return e[0];return E.wrap}(),E.$=function(e){var n={};for(var r in e)n[r]=t.element(e[r]);return n}(E),r.autofocus&&E.input.focus(),E.$.root.length&&(l(E.$.ul),E.$.ul.detach(),E.$.root.append(E.$.ul),d.pin&&d.pin(E.$.ul,u))});function k(){if(!E)return s(k,0,!1);var t=E.wrap.getBoundingClientRect(),r=E.snap.getBoundingClientRect(),o=E.root.getBoundingClientRect(),i=r.bottom-o.top,a=o.bottom-r.top,l={left:t.left-o.left+"px",minWidth:t.width+"px",maxWidth:Math.max(t.right-o.left,o.right-t.left)-n+"px"};i>a&&o.height-t.bottom-n<e?(l.top="auto",l.bottom=a+"px",l.maxHeight=Math.min(e,t.top-o.top-n)+"px"):(l.top=i+"px",l.bottom="auto",l.maxHeight=Math.min(e,o.bottom-t.bottom-n)+"px"),E.$.ul.css(l),s(function(){var e=E.ul.getBoundingClientRect(),r={};e.right>o.right-n&&(r.left=t.right-e.width+"px");E.$.ul.css(r)},0,!1)}function A(){t.element(c).off("resize",k),E.$.ul.remove()}function S(e,t){e&&(r.searchText=D(e)),r.itemChange&&e!==t&&r.itemChange(L(e))}function _(e,t){for(var n=0;n<M.length;++n)M[n](e,t)}function P(e){-1==M.indexOf(e)&&M.push(e)}function N(e,t){v.index=I(),e!==t&&e!==D(r.selectedItem)&&(r.selectedItem=null,r.textChange&&e!==t&&r.textChange(L(r.selectedItem)),R()?U():(v.loading=!1,v.matches=[],v.hidden=O(),V()))}function D(e){return e&&r.itemText?r.itemText(L(e)):e}function L(e){if(e){var t={};return v.itemName&&(t[v.itemName]=e),t}}function I(){return r.autoselect?0:-1}function O(){if(!R())return!0}function H(){return D(v.matches[v.index])}function R(){return t.isDefined(r.searchText)&&r.searchText.length>=(t.isNumber(r.minLength)?r.minLength:1)}function F(e){r.selectedItem=v.matches[e],v.hidden=!0,v.index=0,v.matches=[],s(function(){E.$.input.controller("ngModel").$setViewValue(D(r.selectedItem)||r.searchText),v.hidden=!0})}function V(){v.messages=[function(){if(x===v.matches.length)return"";switch(x=v.matches.length,v.matches.length){case 0:return"There are no matches available.";case 1:return"There is 1 match available.";default:return"There are "+v.matches.length+" matches available."}}(),H()]}function B(){if(E.li[v.index]){var e=E.li[v.index],t=e.offsetTop,n=t+e.offsetHeight,r=E.ul.clientHeight;t<E.ul.scrollTop?E.ul.scrollTop=t:n>E.ul.scrollTop+r&&(E.ul.scrollTop=n-r)}}function U(){var e=r.searchText,n=e.toLowerCase();y&&y.cancel&&(y.cancel(),y=null),!r.noCache&&w[n]?(v.matches=w[n],V()):function(e){var n=r.$parent.$eval($),o=e.toLowerCase();function i(t){w[o]=t,e===r.searchText&&(v.loading=!1,y=null,v.matches=t,v.hidden=O(),V(),k())}t.isArray(n)?i(n):n&&(v.loading=!0,n.success&&n.success(i),n.then&&n.then(i),n.error&&n.error(function(){v.loading=!1}))}(e),T&&(v.hidden=O())}}r.$inject=["$scope","$element","$mdUtil","$mdConstant","$timeout","$mdTheming","$window","$animate","$rootElement","$attrs"]}(),function(){function e(e,t){return{controller:"MdAutocompleteCtrl",controllerAs:"$mdAutocompleteCtrl",scope:{inputName:"@mdInputName",inputMinlength:"@mdInputMinlength",inputMaxlength:"@mdInputMaxlength",searchText:"=?mdSearchText",selectedItem:"=?mdSelectedItem",itemsExpr:"@mdItems",itemText:"&mdItemText",placeholder:"@placeholder",noCache:"=?mdNoCache",itemChange:"&?mdSelectedItemChange",textChange:"&?mdSearchTextChange",minLength:"=?mdMinLength",delay:"=?mdDelay",autofocus:"=?mdAutofocus",floatingLabel:"@?mdFloatingLabel",autoselect:"=?mdAutoselect",menuClass:"@?mdMenuClass"},template:function(e,t){var n,r,o=(n=e.find("md-not-found").remove(),(r=n.length?n.html():"")?'<li ng-if="!$mdAutocompleteCtrl.matches.length && !$mdAutocompleteCtrl.loading && !$mdAutocompleteCtrl.hidden" ng-hide="$mdAutocompleteCtrl.hidden" md-autocomplete-parent-scope>'+r+"</li>":""),i=function(){var t=e.find("md-item-template").remove(),n=t.length?t.html():e.html();t.length||e.empty();return n}(),a=e.html();return' <md-autocomplete-wrap layout="row" ng-class="{ \'md-whiteframe-z1\': !floatingLabel }" role="listbox"> '+(t.mdFloatingLabel?' <md-input-container flex ng-if="floatingLabel"> <label>{{floatingLabel}}</label> <input type="search" id="fl-input-{{$mdAutocompleteCtrl.id}}" name="{{inputName}}" autocomplete="off" ng-required="isRequired" ng-minlength="inputMinlength" ng-maxlength="inputMaxlength" ng-disabled="$mdAutocompleteCtrl.isDisabled" ng-model="$mdAutocompleteCtrl.scope.searchText" ng-keydown="$mdAutocompleteCtrl.keydown($event)" ng-blur="$mdAutocompleteCtrl.blur()" ng-focus="$mdAutocompleteCtrl.focus()" aria-owns="ul-{{$mdAutocompleteCtrl.id}}" aria-label="{{floatingLabel}}" aria-autocomplete="list" aria-haspopup="true" aria-activedescendant="" aria-expanded="{{!$mdAutocompleteCtrl.hidden}}"/> <div md-autocomplete-parent-scope md-autocomplete-replace>'+a+"</div> </md-input-container>":' <input flex type="search" id="input-{{$mdAutocompleteCtrl.id}}" name="{{inputName}}" ng-if="!floatingLabel" autocomplete="off" ng-required="isRequired" ng-disabled="$mdAutocompleteCtrl.isDisabled" ng-model="$mdAutocompleteCtrl.scope.searchText" ng-keydown="$mdAutocompleteCtrl.keydown($event)" ng-blur="$mdAutocompleteCtrl.blur()" ng-focus="$mdAutocompleteCtrl.focus()" placeholder="{{placeholder}}" aria-owns="ul-{{$mdAutocompleteCtrl.id}}" aria-label="{{placeholder}}" aria-autocomplete="list" aria-haspopup="true" aria-activedescendant="" aria-expanded="{{!$mdAutocompleteCtrl.hidden}}"/> <button type="button" tabindex="-1" ng-if="$mdAutocompleteCtrl.scope.searchText && !$mdAutocompleteCtrl.isDisabled" ng-click="$mdAutocompleteCtrl.clear()"> <md-icon md-svg-icon="md-close"></md-icon> <span class="md-visually-hidden">Clear</span> </button> ')+' <md-progress-linear ng-if="$mdAutocompleteCtrl.loading" md-mode="indeterminate"></md-progress-linear> <ul role="presentation" class="md-autocomplete-suggestions md-whiteframe-z1 {{menuClass || \'\'}}" id="ul-{{$mdAutocompleteCtrl.id}}" ng-hide="$mdAutocompleteCtrl.hidden" ng-mouseenter="$mdAutocompleteCtrl.listEnter()" ng-mouseleave="$mdAutocompleteCtrl.listLeave()" ng-mouseup="$mdAutocompleteCtrl.mouseUp()"> <li ng-repeat="(index, item) in $mdAutocompleteCtrl.matches" ng-class="{ selected: index === $mdAutocompleteCtrl.index }" ng-click="$mdAutocompleteCtrl.select(index)" md-autocomplete-list-item="$mdAutocompleteCtrl.itemName"> '+i+" </li> "+o+' </ul> </md-autocomplete-wrap> <aria-status class="md-visually-hidden" role="status" aria-live="assertive"> <p ng-repeat="message in $mdAutocompleteCtrl.messages" ng-if="message">{{message}}</p> </aria-status>'}}}t.module("material.components.autocomplete").directive("mdAutocomplete",e),e.$inject=["$mdTheming","$mdUtil"]}(),function(){function e(e,n,r){return this.init=o,o();function o(o){var i=r(n.html())(e),a=t.element("<div>").text(i).html(),s=n.attr("md-highlight-flags")||"",l=e.$watch(o,function(e){var t=function(e,t){var n="";t.indexOf("^")>=1&&(n+="^");n+=e,t.indexOf("$")>=1&&(n+="$");return new RegExp((r=n,r?r.replace(/[\\\^\$\*\+\?\.\(\)\|\{\}\[\]]/g,"\\$&"):r),t.replace(/[\$\^]/g,""));var r}(e,s),r=a.replace(t,'<span class="highlight">$&</span>');n.html(r)});n.on("$destroy",function(){l()})}}t.module("material.components.autocomplete").controller("MdHighlightCtrl",e),e.$inject=["$scope","$element","$interpolate"]}(),function(){t.module("material.components.autocomplete").directive("mdHighlightText",function(){return{terminal:!0,scope:!1,controller:"MdHighlightCtrl",link:function(e,t,n,r){r.init(n.mdHighlightText)}}})}(),function(){function e(e,t){return{terminal:!0,link:function(n,r,o){var i=n.$parent.$mdAutocompleteCtrl,a=i.parent.$new(!1,i.parent),s=i.scope.$eval(o.mdAutocompleteListItem);a[s]=n.item,e(r.contents())(a),r.attr({role:"option",id:"item_"+t.nextUid()})},scope:!1}}t.module("material.components.autocomplete").directive("mdAutocompleteListItem",e),e.$inject=["$compile","$mdUtil"]}(),function(){function e(e,t){return{restrict:"A",terminal:!0,link:function(t,n,r){var o=t.$parent.$mdAutocompleteCtrl;e(n.contents())(o.parent),r.hasOwnProperty("mdAutocompleteReplace")&&(n.after(n.contents()),n.remove())},scope:!1}}t.module("material.components.autocomplete").directive("mdAutocompleteParentScope",e),e.$inject=["$compile","$mdUtil"]}(),function(){t.module("material.components.chips").directive("mdChip",n);var e=' <span ng-if="!$mdChipsCtrl.readonly" class="md-visually-hidden"> {{$mdChipsCtrl.deleteHint}} </span>';function n(n){return{restrict:"E",require:"^?mdChips",compile:function(r,o){return r.append(e),function(e,r,o,i){r.addClass("md-chip"),n(r),i&&t.element(r[0].querySelector(".md-chip-content")).on("blur",function(){i.selectedChip=-1})}}}}n.$inject=["$mdTheming"]}(),function(){function e(e){return{restrict:"A",require:"^mdChips",scope:!1,link:function(t,n,r,o){n.on("click",function(e){t.$apply(function(){o.removeChip(t.$$replacedScope.$index)})}),e(function(){n.attr({tabindex:-1,ariaHidden:!0}),n.find("button").attr("tabindex","-1")})}}}t.module("material.components.chips").directive("mdChipRemove",e),e.$inject=["$timeout"]}(),function(){function e(e,t){return{restrict:"EA",terminal:!0,link:function(t,n,r){var o=t.$parent.$mdChipsCtrl,i=o.parent.$new(!1,o.parent);i.$$replacedScope=t,i.$chip=t.$chip,i.$mdChipsCtrl=o,n.html(o.$scope.$eval(r.mdChipTransclude)),e(n.contents())(i)},scope:!1}}t.module("material.components.chips").directive("mdChipTransclude",e),e.$inject=["$compile","$mdUtil"]}(),function(){function e(e,t,n,r,o){this.$timeout=o,this.$mdConstant=t,this.$scope=e,this.parent=e.$parent,this.$log=n,this.$element=r,this.ngModelCtrl=null,this.userInputNgModelCtrl=null,this.userInputElement=null,this.items=[],this.selectedChip=-1,this.deleteHint="Press delete to remove this chip.",this.deleteButtonLabel="Remove",this.chipBuffer="",this.useMdOnAppend=!1}t.module("material.components.chips").controller("MdChipsCtrl",e),e.$inject=["$scope","$mdConstant","$log","$element","$timeout"],e.prototype.inputKeydown=function(e){var t=this.getChipBuffer();switch(e.keyCode){case this.$mdConstant.KEY_CODE.ENTER:if(this.$scope.requireMatch||!t)break;e.preventDefault(),this.appendChip(t),this.resetChipBuffer();break;case this.$mdConstant.KEY_CODE.BACKSPACE:if(t)break;e.stopPropagation(),this.items.length&&this.selectAndFocusChipSafe(this.items.length-1)}},e.prototype.chipKeydown=function(e){if(!this.getChipBuffer())switch(e.keyCode){case this.$mdConstant.KEY_CODE.BACKSPACE:case this.$mdConstant.KEY_CODE.DELETE:if(this.selectedChip<0)return;e.preventDefault(),this.removeAndSelectAdjacentChip(this.selectedChip);break;case this.$mdConstant.KEY_CODE.LEFT_ARROW:e.preventDefault(),this.selectedChip<0&&(this.selectedChip=this.items.length),this.items.length&&this.selectAndFocusChipSafe(this.selectedChip-1);break;case this.$mdConstant.KEY_CODE.RIGHT_ARROW:e.preventDefault(),this.selectAndFocusChipSafe(this.selectedChip+1);break;case this.$mdConstant.KEY_CODE.ESCAPE:case this.$mdConstant.KEY_CODE.TAB:if(this.selectedChip<0)return;e.preventDefault(),this.onFocus()}},e.prototype.getPlaceholder=function(){return this.items.length&&(""==this.secondaryPlaceholder||this.secondaryPlaceholder)?this.placeholder:this.secondaryPlaceholder},e.prototype.removeAndSelectAdjacentChip=function(e){var n=this.getAdjacentChipIndex(e);this.removeChip(e),this.$timeout(t.bind(this,function(){this.selectAndFocusChipSafe(n)}))},e.prototype.resetSelectedChip=function(){this.selectedChip=-1},e.prototype.getAdjacentChipIndex=function(e){var t=this.items.length-1;return 0==t?-1:e==t?e-1:e},e.prototype.appendChip=function(e){this.items.indexOf(e)+1||(this.useMdOnAppend&&this.mdOnAppend&&(e=this.mdOnAppend({$chip:e})),this.items.push(e))},e.prototype.useMdOnAppendExpression=function(){this.useMdOnAppend=!0},e.prototype.getChipBuffer=function(){return this.userInputElement?this.userInputNgModelCtrl?this.userInputNgModelCtrl.$viewValue:this.userInputElement[0].value:this.chipBuffer},e.prototype.resetChipBuffer=function(){this.userInputElement?this.userInputNgModelCtrl?(this.userInputNgModelCtrl.$setViewValue(""),this.userInputNgModelCtrl.$render()):this.userInputElement[0].value="":this.chipBuffer=""},e.prototype.removeChip=function(e){this.items.splice(e,1)},e.prototype.removeChipAndFocusInput=function(e){this.removeChip(e),this.onFocus()},e.prototype.selectAndFocusChipSafe=function(e){return this.items.length?e===this.items.length?this.onFocus():(e=Math.max(e,0),e=Math.min(e,this.items.length-1),this.selectChip(e),void this.focusChip(e)):(this.selectChip(-1),void this.onFocus())},e.prototype.selectChip=function(e){e>=-1&&e<=this.items.length?this.selectedChip=e:this.$log.warn("Selected Chip index out of bounds; ignoring.")},e.prototype.selectAndFocusChip=function(e){this.selectChip(e),-1!=e&&this.focusChip(e)},e.prototype.focusChip=function(e){this.$element[0].querySelector('md-chip[index="'+e+'"] .md-chip-content').focus()},e.prototype.configureNgModel=function(e){this.ngModelCtrl=e;var t=this;e.$render=function(){t.items=t.ngModelCtrl.$viewValue}},e.prototype.onFocus=function(){var e=this.$element[0].querySelector("input");e&&e.focus(),this.resetSelectedChip()},e.prototype.onInputFocus=function(){this.inputHasFocus=!0,this.resetSelectedChip()},e.prototype.onInputBlur=function(){this.inputHasFocus=!1},e.prototype.configureUserInput=function(e){this.userInputElement=e;var n=e.controller("ngModel");n!=this.ngModelCtrl&&(this.userInputNgModelCtrl=n);var r=this.$scope,o=this;e.attr({tabindex:0}).on("keydown",function(e){r.$apply(t.bind(o,function(){o.inputKeydown(e)}))}).on("focus",t.bind(o,o.onInputFocus)).on("blur",t.bind(o,o.onInputBlur))},e.prototype.configureAutocomplete=function(e){e.registerSelectedItemWatcher(t.bind(this,function(e){e&&(this.appendChip(e),this.resetChipBuffer())})),this.$element.find("input").on("focus",t.bind(this,this.onInputFocus)).on("blur",t.bind(this,this.onInputBlur))},e.prototype.hasFocus=function(){return this.inputHasFocus||this.selectedChip>=0}}(),function(){t.module("material.components.chips").directive("mdChips",i);var e=' <md-chips-wrap ng-if="!$mdChipsCtrl.readonly || $mdChipsCtrl.items.length > 0" ng-keydown="$mdChipsCtrl.chipKeydown($event)" ng-class="{ \'md-focused\': $mdChipsCtrl.hasFocus() }" class="md-chips"> <md-chip ng-repeat="$chip in $mdChipsCtrl.items" index="{{$index}}" ng-class="{\'md-focused\': $mdChipsCtrl.selectedChip == $index}"> <div class="md-chip-content" tabindex="-1" aria-hidden="true" ng-focus="!$mdChipsCtrl.readonly && $mdChipsCtrl.selectChip($index)" md-chip-transclude="$mdChipsCtrl.chipContentsTemplate"></div> <div class="md-chip-remove-container" md-chip-transclude="$mdChipsCtrl.chipRemoveTemplate"></div> </md-chip> <div ng-if="!$mdChipsCtrl.readonly && $mdChipsCtrl.ngModelCtrl" class="md-chip-input-container" md-chip-transclude="$mdChipsCtrl.chipInputTemplate"></div> </div> </md-chips-wrap>',n=' <input tabindex="0" placeholder="{{$mdChipsCtrl.getPlaceholder()}}" aria-label="{{$mdChipsCtrl.getPlaceholder()}}" ng-model="$mdChipsCtrl.chipBuffer" ng-focus="$mdChipsCtrl.onInputFocus()" ng-blur="$mdChipsCtrl.onInputBlur()" ng-keydown="$mdChipsCtrl.inputKeydown($event)">',r=" <span>{{$chip}}</span>",o=' <button class="md-chip-remove" ng-if="!$mdChipsCtrl.readonly" ng-click="$mdChipsCtrl.removeChipAndFocusInput($$replacedScope.$index)" type="button" aria-hidden="true" tabindex="-1"> <md-icon md-svg-icon="md-close"></md-icon> <span class="md-visually-hidden"> {{$mdChipsCtrl.deleteButtonLabel}} </span> </button>';function i(t,i,a,s,l){return{template:function(t,n){n.$mdUserTemplate=t.clone();return e},require:["mdChips"],restrict:"E",controller:"MdChipsCtrl",controllerAs:"$mdChipsCtrl",bindToController:!0,compile:function(e,c){var d=c.$mdUserTemplate;c.$mdUserTemplate=null;var u=h("md-chips>*[md-chip-remove]")||o,m=h("md-chips>md-chip-template")||r,f=h("md-chips>md-autocomplete")||h("md-chips>input")||n,p=d.find("md-chip");d[0].querySelector("md-chip-template>*[md-chip-remove]")&&s.warn("invalid placement of md-chip-remove within md-chip-template.");function h(e){if(c.ngModel){var t=d[0].querySelector(e);return t&&t.outerHTML}}return function(e,r,o,s){i.initOptionalProperties(e,c),t(r);var d=s[0];if(d.chipContentsTemplate=m,d.chipRemoveTemplate=u,d.chipInputTemplate=f,r.attr({ariaHidden:!0,tabindex:-1}).on("focus",function(){d.onFocus()}),c.ngModel&&(d.configureNgModel(r.controller("ngModel")),o.mdOnAppend&&d.useMdOnAppendExpression(),f!=n&&l(function(){0===f.indexOf("<md-autocomplete")&&d.configureAutocomplete(r.find("md-autocomplete").controller("mdAutocomplete")),d.configureUserInput(r.find("input"))})),p.length>0){var h=a(p)(e.$parent);l(function(){r.find("md-chips-wrap").prepend(h)})}}},scope:{readonly:"=readonly",placeholder:"@",secondaryPlaceholder:"@",mdOnAppend:"&",deleteHint:"@",deleteButtonLabel:"@",requireMatch:"=?mdRequireMatch"}}}i.$inject=["$mdTheming","$mdUtil","$compile","$log","$timeout"]}(),function(){function e(){this.selectedItem=null,this.searchText=""}t.module("material.components.chips").controller("MdContactChipsCtrl",e),e.prototype.queryContact=function(e){var n=this.contactQuery({$query:e});return this.filterSelected?n.filter(t.bind(this,this.filterSelectedContacts)):n},e.prototype.filterSelectedContacts=function(e){return-1==this.contacts.indexOf(e)}}(),function(){t.module("material.components.chips").directive("mdContactChips",n);var e=' <md-chips class="md-contact-chips" ng-model="$mdContactChipsCtrl.contacts" md-require-match="$mdContactChipsCtrl.requireMatch" md-autocomplete-snap> <md-autocomplete md-menu-class="md-contact-chips-suggestions" md-selected-item="$mdContactChipsCtrl.selectedItem" md-search-text="$mdContactChipsCtrl.searchText" md-items="item in $mdContactChipsCtrl.queryContact($mdContactChipsCtrl.searchText)" md-item-text="$mdContactChipsCtrl.mdContactName" md-no-cache="true" md-autoselect placeholder="{{$mdContactChipsCtrl.contacts.length == 0 ? $mdContactChipsCtrl.placeholder : $mdContactChipsCtrl.secondaryPlaceholder}}"> <div class="md-contact-suggestion"> <img ng-src="{{item[$mdContactChipsCtrl.contactImage]}}" alt="{{item[$mdContactChipsCtrl.contactName]}}" /> <span class="md-contact-name" md-highlight-text="$mdContactChipsCtrl.searchText"> {{item[$mdContactChipsCtrl.contactName]}} </span> <span class="md-contact-email" >{{item[$mdContactChipsCtrl.contactEmail]}}</span> </div> </md-autocomplete> <md-chip-template> <div class="md-contact-avatar"> <img ng-src="{{$chip[$mdContactChipsCtrl.contactImage]}}" alt="{{$chip[$mdContactChipsCtrl.contactName]}}" /> </div> <div class="md-contact-name"> {{$chip[$mdContactChipsCtrl.contactName]}} </div> </md-chip-template> </md-chips>';function n(t,n){return{template:function(t,n){return e},restrict:"E",controller:"MdContactChipsCtrl",controllerAs:"$mdContactChipsCtrl",bindToController:!0,compile:function(e,r){return function(e,o,i,a){n.initOptionalProperties(e,r),t(o),o.attr("tabindex","-1")}},scope:{contactQuery:"&mdContacts",placeholder:"@",secondaryPlaceholder:"@",contactName:"@mdContactName",contactImage:"@mdContactImage",contactEmail:"@mdContactEmail",contacts:"=ngModel",requireMatch:"=?mdRequireMatch"}}}n.$inject=["$mdTheming","$mdUtil"]}(),function(){t.module("material.components.tabs").directive("mdTab",function(){return{require:"^?mdTabs",terminal:!0,template:function(e,t){var n=function(){return function(){var t=e.find("md-tab-label").eq(0);if(t.length)return t.remove().html()}()||t.label||(n=e.html(),e.empty(),n);var n}(),r=function(){var n=e.find("md-tab-body").eq(0),r=n.length?n.html():t.label?e.html():"";n.length?n.remove():t.label&&e.empty();return r}();return"<md-tab-label>"+n+"</md-tab-label><md-tab-body>"+r+"</md-tab-body>"},scope:{active:"=?mdActive",disabled:"=?ngDisabled",select:"&?mdOnSelect",deselect:"&?mdOnDeselect"},link:function(e,n,r,o){if(!o)return;var i=n.parent()[0].getElementsByTagName("md-tab"),a=Array.prototype.indexOf.call(i,n[0]),s=n.find("md-tab-body").eq(0).remove(),l=n.find("md-tab-label").eq(0).remove(),c=o.insertTab({scope:e,parent:e.$parent,index:a,element:n,template:s.html(),label:l.html()},a);e.select=e.select||t.noop,e.deselect=e.deselect||t.noop,e.$watch("active",function(e){e&&o.select(c.getIndex())}),e.$watch("disabled",function(){o.refreshIndex()}),e.$watch(function(){return Array.prototype.indexOf.call(i,n[0])},function(e){c.index=e,o.updateTabOrder()}),e.$on("$destroy",function(){o.removeTab(c)})}}})}(),function(){t.module("material.components.tabs").directive("mdTabItem",function(){return{require:"^?mdTabs",link:function(e,t,n,r){r&&r.attachRipple(e,t)}}})}(),function(){t.module("material.components.tabs").directive("mdTabLabel",function(){return{terminal:!0}})}(),function(){function e(e){return{restrict:"A",compile:function(t,n){var r=e(n.mdTabScroll,null,!0);return function(e,t){t.on("mousewheel",function(t){e.$apply(function(){r(e,{$event:t})})})}}}}t.module("material.components.tabs").directive("mdTabScroll",e),e.$inject=["$parse"]}(),function(){function e(e,n,r,o,i,a,s,l,c,d,u){var m,f,p=this,h=!1,g=function(){var e={};return e.wrapper=n[0].getElementsByTagName("md-tabs-wrapper")[0],e.data=n[0].getElementsByTagName("md-tab-data")[0],e.canvas=e.wrapper.getElementsByTagName("md-tabs-canvas")[0],e.paging=e.canvas.getElementsByTagName("md-pagination-wrapper")[0],e.tabs=e.paging.getElementsByTagName("md-tab-item"),e.dummies=e.canvas.getElementsByTagName("md-dummy-tab"),e.inkBar=e.paging.getElementsByTagName("md-ink-bar")[0],e.contentsWrapper=n[0].getElementsByTagName("md-tabs-content-wrapper")[0],e.contents=e.contentsWrapper.getElementsByTagName("md-tab-content"),e}(),v=[],b=!1,$=!1;function E(){b=!0,t.element(r).off("resize",C),t.element(g.paging).off("DOMSubtreeModified",p.updateInkBarStyles),t.element(g.paging).off("DOMSubtreeModified",k)}function y(t,n){t!==n&&(e.selectedIndex=T(t),p.lastSelectedIndex=n,p.updateInkBarStyles(),N(),_(t),e.$broadcast("$mdTabsChanged"),p.tabs[n]&&p.tabs[n].scope.deselect(),p.tabs[t]&&p.tabs[t].scope.select())}function w(t){h||(p.focusIndex=e.selectedIndex=t),p.lastClick=!0,p.tabs[t].element.triggerHandler("click")}function C(){e.$apply(function(){p.lastSelectedIndex=e.selectedIndex,p.offsetLeft=D(p.offsetLeft),o(p.updateInkBarStyles,0,!1),o(k)})}function M(){return e.centerTabs&&!p.shouldPaginate}function T(e){var t,n,r=Math.max(p.tabs.length-e,e);for(t=0;t<=r;t++){if((n=p.tabs[e+t])&&!0!==n.scope.disabled)return n.getIndex();if((n=p.tabs[e-t])&&!0!==n.scope.disabled)return n.getIndex()}return e}function x(e,t,n){Object.defineProperty(p,e,{get:function(){return n},set:function(e){var r=n;n=e,t(e,r)}})}function k(){p.shouldPaginate=function(){if(e.noPagination||!$)return!1;var r=n.prop("clientWidth");return t.forEach(g.dummies,function(e){r-=e.offsetWidth}),r<0}(),p.shouldCenterTabs=M(),o(function(){_(e.selectedIndex)})}function A(e){var t;for(t=p.focusIndex+e;p.tabs[t]&&p.tabs[t].scope.disabled;t+=e);p.tabs[t]&&(p.focusIndex=t)}function S(){g.dummies[p.focusIndex].focus()}function _(e){if(!p.shouldCenterTabs){null==e&&(e=p.focusIndex);var t=g.tabs[e],n=t.offsetLeft,r=t.offsetWidth+n;p.offsetLeft=Math.max(p.offsetLeft,D(r-g.canvas.clientWidth)),p.offsetLeft=Math.min(p.offsetLeft,D(n))}}function P(){e.selectedIndex=T(e.selectedIndex),p.focusIndex=T(p.focusIndex)}function N(){if(!e.dynamicHeight)return n.css("height","");if(!p.tabs.length)return v.push(N);var t=g.contents[e.selectedIndex],r=(t?t.offsetHeight:0)+g.wrapper.offsetHeight,o=n.prop("clientHeight");o!==r&&(h=!0,l.animate(n,{height:o+"px"},{height:r+"px"}).then(function(){n.css("height",""),h=!1}))}function D(e){if(!g.tabs.length||!p.shouldPaginate)return 0;var t=g.tabs[g.tabs.length-1],n=t.offsetLeft+t.offsetWidth;return e=Math.max(0,e),e=Math.min(n-g.canvas.clientWidth,e)}x("focusIndex",function(e,t){if(e===t)return;if(!g.tabs[e])return;_(),S()},e.selectedIndex||0),x("offsetLeft",function(n){var r=p.shouldCenterTabs?"":"-"+n+"px";t.element(g.paging).css(i.CSS.TRANSFORM,"translate3d("+r+", 0, 0)"),e.$broadcast("$mdTabsPaginationChanged")},0),x("hasContent",function(e){n[e?"removeClass":"addClass"]("md-no-tab-content")},!1),p.scope=e,p.parent=e.$parent,p.tabs=[],p.lastSelectedIndex=null,p.hasFocus=!1,p.lastClick=!0,p.shouldPaginate=!1,p.shouldCenterTabs=M(),p.redirectFocus=S,p.attachRipple=function(e,n){var r={colorElement:t.element(g.inkBar)};a.attach(e,n,r)},p.shouldStretchTabs=function(){switch(e.stretchTabs){case"always":return!0;case"never":return!1;default:return!p.shouldPaginate&&r.matchMedia("(max-width: 600px)").matches}},p.insertTab=function(n,r){var i={getIndex:function(){return p.tabs.indexOf(a)},isActive:function(){return this.getIndex()===e.selectedIndex},isLeft:function(){return this.getIndex()<e.selectedIndex},isRight:function(){return this.getIndex()>e.selectedIndex},shouldRender:function(){return!e.noDisconnect||this.isActive()},hasFocus:function(){return!p.lastClick&&p.hasFocus&&this.getIndex()===p.focusIndex},id:s.nextUid()},a=t.extend(i,n);t.isDefined(r)?p.tabs.splice(r,0,a):p.tabs.push(a);v.forEach(function(e){o(e)}),v=[],l=!1,t.forEach(p.tabs,function(e){e.template&&(l=!0)}),p.hasContent=l,$&&e.autoselect&&o(function(){w(p.tabs.indexOf(a))});var l;return o(k),a},p.removeTab=function(t){var n=e.selectedIndex,r=p.tabs.splice(t.getIndex(),1)[0];P(),e.selectedIndex!==n||b||(r.scope.deselect(),p.tabs[e.selectedIndex]&&p.tabs[e.selectedIndex].scope.select());o(function(){k(),p.offsetLeft=D(p.offsetLeft)})},p.select=w,p.scroll=function(e){if(!p.shouldPaginate)return;e.preventDefault(),p.offsetLeft=D(p.offsetLeft-e.wheelDelta)},p.nextPage=function(){var e,t,n=g.canvas.clientWidth+p.offsetLeft;for(e=0;e<g.tabs.length&&!((t=g.tabs[e]).offsetLeft+t.offsetWidth>n);e++);p.offsetLeft=D(t.offsetLeft)},p.previousPage=function(){var e,t;for(e=0;e<g.tabs.length&&!((t=g.tabs[e]).offsetLeft+t.offsetWidth>=p.offsetLeft);e++);p.offsetLeft=D(t.offsetLeft+t.offsetWidth-g.canvas.clientWidth)},p.keydown=function(t){switch(t.keyCode){case i.KEY_CODE.LEFT_ARROW:t.preventDefault(),A(-1);break;case i.KEY_CODE.RIGHT_ARROW:t.preventDefault(),A(1);break;case i.KEY_CODE.SPACE:case i.KEY_CODE.ENTER:t.preventDefault(),h||(e.selectedIndex=p.focusIndex)}p.lastClick=!1},p.canPageForward=function(){var e=g.tabs[g.tabs.length-1];return e&&e.offsetLeft+e.offsetWidth>g.canvas.clientWidth+p.offsetLeft},p.canPageBack=function(){return p.offsetLeft>0},p.refreshIndex=P,p.incrementSelectedIndex=A,p.updateInkBarStyles=s.debounce(function(){if(!g.tabs[e.selectedIndex])return;if(!p.tabs.length)return v.push(p.updateInkBarStyles);if(!n.prop("offsetParent"))return function t(){if(t.watcher)return;t.watcher=e.$watch(function(){o(function(){t.watcher&&n.prop("offsetParent")&&(t.watcher(),t.watcher=null,C())},0,!1)})}();var r=e.selectedIndex,i=g.paging.offsetWidth,a=g.tabs[r],s=a.offsetLeft,l=i-s-a.offsetWidth;(function(){var n=e.selectedIndex,r=p.lastSelectedIndex,o=t.element(g.inkBar);if(!t.isNumber(r))return;n<r?o.addClass("md-left").removeClass("md-right"):n>r&&o.addClass("md-right").removeClass("md-left")})(),t.element(g.inkBar).css({left:s+"px",right:l+"px"})},100),p.updateTabOrder=s.debounce(function(){var t=p.tabs[e.selectedIndex],n=p.tabs[p.focusIndex];p.tabs=p.tabs.sort(function(e,t){return e.index-t.index}),e.selectedIndex=p.tabs.indexOf(t),p.focusIndex=p.tabs.indexOf(n)},100),e.selectedIndex=e.selectedIndex||0,m=c.$mdTabsTemplate,(f=t.element(g.data)).html(m),d(f.contents())(p.parent),delete c.$mdTabsTemplate,s.initOptionalProperties(e,c),c.$observe("mdNoBar",function(n){e.noInkBar=t.isDefined(n)}),e.$watch("selectedIndex",y),e.$watch("dynamicHeight",function(e){e?n.addClass("md-dynamic-height"):n.removeClass("md-dynamic-height")}),e.$on("$destroy",E),t.element(r).on("resize",C),t.element(g.paging).on("DOMSubtreeModified",p.updateInkBarStyles),t.element(g.paging).on("DOMSubtreeModified",k),u(n),o(function(){N(),_(),k(),p.tabs[e.selectedIndex]&&p.tabs[e.selectedIndex].scope.select(),$=!0})}t.module("material.components.tabs").controller("MdTabsController",e),e.$inject=["$scope","$element","$window","$timeout","$mdConstant","$mdTabInkRipple","$mdUtil","$animate","$attrs","$compile","$mdTheming"]}(),function(){function e(e,t,n){return{scope:{noPagination:"=?mdNoPagination",dynamicHeight:"=?mdDynamicHeight",centerTabs:"=?mdCenterTabs",selectedIndex:"=?mdSelected",stretchTabs:"@?mdStretchTabs",swipeContent:"=?mdSwipeContent",noDisconnect:"=?mdNoDisconnect",autoselect:"=?mdAutoselect"},template:function(e,t){return t.$mdTabsTemplate=e.html(),' <md-tabs-wrapper ng-class="{ \'md-stretch-tabs\': $mdTabsCtrl.shouldStretchTabs() }"> <md-tab-data></md-tab-data> <md-prev-button tabindex="-1" role="button" aria-label="Previous Page" aria-disabled="{{!$mdTabsCtrl.canPageBack()}}" ng-class="{ \'md-disabled\': !$mdTabsCtrl.canPageBack() }" ng-if="$mdTabsCtrl.shouldPaginate" ng-click="$mdTabsCtrl.previousPage()"> <md-icon md-svg-icon="md-tabs-arrow"></md-icon> </md-prev-button> <md-next-button tabindex="-1" role="button" aria-label="Next Page" aria-disabled="{{!$mdTabsCtrl.canPageForward()}}" ng-class="{ \'md-disabled\': !$mdTabsCtrl.canPageForward() }" ng-if="$mdTabsCtrl.shouldPaginate" ng-click="$mdTabsCtrl.nextPage()"> <md-icon md-svg-icon="md-tabs-arrow"></md-icon> </md-next-button> <md-tabs-canvas tabindex="0" aria-activedescendant="tab-item-{{$mdTabsCtrl.tabs[$mdTabsCtrl.focusIndex].id}}" ng-focus="$mdTabsCtrl.redirectFocus()" ng-class="{ \'md-paginated\': $mdTabsCtrl.shouldPaginate, \'md-center-tabs\': $mdTabsCtrl.shouldCenterTabs }" ng-keydown="$mdTabsCtrl.keydown($event)" role="tablist"> <md-pagination-wrapper ng-class="{ \'md-center-tabs\': $mdTabsCtrl.shouldCenterTabs }" md-tab-scroll="$mdTabsCtrl.scroll($event)"> <md-tab-item tabindex="-1" class="md-tab" style="max-width: {{ tabWidth ? tabWidth + \'px\' : \'none\' }}" ng-repeat="tab in $mdTabsCtrl.tabs" role="tab" aria-controls="tab-content-{{tab.id}}" aria-selected="{{tab.isActive()}}" aria-disabled="{{tab.scope.disabled || \'false\'}}" ng-click="$mdTabsCtrl.select(tab.getIndex())" ng-class="{ \'md-active\': tab.isActive(), \'md-focused\': tab.hasFocus(), \'md-disabled\': tab.scope.disabled }" ng-disabled="tab.scope.disabled" md-swipe-left="$mdTabsCtrl.nextPage()" md-swipe-right="$mdTabsCtrl.previousPage()" md-template="tab.label" md-scope="tab.parent"></md-tab-item> <md-ink-bar ng-hide="noInkBar"></md-ink-bar> </md-pagination-wrapper> <div class="md-visually-hidden md-dummy-wrapper"> <md-dummy-tab class="md-tab" tabindex="-1" id="tab-item-{{tab.id}}" role="tab" aria-controls="tab-content-{{tab.id}}" aria-selected="{{tab.isActive()}}" aria-disabled="{{tab.scope.disabled || \'false\'}}" ng-focus="$mdTabsCtrl.hasFocus = true" ng-blur="$mdTabsCtrl.hasFocus = false" ng-repeat="tab in $mdTabsCtrl.tabs" md-template="tab.label" md-scope="tab.parent"></md-dummy-tab> </div> </md-tabs-canvas> </md-tabs-wrapper> <md-tabs-content-wrapper ng-show="$mdTabsCtrl.hasContent"> <md-tab-content id="tab-content-{{tab.id}}" role="tabpanel" aria-labelledby="tab-item-{{tab.id}}" md-swipe-left="swipeContent && $mdTabsCtrl.incrementSelectedIndex(1)" md-swipe-right="swipeContent && $mdTabsCtrl.incrementSelectedIndex(-1)" ng-if="$mdTabsCtrl.hasContent" ng-repeat="(index, tab) in $mdTabsCtrl.tabs" md-connected-if="tab.isActive()" ng-class="{ \'md-no-transition\': $mdTabsCtrl.lastSelectedIndex == null, \'md-active\': tab.isActive(), \'md-left\': tab.isLeft(), \'md-right\': tab.isRight(), \'md-no-scroll\': dynamicHeight }"> <div md-template="tab.template" md-scope="tab.parent" ng-if="tab.shouldRender()"></div> </md-tab-content> </md-tabs-content-wrapper> '},controller:"MdTabsController",controllerAs:"$mdTabsCtrl"}}t.module("material.components.tabs").directive("mdTabs",e),e.$inject=["$mdTheming","$mdUtil","$compile"]}(),function(){function e(e,t,n){return{restrict:"A",link:function(r,o,i,a){if(!a)return;var s=r.compileScope.$new();return o.html(r.template),e(o.contents())(s),n(function(){r.$watch("connected",function(e){!1===e?a.scope.noDisconnect||t.disconnectScope(s):l()}),r.$on("$destroy",l)});function l(){a.scope.noDisconnect||t.reconnectScope(s)}},scope:{template:"=mdTemplate",compileScope:"=mdScope",connected:"=?mdConnectedIf"},require:"^?mdTabs"}}t.module("material.components.tabs").directive("mdTemplate",e),e.$inject=["$compile","$mdUtil","$timeout"]}(),t.module("material.core").constant("$MD_THEME_CSS","/* mixin definition ; sets LTR and RTL within the same style call */md-autocomplete.md-THEME_NAME-theme { background: '{{background-50}}'; } md-autocomplete.md-THEME_NAME-theme[disabled] { background: '{{background-100}}'; } md-autocomplete.md-THEME_NAME-theme button md-icon path { fill: '{{background-600}}'; } md-autocomplete.md-THEME_NAME-theme button:after { background: '{{background-600-0.3}}'; }.md-autocomplete-suggestions.md-THEME_NAME-theme { background: '{{background-50}}'; } .md-autocomplete-suggestions.md-THEME_NAME-theme li { color: '{{background-900}}'; } .md-autocomplete-suggestions.md-THEME_NAME-theme li .highlight { color: '{{background-600}}'; } .md-autocomplete-suggestions.md-THEME_NAME-theme li:hover, .md-autocomplete-suggestions.md-THEME_NAME-theme li.selected { background: '{{background-200}}'; }md-backdrop.md-opaque.md-THEME_NAME-theme { background-color: '{{foreground-4-0.5}}'; }a.md-button.md-THEME_NAME-theme, .md-button.md-THEME_NAME-theme { border-radius: 3px; } a.md-button.md-THEME_NAME-theme:not([disabled]):hover, .md-button.md-THEME_NAME-theme:not([disabled]):hover { background-color: '{{background-500-0.2}}'; } a.md-button.md-THEME_NAME-theme:not([disabled]).md-focused, .md-button.md-THEME_NAME-theme:not([disabled]).md-focused { background-color: '{{background-500-0.2}}'; } a.md-button.md-THEME_NAME-theme:not([disabled]).md-icon-button:hover, .md-button.md-THEME_NAME-theme:not([disabled]).md-icon-button:hover { background-color: transparent; } a.md-button.md-THEME_NAME-theme.md-fab, .md-button.md-THEME_NAME-theme.md-fab { border-radius: 50%; background-color: '{{accent-color}}'; color: '{{accent-contrast}}'; } a.md-button.md-THEME_NAME-theme.md-fab md-icon, .md-button.md-THEME_NAME-theme.md-fab md-icon { color: '{{accent-contrast}}'; } a.md-button.md-THEME_NAME-theme.md-fab:not([disabled]):hover, .md-button.md-THEME_NAME-theme.md-fab:not([disabled]):hover { background-color: '{{accent-color}}'; } a.md-button.md-THEME_NAME-theme.md-fab:not([disabled]).md-focused, .md-button.md-THEME_NAME-theme.md-fab:not([disabled]).md-focused { background-color: '{{accent-A700}}'; } a.md-button.md-THEME_NAME-theme.md-icon-button, .md-button.md-THEME_NAME-theme.md-icon-button { border-radius: 50%; } a.md-button.md-THEME_NAME-theme.md-primary, .md-button.md-THEME_NAME-theme.md-primary { color: '{{primary-color}}'; } a.md-button.md-THEME_NAME-theme.md-primary.md-raised, a.md-button.md-THEME_NAME-theme.md-primary.md-fab, .md-button.md-THEME_NAME-theme.md-primary.md-raised, .md-button.md-THEME_NAME-theme.md-primary.md-fab { color: '{{primary-contrast}}'; background-color: '{{primary-color}}'; } a.md-button.md-THEME_NAME-theme.md-primary.md-raised:not([disabled]) md-icon, a.md-button.md-THEME_NAME-theme.md-primary.md-fab:not([disabled]) md-icon, .md-button.md-THEME_NAME-theme.md-primary.md-raised:not([disabled]) md-icon, .md-button.md-THEME_NAME-theme.md-primary.md-fab:not([disabled]) md-icon { color: '{{primary-contrast}}'; } a.md-button.md-THEME_NAME-theme.md-primary.md-raised:not([disabled]):hover, a.md-button.md-THEME_NAME-theme.md-primary.md-fab:not([disabled]):hover, .md-button.md-THEME_NAME-theme.md-primary.md-raised:not([disabled]):hover, .md-button.md-THEME_NAME-theme.md-primary.md-fab:not([disabled]):hover { background-color: '{{primary-color}}'; } a.md-button.md-THEME_NAME-theme.md-primary.md-raised:not([disabled]).md-focused, a.md-button.md-THEME_NAME-theme.md-primary.md-fab:not([disabled]).md-focused, .md-button.md-THEME_NAME-theme.md-primary.md-raised:not([disabled]).md-focused, .md-button.md-THEME_NAME-theme.md-primary.md-fab:not([disabled]).md-focused { background-color: '{{primary-600}}'; } a.md-button.md-THEME_NAME-theme.md-primary:not([disabled]) md-icon, .md-button.md-THEME_NAME-theme.md-primary:not([disabled]) md-icon { color: '{{primary-color}}'; } a.md-button.md-THEME_NAME-theme.md-fab, .md-button.md-THEME_NAME-theme.md-fab { border-radius: 50%; background-color: '{{accent-color}}'; color: '{{accent-contrast}}'; } a.md-button.md-THEME_NAME-theme.md-fab:not([disabled]) .md-icon, .md-button.md-THEME_NAME-theme.md-fab:not([disabled]) .md-icon { color: '{{accent-contrast}}'; } a.md-button.md-THEME_NAME-theme.md-fab:not([disabled]):hover, .md-button.md-THEME_NAME-theme.md-fab:not([disabled]):hover { background-color: '{{accent-color}}'; } a.md-button.md-THEME_NAME-theme.md-fab:not([disabled]).md-focused, .md-button.md-THEME_NAME-theme.md-fab:not([disabled]).md-focused { background-color: '{{accent-A700}}'; } a.md-button.md-THEME_NAME-theme.md-raised, .md-button.md-THEME_NAME-theme.md-raised { color: '{{background-contrast}}'; background-color: '{{background-50}}'; } a.md-button.md-THEME_NAME-theme.md-raised:not([disabled]) .md-icon, .md-button.md-THEME_NAME-theme.md-raised:not([disabled]) .md-icon { color: '{{background-contrast}}'; } a.md-button.md-THEME_NAME-theme.md-raised:not([disabled]):hover, .md-button.md-THEME_NAME-theme.md-raised:not([disabled]):hover { background-color: '{{background-50}}'; } a.md-button.md-THEME_NAME-theme.md-raised:not([disabled]).md-focused, .md-button.md-THEME_NAME-theme.md-raised:not([disabled]).md-focused { background-color: '{{background-200}}'; } a.md-button.md-THEME_NAME-theme.md-warn, .md-button.md-THEME_NAME-theme.md-warn { color: '{{warn-color}}'; } a.md-button.md-THEME_NAME-theme.md-warn.md-raised, a.md-button.md-THEME_NAME-theme.md-warn.md-fab, .md-button.md-THEME_NAME-theme.md-warn.md-raised, .md-button.md-THEME_NAME-theme.md-warn.md-fab { color: '{{warn-contrast}}'; background-color: '{{warn-color}}'; } a.md-button.md-THEME_NAME-theme.md-warn.md-raised:not([disabled]) md-icon, a.md-button.md-THEME_NAME-theme.md-warn.md-fab:not([disabled]) md-icon, .md-button.md-THEME_NAME-theme.md-warn.md-raised:not([disabled]) md-icon, .md-button.md-THEME_NAME-theme.md-warn.md-fab:not([disabled]) md-icon { color: '{{warn-contrast}}'; } a.md-button.md-THEME_NAME-theme.md-warn.md-raised:not([disabled]):hover, a.md-button.md-THEME_NAME-theme.md-warn.md-fab:not([disabled]):hover, .md-button.md-THEME_NAME-theme.md-warn.md-raised:not([disabled]):hover, .md-button.md-THEME_NAME-theme.md-warn.md-fab:not([disabled]):hover { background-color: '{{warn-color}}'; } a.md-button.md-THEME_NAME-theme.md-warn.md-raised:not([disabled]).md-focused, a.md-button.md-THEME_NAME-theme.md-warn.md-fab:not([disabled]).md-focused, .md-button.md-THEME_NAME-theme.md-warn.md-raised:not([disabled]).md-focused, .md-button.md-THEME_NAME-theme.md-warn.md-fab:not([disabled]).md-focused { background-color: '{{warn-700}}'; } a.md-button.md-THEME_NAME-theme.md-warn:not([disabled]) md-icon, .md-button.md-THEME_NAME-theme.md-warn:not([disabled]) md-icon { color: '{{warn-color}}'; } a.md-button.md-THEME_NAME-theme.md-accent, .md-button.md-THEME_NAME-theme.md-accent { color: '{{accent-color}}'; } a.md-button.md-THEME_NAME-theme.md-accent.md-raised, a.md-button.md-THEME_NAME-theme.md-accent.md-fab, .md-button.md-THEME_NAME-theme.md-accent.md-raised, .md-button.md-THEME_NAME-theme.md-accent.md-fab { color: '{{accent-contrast}}'; background-color: '{{accent-color}}'; } a.md-button.md-THEME_NAME-theme.md-accent.md-raised:not([disabled]) md-icon, a.md-button.md-THEME_NAME-theme.md-accent.md-fab:not([disabled]) md-icon, .md-button.md-THEME_NAME-theme.md-accent.md-raised:not([disabled]) md-icon, .md-button.md-THEME_NAME-theme.md-accent.md-fab:not([disabled]) md-icon { color: '{{accent-contrast}}'; } a.md-button.md-THEME_NAME-theme.md-accent.md-raised:not([disabled]):hover, a.md-button.md-THEME_NAME-theme.md-accent.md-fab:not([disabled]):hover, .md-button.md-THEME_NAME-theme.md-accent.md-raised:not([disabled]):hover, .md-button.md-THEME_NAME-theme.md-accent.md-fab:not([disabled]):hover { background-color: '{{accent-color}}'; } a.md-button.md-THEME_NAME-theme.md-accent.md-raised:not([disabled]).md-focused, a.md-button.md-THEME_NAME-theme.md-accent.md-fab:not([disabled]).md-focused, .md-button.md-THEME_NAME-theme.md-accent.md-raised:not([disabled]).md-focused, .md-button.md-THEME_NAME-theme.md-accent.md-fab:not([disabled]).md-focused { background-color: '{{accent-700}}'; } a.md-button.md-THEME_NAME-theme.md-accent:not([disabled]) md-icon, .md-button.md-THEME_NAME-theme.md-accent:not([disabled]) md-icon { color: '{{accent-color}}'; } a.md-button.md-THEME_NAME-theme[disabled], a.md-button.md-THEME_NAME-theme.md-raised[disabled], a.md-button.md-THEME_NAME-theme.md-fab[disabled], a.md-button.md-THEME_NAME-theme.md-accent[disabled], a.md-button.md-THEME_NAME-theme.md-warn[disabled], .md-button.md-THEME_NAME-theme[disabled], .md-button.md-THEME_NAME-theme.md-raised[disabled], .md-button.md-THEME_NAME-theme.md-fab[disabled], .md-button.md-THEME_NAME-theme.md-accent[disabled], .md-button.md-THEME_NAME-theme.md-warn[disabled] { color: '{{foreground-3}}'; cursor: not-allowed; } a.md-button.md-THEME_NAME-theme[disabled] md-icon, a.md-button.md-THEME_NAME-theme.md-raised[disabled] md-icon, a.md-button.md-THEME_NAME-theme.md-fab[disabled] md-icon, a.md-button.md-THEME_NAME-theme.md-accent[disabled] md-icon, a.md-button.md-THEME_NAME-theme.md-warn[disabled] md-icon, .md-button.md-THEME_NAME-theme[disabled] md-icon, .md-button.md-THEME_NAME-theme.md-raised[disabled] md-icon, .md-button.md-THEME_NAME-theme.md-fab[disabled] md-icon, .md-button.md-THEME_NAME-theme.md-accent[disabled] md-icon, .md-button.md-THEME_NAME-theme.md-warn[disabled] md-icon { color: '{{foreground-3}}'; } a.md-button.md-THEME_NAME-theme.md-raised[disabled], a.md-button.md-THEME_NAME-theme.md-fab[disabled], .md-button.md-THEME_NAME-theme.md-raised[disabled], .md-button.md-THEME_NAME-theme.md-fab[disabled] { background-color: '{{foreground-4}}'; } a.md-button.md-THEME_NAME-theme[disabled], .md-button.md-THEME_NAME-theme[disabled] { background-color: transparent; }md-bottom-sheet.md-THEME_NAME-theme { background-color: '{{background-50}}'; border-top-color: '{{background-300}}'; } md-bottom-sheet.md-THEME_NAME-theme.md-list md-list-item { color: '{{foreground-1}}'; } md-bottom-sheet.md-THEME_NAME-theme .md-subheader { background-color: '{{background-50}}'; } md-bottom-sheet.md-THEME_NAME-theme .md-subheader { color: '{{foreground-1}}'; }md-card.md-THEME_NAME-theme { background-color: '{{background-color}}'; border-radius: 2px; } md-card.md-THEME_NAME-theme .md-card-image { border-radius: 2px 2px 0 0; }md-checkbox.md-THEME_NAME-theme .md-ripple { color: '{{accent-600}}'; }md-checkbox.md-THEME_NAME-theme.md-checked .md-ripple { color: '{{background-600}}'; }md-checkbox.md-THEME_NAME-theme.md-checked.md-focused .md-container:before { background-color: '{{accent-color-0.26}}'; }md-checkbox.md-THEME_NAME-theme .md-icon { border-color: '{{foreground-2}}'; }md-checkbox.md-THEME_NAME-theme.md-checked .md-icon { background-color: '{{accent-color-0.87}}'; }md-checkbox.md-THEME_NAME-theme.md-checked .md-icon:after { border-color: '{{background-200}}'; }md-checkbox.md-THEME_NAME-theme:not([disabled]).md-primary .md-ripple { color: '{{primary-600}}'; }md-checkbox.md-THEME_NAME-theme:not([disabled]).md-primary.md-checked .md-ripple { color: '{{background-600}}'; }md-checkbox.md-THEME_NAME-theme:not([disabled]).md-primary .md-icon { border-color: '{{foreground-2}}'; }md-checkbox.md-THEME_NAME-theme:not([disabled]).md-primary.md-checked .md-icon { background-color: '{{primary-color-0.87}}'; }md-checkbox.md-THEME_NAME-theme:not([disabled]).md-primary.md-checked.md-focused .md-container:before { background-color: '{{primary-color-0.26}}'; }md-checkbox.md-THEME_NAME-theme:not([disabled]).md-primary.md-checked .md-icon:after { border-color: '{{background-200}}'; }md-checkbox.md-THEME_NAME-theme:not([disabled]).md-warn .md-ripple { color: '{{warn-600}}'; }md-checkbox.md-THEME_NAME-theme:not([disabled]).md-warn .md-icon { border-color: '{{foreground-2}}'; }md-checkbox.md-THEME_NAME-theme:not([disabled]).md-warn.md-checked .md-icon { background-color: '{{warn-color-0.87}}'; }md-checkbox.md-THEME_NAME-theme:not([disabled]).md-warn.md-checked.md-focused:not([disabled]) .md-container:before { background-color: '{{warn-color-0.26}}'; }md-checkbox.md-THEME_NAME-theme:not([disabled]).md-warn.md-checked .md-icon:after { border-color: '{{background-200}}'; }md-checkbox.md-THEME_NAME-theme[disabled] .md-icon { border-color: '{{foreground-3}}'; }md-checkbox.md-THEME_NAME-theme[disabled].md-checked .md-icon { background-color: '{{foreground-3}}'; }md-checkbox.md-THEME_NAME-theme[disabled] .md-label { color: '{{foreground-3}}'; }md-content.md-THEME_NAME-theme { background-color: '{{background-color}}'; }md-chips.md-THEME_NAME-theme .md-chips { box-shadow: 0 1px '{{background-300}}'; } md-chips.md-THEME_NAME-theme .md-chips.md-focused { box-shadow: 0 2px '{{primary-color}}'; }md-chips.md-THEME_NAME-theme .md-chip { background: '{{background-300}}'; color: '{{background-800}}'; } md-chips.md-THEME_NAME-theme .md-chip.md-focused { background: '{{primary-color}}'; color: '{{primary-contrast}}'; } md-chips.md-THEME_NAME-theme .md-chip.md-focused md-icon { color: '{{primary-contrast}}'; }md-chips.md-THEME_NAME-theme md-chip-remove .md-button md-icon path { fill: '{{background-500}}'; }.md-contact-suggestion span.md-contact-email { color: '{{background-400}}'; }md-dialog.md-THEME_NAME-theme { border-radius: 4px; background-color: '{{background-color}}'; } md-dialog.md-THEME_NAME-theme.md-content-overflow .md-actions { border-top-color: '{{foreground-4}}'; }md-divider.md-THEME_NAME-theme { border-top-color: '{{foreground-4}}'; }md-icon.md-THEME_NAME-theme { color: '{{foreground-2}}'; } md-icon.md-THEME_NAME-theme.md-primary { color: '{{primary-color}}'; } md-icon.md-THEME_NAME-theme.md-accent { color: '{{accent-color}}'; } md-icon.md-THEME_NAME-theme.md-warn { color: '{{warn-color}}'; }md-list.md-THEME_NAME-theme md-list-item.md-2-line .md-list-item-text h3, md-list.md-THEME_NAME-theme md-list-item.md-2-line .md-list-item-text h4, md-list.md-THEME_NAME-theme md-list-item.md-3-line .md-list-item-text h3, md-list.md-THEME_NAME-theme md-list-item.md-3-line .md-list-item-text h4 { color: '{{foreground-1}}'; }md-list.md-THEME_NAME-theme md-list-item.md-2-line .md-list-item-text p, md-list.md-THEME_NAME-theme md-list-item.md-3-line .md-list-item-text p { color: '{{foreground-2}}'; }md-list.md-THEME_NAME-theme .md-proxy-focus.md-focused div.md-no-style { background-color: '{{background-100}}'; }md-list.md-THEME_NAME-theme md-list-item > md-icon { color: '{{foreground-2}}'; } md-list.md-THEME_NAME-theme md-list-item > md-icon.md-highlight { color: '{{primary-color}}'; } md-list.md-THEME_NAME-theme md-list-item > md-icon.md-highlight.md-accent { color: '{{accent-color}}'; }md-list.md-THEME_NAME-theme md-list-item button { background-color: '{{background-color}}'; } md-list.md-THEME_NAME-theme md-list-item button.md-button:not([disabled]):hover { background-color: '{{background-color}}'; }md-input-container.md-THEME_NAME-theme .md-input { color: '{{foreground-1}}'; border-color: '{{foreground-4}}'; text-shadow: '{{foreground-shadow}}'; } md-input-container.md-THEME_NAME-theme .md-input::-webkit-input-placeholder, md-input-container.md-THEME_NAME-theme .md-input::-moz-placeholder, md-input-container.md-THEME_NAME-theme .md-input:-moz-placeholder, md-input-container.md-THEME_NAME-theme .md-input:-ms-input-placeholder { color: '{{foreground-3}}'; }md-input-container.md-THEME_NAME-theme > md-icon { color: '{{foreground-1}}'; }md-input-container.md-THEME_NAME-theme label, md-input-container.md-THEME_NAME-theme .md-placeholder { text-shadow: '{{foreground-shadow}}'; color: '{{foreground-3}}'; }md-input-container.md-THEME_NAME-theme ng-messages, md-input-container.md-THEME_NAME-theme [ng-message], md-input-container.md-THEME_NAME-theme [data-ng-message], md-input-container.md-THEME_NAME-theme [x-ng-message] { color: '{{warn-500}}'; }md-input-container.md-THEME_NAME-theme:not(.md-input-invalid).md-input-has-value label { color: '{{foreground-2}}'; }md-input-container.md-THEME_NAME-theme:not(.md-input-invalid).md-input-focused .md-input { border-color: '{{primary-500}}'; }md-input-container.md-THEME_NAME-theme:not(.md-input-invalid).md-input-focused label { color: '{{primary-500}}'; }md-input-container.md-THEME_NAME-theme:not(.md-input-invalid).md-input-focused md-icon { color: '{{primary-500}}'; }md-input-container.md-THEME_NAME-theme:not(.md-input-invalid).md-input-focused.md-accent .md-input { border-color: '{{accent-500}}'; }md-input-container.md-THEME_NAME-theme:not(.md-input-invalid).md-input-focused.md-accent label { color: '{{accent-500}}'; }md-input-container.md-THEME_NAME-theme:not(.md-input-invalid).md-input-focused.md-warn .md-input { border-color: '{{warn-500}}'; }md-input-container.md-THEME_NAME-theme:not(.md-input-invalid).md-input-focused.md-warn label { color: '{{warn-500}}'; }md-input-container.md-THEME_NAME-theme.md-input-invalid .md-input { border-color: '{{warn-500}}'; }md-input-container.md-THEME_NAME-theme.md-input-invalid.md-input-focused label { color: '{{warn-500}}'; }md-input-container.md-THEME_NAME-theme.md-input-invalid ng-message, md-input-container.md-THEME_NAME-theme.md-input-invalid data-ng-message, md-input-container.md-THEME_NAME-theme.md-input-invalid x-ng-message, md-input-container.md-THEME_NAME-theme.md-input-invalid [ng-message], md-input-container.md-THEME_NAME-theme.md-input-invalid [data-ng-message], md-input-container.md-THEME_NAME-theme.md-input-invalid [x-ng-message], md-input-container.md-THEME_NAME-theme.md-input-invalid .md-char-counter { color: '{{warn-500}}'; }md-input-container.md-THEME_NAME-theme .md-input[disabled], [disabled] md-input-container.md-THEME_NAME-theme .md-input { border-bottom-color: transparent; color: '{{foreground-3}}'; background-image: linear-gradient(to right, '{{foreground-3}}' 0%, '{{foreground-3}}' 33%, transparent 0%); background-image: -ms-linear-gradient(left, transparent 0%, '{{foreground-3}}' 100%); }md-menu-content.md-THEME_NAME-theme { background-color: '{{background-color}}'; } md-menu-content.md-THEME_NAME-theme md-menu-divider { background-color: '{{foreground-4}}'; }md-progress-circular.md-THEME_NAME-theme { background-color: transparent; } md-progress-circular.md-THEME_NAME-theme .md-inner .md-gap { border-top-color: '{{primary-color}}'; border-bottom-color: '{{primary-color}}'; } md-progress-circular.md-THEME_NAME-theme .md-inner .md-left .md-half-circle, md-progress-circular.md-THEME_NAME-theme .md-inner .md-right .md-half-circle { border-top-color: '{{primary-color}}'; } md-progress-circular.md-THEME_NAME-theme .md-inner .md-right .md-half-circle { border-right-color: '{{primary-color}}'; } md-progress-circular.md-THEME_NAME-theme .md-inner .md-left .md-half-circle { border-left-color: '{{primary-color}}'; } md-progress-circular.md-THEME_NAME-theme.md-warn .md-inner .md-gap { border-top-color: '{{warn-color}}'; border-bottom-color: '{{warn-color}}'; } md-progress-circular.md-THEME_NAME-theme.md-warn .md-inner .md-left .md-half-circle, md-progress-circular.md-THEME_NAME-theme.md-warn .md-inner .md-right .md-half-circle { border-top-color: '{{warn-color}}'; } md-progress-circular.md-THEME_NAME-theme.md-warn .md-inner .md-right .md-half-circle { border-right-color: '{{warn-color}}'; } md-progress-circular.md-THEME_NAME-theme.md-warn .md-inner .md-left .md-half-circle { border-left-color: '{{warn-color}}'; } md-progress-circular.md-THEME_NAME-theme.md-accent .md-inner .md-gap { border-top-color: '{{accent-color}}'; border-bottom-color: '{{accent-color}}'; } md-progress-circular.md-THEME_NAME-theme.md-accent .md-inner .md-left .md-half-circle, md-progress-circular.md-THEME_NAME-theme.md-accent .md-inner .md-right .md-half-circle { border-top-color: '{{accent-color}}'; } md-progress-circular.md-THEME_NAME-theme.md-accent .md-inner .md-right .md-half-circle { border-right-color: '{{accent-color}}'; } md-progress-circular.md-THEME_NAME-theme.md-accent .md-inner .md-left .md-half-circle { border-left-color: '{{accent-color}}'; }md-progress-linear.md-THEME_NAME-theme .md-container { background-color: '{{primary-100}}'; }md-progress-linear.md-THEME_NAME-theme .md-bar { background-color: '{{primary-color}}'; }md-progress-linear.md-THEME_NAME-theme.md-warn .md-container { background-color: '{{warn-100}}'; }md-progress-linear.md-THEME_NAME-theme.md-warn .md-bar { background-color: '{{warn-color}}'; }md-progress-linear.md-THEME_NAME-theme.md-accent .md-container { background-color: '{{accent-100}}'; }md-progress-linear.md-THEME_NAME-theme.md-accent .md-bar { background-color: '{{accent-color}}'; }md-progress-linear.md-THEME_NAME-theme[md-mode=buffer].md-warn .md-bar1 { background-color: '{{warn-100}}'; }md-progress-linear.md-THEME_NAME-theme[md-mode=buffer].md-warn .md-dashed:before { background: radial-gradient('{{warn-100}}' 0%, '{{warn-100}}' 16%, transparent 42%); }md-progress-linear.md-THEME_NAME-theme[md-mode=buffer].md-accent .md-bar1 { background-color: '{{accent-100}}'; }md-progress-linear.md-THEME_NAME-theme[md-mode=buffer].md-accent .md-dashed:before { background: radial-gradient('{{accent-100}}' 0%, '{{accent-100}}' 16%, transparent 42%); }md-radio-button.md-THEME_NAME-theme .md-off { border-color: '{{foreground-2}}'; }md-radio-button.md-THEME_NAME-theme .md-on { background-color: '{{accent-color-0.87}}'; }md-radio-button.md-THEME_NAME-theme.md-checked .md-off { border-color: '{{accent-color-0.87}}'; }md-radio-button.md-THEME_NAME-theme.md-checked .md-ink-ripple { color: '{{accent-color-0.87}}'; }md-radio-button.md-THEME_NAME-theme .md-container .md-ripple { color: '{{accent-600}}'; }md-radio-group.md-THEME_NAME-theme:not([disabled]) .md-primary .md-on, md-radio-group.md-THEME_NAME-theme:not([disabled]).md-primary .md-on, md-radio-button.md-THEME_NAME-theme:not([disabled]) .md-primary .md-on, md-radio-button.md-THEME_NAME-theme:not([disabled]).md-primary .md-on { background-color: '{{primary-color-0.87}}'; }md-radio-group.md-THEME_NAME-theme:not([disabled]) .md-primary .md-checked .md-off, md-radio-group.md-THEME_NAME-theme:not([disabled]) .md-primary.md-checked .md-off, md-radio-group.md-THEME_NAME-theme:not([disabled]).md-primary .md-checked .md-off, md-radio-group.md-THEME_NAME-theme:not([disabled]).md-primary.md-checked .md-off, md-radio-button.md-THEME_NAME-theme:not([disabled]) .md-primary .md-checked .md-off, md-radio-button.md-THEME_NAME-theme:not([disabled]) .md-primary.md-checked .md-off, md-radio-button.md-THEME_NAME-theme:not([disabled]).md-primary .md-checked .md-off, md-radio-button.md-THEME_NAME-theme:not([disabled]).md-primary.md-checked .md-off { border-color: '{{primary-color-0.87}}'; }md-radio-group.md-THEME_NAME-theme:not([disabled]) .md-primary .md-checked .md-ink-ripple, md-radio-group.md-THEME_NAME-theme:not([disabled]) .md-primary.md-checked .md-ink-ripple, md-radio-group.md-THEME_NAME-theme:not([disabled]).md-primary .md-checked .md-ink-ripple, md-radio-group.md-THEME_NAME-theme:not([disabled]).md-primary.md-checked .md-ink-ripple, md-radio-button.md-THEME_NAME-theme:not([disabled]) .md-primary .md-checked .md-ink-ripple, md-radio-button.md-THEME_NAME-theme:not([disabled]) .md-primary.md-checked .md-ink-ripple, md-radio-button.md-THEME_NAME-theme:not([disabled]).md-primary .md-checked .md-ink-ripple, md-radio-button.md-THEME_NAME-theme:not([disabled]).md-primary.md-checked .md-ink-ripple { color: '{{primary-color-0.87}}'; }md-radio-group.md-THEME_NAME-theme:not([disabled]) .md-primary .md-container .md-ripple, md-radio-group.md-THEME_NAME-theme:not([disabled]).md-primary .md-container .md-ripple, md-radio-button.md-THEME_NAME-theme:not([disabled]) .md-primary .md-container .md-ripple, md-radio-button.md-THEME_NAME-theme:not([disabled]).md-primary .md-container .md-ripple { color: '{{primary-600}}'; }md-radio-group.md-THEME_NAME-theme:not([disabled]) .md-warn .md-on, md-radio-group.md-THEME_NAME-theme:not([disabled]).md-warn .md-on, md-radio-button.md-THEME_NAME-theme:not([disabled]) .md-warn .md-on, md-radio-button.md-THEME_NAME-theme:not([disabled]).md-warn .md-on { background-color: '{{warn-color-0.87}}'; }md-radio-group.md-THEME_NAME-theme:not([disabled]) .md-warn .md-checked .md-off, md-radio-group.md-THEME_NAME-theme:not([disabled]) .md-warn.md-checked .md-off, md-radio-group.md-THEME_NAME-theme:not([disabled]).md-warn .md-checked .md-off, md-radio-group.md-THEME_NAME-theme:not([disabled]).md-warn.md-checked .md-off, md-radio-button.md-THEME_NAME-theme:not([disabled]) .md-warn .md-checked .md-off, md-radio-button.md-THEME_NAME-theme:not([disabled]) .md-warn.md-checked .md-off, md-radio-button.md-THEME_NAME-theme:not([disabled]).md-warn .md-checked .md-off, md-radio-button.md-THEME_NAME-theme:not([disabled]).md-warn.md-checked .md-off { border-color: '{{warn-color-0.87}}'; }md-radio-group.md-THEME_NAME-theme:not([disabled]) .md-warn .md-checked .md-ink-ripple, md-radio-group.md-THEME_NAME-theme:not([disabled]) .md-warn.md-checked .md-ink-ripple, md-radio-group.md-THEME_NAME-theme:not([disabled]).md-warn .md-checked .md-ink-ripple, md-radio-group.md-THEME_NAME-theme:not([disabled]).md-warn.md-checked .md-ink-ripple, md-radio-button.md-THEME_NAME-theme:not([disabled]) .md-warn .md-checked .md-ink-ripple, md-radio-button.md-THEME_NAME-theme:not([disabled]) .md-warn.md-checked .md-ink-ripple, md-radio-button.md-THEME_NAME-theme:not([disabled]).md-warn .md-checked .md-ink-ripple, md-radio-button.md-THEME_NAME-theme:not([disabled]).md-warn.md-checked .md-ink-ripple { color: '{{warn-color-0.87}}'; }md-radio-group.md-THEME_NAME-theme:not([disabled]) .md-warn .md-container .md-ripple, md-radio-group.md-THEME_NAME-theme:not([disabled]).md-warn .md-container .md-ripple, md-radio-button.md-THEME_NAME-theme:not([disabled]) .md-warn .md-container .md-ripple, md-radio-button.md-THEME_NAME-theme:not([disabled]).md-warn .md-container .md-ripple { color: '{{warn-600}}'; }md-radio-group.md-THEME_NAME-theme[disabled], md-radio-button.md-THEME_NAME-theme[disabled] { color: '{{foreground-3}}'; } md-radio-group.md-THEME_NAME-theme[disabled] .md-container .md-off, md-radio-button.md-THEME_NAME-theme[disabled] .md-container .md-off { border-color: '{{foreground-3}}'; } md-radio-group.md-THEME_NAME-theme[disabled] .md-container .md-on, md-radio-button.md-THEME_NAME-theme[disabled] .md-container .md-on { border-color: '{{foreground-3}}'; }md-radio-group.md-THEME_NAME-theme.md-focused:not(:empty) .md-checked .md-container:before { background-color: '{{accent-color-0.26}}'; }md-radio-group.md-THEME_NAME-theme.md-focused:not(:empty) .md-checked:not([disabled]).md-primary .md-container:before { background-color: '{{primary-color-0.26}}'; }md-radio-group.md-THEME_NAME-theme.md-focused:not(:empty) .md-checked.md-primary .md-container:before { background-color: '{{warn-color-0.26}}'; }md-select.md-THEME_NAME-theme.ng-invalid.ng-dirty .md-select-label { color: '{{warn-500}}' !important; border-bottom-color: '{{warn-500}}' !important; }md-select.md-THEME_NAME-theme:not([disabled]):focus .md-select-label { border-bottom-color: '{{primary-color}}'; color: '{{ foreground-1 }}'; } md-select.md-THEME_NAME-theme:not([disabled]):focus .md-select-label.md-placeholder { color: '{{ foreground-1 }}'; }md-select.md-THEME_NAME-theme:not([disabled]):focus.md-accent .md-select-label { border-bottom-color: '{{accent-color}}'; }md-select.md-THEME_NAME-theme:not([disabled]):focus.md-warn .md-select-label { border-bottom-color: '{{warn-color}}'; }md-select.md-THEME_NAME-theme[disabled] .md-select-label { color: '{{foreground-3}}'; } md-select.md-THEME_NAME-theme[disabled] .md-select-label.md-placeholder { color: '{{foreground-3}}'; }md-select.md-THEME_NAME-theme .md-select-label { border-bottom-color: '{{foreground-4}}'; } md-select.md-THEME_NAME-theme .md-select-label.md-placeholder { color: '{{foreground-2}}'; }md-select-menu.md-THEME_NAME-theme md-optgroup { color: '{{foreground-2}}'; } md-select-menu.md-THEME_NAME-theme md-optgroup md-option { color: '{{foreground-1}}'; }md-select-menu.md-THEME_NAME-theme md-option[selected] { color: '{{primary-500}}'; } md-select-menu.md-THEME_NAME-theme md-option[selected]:focus { color: '{{primary-600}}'; } md-select-menu.md-THEME_NAME-theme md-option[selected].md-accent { color: '{{accent-500}}'; } md-select-menu.md-THEME_NAME-theme md-option[selected].md-accent:focus { color: '{{accent-600}}'; }md-select-menu.md-THEME_NAME-theme md-option:focus:not([selected]) { background: '{{background-200}}'; }md-slider.md-THEME_NAME-theme .md-track { background-color: '{{foreground-3}}'; }md-slider.md-THEME_NAME-theme .md-track-ticks { background-color: '{{foreground-4}}'; }md-slider.md-THEME_NAME-theme .md-focus-thumb { background-color: '{{foreground-2}}'; }md-slider.md-THEME_NAME-theme .md-focus-ring { border-color: '{{foreground-4}}'; }md-slider.md-THEME_NAME-theme .md-disabled-thumb { border-color: '{{background-color}}'; }md-slider.md-THEME_NAME-theme.md-min .md-thumb:after { background-color: '{{background-color}}'; }md-slider.md-THEME_NAME-theme .md-track.md-track-fill { background-color: '{{accent-color}}'; }md-slider.md-THEME_NAME-theme .md-thumb:after { border-color: '{{accent-color}}'; background-color: '{{accent-color}}'; }md-slider.md-THEME_NAME-theme .md-sign { background-color: '{{accent-color}}'; } md-slider.md-THEME_NAME-theme .md-sign:after { border-top-color: '{{accent-color}}'; }md-slider.md-THEME_NAME-theme .md-thumb-text { color: '{{accent-contrast}}'; }md-slider.md-THEME_NAME-theme.md-warn .md-track.md-track-fill { background-color: '{{warn-color}}'; }md-slider.md-THEME_NAME-theme.md-warn .md-thumb:after { border-color: '{{warn-color}}'; background-color: '{{warn-color}}'; }md-slider.md-THEME_NAME-theme.md-warn .md-sign { background-color: '{{warn-color}}'; } md-slider.md-THEME_NAME-theme.md-warn .md-sign:after { border-top-color: '{{warn-color}}'; }md-slider.md-THEME_NAME-theme.md-warn .md-thumb-text { color: '{{warn-contrast}}'; }md-slider.md-THEME_NAME-theme.md-primary .md-track.md-track-fill { background-color: '{{primary-color}}'; }md-slider.md-THEME_NAME-theme.md-primary .md-thumb:after { border-color: '{{primary-color}}'; background-color: '{{primary-color}}'; }md-slider.md-THEME_NAME-theme.md-primary .md-sign { background-color: '{{primary-color}}'; } md-slider.md-THEME_NAME-theme.md-primary .md-sign:after { border-top-color: '{{primary-color}}'; }md-slider.md-THEME_NAME-theme.md-primary .md-thumb-text { color: '{{primary-contrast}}'; }md-slider.md-THEME_NAME-theme[disabled] .md-thumb:after { border-color: '{{foreground-3}}'; }md-slider.md-THEME_NAME-theme[disabled]:not(.md-min) .md-thumb:after { background-color: '{{foreground-3}}'; }md-sidenav.md-THEME_NAME-theme { background-color: '{{background-color}}'; }.md-subheader.md-THEME_NAME-theme { color: '{{ foreground-2-0.23 }}'; background-color: '{{background-color}}'; } .md-subheader.md-THEME_NAME-theme.md-primary { color: '{{primary-color}}'; } .md-subheader.md-THEME_NAME-theme.md-accent { color: '{{accent-color}}'; } .md-subheader.md-THEME_NAME-theme.md-warn { color: '{{warn-color}}'; }md-switch.md-THEME_NAME-theme .md-thumb { background-color: '{{background-50}}'; }md-switch.md-THEME_NAME-theme .md-bar { background-color: '{{background-500}}'; }md-switch.md-THEME_NAME-theme.md-checked .md-thumb { background-color: '{{accent-color}}'; }md-switch.md-THEME_NAME-theme.md-checked .md-bar { background-color: '{{accent-color-0.5}}'; }md-switch.md-THEME_NAME-theme.md-checked.md-focused .md-thumb:before { background-color: '{{accent-color-0.26}}'; }md-switch.md-THEME_NAME-theme.md-checked.md-primary .md-thumb { background-color: '{{primary-color}}'; }md-switch.md-THEME_NAME-theme.md-checked.md-primary .md-bar { background-color: '{{primary-color-0.5}}'; }md-switch.md-THEME_NAME-theme.md-checked.md-primary.md-focused .md-thumb:before { background-color: '{{primary-color-0.26}}'; }md-switch.md-THEME_NAME-theme.md-checked.md-warn .md-thumb { background-color: '{{warn-color}}'; }md-switch.md-THEME_NAME-theme.md-checked.md-warn .md-bar { background-color: '{{warn-color-0.5}}'; }md-switch.md-THEME_NAME-theme.md-checked.md-warn.md-focused .md-thumb:before { background-color: '{{warn-color-0.26}}'; }md-switch.md-THEME_NAME-theme[disabled] .md-thumb { background-color: '{{background-400}}'; }md-switch.md-THEME_NAME-theme[disabled] .md-bar { background-color: '{{foreground-4}}'; }md-tabs.md-THEME_NAME-theme md-tabs-wrapper { background-color: transparent; border-color: '{{foreground-4}}'; }md-tabs.md-THEME_NAME-theme .md-paginator md-icon { color: '{{primary-color}}'; }md-tabs.md-THEME_NAME-theme md-ink-bar { color: '{{accent-color}}'; background: '{{accent-color}}'; }md-tabs.md-THEME_NAME-theme .md-tab { color: '{{foreground-2}}'; } md-tabs.md-THEME_NAME-theme .md-tab[disabled] { color: '{{foreground-3}}'; } md-tabs.md-THEME_NAME-theme .md-tab.md-active, md-tabs.md-THEME_NAME-theme .md-tab.md-focused { color: '{{primary-color}}'; } md-tabs.md-THEME_NAME-theme .md-tab.md-focused { background: '{{primary-color-0.1}}'; } md-tabs.md-THEME_NAME-theme .md-tab .md-ripple-container { color: '{{accent-100}}'; }md-tabs.md-THEME_NAME-theme.md-accent md-tabs-wrapper { background-color: '{{accent-color}}'; }md-tabs.md-THEME_NAME-theme.md-accent md-tab-item:not([disabled]) { color: '{{accent-100}}'; } md-tabs.md-THEME_NAME-theme.md-accent md-tab-item:not([disabled]).md-active, md-tabs.md-THEME_NAME-theme.md-accent md-tab-item:not([disabled]).md-focused { color: '{{accent-contrast}}'; } md-tabs.md-THEME_NAME-theme.md-accent md-tab-item:not([disabled]).md-focused { background: '{{accent-contrast-0.1}}'; }md-tabs.md-THEME_NAME-theme.md-accent md-ink-bar { color: '{{primary-600-1}}'; background: '{{primary-600-1}}'; }md-tabs.md-THEME_NAME-theme.md-primary md-tabs-wrapper { background-color: '{{primary-color}}'; }md-tabs.md-THEME_NAME-theme.md-primary md-tab-item:not([disabled]) { color: '{{primary-100}}'; } md-tabs.md-THEME_NAME-theme.md-primary md-tab-item:not([disabled]).md-active, md-tabs.md-THEME_NAME-theme.md-primary md-tab-item:not([disabled]).md-focused { color: '{{primary-contrast}}'; } md-tabs.md-THEME_NAME-theme.md-primary md-tab-item:not([disabled]).md-focused { background: '{{primary-contrast-0.1}}'; }md-tabs.md-THEME_NAME-theme.md-warn md-tabs-wrapper { background-color: '{{warn-color}}'; }md-tabs.md-THEME_NAME-theme.md-warn md-tab-item:not([disabled]) { color: '{{warn-100}}'; } md-tabs.md-THEME_NAME-theme.md-warn md-tab-item:not([disabled]).md-active, md-tabs.md-THEME_NAME-theme.md-warn md-tab-item:not([disabled]).md-focused { color: '{{warn-contrast}}'; } md-tabs.md-THEME_NAME-theme.md-warn md-tab-item:not([disabled]).md-focused { background: '{{warn-contrast-0.1}}'; }md-toolbar > md-tabs.md-THEME_NAME-theme md-tabs-wrapper { background-color: '{{primary-color}}'; }md-toolbar > md-tabs.md-THEME_NAME-theme md-tab-item:not([disabled]) { color: '{{primary-100}}'; } md-toolbar > md-tabs.md-THEME_NAME-theme md-tab-item:not([disabled]).md-active, md-toolbar > md-tabs.md-THEME_NAME-theme md-tab-item:not([disabled]).md-focused { color: '{{primary-contrast}}'; } md-toolbar > md-tabs.md-THEME_NAME-theme md-tab-item:not([disabled]).md-focused { background: '{{primary-contrast-0.1}}'; }md-toolbar.md-accent > md-tabs.md-THEME_NAME-theme md-tabs-wrapper { background-color: '{{accent-color}}'; }md-toolbar.md-accent > md-tabs.md-THEME_NAME-theme md-tab-item:not([disabled]) { color: '{{accent-100}}'; } md-toolbar.md-accent > md-tabs.md-THEME_NAME-theme md-tab-item:not([disabled]).md-active, md-toolbar.md-accent > md-tabs.md-THEME_NAME-theme md-tab-item:not([disabled]).md-focused { color: '{{accent-contrast}}'; } md-toolbar.md-accent > md-tabs.md-THEME_NAME-theme md-tab-item:not([disabled]).md-focused { background: '{{accent-contrast-0.1}}'; }md-toolbar.md-accent > md-tabs.md-THEME_NAME-theme md-ink-bar { color: '{{primary-600-1}}'; background: '{{primary-600-1}}'; }md-toolbar.md-warn > md-tabs.md-THEME_NAME-theme md-tabs-wrapper { background-color: '{{warn-color}}'; }md-toolbar.md-warn > md-tabs.md-THEME_NAME-theme md-tab-item:not([disabled]) { color: '{{warn-100}}'; } md-toolbar.md-warn > md-tabs.md-THEME_NAME-theme md-tab-item:not([disabled]).md-active, md-toolbar.md-warn > md-tabs.md-THEME_NAME-theme md-tab-item:not([disabled]).md-focused { color: '{{warn-contrast}}'; } md-toolbar.md-warn > md-tabs.md-THEME_NAME-theme md-tab-item:not([disabled]).md-focused { background: '{{warn-contrast-0.1}}'; }md-toast.md-THEME_NAME-theme { background-color: #323232; color: '{{background-50}}'; } md-toast.md-THEME_NAME-theme .md-button { color: '{{background-50}}'; } md-toast.md-THEME_NAME-theme .md-button.md-highlight { color: '{{primary-A200}}'; } md-toast.md-THEME_NAME-theme .md-button.md-highlight.md-accent { color: '{{accent-A200}}'; } md-toast.md-THEME_NAME-theme .md-button.md-highlight.md-warn { color: '{{warn-A200}}'; }md-toolbar.md-THEME_NAME-theme { background-color: '{{primary-color}}'; color: '{{primary-contrast}}'; } md-toolbar.md-THEME_NAME-theme md-icon { color: '{{primary-contrast}}'; } md-toolbar.md-THEME_NAME-theme .md-button { color: '{{primary-contrast}}'; } md-toolbar.md-THEME_NAME-theme.md-accent { background-color: '{{accent-color}}'; color: '{{accent-contrast}}'; } md-toolbar.md-THEME_NAME-theme.md-warn { background-color: '{{warn-color}}'; color: '{{warn-contrast}}'; }md-tooltip.md-THEME_NAME-theme { color: '{{background-A100}}'; } md-tooltip.md-THEME_NAME-theme .md-background { background-color: '{{foreground-2}}'; }")}(window,window.angular);var app,qrcode=function(){var e=function(e,t){var n=e,r=l[t],o=null,i=0,a=null,s=new Array,c={},d=function(e,t){o=function(e){for(var t=new Array(e),n=0;n<e;n+=1){t[n]=new Array(e);for(var r=0;r<e;r+=1)t[n][r]=null}return t}(i=4*n+17),u(0,0),u(i-7,0),u(0,i-7),f(),m(),h(e,t),n>=7&&p(e),null==a&&(a=b(n,r,s)),g(a,t)},u=function(e,t){for(var n=-1;n<=7;n+=1)if(!(e+n<=-1||i<=e+n))for(var r=-1;r<=7;r+=1)t+r<=-1||i<=t+r||(o[e+n][t+r]=0<=n&&n<=6&&(0==r||6==r)||0<=r&&r<=6&&(0==n||6==n)||2<=n&&n<=4&&2<=r&&r<=4)},m=function(){for(var e=8;e<i-8;e+=1)null==o[e][6]&&(o[e][6]=e%2==0);for(var t=8;t<i-8;t+=1)null==o[6][t]&&(o[6][t]=t%2==0)},f=function(){for(var e=v.getPatternPosition(n),t=0;t<e.length;t+=1)for(var r=0;r<e.length;r+=1){var i=e[t],a=e[r];if(null==o[i][a])for(var s=-2;s<=2;s+=1)for(var l=-2;l<=2;l+=1)o[i+s][a+l]=-2==s||2==s||-2==l||2==l||0==s&&0==l}},p=function(e){for(var t=v.getBCHTypeNumber(n),r=0;r<18;r+=1){var a=!e&&1==(t>>r&1);o[Math.floor(r/3)][r%3+i-8-3]=a}for(r=0;r<18;r+=1){a=!e&&1==(t>>r&1);o[r%3+i-8-3][Math.floor(r/3)]=a}},h=function(e,t){for(var n=r<<3|t,a=v.getBCHTypeInfo(n),s=0;s<15;s+=1){var l=!e&&1==(a>>s&1);s<6?o[s][8]=l:s<8?o[s+1][8]=l:o[i-15+s][8]=l}for(s=0;s<15;s+=1){l=!e&&1==(a>>s&1);s<8?o[8][i-s-1]=l:s<9?o[8][15-s-1+1]=l:o[8][15-s-1]=l}o[i-8][8]=!e},g=function(e,t){for(var n=-1,r=i-1,a=7,s=0,l=v.getMaskFunction(t),c=i-1;c>0;c-=2)for(6==c&&(c-=1);;){for(var d=0;d<2;d+=1)if(null==o[r][c-d]){var u=!1;s<e.length&&(u=1==(e[s]>>>a&1)),l(r,c-d)&&(u=!u),o[r][c-d]=u,-1==(a-=1)&&(s+=1,a=7)}if((r+=n)<0||i<=r){r-=n,n=-n;break}}},b=function(e,t,n){for(var r=E.getRSBlocks(e,t),o=y(),i=0;i<n.length;i+=1){var a=n[i];o.put(a.getMode(),4),o.put(a.getLength(),v.getLengthInBits(a.getMode(),e)),a.write(o)}var s=0;for(i=0;i<r.length;i+=1)s+=r[i].dataCount;if(o.getLengthInBits()>8*s)throw new Error("code length overflow. ("+o.getLengthInBits()+">"+8*s+")");for(o.getLengthInBits()+4<=8*s&&o.put(0,4);o.getLengthInBits()%8!=0;)o.putBit(!1);for(;!(o.getLengthInBits()>=8*s||(o.put(236,8),o.getLengthInBits()>=8*s));)o.put(17,8);return function(e,t){for(var n=0,r=0,o=0,i=new Array(t.length),a=new Array(t.length),s=0;s<t.length;s+=1){var l=t[s].dataCount,c=t[s].totalCount-l;r=Math.max(r,l),o=Math.max(o,c),i[s]=new Array(l);for(var d=0;d<i[s].length;d+=1)i[s][d]=255&e.getBuffer()[d+n];n+=l;var u=v.getErrorCorrectPolynomial(c),m=$(i[s],u.getLength()-1).mod(u);for(a[s]=new Array(u.getLength()-1),d=0;d<a[s].length;d+=1){var f=d+m.getLength()-a[s].length;a[s][d]=f>=0?m.getAt(f):0}}var p=0;for(d=0;d<t.length;d+=1)p+=t[d].totalCount;var h=new Array(p),g=0;for(d=0;d<r;d+=1)for(s=0;s<t.length;s+=1)d<i[s].length&&(h[g]=i[s][d],g+=1);for(d=0;d<o;d+=1)for(s=0;s<t.length;s+=1)d<a[s].length&&(h[g]=a[s][d],g+=1);return h}(o,r)};return c.addData=function(e,t){var n=null;switch(t=t||"Byte"){case"Numeric":n=w(e);break;case"Alphanumeric":n=C(e);break;case"Byte":n=M(e);break;case"Kanji":n=T(e);break;default:throw"mode:"+t}s.push(n),a=null},c.isDark=function(e,t){if(e<0||i<=e||t<0||i<=t)throw new Error(e+","+t);return o[e][t]},c.getModuleCount=function(){return i},c.make=function(){if(n<1){for(var e=1;e<40;e++){for(var t=E.getRSBlocks(e,r),o=y(),i=0;i<s.length;i++){var a=s[i];o.put(a.getMode(),4),o.put(a.getLength(),v.getLengthInBits(a.getMode(),e)),a.write(o)}var l=0;for(i=0;i<t.length;i++)l+=t[i].dataCount;if(o.getLengthInBits()<=8*l)break}n=e}d(!1,function(){for(var e=0,t=0,n=0;n<8;n+=1){d(!0,n);var r=v.getLostPoint(c);(0==n||e>r)&&(e=r,t=n)}return t}())},c.createTableTag=function(e,t){e=e||2;var n="";n+='<table style="',n+=" border-width: 0px; border-style: none;",n+=" border-collapse: collapse;",n+=" padding: 0px; margin: "+(t=void 0===t?4*e:t)+"px;",n+='">',n+="<tbody>";for(var r=0;r<c.getModuleCount();r+=1){n+="<tr>";for(var o=0;o<c.getModuleCount();o+=1)n+='<td style="',n+=" border-width: 0px; border-style: none;",n+=" border-collapse: collapse;",n+=" padding: 0px; margin: 0px;",n+=" width: "+e+"px;",n+=" height: "+e+"px;",n+=" background-color: ",n+=c.isDark(r,o)?"#000000":"#ffffff",n+=";",n+='"/>';n+="</tr>"}return n+="</tbody>",n+="</table>"},c.createSvgTag=function(e,t){e=e||2,t=void 0===t?4*e:t;var n,r,o,i,a=c.getModuleCount()*e+2*t,s="";for(i="l"+e+",0 0,"+e+" -"+e+",0 0,-"+e+"z ",s+='<svg version="1.1" xmlns="http://www.w3.org/2000/svg"',s+=' width="'+a+'px"',s+=' height="'+a+'px"',s+=' viewBox="0 0 '+a+" "+a+'" ',s+=' preserveAspectRatio="xMinYMin meet">',s+='<rect width="100%" height="100%" fill="white" cx="0" cy="0"/>',s+='<path d="',r=0;r<c.getModuleCount();r+=1)for(o=r*e+t,n=0;n<c.getModuleCount();n+=1)c.isDark(r,n)&&(s+="M"+(n*e+t)+","+o+i);return s+='" stroke="transparent" fill="black"/>',s+="</svg>"},c.createImgTag=function(e,t){e=e||2,t=void 0===t?4*e:t;var n=c.getModuleCount()*e+2*t,r=t,o=n-t;return S(n,n,function(t,n){if(r<=t&&t<o&&r<=n&&n<o){var i=Math.floor((t-r)/e),a=Math.floor((n-r)/e);return c.isDark(a,i)?0:1}return 1})},c};e.stringToBytes=(e.stringToBytesFuncs={default:function(e){for(var t=[],n=0;n<e.length;n+=1){var r=e.charCodeAt(n);t.push(255&r)}return t}}).default,e.createStringToBytes=function(e,t){var n=function(){for(var n=k(e),r=function(){var e=n.read();if(-1==e)throw new Error;return e},o=0,i={};;){var a=n.read();if(-1==a)break;var s=r(),l=r()<<8|r();i[String.fromCharCode(a<<8|s)]=l,o+=1}if(o!=t)throw new Error(o+" != "+t);return i}(),r="?".charCodeAt(0);return function(e){for(var t=new Array,o=0;o<e.length;o+=1){var i=e.charCodeAt(o);if(i<128)t.push(i);else{var a=n[e.charAt(o)];"number"==typeof a?(255&a)==a?t.push(a):(t.push(a>>>8),t.push(255&a)):t.push(r)}}return t}};var t,n,r,o=1,i=2,a=4,s=8,l={L:1,M:0,Q:3,H:2},c=0,d=1,u=2,m=3,f=4,p=5,h=6,g=7,v=(t=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],r=function(e){for(var t=0;0!=e;)t+=1,e>>>=1;return t},(n={}).getBCHTypeInfo=function(e){for(var t=e<<10;r(t)-r(1335)>=0;)t^=1335<<r(t)-r(1335);return 21522^(e<<10|t)},n.getBCHTypeNumber=function(e){for(var t=e<<12;r(t)-r(7973)>=0;)t^=7973<<r(t)-r(7973);return e<<12|t},n.getPatternPosition=function(e){return t[e-1]},n.getMaskFunction=function(e){switch(e){case c:return function(e,t){return(e+t)%2==0};case d:return function(e,t){return e%2==0};case u:return function(e,t){return t%3==0};case m:return function(e,t){return(e+t)%3==0};case f:return function(e,t){return(Math.floor(e/2)+Math.floor(t/3))%2==0};case p:return function(e,t){return e*t%2+e*t%3==0};case h:return function(e,t){return(e*t%2+e*t%3)%2==0};case g:return function(e,t){return(e*t%3+(e+t)%2)%2==0};default:throw new Error("bad maskPattern:"+e)}},n.getErrorCorrectPolynomial=function(e){for(var t=$([1],0),n=0;n<e;n+=1)t=t.multiply($([1,b.gexp(n)],0));return t},n.getLengthInBits=function(e,t){if(1<=t&&t<10)switch(e){case o:return 10;case i:return 9;case a:case s:return 8;default:throw new Error("mode:"+e)}else if(t<27)switch(e){case o:return 12;case i:return 11;case a:return 16;case s:return 10;default:throw new Error("mode:"+e)}else{if(!(t<41))throw new Error("type:"+t);switch(e){case o:return 14;case i:return 13;case a:return 16;case s:return 12;default:throw new Error("mode:"+e)}}},n.getLostPoint=function(e){for(var t=e.getModuleCount(),n=0,r=0;r<t;r+=1)for(var o=0;o<t;o+=1){for(var i=0,a=e.isDark(r,o),s=-1;s<=1;s+=1)if(!(r+s<0||t<=r+s))for(var l=-1;l<=1;l+=1)o+l<0||t<=o+l||0==s&&0==l||a==e.isDark(r+s,o+l)&&(i+=1);i>5&&(n+=3+i-5)}for(r=0;r<t-1;r+=1)for(o=0;o<t-1;o+=1){var c=0;e.isDark(r,o)&&(c+=1),e.isDark(r+1,o)&&(c+=1),e.isDark(r,o+1)&&(c+=1),e.isDark(r+1,o+1)&&(c+=1),0!=c&&4!=c||(n+=3)}for(r=0;r<t;r+=1)for(o=0;o<t-6;o+=1)e.isDark(r,o)&&!e.isDark(r,o+1)&&e.isDark(r,o+2)&&e.isDark(r,o+3)&&e.isDark(r,o+4)&&!e.isDark(r,o+5)&&e.isDark(r,o+6)&&(n+=40);for(o=0;o<t;o+=1)for(r=0;r<t-6;r+=1)e.isDark(r,o)&&!e.isDark(r+1,o)&&e.isDark(r+2,o)&&e.isDark(r+3,o)&&e.isDark(r+4,o)&&!e.isDark(r+5,o)&&e.isDark(r+6,o)&&(n+=40);var d=0;for(o=0;o<t;o+=1)for(r=0;r<t;r+=1)e.isDark(r,o)&&(d+=1);return n+=Math.abs(100*d/t/t-50)/5*10},n),b=function(){for(var e=new Array(256),t=new Array(256),n=0;n<8;n+=1)e[n]=1<<n;for(n=8;n<256;n+=1)e[n]=e[n-4]^e[n-5]^e[n-6]^e[n-8];for(n=0;n<255;n+=1)t[e[n]]=n;var r={glog:function(e){if(e<1)throw new Error("glog("+e+")");return t[e]},gexp:function(t){for(;t<0;)t+=255;for(;t>=256;)t-=255;return e[t]}};return r}();function $(e,t){if(void 0===e.length)throw new Error(e.length+"/"+t);var n=function(){for(var n=0;n<e.length&&0==e[n];)n+=1;for(var r=new Array(e.length-n+t),o=0;o<e.length-n;o+=1)r[o]=e[o+n];return r}(),r={getAt:function(e){return n[e]},getLength:function(){return n.length},multiply:function(e){for(var t=new Array(r.getLength()+e.getLength()-1),n=0;n<r.getLength();n+=1)for(var o=0;o<e.getLength();o+=1)t[n+o]^=b.gexp(b.glog(r.getAt(n))+b.glog(e.getAt(o)));return $(t,0)},mod:function(e){if(r.getLength()-e.getLength()<0)return r;for(var t=b.glog(r.getAt(0))-b.glog(e.getAt(0)),n=new Array(r.getLength()),o=0;o<r.getLength();o+=1)n[o]=r.getAt(o);for(o=0;o<e.getLength();o+=1)n[o]^=b.gexp(b.glog(e.getAt(o))+t);return $(n,0).mod(e)}};return r}var E=function(){var e=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12,7,37,13],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],t=function(e,t){var n={};return n.totalCount=e,n.dataCount=t,n},n={};return n.getRSBlocks=function(n,r){var o=function(t,n){switch(n){case l.L:return e[4*(t-1)+0];case l.M:return e[4*(t-1)+1];case l.Q:return e[4*(t-1)+2];case l.H:return e[4*(t-1)+3];default:return}}(n,r);if(void 0===o)throw new Error("bad rs block @ typeNumber:"+n+"/errorCorrectionLevel:"+r);for(var i=o.length/3,a=new Array,s=0;s<i;s+=1)for(var c=o[3*s+0],d=o[3*s+1],u=o[3*s+2],m=0;m<c;m+=1)a.push(t(d,u));return a},n}(),y=function(){var e=new Array,t=0,n={getBuffer:function(){return e},getAt:function(t){var n=Math.floor(t/8);return 1==(e[n]>>>7-t%8&1)},put:function(e,t){for(var r=0;r<t;r+=1)n.putBit(1==(e>>>t-r-1&1))},getLengthInBits:function(){return t},putBit:function(n){var r=Math.floor(t/8);e.length<=r&&e.push(0),n&&(e[r]|=128>>>t%8),t+=1}};return n},w=function(e){var t=o,n=e,r={getMode:function(){return t},getLength:function(e){return n.length},write:function(e){for(var t=n,r=0;r+2<t.length;)e.put(i(t.substring(r,r+3)),10),r+=3;r<t.length&&(t.length-r==1?e.put(i(t.substring(r,r+1)),4):t.length-r==2&&e.put(i(t.substring(r,r+2)),7))}},i=function(e){for(var t=0,n=0;n<e.length;n+=1)t=10*t+a(e.charAt(n));return t},a=function(e){if("0"<=e&&e<="9")return e.charCodeAt(0)-"0".charCodeAt(0);throw"illegal char :"+e};return r},C=function(e){var t=i,n=e,r={getMode:function(){return t},getLength:function(e){return n.length},write:function(e){for(var t=n,r=0;r+1<t.length;)e.put(45*o(t.charAt(r))+o(t.charAt(r+1)),11),r+=2;r<t.length&&e.put(o(t.charAt(r)),6)}},o=function(e){if("0"<=e&&e<="9")return e.charCodeAt(0)-"0".charCodeAt(0);if("A"<=e&&e<="Z")return e.charCodeAt(0)-"A".charCodeAt(0)+10;switch(e){case" ":return 36;case"$":return 37;case"%":return 38;case"*":return 39;case"+":return 40;case"-":return 41;case".":return 42;case"/":return 43;case":":return 44;default:throw"illegal char :"+e}};return r},M=function(t){var n=a,r=e.stringToBytes(t),o={getMode:function(){return n},getLength:function(e){return r.length},write:function(e){for(var t=0;t<r.length;t+=1)e.put(r[t],8)}};return o},T=function(t){var n=s,r=e.stringToBytesFuncs.SJIS;if(!r)throw"sjis not supported.";!function(e,t){var n=r("友");if(2!=n.length||38726!=(n[0]<<8|n[1]))throw"sjis not supported."}();var o=r(t),i={getMode:function(){return n},getLength:function(e){return~~(o.length/2)},write:function(e){for(var t=o,n=0;n+1<t.length;){var r=(255&t[n])<<8|255&t[n+1];if(33088<=r&&r<=40956)r-=33088;else{if(!(57408<=r&&r<=60351))throw"illegal char at "+(n+1)+"/"+r;r-=49472}r=192*(r>>>8&255)+(255&r),e.put(r,13),n+=2}if(n<t.length)throw"illegal char at "+(n+1)}};return i},x=function(){var e=new Array,t={writeByte:function(t){e.push(255&t)},writeShort:function(e){t.writeByte(e),t.writeByte(e>>>8)},writeBytes:function(e,n,r){n=n||0,r=r||e.length;for(var o=0;o<r;o+=1)t.writeByte(e[o+n])},writeString:function(e){for(var n=0;n<e.length;n+=1)t.writeByte(e.charCodeAt(n))},toByteArray:function(){return e},toString:function(){var t="";t+="[";for(var n=0;n<e.length;n+=1)n>0&&(t+=","),t+=e[n];return t+="]"}};return t},k=function(e){var t=e,n=0,r=0,o=0,i={read:function(){for(;o<8;){if(n>=t.length){if(0==o)return-1;throw new Error("unexpected end of file./"+o)}var e=t.charAt(n);if(n+=1,"="==e)return o=0,-1;e.match(/^\s$/)||(r=r<<6|a(e.charCodeAt(0)),o+=6)}var i=r>>>o-8&255;return o-=8,i}},a=function(e){if(65<=e&&e<=90)return e-65;if(97<=e&&e<=122)return e-97+26;if(48<=e&&e<=57)return e-48+52;if(43==e)return 62;if(47==e)return 63;throw new Error("c:"+e)};return i},A=function(e,t){var n=e,r=t,o=new Array(e*t),i={setPixel:function(e,t,r){o[t*n+e]=r},write:function(e){e.writeString("GIF87a"),e.writeShort(n),e.writeShort(r),e.writeByte(128),e.writeByte(0),e.writeByte(0),e.writeByte(0),e.writeByte(0),e.writeByte(0),e.writeByte(255),e.writeByte(255),e.writeByte(255),e.writeString(","),e.writeShort(0),e.writeShort(0),e.writeShort(n),e.writeShort(r),e.writeByte(0);var t=a(2);e.writeByte(2);for(var o=0;t.length-o>255;)e.writeByte(255),e.writeBytes(t,o,255),o+=255;e.writeByte(t.length-o),e.writeBytes(t,o,t.length-o),e.writeByte(0),e.writeString(";")}},a=function(e){for(var t=1<<e,n=1+(1<<e),r=e+1,i=s(),a=0;a<t;a+=1)i.add(String.fromCharCode(a));i.add(String.fromCharCode(t)),i.add(String.fromCharCode(n));var l,c,d,u=x(),m=(l=u,c=0,d=0,{write:function(e,t){if(e>>>t!=0)throw new Error("length over");for(;c+t>=8;)l.writeByte(255&(e<<c|d)),t-=8-c,e>>>=8-c,d=0,c=0;d|=e<<c,c+=t},flush:function(){c>0&&l.writeByte(d)}});m.write(t,r);var f=0,p=String.fromCharCode(o[f]);for(f+=1;f<o.length;){var h=String.fromCharCode(o[f]);f+=1,i.contains(p+h)?p+=h:(m.write(i.indexOf(p),r),i.size()<4095&&(i.size()==1<<r&&(r+=1),i.add(p+h)),p=h)}return m.write(i.indexOf(p),r),m.write(n,r),m.flush(),u.toByteArray()},s=function(){var e={},t=0,n={add:function(r){if(n.contains(r))throw new Error("dup key:"+r);e[r]=t,t+=1},size:function(){return t},indexOf:function(t){return e[t]},contains:function(t){return void 0!==e[t]}};return n};return i},S=function(e,t,n,r){for(var o=A(e,t),i=0;i<t;i+=1)for(var a=0;a<e;a+=1)o.setPixel(a,i,n(a,i));var s=x();o.write(s);for(var l,c,d,u,m,f,p,h=(l=0,c=0,d=0,u="",f=function(e){u+=String.fromCharCode(p(63&e))},p=function(e){if(e<0);else{if(e<26)return 65+e;if(e<52)return e-26+97;if(e<62)return e-52+48;if(62==e)return 43;if(63==e)return 47}throw new Error("n:"+e)},(m={}).writeByte=function(e){for(l=l<<8|255&e,c+=8,d+=1;c>=6;)f(l>>>c-6),c-=6},m.flush=function(){if(c>0&&(f(l<<6-c),l=0,c=0),d%3!=0)for(var e=3-d%3,t=0;t<e;t+=1)u+="="},m.toString=function(){return u},m),g=s.toByteArray(),v=0;v<g.length;v+=1)h.writeByte(g[v]);h.flush();var b="";return b+="<img",b+=' src="',b+="data:image/gif;base64,",b+=h,b+='"',b+=' width="',b+=e,b+='"',b+=' height="',b+=t,b+='"',r&&(b+=' alt="',b+=r,b+='"'),b+="/>"};return e}();qrcode.stringToBytesFuncs["UTF-8"]=function(e){return function(e){for(var t=[],n=0;n<e.length;n++){var r=e.charCodeAt(n);r<128?t.push(r):r<2048?t.push(192|r>>6,128|63&r):r<55296||r>=57344?t.push(224|r>>12,128|r>>6&63,128|63&r):(n++,r=65536+((1023&r)<<10|1023&e.charCodeAt(n)),t.push(240|r>>18,128|r>>12&63,128|r>>6&63,128|63&r))}return t}(e)},function(e){"function"==typeof define&&define.amd?define([],e):"object"==typeof exports&&(module.exports=e())}(function(){return qrcode}),function(e){e.stringToBytes=e.stringToBytesFuncs["UTF-8"]}(qrcode),"undefined"!=typeof module&&"undefined"!=typeof exports&&module.exports===exports&&(module.exports="monospaced.qrcode"),angular.module("monospaced.qrcode",[]).directive("qrcode",["$window",function(e){var t=!!e.CanvasRenderingContext2D,n={L:"Low",M:"Medium",Q:"Quartile",H:"High"};return{restrict:"E",template:'<canvas class="qrcode"></canvas>',link:function(e,r,o){var i,a,s,l,c,d,u,m,f,p=r[0],h=r.find("canvas"),g=h[0],v=t?g.getContext("2d"):null,b="download"in o,$=o.href,E=b||$?document.createElement("a"):"",y=/^\s+|\s+$/g,w={foreground:"#000",background:"#fff"},C=function(e){w.foreground=e||w.foreground},M=function(e){w.background=e||w.background},T=function(e){a=Math.max(1,Math.min(parseInt(e,10),40))||5},x=function(e){s=e in n?e:"M"},k=function(e){if(e){l=e.replace(y,""),(m=qrcode(a,s)).addData(l);try{m.make()}catch(n){var t;if(a>=40)throw new Error("Data is too long",n);return T(t=a+1),console.warn("qrcode version is too low and has been incremented to",t),void k(e)}i=!1,d=m.getModuleCount()}},A=function(e){c=parseInt(e,10)||2*d,u=c/d,g.width=g.height=c},S=function(){if(m){if(i)return E&&(E.removeAttribute("download"),E.title="",E.href="#_"),t||(p.innerHTML='<img src width="'+c+'"height="'+c+'"class="qrcode">'),void e.$emit("qrcode:error",i);if(b&&(p.download="qrcode.png",p.title="Download QR code"),t){if(function(e,t,n,r,o){for(var i=0;i<n;i++)for(var a=0;a<n;a++){var s=Math.ceil((a+1)*r)-Math.floor(a*r),l=Math.ceil((i+1)*r)-Math.floor(i*r);e.fillStyle=t.isDark(i,a)?o.foreground:o.background,e.fillRect(Math.round(a*r),Math.round(i*r),s,l)}}(v,m,d,u,w),b)return void(p.href=g.toDataURL("image/png"))}else if(p.innerHTML=m.createImgTag(u,0),(f=r.find("img")).addClass("qrcode"),b)return void(p.href=f[0].src);$&&(p.href=$)}};E&&(E.className="qrcode-link",h.wrap(E),p=p.firstChild),C(o.color),M(o.background),T(o.version),x(o.errorCorrectionLevel),A(o.size),o.$observe("version",function(e){e&&(T(e),k(l),A(c),S())}),o.$observe("errorCorrectionLevel",function(e){e&&(x(e),k(l),A(c),S())}),o.$observe("data",function(e){e&&(k(e),A(c),S())}),o.$observe("size",function(e){e&&(A(e),S())}),o.$observe("color",function(e){e&&(C(e),S())}),o.$observe("background",function(e){e&&(M(e),S())}),o.$observe("href",function(e){e&&($=e,S())})}}}]);"use strict";function loginController(e,t,n,r,o,i,a,s,l,c,d,u){e.config=i,e.sessionData={},e.formError=!1,e.formErrorMsg="",e.spinnerVisible=!1,e.trubleLoggin=!0,e.troubleLoggginContainer=!1,e.showPass=!1,e.showNewHeader=!1,e.emailFieldDisable=!1,e.isIvrFlow=!1,e.diyLoginBtnDisabled=!1,e.autofillFlag=!1,e.intiatedBool=!0,e.formNew={},e.loginVia="email",e.passwordType="password",e.troubleLoggin=function(){if(e.trubleLoggin=!e.trubleLoggin,e.troubleLoggginContainer=!e.troubleLoggginContainer,!e.trubleLoggin){s.gaDataLayer({event:"custom_event",screenName:"auth-init/login/otherLoginIssues",event_category:"login","event-label":"",event_action:"other_login_issue_clicked"}),o(function(){s.gaDataLayer({event:"custom_event",screenName:"auth-init/login/otherLoginIssues",event_category:"login","event-label":"",event_action:"other_login_issue_loaded"})})}},e.redirect=function(e){"myaccount"==e?t.location.href="https://paytm.com/care/myaccount/":"ticket"==e&&"mall-html5"==g?t.location.href="https://paytmmall.com/care/ticket":"ticket"==e&&"mall-html5"!=g&&(t.location.href="https://paytm.com/care/ticket/")},e.helpMeLogin=function(){e.trubleLoggin=!e.trubleLoggin,e.troubleLoggginContainer=!e.troubleLoggginContainer,e.showNewHeader=!e.showNewHeader};var m=navigator.userAgent;-1==m.indexOf("MSIE 8")&&-1==m.indexOf("MSIE 9")||(r.isIE=!0);var f="",p=s.getParameterByName("mobile-prefill"),h=s.getParameterByName("email-prefill");e.triggerQRGa=function(){s.gaDataLayer({event:"custom_event",screenName:"auth-init/QRlogin",event_category:"login","event-label":"",event_action:"Scan_QR_Code"})};var g=e.subTheme;function v(){if(!(e.sessionData.errorMessage&&"null"!=e.sessionData.errorMessage||e.sessionData.showOtpScreen)){s.gaDataLayer({event:"custom_event",vertical_name:"oauth",screenName:"/login",event_category:"login",event_action:"login_signup_popup_loaded",event_label:""})}}function b(){"sellerpanel"===e.subTheme&&(e.emailFieldDisable=!0)}o(function(){"MOBILE"==e.sessionData.login_via&&(e.loginVia="mobile"),"mp-web"!=g&&"mp-mall"!=g||1!=e.qrLogin&&"true"!=e.qrLogin?"mp-web"!=g&&"mp-mall"!=g||null!=e.qrLogin&&"false"!=e.qrLogin?(e.toggleQRAndLogin=!1,e.sessionData.defaultWebLoginPage=""):(e.toggleQRAndLogin=!1,e.sessionData.defaultWebLoginPage="",v()):"QR"==e.sessionData.defaultWebLoginPage&&null==u.get()?(e.toggleQRAndLogin=!0,u.set(!0),e.sessionData.defaultWebLoginPage="",v()):"LOGIN_FORM"==e.sessionData.defaultWebLoginPage&&null==u.get()?(e.toggleQRAndLogin=!1,u.set(!1),e.sessionData.defaultWebLoginPage="",v()):"QR"!=e.sessionData.defaultWebLoginPage&&"LOGIN_FORM"!=e.sessionData.defaultWebLoginPage&&null==u.get()?(e.toggleQRAndLogin=!1,u.set(!1),e.sessionData.defaultWebLoginPage="",v()):(e.toggleQRAndLogin=u.get(),v())}),e.toggleQRLoginFormView=function(){e.toggleQRAndLogin=!e.toggleQRAndLogin,u.set(e.toggleQRAndLogin)},e.otpOptionAvailable=i.loginHi[g].otpOptionAvailable,e.showWalletContainer=i.loginHi[g].showWalletContainer,e.showImage=i.signUpHi[g].showImage,e.text=i.loginHi[g].text,e.text.loginText=i.loginHi[g].text.loginBtnText,e.text.TandCText=i.loginHi[g].text.TandCText,e.text.loginLink=i.loginHi[g].text.loginLink,e.text.signupLink=i.loginHi[g].text.signupLink,e.header=i.loginHi[g].header,e.header.text="function"==typeof e.header.text.$$unwrapTrustedValue?e.header.text:c.trustAsHtml(e.header.text),"netbanking"!=g&&"partner"!=g||(e.text.headerText=i.loginHi[g].text.headerText),"true"==(s.getParameterByName("subscription")||"")&&"airtelhi"==g&&(e.header.text=l.getAirtelCustomHeaderMessage()),"null"==r.minKycState||void 0==r.minKycState||"mp-web"!=e.subTheme&&"mp-mall"!=e.subTheme&&"mp-html5"!=e.subTheme&&"mall-html5"!=e.subTheme||s.displayMinKycFlow({minKycState:r.minKycState,isKycDocMandate:r.isKycDocMandate,pubKey:r.pubKey,redirectUri:r.min_kyc_redirect_uri,minKycMandate:!1,showRbiGuidelines:!0}),"diy"==g&&parent.postMessage("open-oauth","*"),o(function(){var t,n;"mp-web"==g&&e.sessionData.preFillPhoneNumber&&""!=e.sessionData.preFillPhoneNumber&&(e.sessionData.email=e.sessionData.preFillPhoneNumber,e.preFillPhoneNumberFlag=!0),l.getDisplayTroubleLogin()&&(e.troubleLoggin(),l.setDisplayTroubleLogin(!1)),e.formNew.loginForm&&e.formNew.loginForm.$setPristine(),e.errorsShown&&(e.sessionData.isInvalidUserNamePassword=!1),p&&s.mobileRgx(p)?(e.sessionData.email=p,e.formNew.loginForm.username.$dirty=!0,f=f+"&mobile-prefill="+p,b()):h&&s.emailRgx(h)&&(e.sessionData.email=h,e.formNew.loginForm.username.$dirty=!0,f=f+"&email-prefill="+h,b()),e.sessionData.isInvalidUserNamePassword&&(t={event:"custom_event",vertical_name:"oauth",screenName:"/login",event_category:"login",event_action:"login_proceed_error",event_label:e.sessionData.errorMessage,event_label2:"",user_id:""},n={event:"custom_event",vertical_name:"oauth",screenName:"/login",event_category:"login",event_action:"login_unsuccessful",event_label:"",user_id:""},s.gaDataLayer(t),s.gaDataLayer(n)),e.otpVerify="true"===e.sessionData.minKycMandate},0),e.showPassClick=function(){e.showPass=!e.showPass;var t={vertical_name:"oauth",screenName:"auth-init/login/password",event_category:"login",event_action:e.showPass?"show_clicked":"hide_clicked",event_label:"",event_label2:"",user_id:""};s.gaDataLayer(t)},e.hideErrorMessage=function(){"ump2"!=g&&"sup"!=g&&"ad-manager"!=g||(e.sessionData.errorMessage="")},e.changeLoginVia=function(t){e.sessionData.email="",e.loginVia=t},e.changePassowrdType=function(t){e.passwordType=t},e.submitLoginForm=function(n){var r=e.formNew.loginForm;if(r.username.$setViewValue(r.username.$viewValue),r.password.$setViewValue(r.password.$viewValue),r.username.$error.required||r.password.$error.required)return e.showRequired=!0,void(e.spinnerVisible=!1);if(s.checkValidation(e.sessionData.email,r.username),"panel"==e.subTheme||"travel"==e.subTheme){if(r.username.$error.emailValid||r.password.$invalid)return void(e.spinnerVisible=!1)}else if(s.isMobile(e.sessionData.email)&&r.username.$error.mobileValid||!s.isMobile(e.sessionData.email)&&r.username.$error.emailValid||r.password.$invalid)return void(e.spinnerVisible=!1);e.spinnerVisible=!0;var o=document.getElementsByName("fakepasswordremembered"),i=document.getElementsByName("fakeusernameremembered");o.length>0&&(o[0].value=""),i.length>0&&(i[0].value=""),"diy"===e.subTheme&&(e.diyLoginBtnDisabled=!0),r=document.forms[0];var a="/oauth2/authorize?"+e.sessionData.registerRedirectParams;"mp-web"==g&&e.sessionData.preFillPhoneNumber&&""!=e.sessionData.preFillPhoneNumber&&(a=a+"&phoneNumber="+e.sessionData.preFillPhoneNumber),r.action=a,r.submit(),e.location=t.location.href},e.callSignUp=function(){r.errorsShown=!0,n.path("/signup")},e.forgetPasswordClick=function(){s.gaDataLayer({event:"custom_event",vertical_name:"oauth",screenName:"/login",event_category:"login",event_action:"forgot_password_clicked",event_label:""}),"travel"==g||"fastag"==g||"ad-manager"==g?n.path("/forgetPassword"):i.loginHi[g].blockForgotPassword?n.path("/displayMessage"):n.path("/forgetPassword")},e.goToTroubleLogginIssues=function(){e.isIvrFlow=!1,"mp-html5"==g||"mall-html5"==g||"mp-web"==g||"mp-mall"==g||"panel"==g||"sellerpanel"==g?e.troubleLoggginContainer=!0:(e.trubleLoggin=!0,e.troubleLoggginContainer=!1)},e.verifyFields=function(){var e=this.sessionData.email;return!(!s.mobileRgx(e)&&!s.emailRgx(e))||(this.formError=!0,this.formErrorMsg="Please enter a valid email id or 10 digit phone number.",!1)},e.hideBEMsg=function(t){e.formErrorMsg=""},e.loginByOtpClick=function(){if(e.formNew.loginForm.$valid||"scanandpay"!=g){this.sessionData.isInvalidUserNamePassword=!1;var t=e.formNew.loginForm;if(t.username.$setViewValue(t.username.$viewValue),s.checkValidation(e.sessionData.email,t.username),!(s.isMobile(e.sessionData.email)&&t.username.$error.mobileValid||!s.isMobile(e.sessionData.email)&&t.username.$error.emailValid)){var o=this.sessionData.email;e.spinnerVisible=!0,a.generateOtp(o,function(t){e.spinnerVisible=!1,e.OTPState=t.state,"FAILURE"==t.status?(e.formError=!0,"mp-html5"!=g&&"mall-html5"!=g?e.formErrorMsg=t.message:e.sessionData.formFailurerMsg=t.message):(l.setMessage(t.message),e.formError=!1,r.sessionData=e.sessionData,r.sessionData.OTPState=e.OTPState,n.path("/otp/login"),r.errorsShown=!0)},function(t){e.spinnerVisible=!1,e.formError=!0,e.formErrorMsg=l.getAjaxErrorMessage()})}}else e.showRequired=!0}}function loginOtpController(e,t,n,r,o,i,a,s,l,c,d){e.spinnerVisible=!1,e.spinnerVisibleMobile=!1,e.otpData={},e.formError=!1,e.formErrorMsg="",e.otpMessage=a.getMessage(),e.forgotPassConfMessage=a.getForgotPasswordConfirmationMessage(),e.submitButtonText="Login",e.codeForgotPassword="",e.otpValue="";var u=e.subTheme;e.otpForgotPasswordEmailOnly=!a.getIsMobileRegistered(),e.emailMask=a.getMaskEmail(),e.showKnowMoreOtpContainer=o.loginHi[u].showKnowMoreOtpContainer,e.isLeftAlignBack=o.loginHi[u].isLeftAlignBack,e.header={},angular.copy(o.loginHi[u].header,e.header),"ump"===u?e.header.text="function"==typeof e.header.text.$$unwrapTrustedValue?e.header.text:s.trustAsHtml(e.header.text):(e.header.text="",e.header.imagePath="");var m="login",f=r.redirectFrom;if("mp-web"!=u&&"mp-mall"!=u||!e.forgotPassConfMessage||(e.otpMessageNew=e.otpMessage+e.forgotPassConfMessage.split(",")[0]),"login"!=f||e.sessionData&&e.sessionData.email||n.path("/login"),"forgotPassword"==f&&(e.forgotPasswordMessage=a.getForgotPasswordMessage(),e.submitButtonText="Verify",m="forgotPassword",e.codeForgotPassword=a.getCodeForgotPassword(),e.otpForgotPasswordEmailOnly||e.codeForgotPassword||n.path("/forgetPassword")),"login"==m&&(e.showTermsConditions=!0),"scanandpay"==u){e.resendOtpOption=!0,e.isResendOtpEnabled=!1,e.secondCount=30;var p=function(){e.secondCount=e.secondCount-1,e.secondCountString=e.secondCount<10?"0"+e.secondCount.toString():e.secondCount.toString(),0!=e.secondCount?d(p,1e3):e.isResendOtpEnabled=!0};e.resendOtpOption&&d(p,1e3)}e.resendotpClick=function(){e.spinnerVisible="fastag"!=u,e.resendOtpOption&&"scanandpay"==u&&(e.isResendOtpEnabled=!1,e.secondCount=60,d(p,1e3)),"login"==m?i.generateOtp(e.sessionData.email,function(t){e.spinnerVisible=!1,e.OTPState=t.state,"FAILURE"==t.status?(e.formError=!0,e.formErrorMsg=t.message):(e.otpMessage=t.message,e.formError=!1,e.sessionData.OTPState=e.OTPState,e.otpResendMessage=!0)},function(t){e.spinnerVisible=!1,e.formError=!0,e.formErrorMsg=a.getAjaxErrorMessage()}):i.resendOtpForgotPassword(e.sessionData.email,"both",e.codeForgotPassword,function(t){e.spinnerVisible=!1,"FAILURE"==t.status?(e.formError=!0,e.formErrorMsg=t.message):(e.otpMessage=t.message,e.formError=!1,e.codeForgotPassword=t.code,e.otpResendMessage=!0)},function(t){e.spinnerVisible=!1,e.formError=!0;var n="";n=t.error?t.error:a.getAjaxErrorMessage(),e.formErrorMsg=n})},e.verifyOtpClick=function(r){var o,s=e.otpForm;(s.otp.$setViewValue(s.otp.$viewValue),s.otp.$error.pattern&&(e.otpInvalid=!0),s.otp.$invalid)?e.submitted=!0:(e.spinnerVisibleMobile=!0,e.spinnerVisible=!0,o="login"==m?{otp:r.otpValue,state:e.sessionData.OTPState,minKyc:e.sessionData.minKycMandate}:{otp:r.otpValue,code:e.codeForgotPassword},i.verifyOtp(o,m,function(r){e.spinnerVisible=!1,e.spinnerVisibleMobile=!1,"FAILURE"!=r.status?200==r.responseCode?l.displayMinKycFlow({minKycState:r.minKycState,redirectUri:r.redirectUri,isKycDocMandate:r.isKycDocMandate,pubKey:r.pubKey,minKycMandate:"true"==c.sessionData.minKycMandate,showRbiGuidelines:!0}):201==r.responseCode?(e.formError=!1,n.path("/minKycSubmitted")):202==r.responseCode?l.displayMinKycFlow({minKycState:r.minKycState,redirectUri:r.redirectUri,isKycDocMandate:r.isKycDocMandate,pubKey:r.pubKey,minKycMandate:!1,showRbiGuidelines:!0}):r.redirectUri&&"login"==m?(e.formError=!1,t.location=r.redirectUri):(e.formError=!1,a.setCodeForgotPassword(r.code),n.path("/changePassword")):(e.formError=!0,e.formErrorMsg=r.message)},function(t){e.spinnerVisible=!1,e.formError=!0,e.formErrorMsg=a.getAjaxErrorMessage()}))}}function forgetPasswordController(e,t,n,r,o,i,a,s){e.spinnerVisible=!1,e.showNotification=!1,e.formError=!1,e.formErrorMsg="",e.sessionData={},e.emailPrefilled="";var l=e.subTheme;e.objData=r.loginHi[l],e.newForm={},e.message={error:""},e.showView=1,e.forgotEmail="",e.header={},angular.copy(r.loginHi[l].header,e.header),"ump"===l?e.header.text="function"==typeof e.header.text.$$unwrapTrustedValue?e.header.text:s.trustAsHtml(e.header.text):(e.header.text="",e.header.imagePath="","dashboard"!==l&&"ump2"!==l&&"sup"!==l&&"ad-manager"!==l||(e.emailPrefilled=i.getEmail(),e.header=e.objData.header)),e.changeView=function(t){e.showView=t};var c=navigator.userAgent;-1==c.indexOf("MSIE 8")&&-1==c.indexOf("MSIE 9")||(n.isIE=!0),o.getIVRData().then(function(t){"SUCCESS"===t.status?e.forgetPasswordIvrNumberNew=t.data&&t.data.forget_password_ivr_number?t.data.forget_password_ivr_number:"0120-4888488":e.forgetPasswordIvrNumberNew="0120-4888488"},function(t){e.forgetPasswordIvrNumberNew="0120-4888488"}),e.redirect=function(){t.path("/login")},e.getPasswordClick=function(){e.formErrorMobile="";var n=e.newForm.forgetPasswordForm;n.username.$setViewValue(n.username.$viewValue),("ump2"!=l&&"sup"!=l&&"fastag"!=l&&"ad-manager"!=l||/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/.test(e.sessionData.email))&&(n.username.$error.required?e.showRequired=!0:a.isMobile(e.sessionData.email)&&n.username.$error.mobileValid||!a.isMobile(e.sessionData.email)&&n.username.$error.emailValid||("mp-html5"!=e.subTheme&&"mall-html5"!=e.subTheme?e.spinnerVisible=!0:e.spinnerVisibleMobile=!0,!a.isMobile(e.sessionData.email)||"netbanking"!=e.subTheme&&"partner"!=e.subTheme?o.forgotPasswordEmailOnly(l,{username:e.sessionData.email,csrfToken:e.sessionData.csrfToken},function(n){i.setForgotPasswordMessage(""),i.setEmail(""),e.spinnerVisible=!1,"SUCCESS"==n.status?"fastag"==e.subTheme?(e.showView=3,e.forgotEmail=e.sessionData.email,e.sessionData.email=""):"dashboard"==e.subTheme||"ump2"==e.subTheme||"sup"==e.subTheme||"travel"==e.subTheme||"netbanking"==e.subTheme||"partner"==e.subTheme||"ad-manager"==e.subTheme?"FP_115"==n.code?t.url("/displayMessage"):(i.setEmail(e.sessionData.email),i.setPhone(n.phoneNumber),t.url("/emailResetOtp")):(i.setForgotPasswordMessage(n.message),t.url("/displayMessage")):(e.formError=!0,e.formErrorMsg=n.error)},function(t){e.spinnerVisible=!1,e.formError=!0,e.formErrorMsg=t.error}):t.url("/displayMessage")))},e.forgotPasswordSubmit=function(){e.spinnerVisible=!0;var n={loginId:e.sessionData.email,csrfToken:e.sessionData.csrfToken};o.forgotPasswordAPI(n,function(n){e.spinnerVisible=!1,i.setEmail(e.sessionData.email),"SUCCESS"==n.status?"fastag"==l?(e.showView=3,e.forgotEmail=e.sessionData.email,e.sessionData.email=""):"travel"==l?t.url("/emailResetOtp"):t.url("/message/"+l+"/forgot-password-message"):"travel"==l?(e.formError=!0,e.formErrorMsg=n.message):e.message.error=n.message},function(t){"travel"==l?(e.formError=!0,e.formErrorMsg=t.message):(e.spinnerVisible=!1,e.message.error=t.message)})}}function changePasswordController(e,t,n,r,o,i,a){e.passwordChangeComplete=!1,e.spinnerVisible=!1,e.sessionData={},e.code=i.getCodeForgotPassword(),e.header={};var s=e.subTheme;angular.copy(r.loginHi[s].header,e.header),"ump"===s?e.header.text="function"==typeof e.header.text.$$unwrapTrustedValue?e.header.text:a.trustAsHtml(e.header.text):(e.header.text="",e.header.imagePath=""),e.code||t.path("/forgotPassword"),e.changePasswordClick=function(){var r=e.changePasswordForm;if(r.newPassword.$setViewValue(r.newPassword.$viewValue),r.confirmPassword.$setViewValue(r.confirmPassword.$viewValue),r.confirmPassword.$invalid||r.newPassword.$invalid)e.showRequired=!0;else{if(e.sessionData.newPassword!==e.sessionData.confirmPassword)return this.formError=!0,void(this.formErrorMsg="Oops, these passwords do not match, please enter same password.");var a={code:e.code,password:e.sessionData.newPassword,confirmPassword:e.sessionData.confirmPassword};o.changePassword(a,function(r){e.spinnerVisible=!1,"SUCCESS"==r.status?(e.formError=!1,e.passwordChangeComplete=!0,n(function(){t.path("/login")},5e3)):(e.formError=!0,e.formErrorMsg=r.message)},function(t){e.spinnerVisible=!1,e.formError=!0;var n=t.message||i.getAjaxErrorMessage();e.formErrorMsg=n})}}}function signupController(e,t,n,r,o,i,a,s,l,c){l.getRefreshSignup()&&(l.setRefreshSignup(!1),window.location.reload()),e.config=i,e.sessionData={},e.genericError="",e.spinnerVisible=!1,e.spinnerVisibleMobile=!1,e.dobAgreement=!0,e.showPass=!1,e.parkedEmail=!1,e.intiatedBool=!0,e.formNew={},e.message={errorMessageAPI:"",passwordError:""};var d=navigator.userAgent;-1==d.indexOf("MSIE 8")&&-1==d.indexOf("MSIE 9")||(t.isIE=!0);var u="",m=a.getParameterByName("mobile-prefill"),f=a.getParameterByName("email-prefill");e.passwordType="password",e.confirmPasswordType="password",e.changePassowrdType=function(t,n){1==n?e.passwordType=t:e.confirmPasswordType=t},e.showPassClick=function(){e.showPass=!e.showPass;var t={vertical_name:"oauth",screenName:"auth-init/signup/password",event_category:"signup",event_action:e.showPass?"show_clicked":"hide_clicked",event_label:""};a.gaDataLayer(t)},o(function(){if(m&&a.mobileRgx(m)&&(e.sessionData.mobileNumber=m,e.formNew.signupForm.mobileNumber.$dirty=!0,u=u+"&mobile-prefill="+m),f&&a.emailRgx(f)&&(e.sessionData.email=f,e.formNew.signupForm.email.$dirty=!0,u=u+"&email-prefill="+f),l.getSignupData()){var t=e.formNew.signupForm;l.getSignupData().mobile&&(e.sessionData.mobileNumber=l.getSignupData().mobile,t.mobileNumber.$setViewValue(t.mobileNumber.$viewValue)),l.getSignupData().email&&(e.sessionData.email=l.getSignupData().email,t.email.$setViewValue(t.email.$viewValue)),l.getSignupData().password&&(e.sessionData.password=l.getSignupData().password,t.loginPassword.$setViewValue(t.loginPassword.$viewValue))}},0);var p=e.subTheme;e.showWalletContainer=i.signUpHi[p].showWalletContainer,e.showImage=i.signUpHi[p].showImage,e.signUpData=i.signUpHi[p],e.text={},e.text.mobileInputLabel=i.signUpHi[p].text.mobileInputLabel,e.text.passwordInputLabel=i.signUpHi[p].text.passwordInputLabel,e.text.signupText=i.signUpHi[p].text.signupBtnText,e.text.TandCText=i.signUpHi[p].text.TandCText,e.text.loginLink=i.loginHi[p].text.loginLink,e.text.signupLink=i.loginHi[p].text.signupLink,e.header=i.signUpHi[p].header,"true"==(a.getParameterByName("subscription")||"")&&"airtelhi"==p&&(e.header.text=l.getAirtelCustomHeaderMessage()),e.signupUser=function(){n.path("/merge")},e.finalizeAccountDetails=function(){n.path("/verify-otp")},e.callSignup=function(){e.parkedEmail=!1},e.signUpIntiatedGA=function(){if(e.intiatedBool){a.gaDataLayer({event:"custom_event",vertical_name:"oauth",screenName:"/signup",event_category:"signup",event_action:"signup_initiated",event_label:"",event_label2:"",user_id:""}),e.intiatedBool=!1}},e.submitSignupForm=function(){this.continueClick()},e.callLogin=function(){a.gaDataLayer({event:"custom_event",vertical_name:"oauth",screenName:"/oauth-otp",event_category:"login",event_action:"login_tab_clicked",event_label:""}),n.path("/login")},e.dobAgreementChange=function(){e.dobAgreement=!e.dobAgreement},e.submitSignupFormNew=function(){e.spinnerVisible=!0,l.getSignupData()&&(e.sessionData.csrfToken=l.getSignupData().csrfToken),s.registerOnlyEmail(e.sessionData.email,e.sessionData.password,e.sessionData.confirmPassword,e.sessionData.csrfToken).then(function(t){e.spinnerVisible=!1,"SUCCESS"==t.status?(l.setRefreshSignup(!0),l.setEmail(e.sessionData.email),n.url("/message/"+p+"/signup-message")):700==t.responseCode?e.message.passwordError=t.message:e.message.errorMessageAPI=t.message},function(){e.spinnerVisible=!1,e.message.errorMessageAPI=l.getAjaxErrorMessage()})},e.continueClick=function(){if(!1===e.dobAgreement)return e.genericError="You must be above 18 to signup.",!1;var o=e.formNew.signupForm;(l.getSignupData()&&l.getSignupData().mobile||o.mobileNumber.$setViewValue(o.mobileNumber.$viewValue),l.getSignupData()&&l.getSignupData().email||o.email.$setViewValue(o.email.$viewValue),l.getSignupData()&&l.getSignupData().password||o.loginPassword.$setViewValue(o.loginPassword.$viewValue),e.sessionData.mobileNumber&&a.checkValidation(e.sessionData.mobileNumber,o.mobileNumber),a.checkValidation(e.sessionData.email,o.email),o.loginPassword.$invalid||o.mobileNumber.$invalid||o.email.$invalid&&!o.email.$error.required)?e.showRequired=!0:"sellerpanel"===e.subTheme&&o.email.$invalid?e.showRequired=!0:(e.spinnerVisible=!0,e.spinnerVisibleMobile=!0,l.getSignupData()&&(e.sessionData.csrfToken=l.getSignupData().csrfToken),s.register(e.sessionData.email,e.sessionData.mobileNumber,e.sessionData.password,e.sessionData.csrfToken,e.dobAgreement).then(function(i){if(e.spinnerVisibleMobile=!1,e.spinnerVisible=!1,"SUCCESS"==i.status){var s={};s.csrfToken=i.csrfToken,s.email=i.email,s.mobile=i.mobile,s.password=e.sessionData.password,s.signupToken=i.signupToken,s.isMinKycRequiredWhileSignup=e.sessionData.isMinKycRequiredWhileSignup,l.setSignupData(s);var c={event:"custom_event",vertical_name:"oauth",screenName:"/signup",event_category:"signup",event_action:"create_account_button_clicked",event_label:"email_provided_"+(e.sessionData.email?"true":"false"),event_label2:"",user_id:""};a.gaDataLayer(c),n.path("/signupVerify")}else{switch(i.responseCode){case"750":r.location.reload();break;case"705":case"706":case"993":case"995":t.finalMessage=i.message,n.path("/redirect-page");break;case"701":case"702":case"703":case"716":case"761":e.sessionData.emailError=i.message;break;case"705":case"706":case"707":case"762":case"760":e.sessionData.mobileError=i.message;break;case"700":case"704":e.sessionData.passwordError=i.message;break;case"650":case"708":case"994":e.genericError=i.message;break;case"427":e.sessionData.passwordError=i.message;break;default:e.genericError=l.getAjaxErrorMessage()}"ump2"!=p&&"sup"!=p&&"ad-manager"!=p&&(e.sessionData.password=""),o.loginPassword.$setPristine();c={event:"custom_event",vertical_name:"oauth",screenName:"/signup",event_category:"signup",event_action:"create_account_error",event_label:i.message,event_label2:"",user_id:""};a.gaDataLayer(c)}},function(){e.spinnerVisible=!1,e.genericError=l.getAjaxErrorMessage()}))}}function signupVerifyController(e,t,n,r,o,i,a,s,l){var c=e.subTheme;function d(e){l(function(){n.location.href=e},1e3)}e.text={},e.text.loginLink=r.loginHi[c].text.loginLink,e.text.signupLink=r.loginHi[c].text.signupLink,e.showWalletContainer=r.loginHi[c].showWalletContainer,e.spinnerVisibleMobile=!1,e.sessionData={},e.sessionData.gender="male",e.otpResendMessage="",e.error={},e.header=r.signUpHi[c].header,e.isNameMandatory=!1,e.signupData=a.getSignupData(),e.signupData||t.path("/signup"),"true"==(o.getParameterByName("subscription")||"")&&"airtelhi"==c&&(e.header.text=a.getAirtelCustomHeaderMessage()),function(){var t=o.getParameterByName("mobile-prefill"),n=o.getParameterByName("email-prefill");""===t&&""===n&&"sellerpanel"===c&&(e.isNameMandatory=!0);o.gaDataLayer({event:"custom_event",vertical_name:"oauth",screenName:"/oauth-otp",event_category:"signup",event_action:"otp_screen_loaded",event_label:"",event_label2:"",user_id:""})}(),e.callLogin=function(){o.gaDataLayer({event:"custom_event",vertical_name:"oauth",screenName:"/oauth-otp",event_category:"login",event_action:"login_tab_clicked",event_label:""}),t.path("/login")},e.signupClick=function(){var n=e.signupVerifyForm;if(n.otp.$setViewValue(n.otp.$viewValue),n.otp.$invalid)e.showOtpError=!0;else if("sellerpanel"!=e.subTheme||!n.firstname.$invalid&&!n.lastName.$invalid){e.spinnerVisible=!0,e.spinnerVisibleMobile=!0;var r={};r.gender=e.sessionData.gender,e.sessionData.firstName&&(r.firstName=e.sessionData.firstName),e.sessionData.lastName&&(r.lastName=e.sessionData.lastName),i.registerVerify(e.sessionData.otpValue,e.signupData.signupToken,e.signupData.csrfToken,r,e.signupData.isMinKycRequiredWhileSignup).then(function(n){var r,i={event:"custom_event",vertical_name:"oauth",screenName:"/oauth-otp",event_category:"signup",event_action:"otp_confirm_button_clicked",event_label:"",event_label2:"",user_id:""};if(o.gaDataLayer(i),e.spinnerVisible=!1,e.spinnerVisibleMobile=!1,"FAILURE"==n.status){switch(n.responseCode){case"993":case"995":s.finalMessage=n.message,t.path("/redirect-page");break;case"709":e.error.otpError=n.message;break;case"461":e.error.firstNameError=n.message;break;case"463":e.error.lastNameError=n.message;break;case"710":t.path("/signup");break;case"708":case"716":case"708":case"707":case"467":case"703":case"714":case"430":case"994":case"760":e.error.genericError=n.message;break;default:e.error.genericError=a.getAjaxErrorMessage()}i={event:"custom_event",vertical_name:"oauth",screenName:"/oauth-otp",event_category:"signup",event_action:"otp_confirm_error",event_label:e.error.genericError,event_label2:"",user_id:""},r={event:"custom_event",vertical_name:"oauth",screenName:"/oauth-otp",event_category:"signup",event_action:"signup_unsuccessful",event_label:"",user_id:""},o.gaDataLayer(i),o.gaDataLayer(r)}else{var l=t.search();i={event:"custom_event",vertical_name:"oauth",screenName:"/oauth-otp",event_category:"signup",event_action:"signup_successful",event_label:"",user_id:"",acquisition_source:l.source||"",acquisition_medium:l.medium||"",acquisition_campaign:l.campaign||""},o.gaDataLayer(i),"14"===n.responseCode?(s.stateCode=n.state,t.path("/merge/phone")):"mp-web"!==e.subTheme&&"mp-mall"!==e.subTheme&&"mp-html5"!==e.subTheme&&"mall-html5"!==e.subTheme?d(n.redirectUri):n.minKycState&&n.pubKey?o.displayMinKycFlow({redirectUri:n.redirectUri,minKycState:n.minKycState,isKycDocMandate:n.isKycDocMandate,pubKey:n.pubKey,showRbiGuidelines:!1,minKycMandate:!1,paytmUserId:n.paytmUserId}):d(n.redirectUri)}},function(t){e.spinnerVisible=!1,e.error.genericError=a.getAjaxErrorMessage()})}else e.showOtpError=!0},e.resendOtpClick=function(){i.resendOtp(e.signupData.signupToken,function(t){"SUCCESS"==t.status?e.otpResendMessage=t.message:e.error.genericError=t.message},function(t){e.error.genericError=a.getAjaxErrorMessage()})},e.crosOtpNotificationFun=function(){document.getElementById("otp-notificationID").style.display="none"}}function verifyLoginOtpController(e,t,n,r,o,i,a){n(function(){e.confirmClearSession=!1,e.spinnerVisible=!1,e.spinnerVisibleMobile=!1,e.formError=!1,e.formErrorMsg="",e.otpMessage=i.getMessage(),e.submitButtonText="Login",e.otpData={otpDigit:[]},e.isOtpLogin=!0;var t=e.subTheme;if(e.otpObj={},e.newOTPmsgShow=!1,"mp-html5"==t||"mall-html5"==t||"dashboard"==t||"ump2"==t||"sup"==t||"ad-manager"==t?(e.header=r.loginHi[t].header,e.header.isExternal=!1,e.submitButtonText="Login Securely"):(e.header={},e.header.text="",e.header.imagePath=""),"mp-html5"==t||"mp-web"==t){o.gaDataLayer({event:"custom_event",vertical_name:"oauth",screenName:"/oauth-otp",event_category:"login",event_action:"otp_screen_loaded",event_label:"",event_label2:"",user_id:""})}e.showTermsConditions=!0,e.resendOtpOption=!0,e.isOtpByCall=!0,e.isResendOtpEnabled=!1,e.secondCount=30;var s=function(){e.secondCount=e.secondCount-1,e.secondCountString=e.secondCount<10?"0"+e.secondCount.toString():e.secondCount.toString(),0!=e.secondCount?n(s,1e3):e.isResendOtpEnabled=!0};e.resendOtpOption&&n(s,1e3),e.clearSessionConfirmation=function(){e.confirmClearSession=!0,e.confirmClearSessionStep1=!0,e.confirmClearSessionStep2=!1;o.gaDataLayer({event:"custom_event",vertical_name:"oauth",screenName:"/oauth-otp",event_category:"login",event_action:"logout_from_all_devices_clicked",event_label:""}),n(function(){o.gaDataLayer({event:"custom_event",vertical_name:"oauth",screenName:"/oauth-otp",event_category:"login",event_action:"logout_from_all_devices_loaded",event_label:""})})},e.clearSessionChoice=function(t){e.showClearSessionError="",t?a.clearSession(e.sessionData.otpLoginState,function(t){"SUCCESS"==t.status?"01"==t.responseCode&&(e.confirmClearSessionStep1=!1,e.confirmClearSessionStep2=!0):e.showClearSessionError=t.message},function(t){e.showClearSessionError=t.message}):(e.showClearSessionError="",e.confirmClearSession=!1,e.confirmClearSessionStep1=!1,e.confirmClearSessionStep2=!1);var n={event:"custom_event",vertical_name:"oauth",screenName:"/oauth-otp",event_category:"login",event_action:t?"ok_clicked":"cancel_clicked",event_label:""};o.gaDataLayer(n)},e.clearSessionChoiceStep2=function(){o.gaDataLayer({event:"custom_event",vertical_name:"oauth",screenName:"/oauth-otp",event_category:"login",event_action:"ok_confirm_clicked",event_label:""}),window.location.reload()},e.resendotpClick=function(r=!1){"agreement"==t?(e.otpForm.one.$setPristine(),e.otpForm.two.$setPristine(),e.otpForm.three.$setPristine(),e.otpForm.four.$setPristine(),e.otpForm.five.$setPristine(),e.otpForm.six.$setPristine()):"netbanking"==t||"partner"==t?[0,1,2,3,4,5].forEach(function(t){e.otpForm["otp-"+t].$setPristine()}):e.otpForm.otp.$setPristine();var o={};"agreement"==t||"ump2"==t||"sup"==t?o={state:e.sessionData.otpLoginState}:"travel"==t?o={state:e.sessionData.otpLoginState}:e.resendOtpOption?(e.isResendOtpEnabled=!1,e.secondCount=60,o=e.emailOnlyUser||r?{state:e.sessionData.otpLoginState}:{state:e.sessionData.otpLoginState,otpDeliveryMethod:"OBD"}):o={state:e.sessionData.otpLoginState},"panel"==e.subTheme&&(o.otpDeliveryMethod="Email"),e.spinnerVisible=!0,a.resendOtpLoginFlow(o,function(r){e.spinnerVisible=!1,"FAILURE"==r.status?(e.formError=!0,e.formErrorMsg=r.message):(e.resendOtpOption&&n(s,1e3),e.otpMessage=r.message,e.otpMessageNew=r.message,e.formError=!1,e.otpMessageSuccess=r.message,"ump2"!=t&&"sup"!=t&&"travel"!=t&&"ad-manager"!=t||(e.otpResendMsgUMP2="OTP sent successfully.",n(function(){e.otpResendMsgUMP2=""},5e3))),e.otpValue="",e.otpObj={}},function(t){e.spinnerVisible=!1,e.formError=!0;var n=t.message||i.getAjaxErrorMessage();e.formErrorMsg=n,e.otpValue=""})},e.hideErrrorONFocus=function(){e.otpInvalid="",e.formError="",e.newOTPmsgShow=!1,e.otpMessageSuccess=""},e.crosOtpNotificationFun=function(){document.getElementById("otp-notificationID").style.display="none"},e.verifyOtpClick=function(n){var r,s=e.otpForm;if("agreement"==t){if((s.one.$error.pattern||s.two.$error.pattern||s.three.$error.pattern||s.four.$error.pattern||s.five.$error.pattern||s.six.$error.pattern)&&(e.otpInvalid=!0,e.newOTPmsgShow=!0),s.one.$invalid||s.two.$invalid||s.three.$invalid||s.four.$invalid||s.five.$invalid||s.six.$invalid)return e.submitted=!0,void(e.newOTPmsgShow=!0);var l="";l=String(e.otpObj.one)+String(e.otpObj.two)+String(e.otpObj.three)+String(e.otpObj.four)+String(e.otpObj.five)+String(e.otpObj.six),e.spinnerVisible=!0,e.spinnerVisibleMobile=!0}else if("netbanking"!==t&&"partner"!==t){if(s.otp.$setViewValue(s.otp.$viewValue),s.otp.$error.pattern&&(e.otpInvalid=!0),s.otp.$invalid)return void(e.submitted=!0);e.spinnerVisible=!0,e.spinnerVisibleMobile=!0}else{if(n.otpValue=n.otpDigit.join(""),n.otpValue.length<6&&n.otpValue.length>0)return void(e.otpData.otpInvalid=!0);if(0===n.otpValue.length)return void(e.submitted=!0)}r={otp:"agreement"==t?l:n.otpValue,state:e.sessionData.otpLoginState};o.gaDataLayer({event:"custom_event",vertical_name:"oauth",screenName:"/oauth-otp",event_category:"login",event_action:"otp_confirm_clicked",event_label:"",event_label2:"",user_id:""}),a.verifyOtp(r,"login",function(t){if(e.spinnerVisible=!1,e.spinnerVisibleMobile=!1,"FAILURE"!=t.status){var n=o.getParameterByName("showKycPopup")||!0;202==t.responseCode&&0!=n&&"false"!=n?o.displayMinKycFlow({minKycState:t.minKycState,redirectUri:t.redirectUri,isKycDocMandate:t.isKycDocMandate,pubKey:t.pubKey,minKycMandate:!1,showRbiGuidelines:!0}):(e.formError=!1,window.location=t.redirectUri)}else{var r={event:"custom_event",vertical_name:"oauth",screenName:"/oauth-otp",event_category:"login",event_action:"otp_confirm_error",event_label:t.message,event_label2:"",user_id:""};o.gaDataLayer(r),o.gaDataLayer({event:"custom_event",vertical_name:"oauth",screenName:"/login",event_category:"login",event_action:"login_unsuccessful",event_label:"",user_id:""}),e.formError=!0,e.formErrorMsg=t.message}},function(t){e.spinnerVisible=!1,e.spinnerVisibleMobile=!1,e.formError=!0;var n=t.message||i.getAjaxErrorMessage();e.formErrorMsg=n})}},0)}function detailsConfirmationCtrl(e,t,n,r,o){n.debug(o.detailType),e.mobileMessage="Your accounts are successfully merged. These are the following details you have. Please choose the details you want to keep.",e.emailMessage="Your accounts are merged. You have an email ID **[email protected] in the other account. Do you want to use this email ID instead of **[email protected] for your account",e.details={current:"yes",other:"no"},e.setFinalDetail=function(){n.debug(e.selectedDetail),"no"==e.selectedDetail?t.path("/final-details"):t.path("/verify-otp")}}function addMobileScreenController(e,t,n,r){var o;e.addMobileScreenState,e.spinnerVisible=!1,e.addPhoneError=!1,e.showRequired=!1,e.formData={},e.sendOtp=function(){e.addPhoneError=!1,Object.keys(e.addPhoneForm.$error).length?e.showRequired=!0:(e.spinnerVisible=!0,o=n.getAddPhoneState()?n.getAddPhoneState():e.addMobileScreenState,t.addUserPhone("/v3/user/phone",e.formData,o).then(function(t){e.spinnerVisible=!1,"FAILURE"==t.status?e.addPhoneError={type:"error",message:t.message}:(n.setAddPhoneState(t.state),r.path("/addMobileOtp"))},function(t){e.spinnerVisible=!1,e.addPhoneError={type:"error",message:t.message}}))}}function addMobileScreenOtpCtrl(e,t,n,r,o){e.formData={},e.spinnerVisible=!1,e.resendOtpOption=!0,e.showRequired=!1,e.testCtrl="foo",e.validateOtp=function(){if(e.addPhoneOtpError=!1,Object.keys(e.verifyOtpForm.$error).length)e.showRequired=!0;else{var r=o.getAddPhoneState();e.formData.state=r,n.addUserPhoneValidateOTP("/v3/user/validate/otp",e.formData).then(function(n){"FAILURE"==n.status?e.addPhoneOtpError={type:"error",message:n.message}:t.location=n.redirectUri},function(t){e.spinnerVisible=!1,e.addPhoneOtpError={type:"error",message:t.message}})}},e.isResendOtpEnabled=!1,e.secondCount=30;var i=function(){e.secondCount=e.secondCount-1,e.secondCountString=e.secondCount<10?"0"+e.secondCount.toString():e.secondCount.toString(),0!=e.secondCount?r(i,1e3):e.isResendOtpEnabled=!0};e.resendOtpOption&&r(i,1e3),e.resendOtp=function(){e.isResendOtpEnabled=!1,e.secondCount=60,r(i,1e3),e.addPhoneOtpError=!1,e.spinnerVisible=!0;var t=o.getAddPhoneState();n.addUserPhoneResendOtp("/v3/user/resend/otp",{state:t,type:"new"}).then(function(t){e.spinnerVisible=!1,"FAILURE"==t.status?e.addPhoneOtpError={type:"error",message:t.message}:(e.addPhoneOtpError={type:"success",message:"OTP sent successfully"},o.setAddPhoneState(t.state))},function(t){e.spinnerVisible=!1,e.addPhoneOtpError={type:"error",message:t.message}})}}function displayMessageCtrl(e,t,n,r,o,i,a){e.goBackToLogin=function(){"scanandpay"==e.subTheme&&r.setDisplayTroubleLogin(!0),t.url("/login")},e.response=r.getForgotPasswordMessage(),e.header=angular.copy(n.loginHi[e.subTheme].header),e.emailOnlyAccount=function(){r.setEmail(""),t.url("/forgetPassword")},a.getIVRData().then(function(t){"SUCCESS"===t.status?e.forgetPasswordIvrNumber=t.data&&t.data.forget_password_ivr_number?t.data.forget_password_ivr_number:"0120-4888488":e.forgetPasswordIvrNumber="0120-4888488"},function(t){e.forgetPasswordIvrNumber="0120-4888488"})}function minKycCtrl(e,t,n,r,o,i,a){var s=this;s.formIsDisable=!1,e.kycData={},s.shareDataService=n,s.minKycMandate=n.getSignupOtpResData().minKycMandate,s.showRbiGuidelines=n.getSignupOtpResData().showRbiGuidelines;var l=n.getSignupOtpResData().isKycDocMandate;s.isKycDocMandate=1==l||"true"==l,s.showRequiredError=!1;n.getSignupOtpResData().paytmUserId;s.error={showError:"",errorMessage:""},"mp-web"!==e.subTheme&&"mp-mall"!==e.subTheme||(e.kycData.kycDocType="voter"),e.documents={pan:{docRadioLabel:"Enter PAN Card Number",docInputLabel:"Enter PAN Card Number",userNameInputLabel:"Your Name (as on PAN Card)",docType:"pan",regex:/[a-zA-Z]{3}[Pp]{1}[a-zA-Z]{1}\d{4}[a-zA-Z]{1}/,length:10,validationRequired:"PAN Card Number",numberOnly:!1},aadhar:{docRadioLabel:"Enter Aadhaar Card Number",docInputLabel:"Enter Aadhaar Card Number",userNameInputLabel:"Your Name (as on Aadhaar Card)",docType:"aadhar",regex:"",length:12,validationRequired:"Aadhaar Card Number",numberOnly:!0},passport:{docRadioLabel:"Passport",docInputLabel:"Enter Passport Number",userNameInputLabel:"Your Name (as on Passport)",docType:"passport",regex:/[a-zA-Z]{1}\d{7}/,length:8,validationRequired:"Passport Number",numberOnly:!1},voter:{docRadioLabel:"Voter ID",docInputLabel:"Enter Voter ID Number",userNameInputLabel:"Your Name (as on Voter ID)",docType:"voter",regex:/^[a-zA-Z0-9()./-]{0,30}$/,length:30,validationRequired:"Voter ID",numberOnly:!1},dl:{docRadioLabel:"Driving License",docInputLabel:"Enter Driving License",userNameInputLabel:"Your Name (as on Driving License)",docType:"dl",regex:/^[a-zA-Z0-9()./-]{0,30}$/,length:30,validationRequired:"Driving License Number",numberOnly:!1},nrega_job:{docRadioLabel:"NREGA Job Card",docInputLabel:"Enter Job Card Number",userNameInputLabel:"Your Name (as on Job Card)",docType:"nrega_job",regex:/^[a-zA-Z0-9()./-]{0,30}$/,length:30,validationRequired:"Job Card Number",numberOnly:!1}};var c=a.search(),d={event:"custom_event",vertical_name:"oauth",screenName:"signup-kyc",event_category:"signup",event_action:"signup_successful",event_label:"",event_label2:"",user_id:"",acquisition_source:c.source||"",acquisition_medium:c.medium||"",acquisition_campaign:c.campaign||""};r.gaDataLayer(d),e.showOtherDoc=function(){s.showOtherDocuments=!s.showOtherDocuments,e.kycData={},s.showOtherDocuments?e.kycData.kycDocType="passport":e.kycData.kycDocType="voter",s.error.showError=!1},e.createPaytmWallet=function(l){if(l.$valid){s.formIsDisable=!0;var c={docType:e.kycData.kycDocType,docValue:r.rsaEncrypt(e.kycData.kycDocValue,n.getSignupOtpResData().pubKey),name:e.kycData.kycDocName,minKycState:n.getSignupOtpResData().minKycState};t.wrapperService("/v1/kyc/validate/register",c,{method:"POST",headers:{"Content-Type":"application/json"}}).then(function(e){if("SUCCESS"===e.status){var t={event:"custom_event",vertical_name:"oauth",screenName:"signup-kyc",event_category:"signup",event_action:"kyc_submit_clicked",event_label:"",event_label2:"",user_id:""};r.gaDataLayer(t),s.minKycMandate?a.url("/minKycSuccess"):o.location.href=n.getSignupOtpResData().redirectUri}else{"1308"===e.responseCode||"482"===e.responseCode?(s.error.showError=!0,s.error.errorMessage=e.message,i(function(){s.minKycMandate?o.location.href="https://paytm.com/":o.location.href=n.getSignupOtpResData().redirectUri},5e3)):(s.error.showError=!0,s.error.errorMessage=e.message);t={event:"custom_event",vertical_name:"oauth",screenName:"signup-kyc",event_category:"signup",event_action:"kyc_submit_error",event_label:e.message,event_label2:"",user_id:""};r.gaDataLayer(t)}s.formIsDisable=!1},function(e){s.formIsDisable=!1,s.error.showError=!0,s.error.errorMessage="Something went wrong. Please try again"})}else l.$error.required&&(s.showRequiredError=!0)},e.skip=function(){var e=n.getSignupOtpResData().redirectUri;r.gaDataLayer({event:"custom_event",vertical_name:"oauth",screenName:"signup-kyc",event_category:"signup",event_action:"kyc_do_it_later_clicked",event_label:"",event_label2:"",user_id:""}),window.location=e||"https://paytm.com/"},e.$watch("kycData.kycDocType",function(t,n){t!=n&&(e.kycData.kycDocValue="",e.kycData.kycDocName="")})}function qrCodeLoginCtrl(e,t,n,r,o,i,a,s,l,c){var d;function u(){l.on("connect",function(){e.waitForQrRefresh=!0,l.emit("generateQR",a.authState)}),l.on("qrInformation",function(t){e.waitForQrRefresh=!1,"SUCCESS"===t.status?(e.qrCode=t,4===t.id&&i(function(){e.showManualRefresh=!0,l.disconnect()},28e3)):(l.disconnect(),"1506"===t.code?r.location.reload():f())}),l.on("loginSuccessful",function(e){var t={event:"custom_event",vertical_name:"oauth",screenName:"",event_category:"login",event_action:"login_qr_scanned",event_label:"",event_label2:"",user_id:e&&e.userId?e.userId:""};c.gaDataLayer(t),r.location=e.redirectURL,e.cookies.forEach(function(e){var t="",n=new Date;n.setTime(n.getTime()+1e3*e.maxAge),t+=e.name+"="+e.value+";expires="+n.toGMTString(),e.secure&&(t+=";secure"),document.cookie=t}),l.disconnect()}),l.on("reconnect_attempt",function(t){d++,e.waitForQrRefresh=!0,3===d&&(e.waitForQrRefresh=!1,f(),l.disconnect(),d=0)})}function m(){d=0,l.buildSocketConnection(),u()}function f(){e.showManualRefresh=!0,e.showQrError.show=!0,e.showQrError.msg=""}e.showHelpPopup=!1,e.showManualRefresh=!1,e.showHelp=function(t){e.showHelpPopup=!e.showHelpPopup,e.showHelpPopup?s.on("click",function(t){t.preventDefault(),-1===t.target.className.indexOf("dontClosePopup")&&(e.showHelpPopup=!1,e.$apply(),s.off("click"))}):s.off("click")},e.showQrError={show:!1,msg:""},m(),e.manualRefreshQrCode=function(){e.waitForQrRefresh=!0,e.showManualRefresh=!1,e.showQrError={show:!1,msg:""};c.gaDataLayer({event:"custom_event",vertical_name:"oauth",screenName:"auth-init/QRlogin",event_category:"login",event_action:"refresh_qr_code_clicked",event_label:""}),m()}}function emailResetOtpCtrl(e,t,n){e.email=t.getEmail(),e.phone=t.getPhone(),e.maskEmail="";var r=t.getEmail();if(r){var o=r.indexOf("@");-1!=o&&(e.maskEmail=r.substring(o,r.length))}e.loginClick=function(){n.path("/login")},e.forgetPasswordClick=function(){n.path("/forgetPassword")}}function messageController(e,t,n,r,o,i,a){e.email=r.getEmail(),e.messageType="forgot-password-message",e.messageType=t.url().split("/")[2],e.gotoSignup=function(){t.path("/signup")},e.gotoLogin=function(){t.path("/login")}}(app=angular.module("paytm-oauth",["ngRoute","ngProgress","ngMaterial","claimMergeServices","paytm-oauth-widget","monospaced.qrcode"])).config(["$routeProvider",function(e){function t(){return Math.floor(9e4*Math.random())+1e4}function n(e){var t=document.getElementById("current-form");return e==t.getAttribute("data-type")?t.innerHTML:void 0}function r(e){var t="",n=String(window.location.href);switch(n=-1===n.indexOf("#")?n.slice(n.indexOf("?")):n.slice(n.indexOf("?"),n.indexOf("#")),e){case"login":t="/oauth2/authorize"+n+"&templ=true";break;case"signup":t="/register"+n+"&templ=true";break;case"forgotPassword":t="/forgetwPass"+n}return t}e.when("/",{redirectTo:function(){return document.getElementById("current-form").getAttribute("data-type")}}).when("/otp/:redirectFrom",{templateUrl:"/pages/themesv2/templates/loginOtp.html?ver="+t(),controller:"loginOtpController"}).when("/forgetPassword",{templateUrl:r("forgotPassword"),controller:"forgetPasswordController"}).when("/changePassword",{templateUrl:"/pages/themesv2/templates/changePassword.html?ver="+t(),controller:"changePasswordController"}).when("/login",{template:n("login"),templateUrl:r("login"),controller:"loginController"}).when("/signup",{template:n("signup"),templateUrl:r("signup"),controller:"signupController"}).when("/signupVerify",{templateUrl:"/pages/themesv2/templates/signup_verify.html?ver="+t(),controller:"signupVerifyController"}).when("/merge/:option",{templateUrl:"/pages/themesv2/templates/mergeAccounts.html?ver="+t(),controller:"mergeAccountCtrl"}).when("/account-chooser/:detailType/:length",{templateUrl:"/pages/themesv2/templates/details-confirmation.html?ver="+t(),controller:"accountChooserCtrl"}).when("/redirect-page",{templateUrl:"/pages/themesv2/templates/final-details.html?ver="+t(),controller:"redirectPageCtrl"}).when("/otp/:mode/:type",{templateUrl:"/pages/themesv2/templates/verify-otp.html?ver="+t(),controller:"verifyOtpCtrl"}).when("/kyc-decide",{templateUrl:"/pages/themesv2/templates/kyc-decide.html?ver="+t(),controller:"kycDecideCtrl"}).when("/addMobileOtp",{templateUrl:"/pages/themesv2/templates/addMobileScreenOtp.html?ver="+t(),controller:"addMobileScreenOtpCtrl"}).when("/displayMessage",{templateUrl:"/pages/themesv2/templates/ivrScreen.html?ver="+t(),controller:"displayMessageCtrl"}).when("/minKyc",{templateUrl:"/pages/themesv2/templates/minKyc.html?ver="+t(),controller:"minKycCtrl as ctrl"}).when("/emailResetOtp",{templateUrl:"/pages/themesv2/templates/emailResetOtp.html?ver="+t(),controller:"emailResetOtpCtrl"}).when("/minKycSuccess",{templateUrl:"/pages/themesv2/templates/minKycSuccess.html?ver="+t()}).when("/minKycSubmitted",{templateUrl:"/pages/themesv2/templates/minKycSubmitted.html?ver="+t()}).when("/message/:subTheme*/:from*",{templateUrl:function(e){return"/pages/themesv2/templates/"+e.subTheme+"/"+e.from+".html?ver="+t()},controller:"messageController"}).otherwise({redirectTo:"/"})}]),app.run(["$rootScope","$templateCache","ngProgress","shareDataService",function(e,t,n,r){e.$on("$routeChangeStart",function(e,r,o){n.start(),o&&"/forgetPassword"==o.originalPath&&t.remove(o.templateUrl)}),e.$on("$routeChangeSuccess",function(e,t,o){t.$$route&&r.setLeftSection(t.$$route.originalPath),n.complete()}),n.color("#00D7FF")}]),app.constant("CLIENT_CONFIGURATION",{loginHi:{pg:{otpOptionAvailable:!0,showImage:!0,showWalletContainer:!1,showKnowMoreOtpContainer:!0,isLeftAlignBack:!0,blockForgotPassword:!0,text:{loginLink:"Login to Paytm",signupLink:"Sign Up for Paytm",loginBtnText:"Secure Sign In",TandCText:"Terms & Conditions"},header:{text:"",imagePath:"",forgotpassText:"Forgot Password"},label:{forgotPassLabel:"Enter your Mobile or Email"}},dashboard:{otpOptionAvailable:!1,showImage:!0,showWalletContainer:!0,blockForgotPassword:!0,text:{loginLink:"Log in",signupLink:"Sign Up",loginBtnText:"Login",TandCText:"T&C",mobileInputLabel:"Enter your paytm registered mobile/email",passwordInputLabel:"Enter your Paytm password"},header:{text:"",imagePath:"/pages/themesv2/images/P4B-logo.svg",forgotpassText:"Forgot Password"},label:{forgotPassLabel:"Enter your Paytm registered email"}},"mp-web":{otpOptionAvailable:!1,showImage:!1,showWalletContainer:!0,blockForgotPassword:!0,text:{loginLink:"Sign In to Paytm",signupLink:"Sign Up",loginBtnText:"Secure Login",TandCText:"Terms & Conditions",mobileInputLabel:"Registered Paytm Mobile Number or Email ID",passwordInputLabel:"Paytm Password"},header:{text:"",imagePath:"",forgotpassText:"Forgot Password"},label:{forgotPassLabel:"Registered Paytm Mobile Number or Email ID"},qrCodeLogin:{generateTimeout:27e3,waitTimeout:3e3,polling:5e3}},"cms-panel":{otpOptionAvailable:!1,showImage:!1,showWalletContainer:!0,blockForgotPassword:!0,text:{loginLink:"Sign In to Paytm",signupLink:"Sign Up",loginBtnText:"Secure Login",TandCText:"Terms & Conditions",mobileInputLabel:"Registered Paytm Mobile Number or Email ID",passwordInputLabel:"Paytm Password"},header:{text:"",imagePath:"",forgotpassText:"Forgot Password"},label:{forgotPassLabel:"Registered Paytm Mobile Number or Email ID"},qrCodeLogin:{generateTimeout:27e3,waitTimeout:3e3,polling:5e3}},insurance:{otpOptionAvailable:!1,showImage:!1,showWalletContainer:!0,blockForgotPassword:!0,text:{loginLink:"Sign In With Paytm",signupLink:"Sign Up",loginBtnText:"Secure Login",TandCText:"Terms & Conditions",mobileInputLabel:"Registered Paytm Mobile Number or Email ID",passwordInputLabel:"Paytm Password"},header:{text:"",imagePath:"",forgotpassText:"Forgot Password"},label:{forgotPassLabel:"Registered Paytm Mobile Number or Email ID"},qrCodeLogin:{generateTimeout:27e3,waitTimeout:3e3,polling:5e3}},pos:{otpOptionAvailable:!1,showImage:!1,showWalletContainer:!0,blockForgotPassword:!0,text:{loginLink:"Sign In to Paytm",signupLink:"Sign Up",loginBtnText:"Secure Login",TandCText:"Terms & Conditions",mobileInputLabel:"Registered Paytm Mobile Number or Email ID",passwordInputLabel:"Paytm Password"},header:{text:"",imagePath:"",forgotpassText:"Forgot Password"},label:{forgotPassLabel:"Registered Paytm Mobile Number or Email ID"},qrCodeLogin:{generateTimeout:27e3,waitTimeout:3e3,polling:5e3}},travel:{otpOptionAvailable:!1,showImage:!1,showWalletContainer:!0,blockForgotPassword:!0,text:{loginLink:"Sign In to Paytm",signupLink:"",loginBtnText:"Login",TandCText:"Terms & Conditions",mobileInputLabel:"Registered Paytm Corporate Email ID",passwordInputLabel:"Paytm Password"},header:{text:"",imagePath:"",forgotpassText:"Forgot Password"},label:{forgotPassLabel:"Registered Paytm Mobile Number or Email ID"}},diy:{otpOptionAvailable:!1,showImage:!0,showWalletContainer:!0,blockForgotPassword:!0,text:{loginLink:"Log in",signupLink:"Sign Up",loginBtnText:"Login",TandCText:"T&C",mobileInputLabel:"Enter your Mobile or Email",passwordInputLabel:"Paytm Password"},header:{text:"",imagePath:"",forgotpassText:"Forgot Password"},label:{forgotPassLabel:"Enter your Mobile or Email"}},"diy-ppb":{otpOptionAvailable:!1,showImage:!1,showWalletContainer:!0,blockForgotPassword:!0,text:{loginLink:"Log in",signupLink:"Sign Up",loginBtnText:"Login",TandCText:"T&C",mobileInputLabel:"Enter your Mobile or Email",passwordInputLabel:"Paytm Password"},header:{text:"",imagePath:"",forgotpassText:"Forgot Password"},label:{forgotPassLabel:"Enter your Mobile or Email"}},netbanking:{otpOptionAvailable:!1,showImage:!0,showWalletContainer:!0,blockForgotPassword:!1,text:{loginLink:"Log in",signupLink:"Sign Up",loginBtnText:"Login",TandCText:"Terms & Conditions",mobileInputLabel:"Enter your Mobile or Email",passwordInputLabel:"Paytm Password",headerText:"Login to your banking account"},header:{text:"",imagePath:"",forgotpassText:"Forgot Password"},label:{forgotPassLabel:"Enter your Mobile or Email"}},partner:{otpOptionAvailable:!1,showImage:!0,showWalletContainer:!0,blockForgotPassword:!1,text:{loginLink:"Log in",signupLink:"Sign Up",loginBtnText:"Login",TandCText:"Terms & Conditions",mobileInputLabel:"Enter your Mobile or Email",passwordInputLabel:"Paytm Password",headerText:"Login to your partner account"},header:{text:"",imagePath:"",forgotpassText:"Forgot Password"},label:{forgotPassLabel:"Enter your Mobile or Email"}},"pg-dishtv":{otpOptionAvailable:!1,showImage:!0,showWalletContainer:!1,isLeftAlignBack:!0,blockForgotPassword:!0,text:{loginLink:"Login to Paytm",signupLink:"Sign Up for Paytm",loginBtnText:"Secure Sign In",TandCText:"Terms & Conditions"},header:{text:"",imagePath:"/pages/themesv2/images/pg-dishtv/dishtv-logo.png",forgotpassText:"Forgot Password"},label:{forgotPassLabel:"Enter your Mobile or Email"}},airtelhi:{otpOptionAvailable:!1,showImage:!0,showWalletContainer:!1,blockForgotPassword:!0,text:{loginLink:"Login to Paytm",signupLink:"Sign Up for Paytm",loginBtnText:"Secure Sign In",TandCText:"Terms & Conditions"},header:{text:"To pay via Net Banking, Credit Card, Debit Card, or Paytm wallet, please sign in",imagePath:"",isExternal:!0,forgotpassText:"Forgot Password"},label:{forgotPassLabel:"Enter your Mobile or Email"}},"mp-html5":{otpOptionAvailable:!1,showImage:!1,showWalletContainer:!1,blockForgotPassword:!0,text:{loginLink:"Login to",signupLink:"Sign Up",loginBtnText:"Login Securely",TandCText:"Terms & Conditions",mobileInputLabel:"Email or Mobile",passwordInputLabel:"Enter Password"},header:{text:"Login to",imagePath:"/pages/themesv2/images/paytm-logo.png",isExternal:!0,forgotpassText:"Change Paytm Password"},label:{forgotPassLabel:"Registered Email or Mobile"}},agreement:{otpOptionAvailable:!1,showImage:!1,showWalletContainer:!1,blockForgotPassword:!0,text:{loginLink:"Login to",signupLink:"Sign Up",loginBtnText:"Login Securely",TandCText:"Terms & Conditions",mobileInputLabel:"Registered Paytm Mobile Number",passwordInputLabel:"Password"},header:{text:"",imagePath:"/pages/themesv2/images/paytm-logo-apple.png",isExternal:!0,forgotpassText:"Change Paytm Password"},label:{forgotPassLabel:"Registered Email or Mobile"}},"mall-html5":{otpOptionAvailable:!1,showImage:!1,showWalletContainer:!1,blockForgotPassword:!0,text:{loginLink:"Login to",signupLink:"Sign Up",loginBtnText:"Login Securely",TandCText:"Terms & Conditions",mobileInputLabel:"Email or Mobile",passwordInputLabel:"Enter Password"},header:{text:"Login to",imagePath:"/pages/themesv2/images/paytm-logo.png",isExternal:!0,forgotpassText:"Change Paytm Password"},label:{forgotPassLabel:"Registered Email or Mobile"}},"mp-merchant":{otpOptionAvailable:!1,showImage:!1,showWalletContainer:!0,blockForgotPassword:!0,text:{loginLink:"Login to Paytm",signupLink:"Sign Up for Paytm",loginBtnText:"Login",TandCText:"T&C"},header:{text:"",imagePath:"",forgotpassText:"Forgot Password"},label:{forgotPassLabel:"Enter your Mobile or Email"}},web:{otpOptionAvailable:!1,showImage:!1,showWalletContainer:!0,blockForgotPassword:!0,text:{loginLink:"Login to Paytm",signupLink:"Sign Up for Paytm",loginBtnText:"Login",TandCText:"T&C"},header:{text:"",imagePath:"",forgotpassText:"Forgot Password"},label:{forgotPassLabel:"Enter your Mobile or Email"}},html5:{otpOptionAvailable:!1,showImage:!1,showWalletContainer:!1,blockForgotPassword:!0,text:{loginLink:"Login to Paytm",signupLink:"Sign Up for Paytm",loginBtnText:"Secure Sign In",TandCText:"Terms & Conditions"},header:{text:"Sign In To Paytm",imagePath:"",isExternal:!0,forgotpassText:"Forgot Password"},label:{forgotPassLabel:"Enter your Mobile or Email"}},pwp:{otpOptionAvailable:!1,showImage:!1,showWalletContainer:!1,blockForgotPassword:!0,text:{loginLink:"Login to Paytm",signupLink:"Sign Up for Paytm",loginBtnText:"Secure Sign In",TandCText:"Terms & Conditions"},header:{text:"You need a Paytm account to pay!",imagePath:"/pages/themesv2/images/pwp/paytm-logo.png",forgotpassText:"Forgot Password"},label:{forgotPassLabel:"Enter your Mobile or Email"}},"pwp-web":{otpOptionAvailable:!1,showImage:!1,showWalletContainer:!1,blockForgotPassword:!0,text:{loginLink:"Login to Paytm",signupLink:"Sign Up for Paytm",loginBtnText:"Secure Sign In",TandCText:"Terms & Conditions"},header:{text:"You need a Paytm account to pay!",imagePath:"/pages/themesv2/images/pwp/paytm-logo.png",forgotpassText:"Forgot Password"},label:{forgotPassLabel:"Enter your Mobile or Email"}},"pg-ndtv":{otpOptionAvailable:!1,showImage:!0,showWalletContainer:!1,blockForgotPassword:!0,isLeftAlignBack:!0,text:{loginLink:"Login",signupLink:"Signup",loginBtnText:"Secure Sign In",TandCText:"Terms & Conditions"},header:{text:"",imagePath:"/pages/themesv2/images/pg-ndtv/gadgets360_retina.png",forgotpassText:"Forgot Password"},label:{forgotPassLabel:"Enter your Mobile or Email"}},ump:{otpOptionAvailable:!0,showWalletContainer:!1,blockForgotPassword:!0,showImage:!0,header:{text:"<h3>Welcome to Paytm Payments Panel</h3><span>Now manage all your payment transactions at one place</span>",isExternal:!1,forgotpassText:"Forgot Password"},text:{loginLink:"Login",signupLink:null,loginBtnText:"Secure Login",TandCText:"Terms & Conditions"},label:{forgotPassLabel:"Enter your Mobile or Email"}},panel:{otpOptionAvailable:!1,showImage:!1,showWalletContainer:!0,blockForgotPassword:!1,text:{loginLink:"Log in",signupLink:"Sign Up",loginBtnText:"Secure Login",TandCText:"T&C",mobileInputLabel:"Enter your Email",passwordInputLabel:"Paytm Password"},header:{text:"",imagePath:"",forgotpassText:"Forgot Password"},label:{forgotPassLabel:"Enter your Email"}},sellerpanel:{otpOptionAvailable:!1,showImage:!1,showWalletContainer:!0,blockForgotPassword:!0,text:{loginLink:"Log in",signupLink:"Sign Up",loginBtnText:"Secure Login",TandCText:"Terms and Conditions",mobileInputLabel:"Enter your Mobile or Email",passwordInputLabel:"Paytm Password"},header:{text:"",imagePath:"",forgotpassText:"Forgot Password"},label:{forgotPassLabel:"Enter your Mobile or Email"}},scanandpay:{otpOptionAvailable:!1,showImage:!1,showWalletContainer:!0,blockForgotPassword:!0,text:{loginLink:"Login to Pay Securely",signupLink:"Sign Up",loginBtnText:"Secure Login",TandCText:"Terms and Conditions",mobileInputLabel:"Enter Registered Mobile Number",passwordInputLabel:"Paytm Password"},header:{text:"",imagePath:"",forgotpassText:"Forgot Password"},label:{forgotPassLabel:"Enter your Mobile or Email"}},"mp-mall":{otpOptionAvailable:!1,showImage:!1,showWalletContainer:!0,blockForgotPassword:!0,text:{loginLink:"Sign In to Paytm",signupLink:"Sign Up",loginBtnText:"Secure Login",TandCText:"Terms & Conditions",mobileInputLabel:"Registered Paytm Mobile Number or Email ID",passwordInputLabel:"Paytm Password"},header:{text:"",imagePath:"",forgotpassText:"Forgot Password"},label:{forgotPassLabel:"Registered Paytm Mobile Number or Email ID"},qrCodeLogin:{generateTimeout:27e3,waitTimeout:3e3,polling:5e3}},ump2:{otpOptionAvailable:!0,showImage:!1,showWalletContainer:!1,showKnowMoreOtpContainer:!0,isLeftAlignBack:!0,blockForgotPassword:!0,text:{loginLink:"Sign In",signupLink:"Create Account",loginBtnText:"Sign In Securely",TandCText:"terms of use"},header:{text:"",imagePath:"",forgotpassText:"Forgot Password"},label:{forgotPassLabel:"Enter your Mobile or Email"}},"paytm-cloud":{otpOptionAvailable:!1,showImage:!1,showWalletContainer:!0,blockForgotPassword:!0,text:{loginLink:"Sign In to Paytm",signupLink:"Sign Up",loginBtnText:"Secure Login",TandCText:"Terms & Conditions",mobileInputLabel:"Registered Paytm Mobile Number or Email ID",passwordInputLabel:"Paytm Password"},header:{text:"",imagePath:"",forgotpassText:"Forgot Password"},label:{forgotPassLabel:"Registered Paytm Mobile Number or Email ID"}},fastag:{otpOptionAvailable:!1,showImage:!1,showWalletContainer:!0,blockForgotPassword:!0,text:{loginLink:"Sign In to Paytm",signupLink:"Sign Up",loginBtnText:"Secure Login",TandCText:"Terms & Conditions",mobileInputLabel:"Registered Paytm Mobile Number or Email ID",passwordInputLabel:"Paytm Password"},header:{text:"",imagePath:"",forgotpassText:"Forgot Password"},label:{forgotPassLabel:"Registered Paytm Mobile Number or Email ID"}},sup:{otpOptionAvailable:!0,showImage:!1,showWalletContainer:!1,showKnowMoreOtpContainer:!0,isLeftAlignBack:!0,blockForgotPassword:!0,text:{loginLink:"Sign In",signupLink:"Create Account",loginBtnText:"Sign In Securely",TandCText:"terms of use"},header:{text:"",imagePath:"",forgotpassText:"Forgot Password"},label:{forgotPassLabel:"Enter your Mobile or Email"}},"ad-manager":{otpOptionAvailable:!1,showImage:!1,showWalletContainer:!1,showKnowMoreOtpContainer:!0,isLeftAlignBack:!0,blockForgotPassword:!0,text:{loginLink:"Sign In",signupLink:"Create Account",loginBtnText:"Sign In Securely",TandCText:"terms of use"},header:{text:"",imagePath:"",forgotpassText:"Forgot Password"},label:{forgotPassLabel:"Enter your Email"}}},signUpHi:{pg:{showWalletContainer:!1,blockForgotPassword:!0,showImage:!0,text:{signupBtnText:"Signup",TandCText:"Terms & Conditions",mobileInputLabel:"Mobile Number",passwordInputLabel:"Create Paytm Password"},header:{text:"",imagePath:"",forgotpassText:"Forgot Password"},label:{forgotPassLabel:"Enter your Mobile or Email"}},dashboard:{showWalletContainer:!0,blockForgotPassword:!0,showImage:!0,text:{signupBtnText:"Create your Paytm Wallet",TandCText:"T&C",mobileInputLabel:"Enter your mobile number",passwordInputLabel:"Set your Paytm password"},header:{text:"",imagePath:"/pages/themesv2/images/P4B-logo.svg",forgotpassText:"Forgot Password"},label:{forgotPassLabel:"Enter your Mobile or Email"}},"cms-panel":{showWalletContainer:!0,blockForgotPassword:!0,showImage:!1,text:{signupBtnText:"Create your Paytm Wallet",TandCText:"Terms & Conditions ",mobileInputLabel:"Mobile Number",passwordInputLabel:"Create Paytm Password"},header:{text:"",imagePath:"",forgotpassText:"Forgot Password"},button:{text:"Create your Paytm Wallet",showLock:!0},label:{forgotPassLabel:"Enter your Mobile or Email"}},insurance:{showWalletContainer:!0,blockForgotPassword:!0,showImage:!1,text:{signupBtnText:"Create your Paytm Wallet",TandCText:"Terms & Conditions ",mobileInputLabel:"Mobile Number",passwordInputLabel:"Create Paytm Password"},header:{text:"",imagePath:"",forgotpassText:"Forgot Password"},button:{text:"Create your Paytm Wallet",showLock:!0},label:{forgotPassLabel:"Enter your Mobile or Email"}},"mp-web":{showWalletContainer:!0,blockForgotPassword:!0,showImage:!1,text:{signupBtnText:"Create your Paytm Wallet",TandCText:"Terms & Conditions ",mobileInputLabel:"Mobile Number",passwordInputLabel:"Create Paytm Password"},header:{text:"",imagePath:"",forgotpassText:"Forgot Password"},button:{text:"Create your Paytm Wallet",showLock:!0},label:{forgotPassLabel:"Enter your Mobile or Email"}},pos:{showWalletContainer:!0,blockForgotPassword:!0,showImage:!1,text:{signupBtnText:"Create your Paytm Wallet",TandCText:"Terms & Conditions ",mobileInputLabel:"Mobile Number",passwordInputLabel:"Create Paytm Password"},header:{text:"",imagePath:"",forgotpassText:"Forgot Password"},button:{text:"Create your Paytm Wallet",showLock:!0},label:{forgotPassLabel:"Enter your Mobile or Email"}},travel:{showWalletContainer:!0,blockForgotPassword:!0,showImage:!1,text:{signupBtnText:"Create your Paytm Wallet",TandCText:"Terms & Conditions ",mobileInputLabel:"Mobile Number",passwordInputLabel:"Create Paytm Password"},header:{text:"",imagePath:"",forgotpassText:"Forgot Password"},button:{text:"Create your Paytm Wallet",showLock:!0},label:{forgotPassLabel:"Enter your Mobile or Email"}},"mp-mall":{showWalletContainer:!0,blockForgotPassword:!0,showImage:!1,text:{signupBtnText:"Create your Paytm Wallet",TandCText:"Terms & Conditions ",mobileInputLabel:"Mobile Number",passwordInputLabel:"Create Paytm Password"},header:{text:"",imagePath:"",forgotpassText:"Forgot Password"},button:{text:"Create your Paytm Wallet",showLock:!0},label:{forgotPassLabel:"Enter your Mobile or Email"}},diy:{showWalletContainer:!0,blockForgotPassword:!0,showImage:!0,text:{signupBtnText:"Create your Paytm Wallet",TandCText:"T&C",mobileInputLabel:"Mobile Number",passwordInputLabel:"Paytm Password"},header:{text:"",imagePath:"",forgotpassText:"Forgot Password"},label:{forgotPassLabel:"Enter your Mobile or Email"}},"diy-ppb":{showWalletContainer:!0,blockForgotPassword:!0,showImage:!0,text:{signupBtnText:"Create your Paytm Wallet",TandCText:"T&C"},header:{text:"",imagePath:"",forgotpassText:"Forgot Password"},label:{forgotPassLabel:"Enter your Mobile or Email"}},netbanking:{showWalletContainer:!0,blockForgotPassword:!1,showImage:!0,text:{signupBtnText:"Create your Paytm Wallet",TandCText:"T&C"},header:{text:"",imagePath:"",forgotpassText:"Forgot Password"},label:{forgotPassLabel:"Enter your Mobile or Email"}},partner:{showWalletContainer:!0,blockForgotPassword:!1,showImage:!0,text:{signupBtnText:"Create your Paytm Wallet",TandCText:"T&C"},header:{text:"",imagePath:"",forgotpassText:"Forgot Password"},label:{forgotPassLabel:"Enter your Mobile or Email"}},"pg-dishtv":{showWalletContainer:!1,blockForgotPassword:!0,showImage:!0,text:{signupBtnText:"Signup",TandCText:"Terms & Conditions",mobileInputLabel:"Mobile Number",passwordInputLabel:"Create Paytm Password"},header:{text:"",imagePath:"/pages/themesv2/images/pg-dishtv/dishtv-logo.png",forgotpassText:"Forgot Password"},label:{forgotPassLabel:"Enter your Mobile or Email"}},"mp-html5":{showWalletContainer:!1,blockForgotPassword:!0,showImage:!1,text:{signupBtnText:"Sign Up",TandCText:"Terms & Conditions",mobileInputLabel:"Mobile Number",passwordInputLabel:"Create Paytm Password"},header:{text:"Sign Up for",imagePath:"/pages/themesv2/images/paytm-logo.png",isExternal:!0,forgotpassText:"Forgot Password"},button:{text:"Complete Sign Up",showLock:!1},label:{forgotPassLabel:"Registered Email or Mobile"}},agreement:{showWalletContainer:!1,blockForgotPassword:!0,showImage:!1,text:{signupBtnText:"Sign Up",TandCText:"Terms & Conditions",mobileInputLabel:"Mobile Number",passwordInputLabel:"Create Paytm Password"},header:{text:"Sign Up for",imagePath:"/pages/themesv2/images/paytm-logo.png",isExternal:!0,forgotpassText:"Forgot Password"},button:{text:"Complete Sign Up",showLock:!1},label:{forgotPassLabel:"Registered Email or Mobile"}},"mall-html5":{showWalletContainer:!1,blockForgotPassword:!0,showImage:!1,text:{signupBtnText:"Sign Up",TandCText:"Terms & Conditions",mobileInputLabel:"Mobile Number",passwordInputLabel:"Create Paytm Password"},header:{text:"Sign Up for",imagePath:"/pages/themesv2/images/paytm-logo.png",isExternal:!0,forgotpassText:"Forgot Password"},button:{text:"Complete Sign Up",showLock:!1},label:{forgotPassLabel:"Registered Email or Mobile"}},airtelhi:{showWalletContainer:!1,blockForgotPassword:!0,showImage:!0,text:{signupBtnText:"Signup",TandCText:"Terms & Conditions",mobileInputLabel:"Mobile Number",passwordInputLabel:"Create Paytm Password"},header:{text:"To pay via Net Banking, Credit Card, Debit Card, or Paytm wallet, please sign in",imagePath:"",isExternal:!0,forgotpassText:"Forgot Password"},label:{forgotPassLabel:"Enter your Mobile or Email"}},"mp-merchant":{showWalletContainer:!0,blockForgotPassword:!0,showImage:!1,text:{signupBtnText:"Signup",TandCText:"T&C",mobileInputLabel:"Mobile Number",passwordInputLabel:"Create Paytm Password"},header:{text:"",imagePath:"",forgotpassText:"Forgot Password"},label:{forgotPassLabel:"Enter your Mobile or Email"}},web:{showWalletContainer:!0,blockForgotPassword:!0,showImage:!1,text:{signupBtnText:"Signup",TandCText:"T&C",mobileInputLabel:"Mobile Number",passwordInputLabel:"Create Paytm Password"},header:{text:"",imagePath:"",forgotpassText:"Forgot Password"},label:{forgotPassLabel:"Enter your Mobile or Email"}},html5:{showWalletContainer:!1,blockForgotPassword:!0,showImage:!1,text:{signupBtnText:"Signup",TandCText:"Terms & Conditions",mobileInputLabel:"Mobile Number",passwordInputLabel:"Create Paytm Password"},header:{text:"Sign Up To Paytm",imagePath:"",isExternal:!0,forgotpassText:"Forgot Password"},label:{forgotPassLabel:"Enter your Mobile or Email"}},pwp:{otpOptionAvailable:!1,showImage:!1,showWalletContainer:!1,blockForgotPassword:!0,text:{loginLink:"Login to Paytm",signupLink:"Sign Up for Paytm",loginBtnText:"Secure Sign In",TandCText:"Terms & Conditions",mobileInputLabel:"Mobile Number",passwordInputLabel:"Create Paytm Password"},header:{text:"You need a Paytm account to pay!",imagePath:"/pages/themesv2/images/pwp/paytm-logo.png",forgotpassText:"Forgot Password"},label:{forgotPassLabel:"Enter your Mobile or Email"}},"pwp-web":{otpOptionAvailable:!1,showImage:!1,showWalletContainer:!1,blockForgotPassword:!0,text:{loginLink:"Login to Paytm",signupLink:"Sign Up for Paytm",loginBtnText:"Secure Sign In",TandCText:"Terms & Conditions",mobileInputLabel:"Mobile Number",passwordInputLabel:"Create Paytm Password"},header:{text:"You need a Paytm account to pay!",imagePath:"/pages/themesv2/images/pwp/paytm-logo.png",forgotpassText:"Forgot Password"},label:{forgotPassLabel:"Enter your Mobile or Email"}},"pg-ndtv":{showWalletContainer:!1,blockForgotPassword:!0,showImage:!0,text:{signupBtnText:"Signup",TandCText:"Terms & Conditions",mobileInputLabel:"Mobile Number",passwordInputLabel:"Create Paytm Password"},header:{text:"",imagePath:"/pages/themesv2/images/pg-ndtv/gadgets360_retina.png",forgotpassText:"Forgot Password"},label:{forgotPassLabel:"Enter your Mobile or Email"}},ump:{showWalletContainer:!0,blockForgotPassword:!0,showImage:!0,text:{signupBtnText:"Signup",TandCText:"Terms & Conditions",mobileInputLabel:"Mobile Number",passwordInputLabel:"Create Paytm Password"},header:{text:"",imagePath:"",forgotpassText:"Forgot Password"},label:{forgotPassLabel:"Enter your Mobile or Email"}},panel:{showWalletContainer:!0,blockForgotPassword:!0,showImage:!1,text:{signupBtnText:"Create your Paytm Wallet",TandCText:"T&C",mobileInputLabel:"Mobile Number",passwordInputLabel:"Create Paytm Password"},header:{text:"",imagePath:"",forgotpassText:"Forgot Password"},button:{text:"Create your Paytm Wallet",showLock:!0},label:{forgotPassLabel:"Enter your Mobile or Email"}},sellerpanel:{otpOptionAvailable:!1,showImage:!1,showWalletContainer:!0,blockForgotPassword:!0,text:{loginLink:"Log in",signupLink:"Sign Up",loginBtnText:"Secure Login",TandCText:"Terms and Conditions",mobileInputLabel:"Mobile Number",passwordInputLabel:"Create Paytm Password"},header:{text:"",imagePath:"",forgotpassText:"Forgot Password"},label:{forgotPassLabel:"Enter your Mobile or Email"}},scanandpay:{otpOptionAvailable:!1,showImage:!1,showWalletContainer:!0,blockForgotPassword:!0,text:{loginLink:"Login to Pay Securely",signupLink:"Sign Up",loginBtnText:"Secure Login",TandCText:"Terms and Conditions",mobileInputLabel:"Enter your Mobile or Email",passwordInputLabel:"Paytm Password"},header:{text:"",imagePath:"",forgotpassText:"Forgot Password"},label:{forgotPassLabel:"Enter your Mobile or Email"}},ump2:{showWalletContainer:!1,blockForgotPassword:!0,showImage:!1,text:{signupBtnText:"Signup",TandCText:"terms of use",mobileInputLabel:"Mobile Number",passwordInputLabel:"Create Paytm Password"},header:{text:"",imagePath:"",forgotpassText:"Forgot Password"},label:{forgotPassLabel:"Enter your Mobile or Email"}},"paytm-cloud":{showWalletContainer:!0,blockForgotPassword:!0,showImage:!1,text:{signupBtnText:"Create your Paytm Wallet",TandCText:"Terms & Conditions ",mobileInputLabel:"Mobile Number",passwordInputLabel:"Create Paytm Password"},header:{text:"",imagePath:"",forgotpassText:"Forgot Password"},button:{text:"Create your Paytm Wallet",showLock:!0},label:{forgotPassLabel:"Enter your Mobile or Email"}},fastag:{showWalletContainer:!0,blockForgotPassword:!0,showImage:!1,text:{signupBtnText:"Create your Paytm Wallet",TandCText:"Terms & Conditions ",mobileInputLabel:"Mobile Number",passwordInputLabel:"Create Paytm Password"},header:{text:"",imagePath:"",forgotpassText:"Forgot Password"},button:{text:"Create your Paytm Wallet",showLock:!0},label:{forgotPassLabel:"Enter your Mobile or Email"}},sup:{showWalletContainer:!1,blockForgotPassword:!0,showImage:!1,text:{signupBtnText:"Signup",TandCText:"terms of use",mobileInputLabel:"Mobile Number",passwordInputLabel:"Create Paytm Password"},header:{text:"",imagePath:"",forgotpassText:"Forgot Password"},label:{forgotPassLabel:"Enter your Mobile or Email"}},"ad-manager":{showWalletContainer:!1,blockForgotPassword:!0,showImage:!1,text:{signupBtnText:"Signup",TandCText:"terms of use",mobileInputLabel:"Mobile Number",passwordInputLabel:"Create Paytm Password"},header:{text:"",imagePath:"",forgotpassText:"Forgot Password"},label:{forgotPassLabel:"Enter your Email"}}}}),app.constant("DEVICE_REGEX",{tablet:/(ipad|tablet|(android(?!.*mobile))|(windows(?!.*phone)(.*touch))|kindle|playbook|silk|(puffin(?!.*(IP|AP|WP))))/,mobile:/(mobi|ipod|phone|blackberry|opera mini|fennec|minimo|symbian|psp|nintendo ds|archos|skyfire|puffin|blazer|bolt|gobrowser|iris|maemo|semc|teashark|uzard)/}),app.filter("isMobile",function(){return function(e){return/^\d+$/.test(e)}}),angular.module("paytm-oauth").controller("loginController",["$scope","$window","$location","$rootScope","$timeout","CLIENT_CONFIGURATION","backendService","helperService","shareDataService","$sce","$route","storeQRLoginFormData",loginController]),angular.module("paytm-oauth").controller("loginOtpController",["$scope","$window","$location","$routeParams","CLIENT_CONFIGURATION","backendService","shareDataService","$sce","helperService","$rootScope","$timeout",loginOtpController]),angular.module("paytm-oauth").controller("forgetPasswordController",["$scope","$location","$rootScope","CLIENT_CONFIGURATION","backendService","shareDataService","helperService","$sce",forgetPasswordController]),angular.module("paytm-oauth").controller("changePasswordController",["$scope","$location","$timeout","CLIENT_CONFIGURATION","backendService","shareDataService","$sce",changePasswordController]),angular.module("paytm-oauth").controller("signupController",["$scope","$rootScope","$location","$window","$timeout","CLIENT_CONFIGURATION","helperService","backendService","shareDataService","$route",signupController]),angular.module("paytm-oauth").controller("signupVerifyController",["$scope","$location","$window","CLIENT_CONFIGURATION","helperService","backendService","shareDataService","$rootScope","$timeout",signupVerifyController]),angular.module("paytm-oauth").controller("verifyLoginOtpController",["$scope","$element","$timeout","CLIENT_CONFIGURATION","helperService","shareDataService","backendService",verifyLoginOtpController]),angular.module("paytm-oauth").controller("detailsConfirmationCtrl",["$scope","$location","$log","claimMergeFactory","$routeParams",detailsConfirmationCtrl]),angular.module("paytm-oauth").controller("addMobileScreenController",["$scope","backendService","shareDataService","$location",addMobileScreenController]),angular.module("paytm-oauth").controller("addMobileScreenOtpCtrl",["$scope","$window","backendService","$timeout","shareDataService",addMobileScreenOtpCtrl]),angular.module("paytm-oauth").controller("qrCodeLoginCtrl",["$scope","$interval","backendService","$window","CLIENT_CONFIGURATION","$timeout","$rootScope","$document","socketService","helperService",qrCodeLoginCtrl]),angular.module("paytm-oauth").controller("displayMessageCtrl",["$scope","$location","CLIENT_CONFIGURATION","shareDataService","$route","helperService","backendService",displayMessageCtrl]),angular.module("paytm-oauth").controller("minKycCtrl",["$scope","backendService","shareDataService","helperService","$window","$timeout","$location",minKycCtrl]),angular.module("paytm-oauth").controller("emailResetOtpCtrl",["$scope","shareDataService","$location",emailResetOtpCtrl]),angular.module("paytm-oauth").controller("messageController",["$scope","$location","CLIENT_CONFIGURATION","shareDataService","$route","helperService","backendService",messageController]),angular.module("paytm-oauth-widget",[]).factory("shareDataService",function(){var e=!0,t="";return{signupOtpResponseData:{docType:"",docValue:"",name:"",minKycState:""},getRefreshSignup:function(){return this.refreshCSRFSignup},setRefreshSignup:function(e){this.refreshCSRFSignup=e},getMessage:function(){return this.otpMessage},setMessage:function(e){this.otpMessage=e},getForgotPasswordConfirmationMessage:function(){return this.forgotPassConfMessage},setForgotPasswordConfirmationMessage:function(e){this.forgotPassConfMessage=e},setCodeForgotPassword:function(e){this.codeForgotPassword=e},getCodeForgotPassword:function(){return this.codeForgotPassword},getAjaxErrorMessage:function(){return"Oops..something is wrong here. If this issue persists, please raise a query at paytm.com/care. Thank you for your patience"},getSignupData:function(){return this.signupData},setSignupData:function(e){this.signupData=e},getAirtelCustomHeaderMessage:function(){return"To pay via Credit Card, please sign in"},getIsMobileRegistered:function(){return e},setIsMobileRegistered:function(t){e=t},getMaskEmail:function(){return t},setMaskEmail:function(e){t=e},setPasscodeData:function(e){this.passcodeData=e},getPasscodeData:function(){return this.passcodeData},setPasscodeDataState:function(e){this.passcodeState=e},getPasscodeDataState:function(){return this.passcodeState},setForgotPasswordMessage:function(e){this.forgotPasswordMessage=e},getForgotPasswordMessage:function(){return this.forgotPasswordMessage},setAddPhoneState:function(e){this.addPhoneState=e},getAddPhoneState:function(){return this.addPhoneState},setDisplayTroubleLogin:function(e){return this.displayTroubleLogin=e},getDisplayTroubleLogin:function(){return this.displayTroubleLogin},setSignupOtpResData:function(e){this.signupOtpResponseData=e},getSignupOtpResData:function(){return this.signupOtpResponseData},getLeftSection:function(){return this.leftSection},setLeftSection:function(e){this.leftSection=e},getEmail:function(){return this.forgetPasswordEmail},getPhone:function(){return this.forgetPasswordPhone},setPhone:function(e){this.forgetPasswordPhone=e},setEmail:function(e){this.forgetPasswordEmail=e}}}).service("helperService",["$location","shareDataService","DEVICE_REGEX",function(e,t,n){var r=n.tablet.test(navigator.userAgent),o=n.mobile.test(navigator.userAgent),i="device";r?i="tablet":o&&(i="mobile"),this.readCookie=function(e){for(var t=e+"=",n=document.cookie.split(";"),r=0;r<n.length;r++){for(var o=n[r];" "==o.charAt(0);)o=o.substring(1,o.length);if(0==o.indexOf(t))return o.substring(t.length,o.length)}return null},this.getParameterByName=function(e){e=e.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var t=new RegExp("[\\?&]"+e+"=([^&#]*)").exec(location.search);return null==t?"":decodeURIComponent(t[1].replace(/\+/g," "))},this.initialise=function(){var e=this.getParameterByName("device");e?document.cookie="device="+e+"; path=/":e=this.readCookie("device")},this.mobileRgx=function(e){return/^[57-9]{1}[0-9]{9}$/.test(e)},this.emailRgx=function(e){return/^[_A-Za-z0-9-\+]+(\.[_A-Za-z0-9-]+)*(\+[_A-Za-z0-9-]+){0,1}@[A-Za-z0-9-]+(\.[A-Za-z0-9]+)*(\.[A-Za-z]{2,})$/.test(e)},this.isMobile=function(e){return/^\d+$/.test(e)},this.checkValidation=function(e,t){this.isMobile(e)?/^[5-9]{1}[0-9]{9}$/.test(e)?t.$setValidity("mobileValid",!0):t.$setValidity("mobileValid",!1):/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/.test(e)?t.$setValidity("emailValid",!0):t.$setValidity("emailValid",!1)},this.rsaEncrypt=function(e,t){var n=new JSEncrypt;return n.setPublicKey(t),n.encrypt(e)},this.displayMinKycFlow=function(n){t.setSignupOtpResData(n),e.path("/minKyc")},this.gaDataLayer=function(e){e.platform=i,"undefined"!=typeof dataLayer&&dataLayer.push(e)}}]).service("backendService",["$http","helperService","$q","$location",function(e,t,n,r){return{generateOtp:function(n,r,o){var i,a,s,l,c;i=t.getParameterByName("response_type"),a=t.getParameterByName("redirect_uri"),l=t.getParameterByName("scope"),s=t.getParameterByName("state"),c=t.getParameterByName("theme");var d={data:n,redirectUri:a,clientId:t.getParameterByName("client_id"),scope:l,loginData:s,responseType:i,theme:c,doNotRedirect:!1};e.post("/login/otp",d,{method:"POST",headers:{"Content-Type":"application/json"}}).success(r).error(o)},clearSession:function(t,n,r){var o={state:t};e.post("/tokens/deleteAll",o).success(n).error(r)},resendOtpForgotPassword:function(t,n,r,o,i){var a={email:t,sendotp:n,csrfToken:r};e.post("/api/forgetPass",a,{method:"POST",headers:{"Content-Type":"application/json"}}).success(o).error(i)},getCookie:function(e){for(var t=e+"=",n=document.cookie.split(";"),r=0;r<n.length;r++){for(var o=n[r];" "==o.charAt(0);)o=o.substring(1);if(0==o.indexOf(t))return o.substring(t.length,o.length)}return""},verifyOtp:function(t,n,r,o){var i;i="login"==n?"/login/validate/otp":"/api/forgetPass/validateOtp";var a={method:"POST",headers:{"Content-Type":"application/json"}},s=this.getCookie("PT-UWS");a.headers.uwsCookie=s,e.post(i,t,a).success(r).error(o)},forgotPassword:function(t,n,r,o,i){var a={email:t,sendotp:n,csrfToken:r};e.post("/api/forgetPasswordWeb",a,{method:"POST",headers:{"Content-Type":"application/json"}}).success(o).error(i)},forgotPasswordEmailOnly:function(n,r,o,i){var a="/api/forgetpassword/panel?theme="+n,s=t.getParameterByName("client_id");"ump2"!=n&&"dashboard"!=n||(a=a+"&clientId="+s);r.sendotp="both",e.post(a,r,{method:"POST",headers:{"Content-Type":"application/json"}}).success(o).error(i)},forgotPasswordAPI:function(n,r,o){var i={url:"/forgetpassword",method:"PUT",headers:{"Content-Type":"application/json",clientName:t.getParameterByName("client_id"),loginId:n.loginId,csrfToken:n.csrfToken}};e(i).success(r).error(o)},changePassword:function(t,n,r){e.post("/api/resetPassword",t,{method:"POST",headers:{"Content-Type":"application/json"}}).success(n).error(r)},register:function(e,n,r,o,i,a,s){var l,c,d,u,m,f;l=t.getParameterByName("response_type"),c=t.getParameterByName("redirect_uri"),u=t.getParameterByName("scope"),d=t.getParameterByName("state"),m=t.getParameterByName("theme"),f=t.getParameterByName("client_id");var p={email:e=e||"",mobile:n,loginPassword:r,csrfToken:o,redirectUri:c,clientId:f,scope:u,state:d,responseType:l,theme:m,dob_agreement:i},h=t.getParameterByName("channel");h&&(p.channel=h);var g={method:"POST",headers:{"Content-Type":"application/json"}};return"web"===m||"mp-web"===m||"mp-mall"===m?this.wrapperService("/v3/api/register",p,g):this.wrapperService("/v2/api/register",p,g)},registerVerify:function(e,n,r,o,i,a,s){var l=t.getParameterByName("theme"),c=t.getParameterByName("showKycPopup")||!0,d={otp:e,signupToken:n,csrfToken:r,userData:o},u={method:"POST",headers:{"Content-Type":"application/json"}};return"web"===l||"mp-web"===l||"mp-mall"===l||"mp-html5"===l||"mall-html5"===l?1!=i&&"true"!=i||"false"==c||0==c?this.wrapperService("/v3/api/register/validate",d,u):this.wrapperService("/v5/api/register/validate",d,u):this.wrapperService("/v2/api/register/validate",d,u)},registerOnlyEmail:function(e,n,r,o,i,a){var s={email:e,password:n,confirmPassword:r,csrfToken:o,clientName:t.getParameterByName("client_id")};return this.wrapperServiceForSignUp("/email/signup/init",s,{method:"POST",headers:{"Content-Type":"application/json"}})},resendOtp:function(t,n,r){var o={signupToken:t};e.post("/v2/api/register/resendOtp",o,{method:"POST",headers:{"Content-Type":"application/json"}}).success(n).error(r)},resendOtpLoginFlow:function(t,n,r){e.post("/login/resend/otp",t,{method:"POST",headers:{"Content-Type":"application/json"}}).success(n).error(r)},wrapperService:function(t,r,o){var i=n.defer();return e.post(t,r,o).success(function(e){i.resolve(e)}).error(function(e){i.reject(e)}),i.promise},wrapperServiceForSignUp:function(t,r,o){var i=n.defer();return e.post(t,r,o).success(function(e){i.resolve(e)}).error(function(e){i.resolve(e)}),i.promise},addUserPhone:function(t,r,o){var i=n.defer();return e.put(t,{phone:r.phone},{headers:{state:o}}).success(function(e){i.resolve(e)}).error(function(e){i.reject(e)}),i.promise},addUserPhoneResendOtp:function(t,r){var o=n.defer();return e.post(t,r).success(function(e){o.resolve(e)}).error(function(e){o.reject(e)}),o.promise},addUserPhoneValidateOTP:function(t,r,o){var i=n.defer();return e.post(t,r).success(function(e){i.resolve(e)}).error(function(e){i.reject(e)}),i.promise},passodeService:function(t,r){var o=n.defer();return e.post(t,r).success(function(e){o.resolve(e)}).error(function(e){o.reject(e)}),o.promise},handleResponse:function(e,t){if(e.redirectUri){var n,r="error="+t.responseCode+"&errorMessage="+t.message;n=-1==e.redirectUri.indexOf("?")?e.redirectUri+"?"+r:e.redirectUri+"&"+r,console.log("newRedirect: ",n),window.location=n}else $scope.formError=!0,$scope.formErrorMsg=t.message},generateQrCode:function(t,r){var o=n.defer();return e.get(t,{params:{authState:r}}).success(function(e){o.resolve(e)}).error(function(e){o.reject(e)}),o.promise},pollRequest:function(t,r){var o=n.defer();return e.post(t,r).success(function(e){o.resolve(e)}).error(function(e){o.reject(e)}),o.promise},goTo:function(e){r.path(e)},getIVRData:function(){var t=n.defer();return e.get("/property/config?properties=forget_password_ivr_number").success(function(e){t.resolve(e)}).error(function(e){t.reject(e)}),t.promise}}}]).service("socketService",["$rootScope",function(e){var t;this.buildSocketConnection=function(){(t=io.connect(e.qrNodeServerUrl,{transports:["polling","websocket"]})).on("disconnect",function(e){})},this.on=function(n,r){t.on(n,function(){var n=arguments;e.$apply(function(){r.apply(t,n)})})},this.emit=function(n,r,o){t.emit(n,r,function(){var n=arguments;e.$apply(function(){o&&o.apply(t,n)})})},this.disconnect=function(){t.disconnect()}}]).factory("claimMergeFactory",[function(){var e={state:"unknown"};return e}]).factory("storeQRLoginFormData",function(){var e={};return e.data=null,e.get=function(){return e.data},e.set=function(t){e.data=t},e}),angular.module("paytm-oauth-widget").directive("emailValidate",[function(){return{require:"ngModel",link:function(e,t,n,r){t.on("blur",function(n){e.$apply(function(){t.val()&&(/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/.test(t.val())?r.$setValidity("emailValid",!0):r.$setValidity("emailValid",!1))})}),t.on("focus",function(t){e.$apply(function(){r.$setValidity("emailValid",!0)})})}}}]).directive("passwordWithStrength",[function(){return{templateUrl:"/pages/themesv2/templates/passwordStrength.html?ver="+(Math.floor(9e4*Math.random())+1e4),scope:{pwd:"="},restrict:"E",link:function(e,t,n,r){var o=/(?=.*[A-Z])/,i=/(?=.*[0-9])/,a=/(?=.{5,})/,s=/(?=.*[{},/@!$#+:."*;_-])/,l=/(?=.*[a-z])/,c=/(.)\1{4}/;function d(t){if(e.pwdHas={},e.strength="",t){o.test(t)&&(e.pwdHas.upperCase=!0),l.test(t)&&(e.pwdHas.lowerCase=!0),i.test(t)&&(e.pwdHas.numeric=!0),a.test(t)&&(e.pwdHas.fiveChars=!0),s.test(t)&&(e.pwdHas.splChars=!0);var n=t.toLowerCase();c.test(n)?e.strength="Weak":-1===n.indexOf("password")&&-1===n.indexOf("qwerty")&&-1===n.indexOf("paytm")?e.pwdHas.upperCase&&e.pwdHas.numeric&&e.pwdHas.lowerCase&&e.pwdHas.splChars?e.strength="Strong":e.pwdHas.upperCase&&e.pwdHas.numeric&&e.pwdHas.lowerCase?e.strength="Average":e.strength="Weak":e.strength="Weak"}}e.pwd&&d(e.pwd),e.$watch("pwd",function(e,t){e!==t&&d(e)})}}}]).directive("gaClickevent",["helperService",function(e){return{link:function(t,n,r,o){"undefined"!=typeof dataLayer&&n.on("click",function(t){var r=n.val(),o=(n.attr("name"),n.attr("screen-name")),i=n.attr("event-category"),a=n.attr("event-action"),s=n.attr("event-label"),l=n.attr("event-label-two"),c=n.attr("user-id"),d=n.attr("event-type"),u={mobileNumber:{event:"signup_mobile_entered",signup_mobile_number:r},email:{event:"signup_email_entered",signup_email_address:r},signupBtn:{event:"signup_1_clicked",signup_mobile_number:r},signupField1:{event:"signup_field_entered",signup_field:r},signupField2:{event:"signup_field_entered",signup_field:r},signupField3:{event:"signup_field_entered",signup_field:r},gender:{event:"signup_gender_selected",signup_gender:r},signUpCLick2:{event:"signup_2_clicked",signup_mobile_number:r},username:{event:"login_id_entered",login_id:r},paytmLogin:{event:"login_clicked",login_id:r},loginPassword:{event:"signup_password_entered"},signUpOtpResend:{event:"signup_otp_resend"},forgotClick:{event:"login_forgot_password_clicked"},password:{event:"login_password_entered"},"get-password":{event:"login_reset_password_clicked"},customEvent:{event:"custom_event",vertical_name:"oauth",screenName:o||"",event_category:i||"",event_action:a||"",event_label:s||"",event_label2:l||"",user_id:c||""}};"customEvent"==d&&e.gaDataLayer(u[d])})}}}]).directive("gaKeyupEvent",["helperService",function(e){return{require:"ngModel",link:function(t,n,r,o){function i(t){var o=n.val(),a=(r.name,r.screenName),s=r.eventCategory,l=r.eventAction,c=r.eventLabel,d=r.eventLabelTwo,u=r.userId,m=r.eventType,f={mobileNumber:{event:"signup_mobile_entered",signup_mobile_number:o},email:{event:"signup_email_entered",signup_email_address:o},signupBtn:{event:"signup_1_clicked",signup_mobile_number:o},otp:{event:"signup_field_entered",signup_field:"OTP"},firstname:{event:"signup_field_entered",signup_field:"First Name"},lastName:{event:"signup_field_entered",signup_field:"Last Name"},signUpGender:{event:"signup_gender_selected",signup_gender:o},signUpCLick2:{event:"signup_2_clicked",signup_mobile_number:o},username:{event:"login_id_entered",login_id:o},paytmLogin:{event:"login_clicked",login_id:o},loginPassword:{event:"signup_password_entered"},signUpOtpResend:{event:"signup_otp_resend"},forgotClick:{event:"login_forgot_password_clicked"},password:{event:"login_password_entered"},loginRestPassClick:{event:"login_reset_password_clicked"},customEvent:{event:"custom_event",vertical_name:"oauth",screenName:a||"",event_category:s||"",event_action:l||"",event_label:c||"",event_label2:d||"",user_id:u||""}};"customEvent"==m&&o&&(e.gaDataLayer(f[m]),n.off("keyup",i))}"undefined"!=typeof dataLayer&&(n.on("keyup",i),n.on("blur",function(){n.on("keyup",i)}))}}}]).directive("mobileValidate",[function(){return{require:"ngModel",link:function(e,t,n,r){t.on("keydown",function(n){var r=e.sessionData.email;/^\d+$/.test(r)?t.prop("maxLength","10"):t.prop("maxLength","199")}),t.on("blur",function(n){e.$apply(function(){/^\d+/.test(t.val())&&(/^[5-9]{1}[0-9]{9}$/.test(t.val())?r.$setValidity("mobileValid",!0):r.$setValidity("mobileValid",!1))})}),t.on("focus",function(e){r.$setValidity("mobileValid",!0)})}}}]).directive("numberOnly",[function(){return{require:"ngModel",link:function(e,t,n,r){r.$parsers.push(function(e){if(e){var t=e.replace(/[^0-9]/g,"");return t!==e&&(r.$setViewValue(t),r.$render()),0==t.length&&r.$setPristine(),t}});var o=n.numberOnly||"mobile";"otp"==o&&r.$setValidity("otpValid",!0),t.on("blur",function(n){0!=t.val().length&&e.$apply(function(){"otp"==o?6!=t.val().length?r.$setValidity("otpValid",!1):r.$setValidity("otpValid",!0):/^[5-9]{1}[0-9]{9}$/.test(t.val())?r.$setValidity("mobileValid",!0):r.$setValidity("mobileValid",!1)})}),t.on("focus",function(t){e.$apply(function(){"otp"==o?r.$setValidity("otpValid",!0):r.$setValidity("mobileValid",!0)})})}}}]).directive("includeTemplate",function(){return{restrict:"AE",templateUrl:function(e,t){return t.templatePath},controller:"@",name:"ctrl"}}).directive("qrCodeLogin",[function(){return{restrict:"E",templateUrl:"/pages/themesv2/templates/qrCodeLogin.html?ver="+(Math.floor(9e4*Math.random())+1e4),controller:"qrCodeLoginCtrl"}}]).directive("logoHeader",function(){return{restrict:"E",template:'<div id="login-header-wrapper"><div id="img-container"><img ng-if="imageName" width={{width}} ng-src={{"/pages/themesv2/images/"+imageName}}></div></div><h4 class="header" ng-bind="headerText"></h4>',link:function(e,t,n){e.headerText=n.headerText,e.imageName=n.imageName,e.width=n.width?n.width:"auto"}}}).directive("numeric",[function(){return{require:"ngModel",link:function(e,t,n,r){r.$parsers.push(function(e){if(e){var t=e.replace(/[^0-9]/g,"");return t!==e&&(r.$setViewValue(t),r.$render()),0==t.length&&r.$setPristine(),t}return null}),t.on("blur",function(e){t.val().length})}}}]).directive("leftStaticSection",["shareDataService",function(e){return{restrict:"E",templateUrl:"/pages/themesv2/templates/leftStaticSection.html?ver="+(Math.floor(9e4*Math.random())+1e4),link:function(t,n){t.showSection=e.getLeftSection()}}}]).directive("leftStaticSectionInsurance",["shareDataService",function(e){return{restrict:"E",templateUrl:"/pages/themesv2/templates/leftStaticSectionInsurance.html?ver="+(Math.floor(9e4*Math.random())+1e4),link:function(t,n){t.showSection=e.getLeftSection()}}}]).directive("leftStaticSectionTravel",["shareDataService",function(e){return{restrict:"E",templateUrl:"/pages/themesv2/templates/leftStaticSectionTravel.html?ver="+(Math.floor(9e4*Math.random())+1e4),link:function(t,n){t.showSection=e.getLeftSection()}}}]).directive("leftStaticSectionPos",["shareDataService",function(e){return{restrict:"E",templateUrl:"/pages/themesv2/templates/leftStaticSectionPos.html?ver="+(Math.floor(9e4*Math.random())+1e4),link:function(t,n){t.showSection=e.getLeftSection()}}}]).directive("moveNextOnMaxlength",["$timeout",function(e){return{restrict:"A",link:function(t,n){n.on("input",function(e){if(n.val().length==n.attr("maxlength")){var t=n.next();t.length&&t[0].focus()}}),n.on("keydown",function(e){if((8===e.which||46==e.which)&&!n.val().length){var t=n.attr("index");if(t>0)angular.element(document.querySelector("#input-"+--t))[0].focus()}}),e(function(){0==n.attr("index")&&n[0].focus()})}}}]).directive("kycDoc",["$timeout",function(e){var t=[[0,1,2,3,4,5,6,7,8,9],[1,2,3,4,0,6,7,8,9,5],[2,3,4,0,1,7,8,9,5,6],[3,4,0,1,2,8,9,5,6,7],[4,0,1,2,3,9,5,6,7,8],[5,9,8,7,6,0,4,3,2,1],[6,5,9,8,7,1,0,4,3,2],[7,6,5,9,8,2,1,0,4,3],[8,7,6,5,9,3,2,1,0,4],[9,8,7,6,5,4,3,2,1,0]],n=[[0,1,2,3,4,5,6,7,8,9],[1,5,7,6,2,8,3,0,9,4],[5,8,0,3,7,9,6,1,4,2],[8,9,1,6,0,4,3,5,2,7],[9,4,5,3,1,2,6,8,7,0],[4,2,8,6,5,7,3,9,0,1],[2,7,9,3,8,0,6,4,1,5],[7,0,4,6,9,1,3,2,5,8]];function r(e){var r=0,o=function(e){for(var t=[],n=0;n<e.length;n++)t[n]=parseInt(e.substr(n,1));return t=t.reverse()}(e);return o.forEach(function(e,i){r=t[r][n[i%8][o[i]]]}),0==r}return{restrict:"E",require:["^form"],templateUrl:"/pages/themesv2/templates/kycDocForm.html",link:function(e,t,n,o){var i="",a=!0,s=!0;e.formCtrl=o[0],n.$observe("docType",function(t){e.docData=e.documents[t],i=t,e.formCtrl.$setPristine(),e.ctrl.showRequiredError=!1,e.ctrl.error.showError=!1,e.ctrl.customerAgreement=!1}),e.validateDoc=function(){a=!e.kycData.kycDocValue||("aadhar"===i?function(e){var t,n,o,i,a=!0,s=!1;for("0"!=e[0]&&"1"!=e[0]||(a=!1),t=1;t<e.length;t++)e[0]!=e[t]&&(s=!0);return s||(a=!1),n=e.slice(0,4),o=e.slice(4,8),i=e.slice(8,12),n!==o&&o!==i&&i!==n||(a=!1),a&&r(e)}(e.kycData.kycDocValue):e.docData.regex.test(e.kycData.kycDocValue)),e.formCtrl.kycDocType.$setValidity("docValid",a)},e.validateName=function(){e.docData&&(s=!e.kycData.kycDocName||/^[a-zA-Z ]+$/.test(e.kycData.kycDocName),e.formCtrl[e.docData.docType+"name"].$setValidity("docNameValid",s))},e.removeError=function(){e.ctrl.error&&(e.ctrl.error.showError=!1)}}}}]).directive("headerStrip",["$location","shareDataService",function(e,t){return{restrict:"E",templateUrl:"/pages/themesv2/templates/headerStrip.html",scope:{subTheme:"@",header:"=",topRighttext:"@?",topRightfn:"=?",showBack:"@?",showBackLogin:"@?"},link:function(t,n,r,o){t.goBackToLogin=function(){this.showBackLogin?e.url("/login"):e.url("/displayMessage")}}}}]).directive("autofillInput",["$timeout",function(e){return{link:function(t,n,r,o){e(function(){document.querySelectorAll("input:-webkit-autofill").length&&(t.autofillFlag=!0);var e=t.$watch("sessionData.email",function(r,o){var i=window.getComputedStyle(n[0]).getPropertyValue("background-color");"rgba(0, 0, 0, 0)"!==i&&"rgb(255, 255, 255)"!==i||(t.autofillFlag&&(t.sessionData.isInvalidUserNamePassword=!1),e())})},500)}}}]).directive("mdInputContainer",["$timeout",function(e){return function(t,n){e(function(){n[0].querySelector("input:-webkit-autofill")&&n.addClass("md-input-has-value")},500)}}]).directive("customInclude",["$http","$templateCache","$compile",function(e,t,n){return function(r,o,i){var a=i.customInclude;e.get(a,{cache:t}).success(function(e){var t=o.html(e).contents();n(t)(r)})}}]),(app=angular.module("claimMergeServices",[])).service("claimMergeService",["$http","$q","$rootScope",function(e,t,n){this.createPasswordFromLink=function(n){var r=t.defer();return e.post("/createPasswordFromLink",n).success(function(e){r.resolve(e)}).error(function(e){r.reject(e.message)}),r.promise},this.addMobile=function(r){var o=t.defer();return e.put("/v3/user/phone",r,{headers:{state:n.stateCode}}).success(function(e){o.resolve(e)}).error(function(e){o.reject(e.message)}),o.promise},this.verifyMobile=function(n){var r=t.defer();return e.post("/v3/user/validate/otp",n).success(function(e){"SUCCESS"==e.status?r.resolve(e):r.reject(e.message)}).error(function(e){r.reject(e.message)}),r.promise},this.validateOtp=function(n){var r=t.defer();return e.post("/merge/account/validate/otp",n).success(function(e){"SUCCESS"==e.status?r.resolve(e):r.reject(e)}).error(function(e){r.reject(e)}),r.promise},this.userChallenge=function(n){var r=t.defer();return e.post("/v1/merge/challenge",n).success(function(e){"SUCCESS"===e.status?r.resolve(e):r.reject(e)}).error(function(e){r.reject(e)}),r.promise},this.accountSelection=function(n){var r=t.defer();return e.post("/merge/account",n).success(function(e){"SUCCESS"===e.status?r.resolve(e):r.reject(e)}).error(function(e){r.reject(e)}),r.promise},this.resendOtpVerify=function(n){var r=t.defer();return e.post("/v3/user/resend/otp",n).success(function(e){"SUCCESS"===e.status?r.resolve(e):r.reject(e)}).error(function(e){r.reject(e)}),r.promise},this.resendOtpValidate=function(n){var r=t.defer();return e.post("/merge/account/resend/otp",n).success(function(e){"SUCCESS"===e.status?r.resolve(e):r.reject(e.message)}).error(function(e){r.reject(e)}),r.promise},this.cancelOtpProcess=function(n){var r=t.defer();return e.post("/merge/account/validate/otp",n).success(function(e){"SUCCESS"==e.status?r.resolve(e):r.reject(e)}).error(function(e){r.reject(e)}),r.promise},this.makePostCall=function(n,r){var o=t.defer();return e.post(r,n).success(function(e){"SUCCESS"==e.status?o.resolve(e):o.reject(e.message)}).error(function(e){o.reject(e.message)}),o.promise}}]),app.directive("paytmInfo",function(){return{restrict:"AE",templateUrl:"../pages/themesv2/templates/paytm-info.html"}}),app.directive("numeric",function(){return{require:"ngModel",link:function(e,t,n,r){r.$parsers.push(function(e){if(e){var t=e.replace(/[^0-9]/g,"");return t!==e&&(r.$setViewValue(t),r.$render()),0==t.length&&r.$setPristine(),t}})}}}),app.controller("mergeAccountCtrl",["$scope","$http","$rootScope","$location","claimMergeService","$routeParams","$timeout","$window","helperService",function(e,t,n,r,o,i,a,s,l){e.spinnerVisible=!1,e.mergeDisabled=!1,e.redirect=!1,e.spinners={balanceSpinnerVisible:!1,cardSpinnerVisible:!1},i.option&&(e.option="phone"===i.option?"mobile number":"Email ID",n.option=e.option),e.formData={},e.mergeSection=!!n.mergeSection&&n.mergeSection,e.attentionSection=!1,e.claimAccount=function(){e.spinnerVisible=!0;var t={confirmation:0,state:n.stateCode};o.userChallenge(t).then(function(e){e.minKycState&&e.pubKey?l.displayMinKycFlow({redirectUri:e.redirect_uri?e.redirect_uri:"https://paytm.com/",minKycState:e.minKycState,isKycDocMandate:e.isKycDocMandate,pubKey:e.pubKey}):s.location.href=e.redirect_uri?e.redirect_uri:"https://paytm.com/"},function(t){"513"==t.responseCode?(n.finalMessage=t.message,r.path("/redirect-page")):(e.redirect=!0,e.err=t.message,e.spinnerVisible=!1)})},e.mergeAccounts=function(){if(!e.mergeDisabled)if(e.formData.cardDigits||e.formData.balance){var t,i;e.formData.balance?(t="check_balance",i=e.formData.balance,e.spinners.balanceSpinnerVisible=!0):e.formData.cardDigits&&(t="saved_card",i=e.formData.cardDigits,e.spinners.cardSpinnerVisible=!0);var a={option:t,data:i,confirmation:1,state:n.stateCode};e.mergeDisabled=!0,o.userChallenge(a).then(function(t){if("16"==t.responseCode||"15"==t.responseCode)n.redirect_uri=t.redirect_uri?t.redirect_uri:"https://paytm.com/",n.finalMessage=t.message,r.path("/redirect-page");else if("17"==t.responseCode||"18"==t.responseCode){n.stateCode=t.state,n.data=t,t.parkedState&&(n.parkedStateCode=t.parkedState);var o,i=t.valueList.length;o=t.valueList[0].indexOf("@")>-1?"email":"phone",r.path("/account-chooser/"+o+"/"+i)}else"1025"==t.responseCode&&(n.stateCode=t.state,e.err=t.message,e.spinners={cardSpinnerVisible:!1,balanceSpinnerVisible:!1},e.mergeDisabled=!1)},function(t){"997"==t.responseCode?(e.err=t.message,e.spinners={cardSpinnerVisible:!1,balanceSpinnerVisible:!1},e.mergeDisabled=!1,n.stateCode=t.state?t.state:n.stateCode):"996"==t.responseCode?(n.finalMessage=t.message,r.path("/redirect-page")):"513"==t.responseCode?(n.finalMessage=t.message,r.path("/redirect-page")):(e.err=t.message,e.spinners={cardSpinnerVisible:!1,balanceSpinnerVisible:!1},e.mergeDisabled=!1)})}else e.err="Please enter a valid card number or account balance"},e.isAccountKyc=function(){n.stateCode;e.redirect=!0},e.redirectTo=function(){r.path("/login")},a(function(){"email"===e.option&&(e.claimAccount(),e.attentionSection=!0)})}]),app.controller("kycDecideCtrl",["$scope","$rootScope","$location","claimMergeService",function(e,t,n,r){e.kycMergeChoice=function(e){"no"==e?(t.redirect_uri=t.redirect_uri?t.redirect_uri:"https://paytm.com/",t.finalMessage="You have chosen not to merge previous existing account.",n.path("/redirect-page")):(t.mergeSection=!0,n.path("/merge/"+t.option))}}]),app.controller("redirectPageCtrl",["$scope","$rootScope","$timeout","$window","$location",function(e,t,n,r,o){e.flag=!t.redirect_uri,e.message=t.finalMessage;t.redirect_uri&&t.redirect_uri,function(){var e=!1,t=o.$$absUrl.split("redirect_uri=");if(t&&t.length>1){var n=t[1].split(".com")[0];n&&(n=unescape(n)),"https://paytmmall"===n&&(e=!0)}}();e.redirectToSignUp=function(){o.path("/signup")}}]),app.controller("accountChooserCtrl",["$scope","$http","$rootScope","claimMergeService","$location","$routeParams","$timeout","$window",function(e,t,n,r,o,i,a,s){e.spinnerVisible=!1,e.formData={},e.attentionSection=!1,e.claimAccount=n.data.currentData,e.detailType="phone"===i.detailType?"Email Id":"Phone",e.chooseOption="phone"===i.detailType?"phone number":"email ID",e.emailMessage=n.data.message,1==i.length?(e.accounts=["Yes","No"],e.yesNo=!0):(e.accounts=n.data.valueList,e.yesNo=!1),e.chooseAccount=function(){if(e.err="",e.formData.selection){e.spinnerVisible=!0;var t={type:"No"==e.formData.selection?"email":i.detailType,data:"Yes"==e.formData.selection?n.data.valueList[0]:"No"==e.formData.selection?null:e.formData.selection,confirmation:"No"==e.formData.selection?0:1,state:n.stateCode};null==t.data&&delete t.data,n.selectedDetail=t.data,n.parkedStateCode&&(t.parkedState=n.parkedStateCode),r.accountSelection(t).then(function(t){n.stateCode=t.state,"19"==t.responseCode?o.path("/otp/mobile/validate"):"20"==t.responseCode?(t.parkedState?n.parkedStateCode=t.parkedState:n.parkedStateCode="",o.path("/otp/email/validate")):"16"==t.responseCode?(n.redirect_uri=t.redirect_uri?t.redirect_uri:"https://paytm.com/",n.finalMessage=t.message,o.path("/redirect-page")):"01"==t.responseCode&&(e.spinnerVisible=!1,n.redirect_uri=t.redirect_uri,n.finalMessage=t.message,o.path("/redirect-page"))},function(t){"994"==t.responseCode?(n.redirect_uri=t.redirect_uri,n.finalMessage=t.message,o.path("/redirect-page")):e.err=t.message,e.spinnerVisible=!1})}else e.err="Please select an option"},e.toggleAttention=function(){e.formData.selection?(e.err="",1==i.length?"No"==e.formData.selection?(e.delAccount=n.data.valueList[0],e.attentionSection=!0):e.chooseAccount():(e.delAccount=e.formData.selection===n.data.valueList[0]?n.data.valueList[1]:n.data.valueList[0],e.attentionSection=!0)):e.err="Please select an option"}}]),app.controller("verifyOtpCtrl",["$scope","$http","$location","$rootScope","$window","$timeout","$routeParams","claimMergeService",function(e,t,n,r,o,i,a,s){e.mode=a.mode,e.resendBtnDisabled=!1,e.placeholder="verify"===a.type?"Please enter the OTP":"Please enter the OTP sent to "+r.selectedDetail,"validate"==a.type&&(e.showCancelButton=!0),e.resendOtpValidate=function(){e.resendBtnDisabled=!0,i(function(){e.resendBtnDisabled=!1},3e4);var t={parkedState:"",type:"email"===a.mode?"email":"phone",state:r.stateCode};r.parkedStateCode?t.parkedState=r.parkedStateCode:delete t.parkedState,s.resendOtpValidate(t).then(function(t){e.err=t.message,r.stateCode=t.state,r.parkedStateCode=t.parkedState},function(t){e.err=t})},e.verifyOtp=function(){var t;e.otp&&6==e.otp.length?"verify"==a.type?(t={updatedPhoneOtp:e.otp,state:r.stateCode},s.verifyMobile(t).then(function(e){"05"==e.responseCode?(r.finalMessage=e.message,n.path("/redirect-page")):"06"==e.responseCode&&(r.stateCode=e.state,n.path("/merge/email"))},function(t){e.err=t})):"validate"==a.type&&(t={otp:e.otp,state:r.stateCode,confirmation:1},r.parkedStateCode&&(t.parkedState=r.parkedStateCode),s.validateOtp(t).then(function(e){"16"==e.responseCode?(r.redirect_uri=e.redirect_uri?e.redirect_uri:"https://paytm.com/",r.finalMessage=e.message,n.path("/redirect-page")):"01"==e.responseCode&&(r.redirect_uri=e.redirect_uri,r.finalMessage=e.message,n.path("/redirect-page"))},function(t){"25"==t.responseCode||"26"==t.responseCode?(e.err=t.message,r.stateCode=t.state,t.parkedState&&(r.parkedStateCode=t.parkedState)):e.err=t.message})):e.err="Please enter a valid OTP"},e.resendOtpVerify=function(){e.disableResend=!0,i(function(){e.disableResend=!1},3e4);var t={state:r.stateCode,type:"new"};s.resendOtpVerify(t).then(function(t){"06"==t.responseCode&&(r.stateCode=t.state,e.err=t.message)},function(t){e.err=t.message})},e.resendOtp=function(){"verify"==a.type?e.resendOtpVerify():"validate"==a.type&&e.resendOtpValidate()},e.cancelProcess=function(){var t={otp:e.otp?e.otp:"",state:r.stateCode,confirmation:0};r.parkedStateCode&&(t.parkedState=r.parkedStateCode),s.cancelOtpProcess(t).then(function(e){"16"==e.responseCode?(r.redirect_uri=e.redirect_uri?e.redirect_uri:"https://paytm.com/",r.finalMessage=e.message,n.path("/redirect-page")):"01"==e.responseCode&&(r.redirect_uri=e.redirect_uri,r.finalMessage=e.message,n.path("/redirect-page"))},function(t){e.err=t.message})}}]);
84