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

17 lines
661 KiB

function BigInteger(e,t,n){null!=e&&("number"==typeof e?this.fromNumber(e,t,n):null==t&&"string"!=typeof e?this.fromString(e,256):this.fromString(e,t))}function nbi(){return new BigInteger(null)}function am1(e,t,n,i,r,o){for(;--o>=0;){var a=t*this[e++]+n[i]+r;r=Math.floor(a/67108864),n[i++]=67108863&a}return r}function am2(e,t,n,i,r,o){for(var a=32767&t,s=t>>15;--o>=0;){var c=32767&this[e],l=this[e++]>>15,u=s*c+l*a;c=a*c+((32767&u)<<15)+n[i]+(1073741823&r),r=(c>>>30)+(u>>>15)+s*l+(r>>>30),n[i++]=1073741823&c}return r}function am3(e,t,n,i,r,o){for(var a=16383&t,s=t>>14;--o>=0;){var c=16383&this[e],l=this[e++]>>14,u=s*c+l*a;c=a*c+((16383&u)<<14)+n[i]+r,r=(c>>28)+(u>>14)+s*l,n[i++]=268435455&c}return r}function int2char(e){return BI_RM.charAt(e)}function intAt(e,t){var n=BI_RC[e.charCodeAt(t)];return null==n?-1:n}function bnpCopyTo(e){for(var t=this.t-1;t>=0;--t)e[t]=this[t];e.t=this.t,e.s=this.s}function bnpFromInt(e){this.t=1,this.s=0>e?-1:0,e>0?this[0]=e:-1>e?this[0]=e+this.DV:this.t=0}function nbv(e){var t=nbi();return t.fromInt(e),t}function bnpFromString(e,t,n){var i;if(16==t)i=4;else if(8==t)i=3;else if(256==t)i=8;else if(2==t)i=1;else if(32==t)i=5;else{if(4!=t)return void this.fromRadix(e,t);i=2}this.t=0,this.s=0;for(var r=e.length,o=!1,a=0;--r>=0;){var s=8==i?255&e[r]:intAt(e,r);0>s?"-"==e.charAt(r)&&(o=!0):(o=!1,0==a?this[this.t++]=s:a+i>this.DB?(this[this.t-1]|=(s&(1<<this.DB-a)-1)<<a,this[this.t++]=s>>this.DB-a):this[this.t-1]|=s<<a,a+=i,a>=this.DB&&(a-=this.DB))}8==i&&0!=(128&e[0])&&n&&(this.s=-1,a>0&&(this[this.t-1]|=(1<<this.DB-a)-1<<a)),this.clamp(),o&&BigInteger.ZERO.subTo(this,this)}function bnpClamp(){for(var e=this.s&this.DM;this.t>0&&this[this.t-1]==e;)--this.t}function bnToString(e){if(this.s<0)return"-"+this.negate().toString(e);var t;if(16==e)t=4;else if(8==e)t=3;else if(2==e)t=1;else if(32==e)t=5;else{if(4!=e)return this.toRadix(e);t=2}var n,i=(1<<t)-1,r=!1,o="",a=this.t,s=this.DB-a*this.DB%t;if(a-->0)for(s<this.DB&&(n=this[a]>>s)>0&&(r=!0,o=int2char(n));a>=0;)t>s?(n=(this[a]&(1<<s)-1)<<t-s,n|=this[--a]>>(s+=this.DB-t)):(n=this[a]>>(s-=t)&i,0>=s&&(s+=this.DB,--a)),n>0&&(r=!0),r&&(o+=int2char(n));return r?o:"0"}function bnNegate(){var e=nbi();return BigInteger.ZERO.subTo(this,e),e}function bnAbs(){return this.s<0?this.negate():this}function bnCompareTo(e){var t=this.s-e.s;if(0!=t)return t;var n=this.t;if(t=n-e.t,0!=t)return this.s<0?-t:t;for(;--n>=0;)if(0!=(t=this[n]-e[n]))return t;return 0}function nbits(e){var t,n=1;return 0!=(t=e>>>16)&&(e=t,n+=16),0!=(t=e>>8)&&(e=t,n+=8),0!=(t=e>>4)&&(e=t,n+=4),0!=(t=e>>2)&&(e=t,n+=2),0!=(t=e>>1)&&(e=t,n+=1),n}function bnBitLength(){return this.t<=0?0:this.DB*(this.t-1)+nbits(this[this.t-1]^this.s&this.DM)}function bnpDLShiftTo(e,t){var n;for(n=this.t-1;n>=0;--n)t[n+e]=this[n];for(n=e-1;n>=0;--n)t[n]=0;t.t=this.t+e,t.s=this.s}function bnpDRShiftTo(e,t){for(var n=e;n<this.t;++n)t[n-e]=this[n];t.t=Math.max(this.t-e,0),t.s=this.s}function bnpLShiftTo(e,t){var n,i=e%this.DB,r=this.DB-i,o=(1<<r)-1,a=Math.floor(e/this.DB),s=this.s<<i&this.DM;for(n=this.t-1;n>=0;--n)t[n+a+1]=this[n]>>r|s,s=(this[n]&o)<<i;for(n=a-1;n>=0;--n)t[n]=0;t[a]=s,t.t=this.t+a+1,t.s=this.s,t.clamp()}function bnpRShiftTo(e,t){t.s=this.s;var n=Math.floor(e/this.DB);if(n>=this.t)return void(t.t=0);var i=e%this.DB,r=this.DB-i,o=(1<<i)-1;t[0]=this[n]>>i;for(var a=n+1;a<this.t;++a)t[a-n-1]|=(this[a]&o)<<r,t[a-n]=this[a]>>i;i>0&&(t[this.t-n-1]|=(this.s&o)<<r),t.t=this.t-n,t.clamp()}function bnpSubTo(e,t){for(var n=0,i=0,r=Math.min(e.t,this.t);r>n;)i+=this[n]-e[n],t[n++]=i&this.DM,i>>=this.DB;if(e.t<this.t){for(i-=e.s;n<this.t;)i+=this[n],t[n++]=i&this.DM,i>>=this.DB;i+=this.s}else{for(i+=this.s;n<e.t;)i-=e[n],t[n++]=i&this.DM,i>>=this.DB;i-=e.s}t.s=0>i?-1:0,-1>i?t[n++]=this.DV+i:i>0&&(t[n++]=i),t.t=n,t.clamp()}function bnpMultiplyTo(e,t){var n=this.abs(),i=e.abs(),r=n.t;for(t.t=r+i.t;--r>=0;)t[r]=0;for(r=0;r<i.t;++r)t[r+n.t]=n.am(0,i[r],t,r,0,n.t);t.s=0,t.clamp(),this.s!=e.s&&BigInteger.ZERO.subTo(t,t)}function bnpSquareTo(e){for(var t=this.abs(),n=e.t=2*t.t;--n>=0;)e[n]=0;for(n=0;n<t.t-1;++n){var i=t.am(n,t[n],e,2*n,0,1);(e[n+t.t]+=t.am(n+1,2*t[n],e,2*n+1,i,t.t-n-1))>=t.DV&&(e[n+t.t]-=t.DV,e[n+t.t+1]=1)}e.t>0&&(e[e.t-1]+=t.am(n,t[n],e,2*n,0,1)),e.s=0,e.clamp()}function bnpDivRemTo(e,t,n){var i=e.abs();if(!(i.t<=0)){var r=this.abs();if(r.t<i.t)return null!=t&&t.fromInt(0),void(null!=n&&this.copyTo(n));null==n&&(n=nbi());var o=nbi(),a=this.s,s=e.s,c=this.DB-nbits(i[i.t-1]);c>0?(i.lShiftTo(c,o),r.lShiftTo(c,n)):(i.copyTo(o),r.copyTo(n));var l=o.t,u=o[l-1];if(0!=u){var p=u*(1<<this.F1)+(l>1?o[l-2]>>this.F2:0),d=this.FV/p,f=(1<<this.F1)/p,h=1<<this.F2,g=n.t,m=g-l,y=null==t?nbi():t;for(o.dlShiftTo(m,y),n.compareTo(y)>=0&&(n[n.t++]=1,n.subTo(y,n)),BigInteger.ONE.dlShiftTo(l,y),y.subTo(o,o);o.t<l;)o[o.t++]=0;for(;--m>=0;){var v=n[--g]==u?this.DM:Math.floor(n[g]*d+(n[g-1]+h)*f);if((n[g]+=o.am(0,v,n,m,0,l))<v)for(o.dlShiftTo(m,y),n.subTo(y,n);n[g]<--v;)n.subTo(y,n)}null!=t&&(n.drShiftTo(l,t),a!=s&&BigInteger.ZERO.subTo(t,t)),n.t=l,n.clamp(),c>0&&n.rShiftTo(c,n),0>a&&BigInteger.ZERO.subTo(n,n)}}}function bnMod(e){var t=nbi();return this.abs().divRemTo(e,null,t),this.s<0&&t.compareTo(BigInteger.ZERO)>0&&e.subTo(t,t),t}function Classic(e){this.m=e}function cConvert(e){return e.s<0||e.compareTo(this.m)>=0?e.mod(this.m):e}function cRevert(e){return e}function cReduce(e){e.divRemTo(this.m,null,e)}function cMulTo(e,t,n){e.multiplyTo(t,n),this.reduce(n)}function cSqrTo(e,t){e.squareTo(t),this.reduce(t)}function bnpInvDigit(){if(this.t<1)return 0;var e=this[0];if(0==(1&e))return 0;var t=3&e;return t=t*(2-(15&e)*t)&15,t=t*(2-(255&e)*t)&255,t=t*(2-((65535&e)*t&65535))&65535,t=t*(2-e*t%this.DV)%this.DV,t>0?this.DV-t:-t}function Montgomery(e){this.m=e,this.mp=e.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<<e.DB-15)-1,this.mt2=2*e.t}function montConvert(e){var t=nbi();return e.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),e.s<0&&t.compareTo(BigInteger.ZERO)>0&&this.m.subTo(t,t),t}function montRevert(e){var t=nbi();return e.copyTo(t),this.reduce(t),t}function montReduce(e){for(;e.t<=this.mt2;)e[e.t++]=0;for(var t=0;t<this.m.t;++t){var n=32767&e[t],i=n*this.mpl+((n*this.mph+(e[t]>>15)*this.mpl&this.um)<<15)&e.DM;for(n=t+this.m.t,e[n]+=this.m.am(0,i,e,t,0,this.m.t);e[n]>=e.DV;)e[n]-=e.DV,e[++n]++}e.clamp(),e.drShiftTo(this.m.t,e),e.compareTo(this.m)>=0&&e.subTo(this.m,e)}function montSqrTo(e,t){e.squareTo(t),this.reduce(t)}function montMulTo(e,t,n){e.multiplyTo(t,n),this.reduce(n)}function bnpIsEven(){return 0==(this.t>0?1&this[0]:this.s)}function bnpExp(e,t){if(e>4294967295||1>e)return BigInteger.ONE;var n=nbi(),i=nbi(),r=t.convert(this),o=nbits(e)-1;for(r.copyTo(n);--o>=0;)if(t.sqrTo(n,i),(e&1<<o)>0)t.mulTo(i,r,n);else{var a=n;n=i,i=a}return t.revert(n)}function bnModPowInt(e,t){var n;return n=256>e||t.isEven()?new Classic(t):new Montgomery(t),this.exp(e,n)}function bnClone(){var e=nbi();return this.copyTo(e),e}function bnIntValue(){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 bnByteValue(){return 0==this.t?this.s:this[0]<<24>>24}function bnShortValue(){return 0==this.t?this.s:this[0]<<16>>16}function bnpChunkSize(e){return Math.floor(Math.LN2*this.DB/Math.log(e))}function bnSigNum(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1}function bnpToRadix(e){if(null==e&&(e=10),0==this.signum()||2>e||e>36)return"0";var t=this.chunkSize(e),n=Math.pow(e,t),i=nbv(n),r=nbi(),o=nbi(),a="";for(this.divRemTo(i,r,o);r.signum()>0;)a=(n+o.intValue()).toString(e).substr(1)+a,r.divRemTo(i,r,o);return o.intValue().toString(e)+a}function bnpFromRadix(e,t){this.fromInt(0),null==t&&(t=10);for(var n=this.chunkSize(t),i=Math.pow(t,n),r=!1,o=0,a=0,s=0;s<e.length;++s){var c=intAt(e,s);0>c?"-"==e.charAt(s)&&0==this.signum()&&(r=!0):(a=t*a+c,++o>=n&&(this.dMultiply(i),this.dAddOffset(a,0),o=0,a=0))}o>0&&(this.dMultiply(Math.pow(t,o)),this.dAddOffset(a,0)),r&&BigInteger.ZERO.subTo(this,this)}function bnpFromNumber(e,t,n){if("number"==typeof t)if(2>e)this.fromInt(1);else for(this.fromNumber(e,n),this.testBit(e-1)||this.bitwiseTo(BigInteger.ONE.shiftLeft(e-1),op_or,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(t);)this.dAddOffset(2,0),this.bitLength()>e&&this.subTo(BigInteger.ONE.shiftLeft(e-1),this);else{var i=new Array,r=7&e;i.length=(e>>3)+1,t.nextBytes(i),r>0?i[0]&=(1<<r)-1:i[0]=0,this.fromString(i,256)}}function bnToByteArray(e){var t=this.t,n=new Array;n[0]=this.s;var i,r=this.DB-t*this.DB%8,o=0;if(t-->0)for(r<this.DB&&(i=this[t]>>r)!=(this.s&this.DM)>>r&&(n[o++]=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)),e&&0!=(128&i)&&(i|=-256),0==o&&(128&this.s)!=(128&i)&&++o,(o>0||i!=this.s)&&(n[o++]=i);return n}function bnEquals(e){return 0==this.compareTo(e)}function bnMin(e){return this.compareTo(e)<0?this:e}function bnMax(e){return this.compareTo(e)>0?this:e}function bnpBitwiseTo(e,t,n){var i,r,o=Math.min(e.t,this.t);for(i=0;o>i;++i)n[i]=t(this[i],e[i]);if(e.t<this.t){for(r=e.s&this.DM,i=o;i<this.t;++i)n[i]=t(this[i],r);n.t=this.t}else{for(r=this.s&this.DM,i=o;i<e.t;++i)n[i]=t(r,e[i]);n.t=e.t}n.s=t(this.s,e.s),n.clamp()}function op_and(e,t){return e&t}function bnAnd(e){var t=nbi();return this.bitwiseTo(e,op_and,t),t}function op_or(e,t){return e|t}function bnOr(e){var t=nbi();return this.bitwiseTo(e,op_or,t),t}function op_xor(e,t){return e^t}function bnXor(e){var t=nbi();return this.bitwiseTo(e,op_xor,t),t}function op_andnot(e,t){return e&~t}function bnAndNot(e){var t=nbi();return this.bitwiseTo(e,op_andnot,t),t}function bnNot(){for(var e=nbi(),t=0;t<this.t;++t)e[t]=this.DM&~this[t];return e.t=this.t,e.s=~this.s,e}function bnShiftLeft(e){var t=nbi();return 0>e?this.rShiftTo(-e,t):this.lShiftTo(e,t),t}function bnShiftRight(e){var t=nbi();return 0>e?this.lShiftTo(-e,t):this.rShiftTo(e,t),t}function lbit(e){if(0==e)return-1;var t=0;return 0==(65535&e)&&(e>>=16,t+=16),0==(255&e)&&(e>>=8,t+=8),0==(15&e)&&(e>>=4,t+=4),0==(3&e)&&(e>>=2,t+=2),0==(1&e)&&++t,t}function bnGetLowestSetBit(){for(var e=0;e<this.t;++e)if(0!=this[e])return e*this.DB+lbit(this[e]);return this.s<0?this.t*this.DB:-1}function cbit(e){for(var t=0;0!=e;)e&=e-1,++t;return t}function bnBitCount(){for(var e=0,t=this.s&this.DM,n=0;n<this.t;++n)e+=cbit(this[n]^t);return e}function bnTestBit(e){var t=Math.floor(e/this.DB);return t>=this.t?0!=this.s:0!=(this[t]&1<<e%this.DB)}function bnpChangeBit(e,t){var n=BigInteger.ONE.shiftLeft(e);return this.bitwiseTo(n,t,n),n}function bnSetBit(e){return this.changeBit(e,op_or)}function bnClearBit(e){return this.changeBit(e,op_andnot)}function bnFlipBit(e){return this.changeBit(e,op_xor)}function bnpAddTo(e,t){for(var n=0,i=0,r=Math.min(e.t,this.t);r>n;)i+=this[n]+e[n],t[n++]=i&this.DM,i>>=this.DB;if(e.t<this.t){for(i+=e.s;n<this.t;)i+=this[n],t[n++]=i&this.DM,i>>=this.DB;i+=this.s}else{for(i+=this.s;n<e.t;)i+=e[n],t[n++]=i&this.DM,i>>=this.DB;i+=e.s}t.s=0>i?-1:0,i>0?t[n++]=i:-1>i&&(t[n++]=this.DV+i),t.t=n,t.clamp()}function bnAdd(e){var t=nbi();return this.addTo(e,t),t}function bnSubtract(e){var t=nbi();return this.subTo(e,t),t}function bnMultiply(e){var t=nbi();return this.multiplyTo(e,t),t}function bnSquare(){var e=nbi();return this.squareTo(e),e}function bnDivide(e){var t=nbi();return this.divRemTo(e,t,null),t}function bnRemainder(e){var t=nbi();return this.divRemTo(e,null,t),t}function bnDivideAndRemainder(e){var t=nbi(),n=nbi();return this.divRemTo(e,t,n),new Array(t,n)}function bnpDMultiply(e){this[this.t]=this.am(0,e-1,this,0,0,this.t),++this.t,this.clamp()}function bnpDAddOffset(e,t){if(0!=e){for(;this.t<=t;)this[this.t++]=0;for(this[t]+=e;this[t]>=this.DV;)this[t]-=this.DV,++t>=this.t&&(this[this.t++]=0),++this[t]}}function NullExp(){}function nNop(e){return e}function nMulTo(e,t,n){e.multiplyTo(t,n)}function nSqrTo(e,t){e.squareTo(t)}function bnPow(e){return this.exp(e,new NullExp)}function bnpMultiplyLowerTo(e,t,n){var i=Math.min(this.t+e.t,t);for(n.s=0,n.t=i;i>0;)n[--i]=0;var r;for(r=n.t-this.t;r>i;++i)n[i+this.t]=this.am(0,e[i],n,i,0,this.t);for(r=Math.min(e.t,t);r>i;++i)this.am(0,e[i],n,i,0,t-i);n.clamp()}function bnpMultiplyUpperTo(e,t,n){--t;var i=n.t=this.t+e.t-t;for(n.s=0;--i>=0;)n[i]=0;for(i=Math.max(t-this.t,0);i<e.t;++i)n[this.t+i-t]=this.am(t-i,e[i],n,0,0,this.t+i-t);n.clamp(),n.drShiftTo(1,n)}function Barrett(e){this.r2=nbi(),this.q3=nbi(),BigInteger.ONE.dlShiftTo(2*e.t,this.r2),this.mu=this.r2.divide(e),this.m=e}function barrettConvert(e){if(e.s<0||e.t>2*this.m.t)return e.mod(this.m);if(e.compareTo(this.m)<0)return e;var t=nbi();return e.copyTo(t),this.reduce(t),t}function barrettRevert(e){return e}function barrettReduce(e){for(e.drShiftTo(this.m.t-1,this.r2),e.t>this.m.t+1&&(e.t=this.m.t+1,e.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);e.compareTo(this.r2)<0;)e.dAddOffset(1,this.m.t+1);for(e.subTo(this.r2,e);e.compareTo(this.m)>=0;)e.subTo(this.m,e)}function barrettSqrTo(e,t){e.squareTo(t),this.reduce(t)}function barrettMulTo(e,t,n){e.multiplyTo(t,n),this.reduce(n)}function bnModPow(e,t){var n,i,r=e.bitLength(),o=nbv(1);if(0>=r)return o;n=18>r?1:48>r?3:144>r?4:768>r?5:6,i=8>r?new Classic(t):t.isEven()?new Barrett(t):new Montgomery(t);var a=new Array,s=3,c=n-1,l=(1<<n)-1;if(a[1]=i.convert(this),n>1){var u=nbi();for(i.sqrTo(a[1],u);l>=s;)a[s]=nbi(),i.mulTo(u,a[s-2],a[s]),s+=2}var p,d,f=e.t-1,h=!0,g=nbi();for(r=nbits(e[f])-1;f>=0;){for(r>=c?p=e[f]>>r-c&l:(p=(e[f]&(1<<r+1)-1)<<c-r,f>0&&(p|=e[f-1]>>this.DB+r-c)),s=n;0==(1&p);)p>>=1,--s;if((r-=s)<0&&(r+=this.DB,--f),h)a[p].copyTo(o),h=!1;else{for(;s>1;)i.sqrTo(o,g),i.sqrTo(g,o),s-=2;s>0?i.sqrTo(o,g):(d=o,o=g,g=d),i.mulTo(g,a[p],o)}for(;f>=0&&0==(e[f]&1<<r);)i.sqrTo(o,g),d=o,o=g,g=d,--r<0&&(r=this.DB-1,--f)}return i.revert(o)}function bnGCD(e){var t=this.s<0?this.negate():this.clone(),n=e.s<0?e.negate():e.clone();if(t.compareTo(n)<0){var i=t;t=n,n=i}var r=t.getLowestSetBit(),o=n.getLowestSetBit();if(0>o)return t;for(o>r&&(o=r),o>0&&(t.rShiftTo(o,t),n.rShiftTo(o,n));t.signum()>0;)(r=t.getLowestSetBit())>0&&t.rShiftTo(r,t),(r=n.getLowestSetBit())>0&&n.rShiftTo(r,n),t.compareTo(n)>=0?(t.subTo(n,t),t.rShiftTo(1,t)):(n.subTo(t,n),n.rShiftTo(1,n));return o>0&&n.lShiftTo(o,n),n}function bnpModInt(e){if(0>=e)return 0;var t=this.DV%e,n=this.s<0?e-1:0;if(this.t>0)if(0==t)n=this[0]%e;else for(var i=this.t-1;i>=0;--i)n=(t*n+this[i])%e;return n}function bnModInverse(e){var t=e.isEven();if(this.isEven()&&t||0==e.signum())return BigInteger.ZERO;for(var n=e.clone(),i=this.clone(),r=nbv(1),o=nbv(0),a=nbv(0),s=nbv(1);0!=n.signum();){for(;n.isEven();)n.rShiftTo(1,n),t?(r.isEven()&&o.isEven()||(r.addTo(this,r),o.subTo(e,o)),r.rShiftTo(1,r)):o.isEven()||o.subTo(e,o),o.rShiftTo(1,o);for(;i.isEven();)i.rShiftTo(1,i),t?(a.isEven()&&s.isEven()||(a.addTo(this,a),s.subTo(e,s)),a.rShiftTo(1,a)):s.isEven()||s.subTo(e,s),s.rShiftTo(1,s);n.compareTo(i)>=0?(n.subTo(i,n),t&&r.subTo(a,r),o.subTo(s,o)):(i.subTo(n,i),t&&a.subTo(r,a),s.subTo(o,s))}return 0!=i.compareTo(BigInteger.ONE)?BigInteger.ZERO:s.compareTo(e)>=0?s.subtract(e):s.signum()<0?(s.addTo(e,s),s.signum()<0?s.add(e):s):s}function bnIsProbablePrime(e){var t,n=this.abs();if(1==n.t&&n[0]<=lowprimes[lowprimes.length-1]){for(t=0;t<lowprimes.length;++t)if(n[0]==lowprimes[t])return!0;return!1}if(n.isEven())return!1;for(t=1;t<lowprimes.length;){for(var i=lowprimes[t],r=t+1;r<lowprimes.length&&lplim>i;)i*=lowprimes[r++];for(i=n.modInt(i);r>t;)if(i%lowprimes[t++]==0)return!1}return n.millerRabin(e)}function bnpMillerRabin(e){var t=this.subtract(BigInteger.ONE),n=t.getLowestSetBit();if(0>=n)return!1;var i=t.shiftRight(n);e=e+1>>1,e>lowprimes.length&&(e=lowprimes.length);for(var r=nbi(),o=0;e>o;++o){r.fromInt(lowprimes[Math.floor(Math.random()*lowprimes.length)]);var a=r.modPow(i,this);if(0!=a.compareTo(BigInteger.ONE)&&0!=a.compareTo(t)){for(var s=1;s++<n&&0!=a.compareTo(t);)if(a=a.modPowInt(2,this),0==a.compareTo(BigInteger.ONE))return!1;if(0!=a.compareTo(t))return!1}}return!0}function rng_seed_int(e){rng_pool[rng_pptr++]^=255&e,rng_pool[rng_pptr++]^=e>>8&255,rng_pool[rng_pptr++]^=e>>16&255,rng_pool[rng_pptr++]^=e>>24&255,rng_pptr>=rng_psize&&(rng_pptr-=rng_psize)}function rng_seed_time(){rng_seed_int((new Date).getTime())}function rng_get_byte(){if(null==rng_state){for(rng_seed_time(),rng_state=prng_newstate(),rng_state.init(rng_pool),rng_pptr=0;rng_pptr<rng_pool.length;++rng_pptr)rng_pool[rng_pptr]=0;rng_pptr=0}return rng_state.next()}function rng_get_bytes(e){var t;for(t=0;t<e.length;++t)e[t]=rng_get_byte()}function SecureRandom(){}function Arcfour(){this.i=0,this.j=0,this.S=new Array}function ARC4init(e){var t,n,i;for(t=0;256>t;++t)this.S[t]=t;for(n=0,t=0;256>t;++t)n=n+this.S[t]+e[t%e.length]&255,i=this.S[t],this.S[t]=this.S[n],this.S[n]=i;this.i=0,this.j=0}function ARC4next(){var e;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,e=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=e,this.S[e+this.S[this.i]&255]}function prng_newstate(){return new Arcfour}function dT(){return"["+(((new Date).getTime()-_logTimer)/1e3).toFixed(3)+"]"}function checkClick(e,t){return 1==e.which&&(e.ctrlKey||e.metaKey)||2==e.which?!0:(t||e.preventDefault(),!1)}function checkDragEvent(e){if(!e||e.target&&("IMG"==e.target.tagName||"A"==e.target.tagName))return!1;if(!e.dataTransfer||!e.dataTransfer.types)return!0;for(var t=0;t<e.dataTransfer.types.length;t++)if("Files"==e.dataTransfer.types[t])return!0;return!1}function cancelEvent(e){return e=e||window.event,e&&(e=e.originalEvent||e),e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault(),!1}function onCtrlEnter(e,t){$(e).on("keydown",function(e){return 13==e.keyCode&&(e.ctrlKey||e.metaKey)?(t(),cancelEvent(e)):void 0})}function onContentLoaded(e){setTimeout(e,0)}function tsNow(e){var t=+new Date;return e?Math.floor(t/1e3):t}function safeReplaceObject(e,t){for(var n in e)t.hasOwnProperty(n)||"$"==n.charAt(0)||delete e[n];for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])}function listMergeSorted(e,t){e=e||[],t=t||[];for(var n=angular.copy(e),i=e.length?e[e.length-1]:4294967295,r=0;r<t.length;r++)t[r]<i&&n.push(t[r]);return n}function listUniqSorted(e){e=e||[];for(var t=[],n=!1,i=0;i<e.length;i++)e[i]!==n&&t.push(e[i]),n=e[i];return t}function bigint(e){return new BigInteger(e.toString(16),16)}function bigStringInt(e){return new BigInteger(e,10)}function dHexDump(e){for(var t=[],n=0;n<e.length;n++)!n||n%2||t.push(n%16?n%4?" ":" ":"\n"),t.push((e[n]<16?"0":"")+e[n].toString(16));console.log(t.join(""))}function bytesToHex(e){e=e||[];for(var t=[],n=0;n<e.length;n++)t.push((e[n]<16?"0":"")+(e[n]||0).toString(16));return t.join("")}function bytesFromHex(e){var t,n=e.length,i=[];for(t=0;n>t;t+=2)i.push(parseInt(e.substr(t,2),16));return i}function bytesToBase64(e){for(var t,n="",i=e.length,r=0,o=0;i>o;o++)t=o%3,r|=e[o]<<(16>>>t&24),(2===t||i-o===1)&&(n+=String.fromCharCode(uint6ToBase64(r>>>18&63),uint6ToBase64(r>>>12&63),uint6ToBase64(r>>>6&63),uint6ToBase64(63&r)),r=0);return n.replace(/A(?=A$|$)/g,"=")}function uint6ToBase64(e){return 26>e?e+65:52>e?e+71:62>e?e-4:62===e?43:63===e?47:65}function bytesCmp(e,t){var n=e.length;if(n!=t.length)return!1;for(var i=0;n>i;i++)if(e[i]!=t[i])return!1;return!0}function bytesXor(e,t){for(var n=e.length,i=[],r=0;n>r;++r)i[r]=e[r]^t[r];return i}function bytesToWords(e){for(var t=e.length,n=[],i=0;t>i;i++)n[i>>>2]|=e[i]<<24-i%4*8;return new CryptoJS.lib.WordArray.init(n,t)}function bytesFromWords(e){for(var t=e.words,n=e.sigBytes,i=[],r=0;n>r;r++)i.push(t[r>>>2]>>>24-r%4*8&255);return i}function bytesFromBigInt(e,t){for(var n=e.toByteArray();!n[0]&&(!t||n.length>t);)n=n.slice(1);return n}function bytesFromLeemonBigInt(e){var t=bigInt2str(e,16);return bytesFromHex(t)}function bytesToArrayBuffer(e){return new Uint8Array(e).buffer}function bytesFromArrayBuffer(e){for(var t=e.byteLength,n=new Uint8Array(e),i=[],r=0;t>r;++r)i[r]=n[r];return i}function longToInts(e){var t=bigStringInt(e).divideAndRemainder(bigint(4294967296));return[t[0].intValue(),t[1].intValue()]}function longToBytes(e){return bytesFromWords({words:longToInts(e),sigBytes:8}).reverse()}function longFromInts(e,t){return bigint(e).shiftLeft(32).add(bigint(t)).toString(10)}function intToUint(e){return e=parseInt(e),0>e&&(e+=4294967296),e}function uintToInt(e){return e>2147483647&&(e-=4294967296),e}function sha1Hash(e){var t=sha1.hash(e,!0);return t}function rsaEncrypt(e,t){var n=255-t.length;if(n>0){var i=new Array(n);(new SecureRandom).nextBytes(i),t=t.concat(i)}var r=new BigInteger(e.modulus,16),o=new BigInteger(e.exponent,16),a=new BigInteger(t),s=a.modPowInt(o,r),c=bytesFromBigInt(s,256);return c}function aesEncrypt(e,t,n){var i=16-e.length%16;if(i>0&&16>i){var r=new Array(i);(new SecureRandom).nextBytes(r),e=e.concat(r)}var o=CryptoJS.AES.encrypt(bytesToWords(e),bytesToWords(t),{iv:bytesToWords(n),padding:CryptoJS.pad.NoPadding,mode:CryptoJS.mode.IGE}).ciphertext,a=bytesFromWords(o);return a}function aesDecrypt(e,t,n){var i=CryptoJS.AES.decrypt({ciphertext:bytesToWords(e)},bytesToWords(t),{iv:bytesToWords(n),padding:CryptoJS.pad.NoPadding,mode:CryptoJS.mode.IGE}),r=bytesFromWords(i);return r}function gzipUncompress(e){var t=new Zlib.Gunzip(e).decompress();return t}function nextRandomInt(e){return Math.floor(Math.random()*e)}function pqPrimeFactorization(e){var t=new BigInteger(e),n=!1;console.log("PQ start",e,t.bitLength());try{n=pqPrimeLeemon(str2bigInt(t.toString(16),16,Math.ceil(64/bpe)+1))}catch(i){console.error(i),console.error("Pq leemon Exception",i)}if(n===!1&&t.bitLength()<=64)try{n=pqPrimeLong(goog.math.Long.fromString(t.toString(16),16))}catch(i){console.error("Pq long Exception",i)}return n===!1&&(n=pqPrimeBigInteger(t)),console.log("PQ finish"),n}function pqPrimeBigInteger(e){for(var t,n=0,i=0;3>i;i++){for(var r=(15&nextRandomInt(128))+17,o=bigint(nextRandomInt(1e9)+1),a=o.clone(),s=1<<i+18,c=1;s>c;c++){++n;for(var l=o.clone(),u=o.clone(),p=bigint(r);!u.equals(BigInteger.ZERO);)u.and(BigInteger.ONE).equals(BigInteger.ZERO)||(p=p.add(l),p.compareTo(e)>0&&(p=p.subtract(e))),l=l.add(l),l.compareTo(e)>0&&(l=l.subtract(e)),u=u.shiftRight(1);o=p.clone();var d=o.compareTo(a)<0?a.subtract(o):o.subtract(a);if(t=d.gcd(e),!t.equals(BigInteger.ONE))break;0==(c&c-1)&&(a=o.clone())}if(t.compareTo(BigInteger.ONE)>0)break}var f,h,g=e.divide(t);return t.compareTo(g)>0?(f=g,h=t):(f=t,h=g),[bytesFromBigInt(f),bytesFromBigInt(h)]}function gcdLong(e,t){for(;e.notEquals(goog.math.Long.ZERO)&&t.notEquals(goog.math.Long.ZERO);){for(;t.and(goog.math.Long.ONE).equals(goog.math.Long.ZERO);)t=t.shiftRight(1);for(;e.and(goog.math.Long.ONE).equals(goog.math.Long.ZERO);)e=e.shiftRight(1);e.compare(t)>0?e=e.subtract(t):t=t.subtract(e)}return t.equals(goog.math.Long.ZERO)?e:t}function pqPrimeLong(e){for(var t,n=0,i=0;3>i;i++){for(var r=goog.math.Long.fromInt((15&nextRandomInt(128))+17),o=goog.math.Long.fromInt(nextRandomInt(1e9)+1),a=o,s=1<<i+18,c=1;s>c;c++){++n;for(var l=o,u=o,p=r;u.notEquals(goog.math.Long.ZERO);)u.and(goog.math.Long.ONE).notEquals(goog.math.Long.ZERO)&&(p=p.add(l),p.compare(e)>0&&(p=p.subtract(e))),l=l.add(l),l.compare(e)>0&&(l=l.subtract(e)),u=u.shiftRight(1);o=p;var d=o.compare(a)<0?a.subtract(o):o.subtract(a);if(t=gcdLong(d,e),t.notEquals(goog.math.Long.ONE))break;0==(c&c-1)&&(a=o)}if(t.compare(goog.math.Long.ONE)>0)break}var f,h,g=e.div(t);return t.compare(g)>0?(f=g,h=t):(f=t,h=g),[bytesFromHex(f.toString(16)),bytesFromHex(h.toString(16))]}function pqPrimeLeemon(e){var t,n,i,r,o,a,s,c=64,l=Math.ceil(c/bpe)+1,u=0,p=new Array(l),d=new Array(l),f=new Array(l),o=new Array(l),h=new Array(l),g=new Array(l),m=new Array(l);for(t=0;3>t;t++){for(n=(15&nextRandomInt(128))+17,copyInt_(g,nextRandomInt(1e9)+1),copy_(m,g),r=1<<t+18,i=1;r>i;i++){for(++u,copy_(p,g),copy_(d,g),copyInt_(f,n);!isZero(d);)1&d[0]&&(add_(f,p),greater(f,e)&&sub_(f,e)),add_(p,p),greater(p,e)&&sub_(p,e),rightShift_(d,1);if(copy_(g,f),greater(g,m)?(copy_(h,g),sub_(h,m)):(copy_(h,m),sub_(h,g)),eGCD_(h,e,o,p,d),!equalsInt(o,1))break;0==(i&i-1)&&copy_(m,g)}if(greater(o,one))break}return divide_(e,o,g,m),greater(o,g)?(a=g,s=o):(a=o,s=g),[bytesFromLeemonBigInt(a),bytesFromLeemonBigInt(s)]}function TLSerialization(e){return e=e||{},this.maxLength=e.startMaxLength||2048,this.offset=0,this.createBuffer(),this.mtproto=e.mtproto||!1,this}function TLDeserialization(e,t){return t=t||{},this.offset=0,this.override=t.override||{},this.buffer=e,this.intView=new Uint32Array(this.buffer),this.byteView=new Uint8Array(this.buffer),this.mtproto=t.mtproto||!1,this}!function(e){"use strict";for(var t,n,i={},r=function(){},o="memory".split(","),a="assert,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profileEnd,time,timeEnd,trace,warn".split(",");t=o.pop();)e[t]=e[t]||i;for(;n=a.pop();)e[n]=e[n]||r}(this.console=this.console||{}),function(e,t){function n(e){var t=e.length,n=ut.type(e);return ut.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)}function i(e){var t=kt[e]={};return ut.each(e.match(dt)||[],function(e,n){t[n]=!0}),t}function r(e,n,i,r){if(ut.acceptData(e)){var o,a,s=ut.expando,c=e.nodeType,l=c?ut.cache:e,u=c?e[s]:e[s]&&s;if(u&&l[u]&&(r||l[u].data)||i!==t||"string"!=typeof n)return u||(u=c?e[s]=tt.pop()||ut.guid++:s),l[u]||(l[u]=c?{}:{toJSON:ut.noop}),("object"==typeof n||"function"==typeof n)&&(r?l[u]=ut.extend(l[u],n):l[u].data=ut.extend(l[u].data,n)),a=l[u],r||(a.data||(a.data={}),a=a.data),i!==t&&(a[ut.camelCase(n)]=i),"string"==typeof n?(o=a[n],null==o&&(o=a[ut.camelCase(n)])):o=a,o}}function o(e,t,n){if(ut.acceptData(e)){var i,r,o=e.nodeType,a=o?ut.cache:e,c=o?e[ut.expando]:ut.expando;if(a[c]){if(t&&(i=n?a[c]:a[c].data)){ut.isArray(t)?t=t.concat(ut.map(t,ut.camelCase)):t in i?t=[t]:(t=ut.camelCase(t),t=t in i?[t]:t.split(" ")),r=t.length;for(;r--;)delete i[t[r]];if(n?!s(i):!ut.isEmptyObject(i))return}(n||(delete a[c].data,s(a[c])))&&(o?ut.cleanData([e],!0):ut.support.deleteExpando||a!=a.window?delete a[c]:a[c]=null)}}}function a(e,n,i){if(i===t&&1===e.nodeType){var r="data-"+n.replace(xt,"-$1").toLowerCase();if(i=e.getAttribute(r),"string"==typeof i){try{i="true"===i?!0:"false"===i?!1:"null"===i?null:+i+""===i?+i:Mt.test(i)?ut.parseJSON(i):i}catch(o){}ut.data(e,n,i)}else i=t}return i}function s(e){var t;for(t in e)if(("data"!==t||!ut.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}function c(){return!0}function l(){return!1}function u(){try{return Z.activeElement}catch(e){}}function p(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}function d(e,t,n){if(ut.isFunction(t))return ut.grep(e,function(e,i){return!!t.call(e,i,e)!==n});if(t.nodeType)return ut.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(jt.test(t))return ut.filter(t,e,n);t=ut.filter(t,e)}return ut.grep(e,function(e){return ut.inArray(e,t)>=0!==n})}function f(e){var t=Wt.split("|"),n=e.createDocumentFragment();if(n.createElement)for(;t.length;)n.createElement(t.pop());return n}function h(e,t){return ut.nodeName(e,"table")&&ut.nodeName(1===t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function g(e){return e.type=(null!==ut.find.attr(e,"type"))+"/"+e.type,e}function m(e){var t=on.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function y(e,t){for(var n,i=0;null!=(n=e[i]);i++)ut._data(n,"globalEval",!t||ut._data(t[i],"globalEval"))}function v(e,t){if(1===t.nodeType&&ut.hasData(e)){var n,i,r,o=ut._data(e),a=ut._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(i=0,r=s[n].length;r>i;i++)ut.event.add(t,n,s[n][i])}a.data&&(a.data=ut.extend({},a.data))}}function _(e,t){var n,i,r;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!ut.support.noCloneEvent&&t[ut.expando]){r=ut._data(t);for(i in r.events)ut.removeEvent(t,i,r.handle);t.removeAttribute(ut.expando)}"script"===n&&t.text!==e.text?(g(t).text=e.text,m(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),ut.support.html5Clone&&e.innerHTML&&!ut.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&tn.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}}function b(e,n){var i,r,o=0,a=typeof e.getElementsByTagName!==K?e.getElementsByTagName(n||"*"):typeof e.querySelectorAll!==K?e.querySelectorAll(n||"*"):t;if(!a)for(a=[],i=e.childNodes||e;null!=(r=i[o]);o++)!n||ut.nodeName(r,n)?a.push(r):ut.merge(a,b(r,n));return n===t||n&&ut.nodeName(e,n)?ut.merge([e],a):a}function w(e){tn.test(e.type)&&(e.defaultChecked=e.checked)}function $(e,t){if(t in e)return t;for(var n=t.charAt(0).toUpperCase()+t.slice(1),i=t,r=kn.length;r--;)if(t=kn[r]+n,t in e)return t;return i}function S(e,t){return e=t||e,"none"===ut.css(e,"display")||!ut.contains(e.ownerDocument,e)}function C(e,t){for(var n,i,r,o=[],a=0,s=e.length;s>a;a++)i=e[a],i.style&&(o[a]=ut._data(i,"olddisplay"),n=i.style.display,t?(o[a]||"none"!==n||(i.style.display=""),""===i.style.display&&S(i)&&(o[a]=ut._data(i,"olddisplay",T(i.nodeName)))):o[a]||(r=S(i),(n&&"none"!==n||!r)&&ut._data(i,"olddisplay",r?n:ut.css(i,"display"))));for(a=0;s>a;a++)i=e[a],i.style&&(t&&"none"!==i.style.display&&""!==i.style.display||(i.style.display=t?o[a]||"":"none"));return e}function k(e,t,n){var i=vn.exec(t);return i?Math.max(0,i[1]-(n||0))+(i[2]||"px"):t}function M(e,t,n,i,r){for(var o=n===(i?"border":"content")?4:"width"===t?1:0,a=0;4>o;o+=2)"margin"===n&&(a+=ut.css(e,n+Cn[o],!0,r)),i?("content"===n&&(a-=ut.css(e,"padding"+Cn[o],!0,r)),"margin"!==n&&(a-=ut.css(e,"border"+Cn[o]+"Width",!0,r))):(a+=ut.css(e,"padding"+Cn[o],!0,r),"padding"!==n&&(a+=ut.css(e,"border"+Cn[o]+"Width",!0,r)));return a}function x(e,t,n){var i=!0,r="width"===t?e.offsetWidth:e.offsetHeight,o=pn(e),a=ut.support.boxSizing&&"border-box"===ut.css(e,"boxSizing",!1,o);if(0>=r||null==r){if(r=dn(e,t,o),(0>r||null==r)&&(r=e.style[t]),_n.test(r))return r;i=a&&(ut.support.boxSizingReliable||r===e.style[t]),r=parseFloat(r)||0}return r+M(e,t,n||(a?"border":"content"),i,o)+"px"}function T(e){var t=Z,n=wn[e];return n||(n=E(e,t),"none"!==n&&n||(un=(un||ut("<iframe frameborder='0' width='0' height='0'/>").css("cssText","display:block !important")).appendTo(t.documentElement),t=(un[0].contentWindow||un[0].contentDocument).document,t.write("<!doctype html><html><body>"),t.close(),n=E(e,t),un.detach()),wn[e]=n),n}function E(e,t){var n=ut(t.createElement(e)).appendTo(t.body),i=ut.css(n[0],"display");return n.remove(),i}function A(e,t,n,i){var r;if(ut.isArray(t))ut.each(t,function(t,r){n||xn.test(e)?i(e,r):A(e+"["+("object"==typeof r?t:"")+"]",r,n,i)});else if(n||"object"!==ut.type(t))i(e,t);else for(r in t)A(e+"["+r+"]",t[r],n,i)}function D(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var i,r=0,o=t.toLowerCase().match(dt)||[];if(ut.isFunction(n))for(;i=o[r++];)"+"===i[0]?(i=i.slice(1)||"*",(e[i]=e[i]||[]).unshift(n)):(e[i]=e[i]||[]).push(n)}}function I(e,n,i,r){function o(c){var l;return a[c]=!0,ut.each(e[c]||[],function(e,c){var u=c(n,i,r);return"string"!=typeof u||s||a[u]?s?!(l=u):t:(n.dataTypes.unshift(u),o(u),!1)}),l}var a={},s=e===Vn;return o(n.dataTypes[0])||!a["*"]&&o("*")}function P(e,n){var i,r,o=ut.ajaxSettings.flatOptions||{};for(r in n)n[r]!==t&&((o[r]?e:i||(i={}))[r]=n[r]);return i&&ut.extend(!0,e,i),e}function N(e,n,i){for(var r,o,a,s,c=e.contents,l=e.dataTypes;"*"===l[0];)l.shift(),o===t&&(o=e.mimeType||n.getResponseHeader("Content-Type"));if(o)for(s in c)if(c[s]&&c[s].test(o)){l.unshift(s);break}if(l[0]in i)a=l[0];else{for(s in i){if(!l[0]||e.converters[s+" "+l[0]]){a=s;break}r||(r=s)}a=a||r}return a?(a!==l[0]&&l.unshift(a),i[a]):t}function L(e,t,n,i){var r,o,a,s,c,l={},u=e.dataTypes.slice();
if(u[1])for(a in e.converters)l[a.toLowerCase()]=e.converters[a];for(o=u.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!c&&i&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),c=o,o=u.shift())if("*"===o)o=c;else if("*"!==c&&c!==o){if(a=l[c+" "+o]||l["* "+o],!a)for(r in l)if(s=r.split(" "),s[1]===o&&(a=l[c+" "+s[0]]||l["* "+s[0]])){a===!0?a=l[r]:l[r]!==!0&&(o=s[0],u.unshift(s[1]));break}if(a!==!0)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(p){return{state:"parsererror",error:a?p:"No conversion from "+c+" to "+o}}}return{state:"success",data:t}}function B(){try{return new e.XMLHttpRequest}catch(t){}}function F(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}function O(){return setTimeout(function(){Jn=t}),Jn=ut.now()}function U(e,t,n){for(var i,r=(oi[t]||[]).concat(oi["*"]),o=0,a=r.length;a>o;o++)if(i=r[o].call(n,t,e))return i}function R(e,t,n){var i,r,o=0,a=ri.length,s=ut.Deferred().always(function(){delete c.elem}),c=function(){if(r)return!1;for(var t=Jn||O(),n=Math.max(0,l.startTime+l.duration-t),i=n/l.duration||0,o=1-i,a=0,c=l.tweens.length;c>a;a++)l.tweens[a].run(o);return s.notifyWith(e,[l,o,n]),1>o&&c?n:(s.resolveWith(e,[l]),!1)},l=s.promise({elem:e,props:ut.extend({},t),opts:ut.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:Jn||O(),duration:n.duration,tweens:[],createTween:function(t,n){var i=ut.Tween(e,l.opts,t,n,l.opts.specialEasing[t]||l.opts.easing);return l.tweens.push(i),i},stop:function(t){var n=0,i=t?l.tweens.length:0;if(r)return this;for(r=!0;i>n;n++)l.tweens[n].run(1);return t?s.resolveWith(e,[l,t]):s.rejectWith(e,[l,t]),this}}),u=l.props;for(q(u,l.opts.specialEasing);a>o;o++)if(i=ri[o].call(l,e,u,l.opts))return i;return ut.map(u,U,l),ut.isFunction(l.opts.start)&&l.opts.start.call(e,l),ut.fx.timer(ut.extend(c,{elem:e,anim:l,queue:l.opts.queue})),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always)}function q(e,t){var n,i,r,o,a;for(n in e)if(i=ut.camelCase(n),r=t[i],o=e[n],ut.isArray(o)&&(r=o[1],o=e[n]=o[0]),n!==i&&(e[i]=o,delete e[n]),a=ut.cssHooks[i],a&&"expand"in a){o=a.expand(o),delete e[i];for(n in o)n in e||(e[n]=o[n],t[n]=r)}else t[i]=r}function j(e,t,n){var i,r,o,a,s,c,l=this,u={},p=e.style,d=e.nodeType&&S(e),f=ut._data(e,"fxshow");n.queue||(s=ut._queueHooks(e,"fx"),null==s.unqueued&&(s.unqueued=0,c=s.empty.fire,s.empty.fire=function(){s.unqueued||c()}),s.unqueued++,l.always(function(){l.always(function(){s.unqueued--,ut.queue(e,"fx").length||s.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],"inline"===ut.css(e,"display")&&"none"===ut.css(e,"float")&&(ut.support.inlineBlockNeedsLayout&&"inline"!==T(e.nodeName)?p.zoom=1:p.display="inline-block")),n.overflow&&(p.overflow="hidden",ut.support.shrinkWrapBlocks||l.always(function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}));for(i in t)if(r=t[i],ti.exec(r)){if(delete t[i],o=o||"toggle"===r,r===(d?"hide":"show"))continue;u[i]=f&&f[i]||ut.style(e,i)}if(!ut.isEmptyObject(u)){f?"hidden"in f&&(d=f.hidden):f=ut._data(e,"fxshow",{}),o&&(f.hidden=!d),d?ut(e).show():l.done(function(){ut(e).hide()}),l.done(function(){var t;ut._removeData(e,"fxshow");for(t in u)ut.style(e,t,u[t])});for(i in u)a=U(d?f[i]:0,i,l),i in f||(f[i]=a.start,d&&(a.end=a.start,a.start="width"===i||"height"===i?1:0))}}function H(e,t,n,i,r){return new H.prototype.init(e,t,n,i,r)}function V(e,t){var n,i={height:e},r=0;for(t=t?1:0;4>r;r+=2-t)n=Cn[r],i["margin"+n]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function z(e){return ut.isWindow(e)?e:9===e.nodeType?e.defaultView||e.parentWindow:!1}var W,G,K=typeof t,X=e.location,Z=e.document,Y=Z.documentElement,Q=e.jQuery,J=e.$,et={},tt=[],nt="1.10.2",it=tt.concat,rt=tt.push,ot=tt.slice,at=tt.indexOf,st=et.toString,ct=et.hasOwnProperty,lt=nt.trim,ut=function(e,t){return new ut.fn.init(e,t,G)},pt=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,dt=/\S+/g,ft=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,ht=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,gt=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,mt=/^[\],:{}\s]*$/,yt=/(?:^|:|,)(?:\s*\[)+/g,vt=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,_t=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,bt=/^-ms-/,wt=/-([\da-z])/gi,$t=function(e,t){return t.toUpperCase()},St=function(e){(Z.addEventListener||"load"===e.type||"complete"===Z.readyState)&&(Ct(),ut.ready())},Ct=function(){Z.addEventListener?(Z.removeEventListener("DOMContentLoaded",St,!1),e.removeEventListener("load",St,!1)):(Z.detachEvent("onreadystatechange",St),e.detachEvent("onload",St))};ut.fn=ut.prototype={jquery:nt,constructor:ut,init:function(e,n,i){var r,o;if(!e)return this;if("string"==typeof e){if(r="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:ht.exec(e),!r||!r[1]&&n)return!n||n.jquery?(n||i).find(e):this.constructor(n).find(e);if(r[1]){if(n=n instanceof ut?n[0]:n,ut.merge(this,ut.parseHTML(r[1],n&&n.nodeType?n.ownerDocument||n:Z,!0)),gt.test(r[1])&&ut.isPlainObject(n))for(r in n)ut.isFunction(this[r])?this[r](n[r]):this.attr(r,n[r]);return this}if(o=Z.getElementById(r[2]),o&&o.parentNode){if(o.id!==r[2])return i.find(e);this.length=1,this[0]=o}return this.context=Z,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):ut.isFunction(e)?i.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),ut.makeArray(e,this))},selector:"",length:0,toArray:function(){return ot.call(this)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e){var t=ut.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return ut.each(this,e,t)},ready:function(e){return ut.ready.promise().done(e),this},slice:function(){return this.pushStack(ot.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},map:function(e){return this.pushStack(ut.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:rt,sort:[].sort,splice:[].splice},ut.fn.init.prototype=ut.fn,ut.extend=ut.fn.extend=function(){var e,n,i,r,o,a,s=arguments[0]||{},c=1,l=arguments.length,u=!1;for("boolean"==typeof s&&(u=s,s=arguments[1]||{},c=2),"object"==typeof s||ut.isFunction(s)||(s={}),l===c&&(s=this,--c);l>c;c++)if(null!=(o=arguments[c]))for(r in o)e=s[r],i=o[r],s!==i&&(u&&i&&(ut.isPlainObject(i)||(n=ut.isArray(i)))?(n?(n=!1,a=e&&ut.isArray(e)?e:[]):a=e&&ut.isPlainObject(e)?e:{},s[r]=ut.extend(u,a,i)):i!==t&&(s[r]=i));return s},ut.extend({expando:"jQuery"+(nt+Math.random()).replace(/\D/g,""),noConflict:function(t){return e.$===ut&&(e.$=J),t&&e.jQuery===ut&&(e.jQuery=Q),ut},isReady:!1,readyWait:1,holdReady:function(e){e?ut.readyWait++:ut.ready(!0)},ready:function(e){if(e===!0?!--ut.readyWait:!ut.isReady){if(!Z.body)return setTimeout(ut.ready);ut.isReady=!0,e!==!0&&--ut.readyWait>0||(W.resolveWith(Z,[ut]),ut.fn.trigger&&ut(Z).trigger("ready").off("ready"))}},isFunction:function(e){return"function"===ut.type(e)},isArray:Array.isArray||function(e){return"array"===ut.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?et[st.call(e)]||"object":typeof e},isPlainObject:function(e){var n;if(!e||"object"!==ut.type(e)||e.nodeType||ut.isWindow(e))return!1;try{if(e.constructor&&!ct.call(e,"constructor")&&!ct.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(i){return!1}if(ut.support.ownLast)for(n in e)return ct.call(e,n);for(n in e);return n===t||ct.call(e,n)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw Error(e)},parseHTML:function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||Z;var i=gt.exec(e),r=!n&&[];return i?[t.createElement(i[1])]:(i=ut.buildFragment([e],t,r),r&&ut(r).remove(),ut.merge([],i.childNodes))},parseJSON:function(n){return e.JSON&&e.JSON.parse?e.JSON.parse(n):null===n?n:"string"==typeof n&&(n=ut.trim(n),n&&mt.test(n.replace(vt,"@").replace(_t,"]").replace(yt,"")))?Function("return "+n)():(ut.error("Invalid JSON: "+n),t)},parseXML:function(n){var i,r;if(!n||"string"!=typeof n)return null;try{e.DOMParser?(r=new DOMParser,i=r.parseFromString(n,"text/xml")):(i=new ActiveXObject("Microsoft.XMLDOM"),i.async="false",i.loadXML(n))}catch(o){i=t}return i&&i.documentElement&&!i.getElementsByTagName("parsererror").length||ut.error("Invalid XML: "+n),i},noop:function(){},globalEval:function(t){t&&ut.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(bt,"ms-").replace(wt,$t)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,i){var r,o=0,a=e.length,s=n(e);if(i){if(s)for(;a>o&&(r=t.apply(e[o],i),r!==!1);o++);else for(o in e)if(r=t.apply(e[o],i),r===!1)break}else if(s)for(;a>o&&(r=t.call(e[o],o,e[o]),r!==!1);o++);else for(o in e)if(r=t.call(e[o],o,e[o]),r===!1)break;return e},trim:lt&&!lt.call(" ")?function(e){return null==e?"":lt.call(e)}:function(e){return null==e?"":(e+"").replace(ft,"")},makeArray:function(e,t){var i=t||[];return null!=e&&(n(Object(e))?ut.merge(i,"string"==typeof e?[e]:e):rt.call(i,e)),i},inArray:function(e,t,n){var i;if(t){if(at)return at.call(t,e,n);for(i=t.length,n=n?0>n?Math.max(0,i+n):n:0;i>n;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var i=n.length,r=e.length,o=0;if("number"==typeof i)for(;i>o;o++)e[r++]=n[o];else for(;n[o]!==t;)e[r++]=n[o++];return e.length=r,e},grep:function(e,t,n){var i,r=[],o=0,a=e.length;for(n=!!n;a>o;o++)i=!!t(e[o],o),n!==i&&r.push(e[o]);return r},map:function(e,t,i){var r,o=0,a=e.length,s=n(e),c=[];if(s)for(;a>o;o++)r=t(e[o],o,i),null!=r&&(c[c.length]=r);else for(o in e)r=t(e[o],o,i),null!=r&&(c[c.length]=r);return it.apply([],c)},guid:1,proxy:function(e,n){var i,r,o;return"string"==typeof n&&(o=e[n],n=e,e=o),ut.isFunction(e)?(i=ot.call(arguments,2),r=function(){return e.apply(n||this,i.concat(ot.call(arguments)))},r.guid=e.guid=e.guid||ut.guid++,r):t},access:function(e,n,i,r,o,a,s){var c=0,l=e.length,u=null==i;if("object"===ut.type(i)){o=!0;for(c in i)ut.access(e,n,c,i[c],!0,a,s)}else if(r!==t&&(o=!0,ut.isFunction(r)||(s=!0),u&&(s?(n.call(e,r),n=null):(u=n,n=function(e,t,n){return u.call(ut(e),n)})),n))for(;l>c;c++)n(e[c],i,s?r:r.call(e[c],c,n(e[c],i)));return o?e:u?n.call(e):l?n(e[0],i):a},now:function(){return(new Date).getTime()},swap:function(e,t,n,i){var r,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];r=n.apply(e,i||[]);for(o in t)e.style[o]=a[o];return r}}),ut.ready.promise=function(t){if(!W)if(W=ut.Deferred(),"complete"===Z.readyState)setTimeout(ut.ready);else if(Z.addEventListener)Z.addEventListener("DOMContentLoaded",St,!1),e.addEventListener("load",St,!1);else{Z.attachEvent("onreadystatechange",St),e.attachEvent("onload",St);var n=!1;try{n=null==e.frameElement&&Z.documentElement}catch(i){}n&&n.doScroll&&function r(){if(!ut.isReady){try{n.doScroll("left")}catch(e){return setTimeout(r,50)}Ct(),ut.ready()}}()}return W.promise(t)},ut.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){et["[object "+t+"]"]=t.toLowerCase()}),G=ut(Z),function(e,t){function n(e,t,n,i){var r,o,a,s,c,l,u,p,h,g;if((t?t.ownerDocument||t:R)!==I&&D(t),t=t||I,n=n||[],!e||"string"!=typeof e)return n;if(1!==(s=t.nodeType)&&9!==s)return[];if(N&&!i){if(r=_t.exec(e))if(a=r[1]){if(9===s){if(o=t.getElementById(a),!o||!o.parentNode)return n;if(o.id===a)return n.push(o),n}else if(t.ownerDocument&&(o=t.ownerDocument.getElementById(a))&&O(t,o)&&o.id===a)return n.push(o),n}else{if(r[2])return et.apply(n,t.getElementsByTagName(e)),n;if((a=r[3])&&S.getElementsByClassName&&t.getElementsByClassName)return et.apply(n,t.getElementsByClassName(a)),n}if(S.qsa&&(!L||!L.test(e))){if(p=u=U,h=t,g=9===s&&e,1===s&&"object"!==t.nodeName.toLowerCase()){for(l=d(e),(u=t.getAttribute("id"))?p=u.replace($t,"\\$&"):t.setAttribute("id",p),p="[id='"+p+"'] ",c=l.length;c--;)l[c]=p+f(l[c]);h=ft.test(e)&&t.parentNode||t,g=l.join(",")}if(g)try{return et.apply(n,h.querySelectorAll(g)),n}catch(m){}finally{u||t.removeAttribute("id")}}}return w(e.replace(lt,"$1"),t,n,i)}function i(){function e(n,i){return t.push(n+=" ")>k.cacheLength&&delete e[t.shift()],e[n]=i}var t=[];return e}function r(e){return e[U]=!0,e}function o(e){var t=I.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function a(e,t){for(var n=e.split("|"),i=e.length;i--;)k.attrHandle[n[i]]=t}function s(e,t){var n=t&&e,i=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||X)-(~e.sourceIndex||X);if(i)return i;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function c(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function l(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function u(e){return r(function(t){return t=+t,r(function(n,i){for(var r,o=e([],n.length,t),a=o.length;a--;)n[r=o[a]]&&(n[r]=!(i[r]=n[r]))})})}function p(){}function d(e,t){var i,r,o,a,s,c,l,u=V[e+" "];if(u)return t?0:u.slice(0);for(s=e,c=[],l=k.preFilter;s;){(!i||(r=pt.exec(s)))&&(r&&(s=s.slice(r[0].length)||s),c.push(o=[])),i=!1,(r=dt.exec(s))&&(i=r.shift(),o.push({value:i,type:r[0].replace(lt," ")}),s=s.slice(i.length));for(a in k.filter)!(r=yt[a].exec(s))||l[a]&&!(r=l[a](r))||(i=r.shift(),o.push({value:i,type:a,matches:r}),s=s.slice(i.length));if(!i)break}return t?s.length:s?n.error(e):V(e,c).slice(0)}function f(e){for(var t=0,n=e.length,i="";n>t;t++)i+=e[t].value;return i}function h(e,t,n){var i=t.dir,r=n&&"parentNode"===i,o=j++;return t.first?function(t,n,o){for(;t=t[i];)if(1===t.nodeType||r)return e(t,n,o)}:function(t,n,a){var s,c,l,u=q+" "+o;if(a){for(;t=t[i];)if((1===t.nodeType||r)&&e(t,n,a))return!0}else for(;t=t[i];)if(1===t.nodeType||r)if(l=t[U]||(t[U]={}),(c=l[i])&&c[0]===u){if((s=c[1])===!0||s===C)return s===!0}else if(c=l[i]=[u],c[1]=e(t,n,a)||C,c[1]===!0)return!0}}function g(e){return e.length>1?function(t,n,i){for(var r=e.length;r--;)if(!e[r](t,n,i))return!1;return!0}:e[0]}function m(e,t,n,i,r){for(var o,a=[],s=0,c=e.length,l=null!=t;c>s;s++)(o=e[s])&&(!n||n(o,i,r))&&(a.push(o),l&&t.push(s));return a}function y(e,t,n,i,o,a){return i&&!i[U]&&(i=y(i)),o&&!o[U]&&(o=y(o,a)),r(function(r,a,s,c){var l,u,p,d=[],f=[],h=a.length,g=r||b(t||"*",s.nodeType?[s]:s,[]),y=!e||!r&&t?g:m(g,d,e,s,c),v=n?o||(r?e:h||i)?[]:a:y;if(n&&n(y,v,s,c),i)for(l=m(v,f),i(l,[],s,c),u=l.length;u--;)(p=l[u])&&(v[f[u]]=!(y[f[u]]=p));if(r){if(o||e){if(o){for(l=[],u=v.length;u--;)(p=v[u])&&l.push(y[u]=p);o(null,v=[],l,c)}for(u=v.length;u--;)(p=v[u])&&(l=o?nt.call(r,p):d[u])>-1&&(r[l]=!(a[l]=p))}}else v=m(v===a?v.splice(h,v.length):v),o?o(null,a,v,c):et.apply(a,v)})}function v(e){for(var t,n,i,r=e.length,o=k.relative[e[0].type],a=o||k.relative[" "],s=o?1:0,c=h(function(e){return e===t},a,!0),l=h(function(e){return nt.call(t,e)>-1},a,!0),u=[function(e,n,i){return!o&&(i||n!==E)||((t=n).nodeType?c(e,n,i):l(e,n,i))}];r>s;s++)if(n=k.relative[e[s].type])u=[h(g(u),n)];else{if(n=k.filter[e[s].type].apply(null,e[s].matches),n[U]){for(i=++s;r>i&&!k.relative[e[i].type];i++);return y(s>1&&g(u),s>1&&f(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(lt,"$1"),n,i>s&&v(e.slice(s,i)),r>i&&v(e=e.slice(i)),r>i&&f(e))}u.push(n)}return g(u)}function _(e,t){var i=0,o=t.length>0,a=e.length>0,s=function(r,s,c,l,u){var p,d,f,h=[],g=0,y="0",v=r&&[],_=null!=u,b=E,w=r||a&&k.find.TAG("*",u&&s.parentNode||s),$=q+=null==b?1:Math.random()||.1;for(_&&(E=s!==I&&s,C=i);null!=(p=w[y]);y++){if(a&&p){for(d=0;f=e[d++];)if(f(p,s,c)){l.push(p);break}_&&(q=$,C=++i)}o&&((p=!f&&p)&&g--,r&&v.push(p))}if(g+=y,o&&y!==g){for(d=0;f=t[d++];)f(v,h,s,c);if(r){if(g>0)for(;y--;)v[y]||h[y]||(h[y]=Q.call(l));h=m(h)}et.apply(l,h),_&&!r&&h.length>0&&g+t.length>1&&n.uniqueSort(l)}return _&&(q=$,E=b),v};return o?r(s):s}function b(e,t,i){for(var r=0,o=t.length;o>r;r++)n(e,t[r],i);return i}function w(e,t,n,i){var r,o,a,s,c,l=d(e);if(!i&&1===l.length){if(o=l[0]=l[0].slice(0),o.length>2&&"ID"===(a=o[0]).type&&S.getById&&9===t.nodeType&&N&&k.relative[o[1].type]){if(t=(k.find.ID(a.matches[0].replace(St,Ct),t)||[])[0],!t)return n;e=e.slice(o.shift().value.length)}for(r=yt.needsContext.test(e)?0:o.length;r--&&(a=o[r],!k.relative[s=a.type]);)if((c=k.find[s])&&(i=c(a.matches[0].replace(St,Ct),ft.test(o[0].type)&&t.parentNode||t))){if(o.splice(r,1),e=i.length&&f(o),!e)return et.apply(n,i),n;break}}return T(e,l)(i,t,!N,n,ft.test(e)),n}var $,S,C,k,M,x,T,E,A,D,I,P,N,L,B,F,O,U="sizzle"+-new Date,R=e.document,q=0,j=0,H=i(),V=i(),z=i(),W=!1,G=function(e,t){return e===t?(W=!0,0):0},K=typeof t,X=1<<31,Z={}.hasOwnProperty,Y=[],Q=Y.pop,J=Y.push,et=Y.push,tt=Y.slice,nt=Y.indexOf||function(e){for(var t=0,n=this.length;n>t;t++)if(this[t]===e)return t;return-1},it="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",rt="[\\x20\\t\\r\\n\\f]",ot="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",at=ot.replace("w","w#"),st="\\["+rt+"*("+ot+")"+rt+"*(?:([*^$|!~]?=)"+rt+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+at+")|)|)"+rt+"*\\]",ct=":("+ot+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+st.replace(3,8)+")*)|.*)\\)|)",lt=RegExp("^"+rt+"+|((?:^|[^\\\\])(?:\\\\.)*)"+rt+"+$","g"),pt=RegExp("^"+rt+"*,"+rt+"*"),dt=RegExp("^"+rt+"*([>+~]|"+rt+")"+rt+"*"),ft=RegExp(rt+"*[+~]"),ht=RegExp("="+rt+"*([^\\]'\"]*)"+rt+"*\\]","g"),gt=RegExp(ct),mt=RegExp("^"+at+"$"),yt={ID:RegExp("^#("+ot+")"),CLASS:RegExp("^\\.("+ot+")"),TAG:RegExp("^("+ot.replace("w","w*")+")"),ATTR:RegExp("^"+st),PSEUDO:RegExp("^"+ct),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+rt+"*(even|odd|(([+-]|)(\\d*)n|)"+rt+"*(?:([+-]|)"+rt+"*(\\d+)|))"+rt+"*\\)|)","i"),bool:RegExp("^(?:"+it+")$","i"),needsContext:RegExp("^"+rt+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+rt+"*((?:-\\d)?\\d*)"+rt+"*\\)|)(?=[^-]|$)","i")},vt=/^[^{]+\{\s*\[native \w/,_t=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,bt=/^(?:input|select|textarea|button)$/i,wt=/^h\d$/i,$t=/'|\\/g,St=RegExp("\\\\([\\da-f]{1,6}"+rt+"?|("+rt+")|.)","ig"),Ct=function(e,t,n){var i="0x"+t-65536;return i!==i||n?t:0>i?String.fromCharCode(i+65536):String.fromCharCode(55296|i>>10,56320|1023&i)};try{et.apply(Y=tt.call(R.childNodes),R.childNodes),Y[R.childNodes.length].nodeType}catch(kt){et={apply:Y.length?function(e,t){J.apply(e,tt.call(t))}:function(e,t){for(var n=e.length,i=0;e[n++]=t[i++];);e.length=n-1}}}x=n.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},S=n.support={},D=n.setDocument=function(e){var n=e?e.ownerDocument||e:R,i=n.defaultView;return n!==I&&9===n.nodeType&&n.documentElement?(I=n,P=n.documentElement,N=!x(n),i&&i.attachEvent&&i!==i.top&&i.attachEvent("onbeforeunload",function(){D()}),S.attributes=o(function(e){return e.className="i",!e.getAttribute("className")}),S.getElementsByTagName=o(function(e){return e.appendChild(n.createComment("")),!e.getElementsByTagName("*").length}),S.getElementsByClassName=o(function(e){return e.innerHTML="<div class='a'></div><div class='a i'></div>",e.firstChild.className="i",2===e.getElementsByClassName("i").length}),S.getById=o(function(e){return P.appendChild(e).id=U,!n.getElementsByName||!n.getElementsByName(U).length}),S.getById?(k.find.ID=function(e,t){if(typeof t.getElementById!==K&&N){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},k.filter.ID=function(e){var t=e.replace(St,Ct);return function(e){return e.getAttribute("id")===t}}):(delete k.find.ID,k.filter.ID=function(e){var t=e.replace(St,Ct);return function(e){var n=typeof e.getAttributeNode!==K&&e.getAttributeNode("id");return n&&n.value===t}}),k.find.TAG=S.getElementsByTagName?function(e,n){return typeof n.getElementsByTagName!==K?n.getElementsByTagName(e):t}:function(e,t){var n,i=[],r=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[r++];)1===n.nodeType&&i.push(n);return i}return o},k.find.CLASS=S.getElementsByClassName&&function(e,n){return typeof n.getElementsByClassName!==K&&N?n.getElementsByClassName(e):t},B=[],L=[],(S.qsa=vt.test(n.querySelectorAll))&&(o(function(e){e.innerHTML="<select><option selected=''></option></select>",e.querySelectorAll("[selected]").length||L.push("\\["+rt+"*(?:value|"+it+")"),e.querySelectorAll(":checked").length||L.push(":checked")}),o(function(e){var t=n.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("t",""),e.querySelectorAll("[t^='']").length&&L.push("[*^$]="+rt+"*(?:''|\"\")"),e.querySelectorAll(":enabled").length||L.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),L.push(",.*:")})),(S.matchesSelector=vt.test(F=P.webkitMatchesSelector||P.mozMatchesSelector||P.oMatchesSelector||P.msMatchesSelector))&&o(function(e){S.disconnectedMatch=F.call(e,"div"),F.call(e,"[s!='']:x"),B.push("!=",ct)}),L=L.length&&RegExp(L.join("|")),B=B.length&&RegExp(B.join("|")),O=vt.test(P.contains)||P.compareDocumentPosition?function(e,t){var n=9===e.nodeType?e.documentElement:e,i=t&&t.parentNode;return e===i||!(!i||1!==i.nodeType||!(n.contains?n.contains(i):e.compareDocumentPosition&&16&e.compareDocumentPosition(i)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},G=P.compareDocumentPosition?function(e,t){if(e===t)return W=!0,0;var i=t.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(t);return i?1&i||!S.sortDetached&&t.compareDocumentPosition(e)===i?e===n||O(R,e)?-1:t===n||O(R,t)?1:A?nt.call(A,e)-nt.call(A,t):0:4&i?-1:1:e.compareDocumentPosition?-1:1}:function(e,t){var i,r=0,o=e.parentNode,a=t.parentNode,c=[e],l=[t];if(e===t)return W=!0,0;if(!o||!a)return e===n?-1:t===n?1:o?-1:a?1:A?nt.call(A,e)-nt.call(A,t):0;if(o===a)return s(e,t);for(i=e;i=i.parentNode;)c.unshift(i);for(i=t;i=i.parentNode;)l.unshift(i);for(;c[r]===l[r];)r++;return r?s(c[r],l[r]):c[r]===R?-1:l[r]===R?1:0},n):I},n.matches=function(e,t){return n(e,null,null,t)},n.matchesSelector=function(e,t){if((e.ownerDocument||e)!==I&&D(e),t=t.replace(ht,"='$1']"),!(!S.matchesSelector||!N||B&&B.test(t)||L&&L.test(t)))try{var i=F.call(e,t);if(i||S.disconnectedMatch||e.document&&11!==e.document.nodeType)return i}catch(r){}return n(t,I,null,[e]).length>0},n.contains=function(e,t){return(e.ownerDocument||e)!==I&&D(e),O(e,t)},n.attr=function(e,n){(e.ownerDocument||e)!==I&&D(e);var i=k.attrHandle[n.toLowerCase()],r=i&&Z.call(k.attrHandle,n.toLowerCase())?i(e,n,!N):t;return r===t?S.attributes||!N?e.getAttribute(n):(r=e.getAttributeNode(n))&&r.specified?r.value:null:r},n.error=function(e){throw Error("Syntax error, unrecognized expression: "+e)},n.uniqueSort=function(e){var t,n=[],i=0,r=0;if(W=!S.detectDuplicates,A=!S.sortStable&&e.slice(0),e.sort(G),W){for(;t=e[r++];)t===e[r]&&(i=n.push(r));for(;i--;)e.splice(n[i],1)}return e},M=n.getText=function(e){var t,n="",i=0,r=e.nodeType;if(r){if(1===r||9===r||11===r){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=M(e)}else if(3===r||4===r)return e.nodeValue}else for(;t=e[i];i++)n+=M(t);return n},k=n.selectors={cacheLength:50,createPseudo:r,match:yt,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(St,Ct),e[3]=(e[4]||e[5]||"").replace(St,Ct),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||n.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&n.error(e[0]),e},PSEUDO:function(e){var n,i=!e[5]&&e[2];return yt.CHILD.test(e[0])?null:(e[3]&&e[4]!==t?e[2]=e[4]:i&&gt.test(i)&&(n=d(i,!0))&&(n=i.indexOf(")",i.length-n)-i.length)&&(e[0]=e[0].slice(0,n),e[2]=i.slice(0,n)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(St,Ct).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=H[e+" "];return t||(t=RegExp("(^|"+rt+")"+e+"("+rt+"|$)"))&&H(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!==K&&e.getAttribute("class")||"")})},ATTR:function(e,t,i){return function(r){var o=n.attr(r,e);return null==o?"!="===t:t?(o+="","="===t?o===i:"!="===t?o!==i:"^="===t?i&&0===o.indexOf(i):"*="===t?i&&o.indexOf(i)>-1:"$="===t?i&&o.slice(-i.length)===i:"~="===t?(" "+o+" ").indexOf(i)>-1:"|="===t?o===i||o.slice(0,i.length+1)===i+"-":!1):!0}},CHILD:function(e,t,n,i,r){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===i&&0===r?function(e){return!!e.parentNode}:function(t,n,c){var l,u,p,d,f,h,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,y=s&&t.nodeName.toLowerCase(),v=!c&&!s;if(m){if(o){for(;g;){for(p=t;p=p[g];)if(s?p.nodeName.toLowerCase()===y:1===p.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&v){for(u=m[U]||(m[U]={}),l=u[e]||[],f=l[0]===q&&l[1],d=l[0]===q&&l[2],p=f&&m.childNodes[f];p=++f&&p&&p[g]||(d=f=0)||h.pop();)if(1===p.nodeType&&++d&&p===t){u[e]=[q,f,d];break}}else if(v&&(l=(t[U]||(t[U]={}))[e])&&l[0]===q)d=l[1];else for(;(p=++f&&p&&p[g]||(d=f=0)||h.pop())&&((s?p.nodeName.toLowerCase()!==y:1!==p.nodeType)||!++d||(v&&((p[U]||(p[U]={}))[e]=[q,d]),p!==t)););return d-=r,d===i||0===d%i&&d/i>=0}}},PSEUDO:function(e,t){var i,o=k.pseudos[e]||k.setFilters[e.toLowerCase()]||n.error("unsupported pseudo: "+e);return o[U]?o(t):o.length>1?(i=[e,e,"",t],k.setFilters.hasOwnProperty(e.toLowerCase())?r(function(e,n){for(var i,r=o(e,t),a=r.length;a--;)i=nt.call(e,r[a]),e[i]=!(n[i]=r[a])}):function(e){return o(e,0,i)}):o}},pseudos:{not:r(function(e){var t=[],n=[],i=T(e.replace(lt,"$1"));return i[U]?r(function(e,t,n,r){for(var o,a=i(e,null,r,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,r,o){return t[0]=e,i(t,null,o,n),!n.pop()}}),has:r(function(e){return function(t){return n(e,t).length>0}}),contains:r(function(e){return function(t){return(t.textContent||t.innerText||M(t)).indexOf(e)>-1}}),lang:r(function(e){return mt.test(e||"")||n.error("unsupported lang: "+e),e=e.replace(St,Ct).toLowerCase(),function(t){var n;do if(n=N?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===P},focus:function(e){return e===I.activeElement&&(!I.hasFocus||I.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeName>"@"||3===e.nodeType||4===e.nodeType)return!1;return!0},parent:function(e){return!k.pseudos.empty(e)},header:function(e){return wt.test(e.nodeName)},input:function(e){return bt.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||t.toLowerCase()===e.type)},first:u(function(){return[0]}),last:u(function(e,t){return[t-1]}),eq:u(function(e,t,n){return[0>n?n+t:n]}),even:u(function(e,t){for(var n=0;t>n;n+=2)e.push(n);return e}),odd:u(function(e,t){for(var n=1;t>n;n+=2)e.push(n);return e}),lt:u(function(e,t,n){for(var i=0>n?n+t:n;--i>=0;)e.push(i);return e}),gt:u(function(e,t,n){for(var i=0>n?n+t:n;t>++i;)e.push(i);return e})}},k.pseudos.nth=k.pseudos.eq;for($ in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})k.pseudos[$]=c($);for($ in{submit:!0,reset:!0})k.pseudos[$]=l($);p.prototype=k.filters=k.pseudos,k.setFilters=new p,T=n.compile=function(e,t){var n,i=[],r=[],o=z[e+" "];if(!o){for(t||(t=d(e)),n=t.length;n--;)o=v(t[n]),o[U]?i.push(o):r.push(o);o=z(e,_(r,i))}return o},S.sortStable=U.split("").sort(G).join("")===U,S.detectDuplicates=W,D(),S.sortDetached=o(function(e){return 1&e.compareDocumentPosition(I.createElement("div"))}),o(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||a("type|href|height|width",function(e,n,i){return i?t:e.getAttribute(n,"type"===n.toLowerCase()?1:2)}),S.attributes&&o(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||a("value",function(e,n,i){return i||"input"!==e.nodeName.toLowerCase()?t:e.defaultValue}),o(function(e){return null==e.getAttribute("disabled")})||a(it,function(e,n,i){var r;return i?t:(r=e.getAttributeNode(n))&&r.specified?r.value:e[n]===!0?n.toLowerCase():null}),ut.find=n,ut.expr=n.selectors,ut.expr[":"]=ut.expr.pseudos,ut.unique=n.uniqueSort,ut.text=n.getText,ut.isXMLDoc=n.isXML,ut.contains=n.contains}(e);var kt={};ut.Callbacks=function(e){e="string"==typeof e?kt[e]||i(e):ut.extend({},e);var n,r,o,a,s,c,l=[],u=!e.once&&[],p=function(t){for(r=e.memory&&t,o=!0,s=c||0,c=0,a=l.length,n=!0;l&&a>s;s++)if(l[s].apply(t[0],t[1])===!1&&e.stopOnFalse){r=!1;break}n=!1,l&&(u?u.length&&p(u.shift()):r?l=[]:d.disable())},d={add:function(){if(l){var t=l.length;!function i(t){ut.each(t,function(t,n){var r=ut.type(n);"function"===r?e.unique&&d.has(n)||l.push(n):n&&n.length&&"string"!==r&&i(n)})}(arguments),n?a=l.length:r&&(c=t,p(r))}return this},remove:function(){return l&&ut.each(arguments,function(e,t){for(var i;(i=ut.inArray(t,l,i))>-1;)l.splice(i,1),n&&(a>=i&&a--,s>=i&&s--)}),this},has:function(e){return e?ut.inArray(e,l)>-1:!(!l||!l.length)},empty:function(){return l=[],a=0,this},disable:function(){return l=u=r=t,this},disabled:function(){return!l},lock:function(){return u=t,r||d.disable(),this},locked:function(){return!u},fireWith:function(e,t){return!l||o&&!u||(t=t||[],t=[e,t.slice?t.slice():t],n?u.push(t):p(t)),this},fire:function(){return d.fireWith(this,arguments),this},fired:function(){return!!o}};return d},ut.extend({Deferred:function(e){var t=[["resolve","done",ut.Callbacks("once memory"),"resolved"],["reject","fail",ut.Callbacks("once memory"),"rejected"],["notify","progress",ut.Callbacks("memory")]],n="pending",i={state:function(){return n},always:function(){return r.done(arguments).fail(arguments),this},then:function(){var e=arguments;return ut.Deferred(function(n){ut.each(t,function(t,o){var a=o[0],s=ut.isFunction(e[t])&&e[t];r[o[1]](function(){var e=s&&s.apply(this,arguments);e&&ut.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[a+"With"](this===i?n.promise():this,s?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?ut.extend(e,i):i}},r={};return i.pipe=i.then,ut.each(t,function(e,o){var a=o[2],s=o[3];i[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),r[o[0]]=function(){return r[o[0]+"With"](this===r?i:this,arguments),this},r[o[0]+"With"]=a.fireWith}),i.promise(r),e&&e.call(r,r),r},when:function(e){var t,n,i,r=0,o=ot.call(arguments),a=o.length,s=1!==a||e&&ut.isFunction(e.promise)?a:0,c=1===s?e:ut.Deferred(),l=function(e,n,i){return function(r){n[e]=this,i[e]=arguments.length>1?ot.call(arguments):r,i===t?c.notifyWith(n,i):--s||c.resolveWith(n,i)}};if(a>1)for(t=Array(a),n=Array(a),i=Array(a);a>r;r++)o[r]&&ut.isFunction(o[r].promise)?o[r].promise().done(l(r,i,o)).fail(c.reject).progress(l(r,n,t)):--s;return s||c.resolveWith(i,o),c.promise()}}),ut.support=function(t){var n,i,r,o,a,s,c,l,u,p=Z.createElement("div");if(p.setAttribute("className","t"),p.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",n=p.getElementsByTagName("*")||[],i=p.getElementsByTagName("a")[0],!i||!i.style||!n.length)return t;
o=Z.createElement("select"),s=o.appendChild(Z.createElement("option")),r=p.getElementsByTagName("input")[0],i.style.cssText="top:1px;float:left;opacity:.5",t.getSetAttribute="t"!==p.className,t.leadingWhitespace=3===p.firstChild.nodeType,t.tbody=!p.getElementsByTagName("tbody").length,t.htmlSerialize=!!p.getElementsByTagName("link").length,t.style=/top/.test(i.getAttribute("style")),t.hrefNormalized="/a"===i.getAttribute("href"),t.opacity=/^0.5/.test(i.style.opacity),t.cssFloat=!!i.style.cssFloat,t.checkOn=!!r.value,t.optSelected=s.selected,t.enctype=!!Z.createElement("form").enctype,t.html5Clone="<:nav></:nav>"!==Z.createElement("nav").cloneNode(!0).outerHTML,t.inlineBlockNeedsLayout=!1,t.shrinkWrapBlocks=!1,t.pixelPosition=!1,t.deleteExpando=!0,t.noCloneEvent=!0,t.reliableMarginRight=!0,t.boxSizingReliable=!0,r.checked=!0,t.noCloneChecked=r.cloneNode(!0).checked,o.disabled=!0,t.optDisabled=!s.disabled;try{delete p.test}catch(d){t.deleteExpando=!1}r=Z.createElement("input"),r.setAttribute("value",""),t.input=""===r.getAttribute("value"),r.value="t",r.setAttribute("type","radio"),t.radioValue="t"===r.value,r.setAttribute("checked","t"),r.setAttribute("name","t"),a=Z.createDocumentFragment(),a.appendChild(r),t.appendChecked=r.checked,t.checkClone=a.cloneNode(!0).cloneNode(!0).lastChild.checked,p.attachEvent&&(p.attachEvent("onclick",function(){t.noCloneEvent=!1}),p.cloneNode(!0).click());for(u in{submit:!0,change:!0,focusin:!0})p.setAttribute(c="on"+u,"t"),t[u+"Bubbles"]=c in e||p.attributes[c].expando===!1;p.style.backgroundClip="content-box",p.cloneNode(!0).style.backgroundClip="",t.clearCloneStyle="content-box"===p.style.backgroundClip;for(u in ut(t))break;return t.ownLast="0"!==u,ut(function(){var n,i,r,o="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",a=Z.getElementsByTagName("body")[0];a&&(n=Z.createElement("div"),n.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",a.appendChild(n).appendChild(p),p.innerHTML="<table><tr><td></td><td>t</td></tr></table>",r=p.getElementsByTagName("td"),r[0].style.cssText="padding:0;margin:0;border:0;display:none",l=0===r[0].offsetHeight,r[0].style.display="",r[1].style.display="none",t.reliableHiddenOffsets=l&&0===r[0].offsetHeight,p.innerHTML="",p.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",ut.swap(a,null!=a.style.zoom?{zoom:1}:{},function(){t.boxSizing=4===p.offsetWidth}),e.getComputedStyle&&(t.pixelPosition="1%"!==(e.getComputedStyle(p,null)||{}).top,t.boxSizingReliable="4px"===(e.getComputedStyle(p,null)||{width:"4px"}).width,i=p.appendChild(Z.createElement("div")),i.style.cssText=p.style.cssText=o,i.style.marginRight=i.style.width="0",p.style.width="1px",t.reliableMarginRight=!parseFloat((e.getComputedStyle(i,null)||{}).marginRight)),typeof p.style.zoom!==K&&(p.innerHTML="",p.style.cssText=o+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=3===p.offsetWidth,p.style.display="block",p.innerHTML="<div></div>",p.firstChild.style.width="5px",t.shrinkWrapBlocks=3!==p.offsetWidth,t.inlineBlockNeedsLayout&&(a.style.zoom=1)),a.removeChild(n),n=p=r=i=null)}),n=o=a=s=i=r=null,t}({});var Mt=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,xt=/([A-Z])/g;ut.extend({cache:{},noData:{applet:!0,embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(e){return e=e.nodeType?ut.cache[e[ut.expando]]:e[ut.expando],!!e&&!s(e)},data:function(e,t,n){return r(e,t,n)},removeData:function(e,t){return o(e,t)},_data:function(e,t,n){return r(e,t,n,!0)},_removeData:function(e,t){return o(e,t,!0)},acceptData:function(e){if(e.nodeType&&1!==e.nodeType&&9!==e.nodeType)return!1;var t=e.nodeName&&ut.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),ut.fn.extend({data:function(e,n){var i,r,o=null,s=0,c=this[0];if(e===t){if(this.length&&(o=ut.data(c),1===c.nodeType&&!ut._data(c,"parsedAttrs"))){for(i=c.attributes;i.length>s;s++)r=i[s].name,0===r.indexOf("data-")&&(r=ut.camelCase(r.slice(5)),a(c,r,o[r]));ut._data(c,"parsedAttrs",!0)}return o}return"object"==typeof e?this.each(function(){ut.data(this,e)}):arguments.length>1?this.each(function(){ut.data(this,e,n)}):c?a(c,e,ut.data(c,e)):null},removeData:function(e){return this.each(function(){ut.removeData(this,e)})}}),ut.extend({queue:function(e,n,i){var r;return e?(n=(n||"fx")+"queue",r=ut._data(e,n),i&&(!r||ut.isArray(i)?r=ut._data(e,n,ut.makeArray(i)):r.push(i)),r||[]):t},dequeue:function(e,t){t=t||"fx";var n=ut.queue(e,t),i=n.length,r=n.shift(),o=ut._queueHooks(e,t),a=function(){ut.dequeue(e,t)};"inprogress"===r&&(r=n.shift(),i--),r&&("fx"===t&&n.unshift("inprogress"),delete o.stop,r.call(e,a,o)),!i&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return ut._data(e,n)||ut._data(e,n,{empty:ut.Callbacks("once memory").add(function(){ut._removeData(e,t+"queue"),ut._removeData(e,n)})})}}),ut.fn.extend({queue:function(e,n){var i=2;return"string"!=typeof e&&(n=e,e="fx",i--),i>arguments.length?ut.queue(this[0],e):n===t?this:this.each(function(){var t=ut.queue(this,e,n);ut._queueHooks(this,e),"fx"===e&&"inprogress"!==t[0]&&ut.dequeue(this,e)})},dequeue:function(e){return this.each(function(){ut.dequeue(this,e)})},delay:function(e,t){return e=ut.fx?ut.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var i=setTimeout(t,e);n.stop=function(){clearTimeout(i)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var i,r=1,o=ut.Deferred(),a=this,s=this.length,c=function(){--r||o.resolveWith(a,[a])};for("string"!=typeof e&&(n=e,e=t),e=e||"fx";s--;)i=ut._data(a[s],e+"queueHooks"),i&&i.empty&&(r++,i.empty.add(c));return c(),o.promise(n)}});var Tt,Et,At=/[\t\r\n\f]/g,Dt=/\r/g,It=/^(?:input|select|textarea|button|object)$/i,Pt=/^(?:a|area)$/i,Nt=/^(?:checked|selected)$/i,Lt=ut.support.getSetAttribute,Bt=ut.support.input;ut.fn.extend({attr:function(e,t){return ut.access(this,ut.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){ut.removeAttr(this,e)})},prop:function(e,t){return ut.access(this,ut.prop,e,t,arguments.length>1)},removeProp:function(e){return e=ut.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,i,r,o,a=0,s=this.length,c="string"==typeof e&&e;if(ut.isFunction(e))return this.each(function(t){ut(this).addClass(e.call(this,t,this.className))});if(c)for(t=(e||"").match(dt)||[];s>a;a++)if(n=this[a],i=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(At," "):" ")){for(o=0;r=t[o++];)0>i.indexOf(" "+r+" ")&&(i+=r+" ");n.className=ut.trim(i)}return this},removeClass:function(e){var t,n,i,r,o,a=0,s=this.length,c=0===arguments.length||"string"==typeof e&&e;if(ut.isFunction(e))return this.each(function(t){ut(this).removeClass(e.call(this,t,this.className))});if(c)for(t=(e||"").match(dt)||[];s>a;a++)if(n=this[a],i=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(At," "):"")){for(o=0;r=t[o++];)for(;i.indexOf(" "+r+" ")>=0;)i=i.replace(" "+r+" "," ");n.className=e?ut.trim(i):""}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):this.each(ut.isFunction(e)?function(n){ut(this).toggleClass(e.call(this,n,this.className,t),t)}:function(){if("string"===n)for(var t,i=0,r=ut(this),o=e.match(dt)||[];t=o[i++];)r.hasClass(t)?r.removeClass(t):r.addClass(t);else(n===K||"boolean"===n)&&(this.className&&ut._data(this,"__className__",this.className),this.className=this.className||e===!1?"":ut._data(this,"__className__")||"")})},hasClass:function(e){for(var t=" "+e+" ",n=0,i=this.length;i>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(At," ").indexOf(t)>=0)return!0;return!1},val:function(e){var n,i,r,o=this[0];return arguments.length?(r=ut.isFunction(e),this.each(function(n){var o;1===this.nodeType&&(o=r?e.call(this,n,ut(this).val()):e,null==o?o="":"number"==typeof o?o+="":ut.isArray(o)&&(o=ut.map(o,function(e){return null==e?"":e+""})),i=ut.valHooks[this.type]||ut.valHooks[this.nodeName.toLowerCase()],i&&"set"in i&&i.set(this,o,"value")!==t||(this.value=o))})):o?(i=ut.valHooks[o.type]||ut.valHooks[o.nodeName.toLowerCase()],i&&"get"in i&&(n=i.get(o,"value"))!==t?n:(n=o.value,"string"==typeof n?n.replace(Dt,""):null==n?"":n)):void 0}}),ut.extend({valHooks:{option:{get:function(e){var t=ut.find.attr(e,"value");return null!=t?t:e.text}},select:{get:function(e){for(var t,n,i=e.options,r=e.selectedIndex,o="select-one"===e.type||0>r,a=o?null:[],s=o?r+1:i.length,c=0>r?s:o?r:0;s>c;c++)if(n=i[c],!(!n.selected&&c!==r||(ut.support.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&ut.nodeName(n.parentNode,"optgroup"))){if(t=ut(n).val(),o)return t;a.push(t)}return a},set:function(e,t){for(var n,i,r=e.options,o=ut.makeArray(t),a=r.length;a--;)i=r[a],(i.selected=ut.inArray(ut(i).val(),o)>=0)&&(n=!0);return n||(e.selectedIndex=-1),o}}},attr:function(e,n,i){var r,o,a=e.nodeType;return e&&3!==a&&8!==a&&2!==a?typeof e.getAttribute===K?ut.prop(e,n,i):(1===a&&ut.isXMLDoc(e)||(n=n.toLowerCase(),r=ut.attrHooks[n]||(ut.expr.match.bool.test(n)?Et:Tt)),i===t?r&&"get"in r&&null!==(o=r.get(e,n))?o:(o=ut.find.attr(e,n),null==o?t:o):null!==i?r&&"set"in r&&(o=r.set(e,i,n))!==t?o:(e.setAttribute(n,i+""),i):(ut.removeAttr(e,n),t)):void 0},removeAttr:function(e,t){var n,i,r=0,o=t&&t.match(dt);if(o&&1===e.nodeType)for(;n=o[r++];)i=ut.propFix[n]||n,ut.expr.match.bool.test(n)?Bt&&Lt||!Nt.test(n)?e[i]=!1:e[ut.camelCase("default-"+n)]=e[i]=!1:ut.attr(e,n,""),e.removeAttribute(Lt?n:i)},attrHooks:{type:{set:function(e,t){if(!ut.support.radioValue&&"radio"===t&&ut.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},propFix:{"for":"htmlFor","class":"className"},prop:function(e,n,i){var r,o,a,s=e.nodeType;return e&&3!==s&&8!==s&&2!==s?(a=1!==s||!ut.isXMLDoc(e),a&&(n=ut.propFix[n]||n,o=ut.propHooks[n]),i!==t?o&&"set"in o&&(r=o.set(e,i,n))!==t?r:e[n]=i:o&&"get"in o&&null!==(r=o.get(e,n))?r:e[n]):void 0},propHooks:{tabIndex:{get:function(e){var t=ut.find.attr(e,"tabindex");return t?parseInt(t,10):It.test(e.nodeName)||Pt.test(e.nodeName)&&e.href?0:-1}}}}),Et={set:function(e,t,n){return t===!1?ut.removeAttr(e,n):Bt&&Lt||!Nt.test(n)?e.setAttribute(!Lt&&ut.propFix[n]||n,n):e[ut.camelCase("default-"+n)]=e[n]=!0,n}},ut.each(ut.expr.match.bool.source.match(/\w+/g),function(e,n){var i=ut.expr.attrHandle[n]||ut.find.attr;ut.expr.attrHandle[n]=Bt&&Lt||!Nt.test(n)?function(e,n,r){var o=ut.expr.attrHandle[n],a=r?t:(ut.expr.attrHandle[n]=t)!=i(e,n,r)?n.toLowerCase():null;return ut.expr.attrHandle[n]=o,a}:function(e,n,i){return i?t:e[ut.camelCase("default-"+n)]?n.toLowerCase():null}}),Bt&&Lt||(ut.attrHooks.value={set:function(e,n,i){return ut.nodeName(e,"input")?(e.defaultValue=n,t):Tt&&Tt.set(e,n,i)}}),Lt||(Tt={set:function(e,n,i){var r=e.getAttributeNode(i);return r||e.setAttributeNode(r=e.ownerDocument.createAttribute(i)),r.value=n+="","value"===i||n===e.getAttribute(i)?n:t}},ut.expr.attrHandle.id=ut.expr.attrHandle.name=ut.expr.attrHandle.coords=function(e,n,i){var r;return i?t:(r=e.getAttributeNode(n))&&""!==r.value?r.value:null},ut.valHooks.button={get:function(e,n){var i=e.getAttributeNode(n);return i&&i.specified?i.value:t},set:Tt.set},ut.attrHooks.contenteditable={set:function(e,t,n){Tt.set(e,""===t?!1:t,n)}},ut.each(["width","height"],function(e,n){ut.attrHooks[n]={set:function(e,i){return""===i?(e.setAttribute(n,"auto"),i):t}}})),ut.support.hrefNormalized||ut.each(["href","src"],function(e,t){ut.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}}),ut.support.style||(ut.attrHooks.style={get:function(e){return e.style.cssText||t},set:function(e,t){return e.style.cssText=t+""}}),ut.support.optSelected||(ut.propHooks.selected={get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}}),ut.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){ut.propFix[this.toLowerCase()]=this}),ut.support.enctype||(ut.propFix.enctype="encoding"),ut.each(["radio","checkbox"],function(){ut.valHooks[this]={set:function(e,n){return ut.isArray(n)?e.checked=ut.inArray(ut(e).val(),n)>=0:t}},ut.support.checkOn||(ut.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var Ft=/^(?:input|select|textarea)$/i,Ot=/^key/,Ut=/^(?:mouse|contextmenu)|click/,Rt=/^(?:focusinfocus|focusoutblur)$/,qt=/^([^.]*)(?:\.(.+)|)$/;ut.event={global:{},add:function(e,n,i,r,o){var a,s,c,l,u,p,d,f,h,g,m,y=ut._data(e);if(y){for(i.handler&&(l=i,i=l.handler,o=l.selector),i.guid||(i.guid=ut.guid++),(s=y.events)||(s=y.events={}),(p=y.handle)||(p=y.handle=function(e){return typeof ut===K||e&&ut.event.triggered===e.type?t:ut.event.dispatch.apply(p.elem,arguments)},p.elem=e),n=(n||"").match(dt)||[""],c=n.length;c--;)a=qt.exec(n[c])||[],h=m=a[1],g=(a[2]||"").split(".").sort(),h&&(u=ut.event.special[h]||{},h=(o?u.delegateType:u.bindType)||h,u=ut.event.special[h]||{},d=ut.extend({type:h,origType:m,data:r,handler:i,guid:i.guid,selector:o,needsContext:o&&ut.expr.match.needsContext.test(o),namespace:g.join(".")},l),(f=s[h])||(f=s[h]=[],f.delegateCount=0,u.setup&&u.setup.call(e,r,g,p)!==!1||(e.addEventListener?e.addEventListener(h,p,!1):e.attachEvent&&e.attachEvent("on"+h,p))),u.add&&(u.add.call(e,d),d.handler.guid||(d.handler.guid=i.guid)),o?f.splice(f.delegateCount++,0,d):f.push(d),ut.event.global[h]=!0);e=null}},remove:function(e,t,n,i,r){var o,a,s,c,l,u,p,d,f,h,g,m=ut.hasData(e)&&ut._data(e);if(m&&(u=m.events)){for(t=(t||"").match(dt)||[""],l=t.length;l--;)if(s=qt.exec(t[l])||[],f=g=s[1],h=(s[2]||"").split(".").sort(),f){for(p=ut.event.special[f]||{},f=(i?p.delegateType:p.bindType)||f,d=u[f]||[],s=s[2]&&RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),c=o=d.length;o--;)a=d[o],!r&&g!==a.origType||n&&n.guid!==a.guid||s&&!s.test(a.namespace)||i&&i!==a.selector&&("**"!==i||!a.selector)||(d.splice(o,1),a.selector&&d.delegateCount--,p.remove&&p.remove.call(e,a));c&&!d.length&&(p.teardown&&p.teardown.call(e,h,m.handle)!==!1||ut.removeEvent(e,f,m.handle),delete u[f])}else for(f in u)ut.event.remove(e,f+t[l],n,i,!0);ut.isEmptyObject(u)&&(delete m.handle,ut._removeData(e,"events"))}},trigger:function(n,i,r,o){var a,s,c,l,u,p,d,f=[r||Z],h=ct.call(n,"type")?n.type:n,g=ct.call(n,"namespace")?n.namespace.split("."):[];if(c=p=r=r||Z,3!==r.nodeType&&8!==r.nodeType&&!Rt.test(h+ut.event.triggered)&&(h.indexOf(".")>=0&&(g=h.split("."),h=g.shift(),g.sort()),s=0>h.indexOf(":")&&"on"+h,n=n[ut.expando]?n:new ut.Event(h,"object"==typeof n&&n),n.isTrigger=o?2:3,n.namespace=g.join("."),n.namespace_re=n.namespace?RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,n.result=t,n.target||(n.target=r),i=null==i?[n]:ut.makeArray(i,[n]),u=ut.event.special[h]||{},o||!u.trigger||u.trigger.apply(r,i)!==!1)){if(!o&&!u.noBubble&&!ut.isWindow(r)){for(l=u.delegateType||h,Rt.test(l+h)||(c=c.parentNode);c;c=c.parentNode)f.push(c),p=c;p===(r.ownerDocument||Z)&&f.push(p.defaultView||p.parentWindow||e)}for(d=0;(c=f[d++])&&!n.isPropagationStopped();)n.type=d>1?l:u.bindType||h,a=(ut._data(c,"events")||{})[n.type]&&ut._data(c,"handle"),a&&a.apply(c,i),a=s&&c[s],a&&ut.acceptData(c)&&a.apply&&a.apply(c,i)===!1&&n.preventDefault();if(n.type=h,!o&&!n.isDefaultPrevented()&&(!u._default||u._default.apply(f.pop(),i)===!1)&&ut.acceptData(r)&&s&&r[h]&&!ut.isWindow(r)){p=r[s],p&&(r[s]=null),ut.event.triggered=h;try{r[h]()}catch(m){}ut.event.triggered=t,p&&(r[s]=p)}return n.result}},dispatch:function(e){e=ut.event.fix(e);var n,i,r,o,a,s=[],c=ot.call(arguments),l=(ut._data(this,"events")||{})[e.type]||[],u=ut.event.special[e.type]||{};if(c[0]=e,e.delegateTarget=this,!u.preDispatch||u.preDispatch.call(this,e)!==!1){for(s=ut.event.handlers.call(this,e,l),n=0;(o=s[n++])&&!e.isPropagationStopped();)for(e.currentTarget=o.elem,a=0;(r=o.handlers[a++])&&!e.isImmediatePropagationStopped();)(!e.namespace_re||e.namespace_re.test(r.namespace))&&(e.handleObj=r,e.data=r.data,i=((ut.event.special[r.origType]||{}).handle||r.handler).apply(o.elem,c),i!==t&&(e.result=i)===!1&&(e.preventDefault(),e.stopPropagation()));return u.postDispatch&&u.postDispatch.call(this,e),e.result}},handlers:function(e,n){var i,r,o,a,s=[],c=n.delegateCount,l=e.target;if(c&&l.nodeType&&(!e.button||"click"!==e.type))for(;l!=this;l=l.parentNode||this)if(1===l.nodeType&&(l.disabled!==!0||"click"!==e.type)){for(o=[],a=0;c>a;a++)r=n[a],i=r.selector+" ",o[i]===t&&(o[i]=r.needsContext?ut(i,this).index(l)>=0:ut.find(i,this,null,[l]).length),o[i]&&o.push(r);o.length&&s.push({elem:l,handlers:o})}return n.length>c&&s.push({elem:this,handlers:n.slice(c)}),s},fix:function(e){if(e[ut.expando])return e;var t,n,i,r=e.type,o=e,a=this.fixHooks[r];for(a||(this.fixHooks[r]=a=Ut.test(r)?this.mouseHooks:Ot.test(r)?this.keyHooks:{}),i=a.props?this.props.concat(a.props):this.props,e=new ut.Event(o),t=i.length;t--;)n=i[t],e[n]=o[n];return e.target||(e.target=o.srcElement||Z),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,a.filter?a.filter(e,o):e},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,n){var i,r,o,a=n.button,s=n.fromElement;return null==e.pageX&&null!=n.clientX&&(r=e.target.ownerDocument||Z,o=r.documentElement,i=r.body,e.pageX=n.clientX+(o&&o.scrollLeft||i&&i.scrollLeft||0)-(o&&o.clientLeft||i&&i.clientLeft||0),e.pageY=n.clientY+(o&&o.scrollTop||i&&i.scrollTop||0)-(o&&o.clientTop||i&&i.clientTop||0)),!e.relatedTarget&&s&&(e.relatedTarget=s===e.target?n.toElement:s),e.which||a===t||(e.which=1&a?1:2&a?3:4&a?2:0),e}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==u()&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){return this===u()&&this.blur?(this.blur(),!1):t},delegateType:"focusout"},click:{trigger:function(){return ut.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):t},_default:function(e){return ut.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){e.result!==t&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,i){var r=ut.extend(new ut.Event,n,{type:e,isSimulated:!0,originalEvent:{}});i?ut.event.trigger(r,null,t):ut.event.dispatch.call(t,r),r.isDefaultPrevented()&&n.preventDefault()}},ut.removeEvent=Z.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var i="on"+t;e.detachEvent&&(typeof e[i]===K&&(e[i]=null),e.detachEvent(i,n))},ut.Event=function(e,n){return this instanceof ut.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?c:l):this.type=e,n&&ut.extend(this,n),this.timeStamp=e&&e.timeStamp||ut.now(),this[ut.expando]=!0,t):new ut.Event(e,n)},ut.Event.prototype={isDefaultPrevented:l,isPropagationStopped:l,isImmediatePropagationStopped:l,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=c,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=c,e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=c,this.stopPropagation()}},ut.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){ut.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,i=this,r=e.relatedTarget,o=e.handleObj;return(!r||r!==i&&!ut.contains(i,r))&&(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),ut.support.submitBubbles||(ut.event.special.submit={setup:function(){return ut.nodeName(this,"form")?!1:(ut.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,i=ut.nodeName(n,"input")||ut.nodeName(n,"button")?n.form:t;i&&!ut._data(i,"submitBubbles")&&(ut.event.add(i,"submit._submit",function(e){e._submit_bubble=!0}),ut._data(i,"submitBubbles",!0))}),t)},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&ut.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){return ut.nodeName(this,"form")?!1:(ut.event.remove(this,"._submit"),t)}}),ut.support.changeBubbles||(ut.event.special.change={setup:function(){return Ft.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(ut.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._just_changed=!0)}),ut.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),ut.event.simulate("change",this,e,!0)})),!1):(ut.event.add(this,"beforeactivate._change",function(e){var t=e.target;Ft.test(t.nodeName)&&!ut._data(t,"changeBubbles")&&(ut.event.add(t,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||ut.event.simulate("change",this.parentNode,e,!0)}),ut._data(t,"changeBubbles",!0))}),t)},handle:function(e){var n=e.target;return this!==n||e.isSimulated||e.isTrigger||"radio"!==n.type&&"checkbox"!==n.type?e.handleObj.handler.apply(this,arguments):t},teardown:function(){return ut.event.remove(this,"._change"),!Ft.test(this.nodeName)}}),ut.support.focusinBubbles||ut.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,i=function(e){ut.event.simulate(t,e.target,ut.event.fix(e),!0)};ut.event.special[t]={setup:function(){0===n++&&Z.addEventListener(e,i,!0)},teardown:function(){0===--n&&Z.removeEventListener(e,i,!0)}}}),ut.fn.extend({on:function(e,n,i,r,o){var a,s;if("object"==typeof e){"string"!=typeof n&&(i=i||n,n=t);for(a in e)this.on(a,n,i,e[a],o);return this}if(null==i&&null==r?(r=n,i=n=t):null==r&&("string"==typeof n?(r=i,i=t):(r=i,i=n,n=t)),r===!1)r=l;else if(!r)return this;return 1===o&&(s=r,r=function(e){return ut().off(e),s.apply(this,arguments)},r.guid=s.guid||(s.guid=ut.guid++)),this.each(function(){ut.event.add(this,e,r,i,n)})},one:function(e,t,n,i){return this.on(e,t,n,i,1)},off:function(e,n,i){var r,o;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,ut(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(o in e)this.off(o,n,e[o]);return this}return(n===!1||"function"==typeof n)&&(i=n,n=t),i===!1&&(i=l),this.each(function(){ut.event.remove(this,e,i,n)})},trigger:function(e,t){return this.each(function(){ut.event.trigger(e,t,this)})},triggerHandler:function(e,n){var i=this[0];return i?ut.event.trigger(e,n,i,!0):t}});var jt=/^.[^:#\[\.,]*$/,Ht=/^(?:parents|prev(?:Until|All))/,Vt=ut.expr.match.needsContext,zt={children:!0,contents:!0,next:!0,prev:!0};ut.fn.extend({find:function(e){var t,n=[],i=this,r=i.length;if("string"!=typeof e)return this.pushStack(ut(e).filter(function(){for(t=0;r>t;t++)if(ut.contains(i[t],this))return!0}));for(t=0;r>t;t++)ut.find(e,i[t],n);return n=this.pushStack(r>1?ut.unique(n):n),n.selector=this.selector?this.selector+" "+e:e,n},has:function(e){var t,n=ut(e,this),i=n.length;return this.filter(function(){for(t=0;i>t;t++)if(ut.contains(this,n[t]))return!0})},not:function(e){return this.pushStack(d(this,e||[],!0))},filter:function(e){return this.pushStack(d(this,e||[],!1))},is:function(e){return!!d(this,"string"==typeof e&&Vt.test(e)?ut(e):e||[],!1).length},closest:function(e,t){for(var n,i=0,r=this.length,o=[],a=Vt.test(e)||"string"!=typeof e?ut(e,t||this.context):0;r>i;i++)for(n=this[i];n&&n!==t;n=n.parentNode)if(11>n.nodeType&&(a?a.index(n)>-1:1===n.nodeType&&ut.find.matchesSelector(n,e))){n=o.push(n);break}return this.pushStack(o.length>1?ut.unique(o):o)},index:function(e){return e?"string"==typeof e?ut.inArray(this[0],ut(e)):ut.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){var n="string"==typeof e?ut(e,t):ut.makeArray(e&&e.nodeType?[e]:e),i=ut.merge(this.get(),n);return this.pushStack(ut.unique(i))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),ut.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return ut.dir(e,"parentNode")},parentsUntil:function(e,t,n){return ut.dir(e,"parentNode",n)},next:function(e){return p(e,"nextSibling")},prev:function(e){return p(e,"previousSibling")},nextAll:function(e){return ut.dir(e,"nextSibling")},prevAll:function(e){return ut.dir(e,"previousSibling")},nextUntil:function(e,t,n){return ut.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return ut.dir(e,"previousSibling",n)},siblings:function(e){return ut.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return ut.sibling(e.firstChild)},contents:function(e){return ut.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:ut.merge([],e.childNodes)}},function(e,t){ut.fn[e]=function(n,i){var r=ut.map(this,t,n);return"Until"!==e.slice(-5)&&(i=n),i&&"string"==typeof i&&(r=ut.filter(i,r)),this.length>1&&(zt[e]||(r=ut.unique(r)),Ht.test(e)&&(r=r.reverse())),this.pushStack(r)}}),ut.extend({filter:function(e,t,n){var i=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===i.nodeType?ut.find.matchesSelector(i,e)?[i]:[]:ut.find.matches(e,ut.grep(t,function(e){return 1===e.nodeType}))},dir:function(e,n,i){for(var r=[],o=e[n];o&&9!==o.nodeType&&(i===t||1!==o.nodeType||!ut(o).is(i));)1===o.nodeType&&r.push(o),o=o[n];return r},sibling:function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}});var Wt="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",Gt=/ jQuery\d+="(?:null|\d+)"/g,Kt=RegExp("<(?:"+Wt+")[\\s/>]","i"),Xt=/^\s+/,Zt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,Yt=/<([\w:]+)/,Qt=/<tbody/i,Jt=/<|&#?\w+;/,en=/<(?:script|style|link)/i,tn=/^(?:checkbox|radio)$/i,nn=/checked\s*(?:[^=]|=\s*.checked.)/i,rn=/^$|\/(?:java|ecma)script/i,on=/^true\/(.*)/,an=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,sn={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:ut.support.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},cn=f(Z),ln=cn.appendChild(Z.createElement("div"));sn.optgroup=sn.option,sn.tbody=sn.tfoot=sn.colgroup=sn.caption=sn.thead,sn.th=sn.td,ut.fn.extend({text:function(e){return ut.access(this,function(e){return e===t?ut.text(this):this.empty().append((this[0]&&this[0].ownerDocument||Z).createTextNode(e))},null,e,arguments.length)},append:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=h(this,e);t.appendChild(e)}})},prepend:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=h(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){for(var n,i=e?ut.filter(e,this):this,r=0;null!=(n=i[r]);r++)t||1!==n.nodeType||ut.cleanData(b(n)),n.parentNode&&(t&&ut.contains(n.ownerDocument,n)&&y(b(n,"script")),n.parentNode.removeChild(n));return this},empty:function(){for(var e,t=0;null!=(e=this[t]);t++){for(1===e.nodeType&&ut.cleanData(b(e,!1));e.firstChild;)e.removeChild(e.firstChild);e.options&&ut.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return ut.clone(this,e,t)})},html:function(e){return ut.access(this,function(e){var n=this[0]||{},i=0,r=this.length;if(e===t)return 1===n.nodeType?n.innerHTML.replace(Gt,""):t;if(!("string"!=typeof e||en.test(e)||!ut.support.htmlSerialize&&Kt.test(e)||!ut.support.leadingWhitespace&&Xt.test(e)||sn[(Yt.exec(e)||["",""])[1].toLowerCase()])){e=e.replace(Zt,"<$1></$2>");try{for(;r>i;i++)n=this[i]||{},1===n.nodeType&&(ut.cleanData(b(n,!1)),n.innerHTML=e);n=0}catch(o){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=ut.map(this,function(e){return[e.nextSibling,e.parentNode]}),t=0;return this.domManip(arguments,function(n){var i=e[t++],r=e[t++];r&&(i&&i.parentNode!==r&&(i=this.nextSibling),ut(this).remove(),r.insertBefore(n,i))},!0),t?this:this.remove()},detach:function(e){return this.remove(e,!0)},domManip:function(e,t,n){e=it.apply([],e);var i,r,o,a,s,c,l=0,u=this.length,p=this,d=u-1,f=e[0],h=ut.isFunction(f);if(h||!(1>=u||"string"!=typeof f||ut.support.checkClone)&&nn.test(f))return this.each(function(i){var r=p.eq(i);h&&(e[0]=f.call(this,i,r.html())),r.domManip(e,t,n)});if(u&&(c=ut.buildFragment(e,this[0].ownerDocument,!1,!n&&this),i=c.firstChild,1===c.childNodes.length&&(c=i),i)){for(a=ut.map(b(c,"script"),g),o=a.length;u>l;l++)r=c,l!==d&&(r=ut.clone(r,!0,!0),o&&ut.merge(a,b(r,"script"))),t.call(this[l],r,l);if(o)for(s=a[a.length-1].ownerDocument,ut.map(a,m),l=0;o>l;l++)r=a[l],rn.test(r.type||"")&&!ut._data(r,"globalEval")&&ut.contains(s,r)&&(r.src?ut._evalUrl(r.src):ut.globalEval((r.text||r.textContent||r.innerHTML||"").replace(an,"")));c=i=null}return this}}),ut.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){ut.fn[e]=function(e){for(var n,i=0,r=[],o=ut(e),a=o.length-1;a>=i;i++)n=i===a?this:this.clone(!0),ut(o[i])[t](n),rt.apply(r,n.get());return this.pushStack(r)}}),ut.extend({clone:function(e,t,n){var i,r,o,a,s,c=ut.contains(e.ownerDocument,e);if(ut.support.html5Clone||ut.isXMLDoc(e)||!Kt.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(ln.innerHTML=e.outerHTML,ln.removeChild(o=ln.firstChild)),!(ut.support.noCloneEvent&&ut.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||ut.isXMLDoc(e)))for(i=b(o),s=b(e),a=0;null!=(r=s[a]);++a)i[a]&&_(r,i[a]);if(t)if(n)for(s=s||b(e),i=i||b(o),a=0;null!=(r=s[a]);a++)v(r,i[a]);else v(e,o);return i=b(o,"script"),i.length>0&&y(i,!c&&b(e,"script")),i=s=r=null,o},buildFragment:function(e,t,n,i){for(var r,o,a,s,c,l,u,p=e.length,d=f(t),h=[],g=0;p>g;g++)if(o=e[g],o||0===o)if("object"===ut.type(o))ut.merge(h,o.nodeType?[o]:o);else if(Jt.test(o)){for(s=s||d.appendChild(t.createElement("div")),c=(Yt.exec(o)||["",""])[1].toLowerCase(),u=sn[c]||sn._default,s.innerHTML=u[1]+o.replace(Zt,"<$1></$2>")+u[2],r=u[0];r--;)s=s.lastChild;if(!ut.support.leadingWhitespace&&Xt.test(o)&&h.push(t.createTextNode(Xt.exec(o)[0])),!ut.support.tbody)for(o="table"!==c||Qt.test(o)?"<table>"!==u[1]||Qt.test(o)?0:s:s.firstChild,r=o&&o.childNodes.length;r--;)ut.nodeName(l=o.childNodes[r],"tbody")&&!l.childNodes.length&&o.removeChild(l);for(ut.merge(h,s.childNodes),s.textContent="";s.firstChild;)s.removeChild(s.firstChild);s=d.lastChild}else h.push(t.createTextNode(o));for(s&&d.removeChild(s),ut.support.appendChecked||ut.grep(b(h,"input"),w),g=0;o=h[g++];)if((!i||-1===ut.inArray(o,i))&&(a=ut.contains(o.ownerDocument,o),s=b(d.appendChild(o),"script"),a&&y(s),n))for(r=0;o=s[r++];)rn.test(o.type||"")&&n.push(o);return s=null,d},cleanData:function(e,t){for(var n,i,r,o,a=0,s=ut.expando,c=ut.cache,l=ut.support.deleteExpando,u=ut.event.special;null!=(n=e[a]);a++)if((t||ut.acceptData(n))&&(r=n[s],o=r&&c[r])){if(o.events)for(i in o.events)u[i]?ut.event.remove(n,i):ut.removeEvent(n,i,o.handle);
c[r]&&(delete c[r],l?delete n[s]:typeof n.removeAttribute!==K?n.removeAttribute(s):n[s]=null,tt.push(r))}},_evalUrl:function(e){return ut.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})}}),ut.fn.extend({wrapAll:function(e){if(ut.isFunction(e))return this.each(function(t){ut(this).wrapAll(e.call(this,t))});if(this[0]){var t=ut(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstChild&&1===e.firstChild.nodeType;)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return this.each(ut.isFunction(e)?function(t){ut(this).wrapInner(e.call(this,t))}:function(){var t=ut(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=ut.isFunction(e);return this.each(function(n){ut(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){ut.nodeName(this,"body")||ut(this).replaceWith(this.childNodes)}).end()}});var un,pn,dn,fn=/alpha\([^)]*\)/i,hn=/opacity\s*=\s*([^)]*)/,gn=/^(top|right|bottom|left)$/,mn=/^(none|table(?!-c[ea]).+)/,yn=/^margin/,vn=RegExp("^("+pt+")(.*)$","i"),_n=RegExp("^("+pt+")(?!px)[a-z%]+$","i"),bn=RegExp("^([+-])=("+pt+")","i"),wn={BODY:"block"},$n={position:"absolute",visibility:"hidden",display:"block"},Sn={letterSpacing:0,fontWeight:400},Cn=["Top","Right","Bottom","Left"],kn=["Webkit","O","Moz","ms"];ut.fn.extend({css:function(e,n){return ut.access(this,function(e,n,i){var r,o,a={},s=0;if(ut.isArray(n)){for(o=pn(e),r=n.length;r>s;s++)a[n[s]]=ut.css(e,n[s],!1,o);return a}return i!==t?ut.style(e,n,i):ut.css(e,n)},e,n,arguments.length>1)},show:function(){return C(this,!0)},hide:function(){return C(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){S(this)?ut(this).show():ut(this).hide()})}}),ut.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=dn(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":ut.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,i,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,a,s,c=ut.camelCase(n),l=e.style;if(n=ut.cssProps[c]||(ut.cssProps[c]=$(l,c)),s=ut.cssHooks[n]||ut.cssHooks[c],i===t)return s&&"get"in s&&(o=s.get(e,!1,r))!==t?o:l[n];if(a=typeof i,"string"===a&&(o=bn.exec(i))&&(i=(o[1]+1)*o[2]+parseFloat(ut.css(e,n)),a="number"),!(null==i||"number"===a&&isNaN(i)||("number"!==a||ut.cssNumber[c]||(i+="px"),ut.support.clearCloneStyle||""!==i||0!==n.indexOf("background")||(l[n]="inherit"),s&&"set"in s&&(i=s.set(e,i,r))===t)))try{l[n]=i}catch(u){}}},css:function(e,n,i,r){var o,a,s,c=ut.camelCase(n);return n=ut.cssProps[c]||(ut.cssProps[c]=$(e.style,c)),s=ut.cssHooks[n]||ut.cssHooks[c],s&&"get"in s&&(a=s.get(e,!0,i)),a===t&&(a=dn(e,n,r)),"normal"===a&&n in Sn&&(a=Sn[n]),""===i||i?(o=parseFloat(a),i===!0||ut.isNumeric(o)?o||0:a):a}}),e.getComputedStyle?(pn=function(t){return e.getComputedStyle(t,null)},dn=function(e,n,i){var r,o,a,s=i||pn(e),c=s?s.getPropertyValue(n)||s[n]:t,l=e.style;return s&&(""!==c||ut.contains(e.ownerDocument,e)||(c=ut.style(e,n)),_n.test(c)&&yn.test(n)&&(r=l.width,o=l.minWidth,a=l.maxWidth,l.minWidth=l.maxWidth=l.width=c,c=s.width,l.width=r,l.minWidth=o,l.maxWidth=a)),c}):Z.documentElement.currentStyle&&(pn=function(e){return e.currentStyle},dn=function(e,n,i){var r,o,a,s=i||pn(e),c=s?s[n]:t,l=e.style;return null==c&&l&&l[n]&&(c=l[n]),_n.test(c)&&!gn.test(n)&&(r=l.left,o=e.runtimeStyle,a=o&&o.left,a&&(o.left=e.currentStyle.left),l.left="fontSize"===n?"1em":c,c=l.pixelLeft+"px",l.left=r,a&&(o.left=a)),""===c?"auto":c}),ut.each(["height","width"],function(e,n){ut.cssHooks[n]={get:function(e,i,r){return i?0===e.offsetWidth&&mn.test(ut.css(e,"display"))?ut.swap(e,$n,function(){return x(e,n,r)}):x(e,n,r):t},set:function(e,t,i){var r=i&&pn(e);return k(e,t,i?M(e,n,i,ut.support.boxSizing&&"border-box"===ut.css(e,"boxSizing",!1,r),r):0)}}}),ut.support.opacity||(ut.cssHooks.opacity={get:function(e,t){return hn.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,i=e.currentStyle,r=ut.isNumeric(t)?"alpha(opacity="+100*t+")":"",o=i&&i.filter||n.filter||"";n.zoom=1,(t>=1||""===t)&&""===ut.trim(o.replace(fn,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===t||i&&!i.filter)||(n.filter=fn.test(o)?o.replace(fn,r):o+" "+r)}}),ut(function(){ut.support.reliableMarginRight||(ut.cssHooks.marginRight={get:function(e,n){return n?ut.swap(e,{display:"inline-block"},dn,[e,"marginRight"]):t}}),!ut.support.pixelPosition&&ut.fn.position&&ut.each(["top","left"],function(e,n){ut.cssHooks[n]={get:function(e,i){return i?(i=dn(e,n),_n.test(i)?ut(e).position()[n]+"px":i):t}}})}),ut.expr&&ut.expr.filters&&(ut.expr.filters.hidden=function(e){return 0>=e.offsetWidth&&0>=e.offsetHeight||!ut.support.reliableHiddenOffsets&&"none"===(e.style&&e.style.display||ut.css(e,"display"))},ut.expr.filters.visible=function(e){return!ut.expr.filters.hidden(e)}),ut.each({margin:"",padding:"",border:"Width"},function(e,t){ut.cssHooks[e+t]={expand:function(n){for(var i=0,r={},o="string"==typeof n?n.split(" "):[n];4>i;i++)r[e+Cn[i]+t]=o[i]||o[i-2]||o[0];return r}},yn.test(e)||(ut.cssHooks[e+t].set=k)});var Mn=/%20/g,xn=/\[\]$/,Tn=/\r?\n/g,En=/^(?:submit|button|image|reset|file)$/i,An=/^(?:input|select|textarea|keygen)/i;ut.fn.extend({serialize:function(){return ut.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=ut.prop(this,"elements");return e?ut.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!ut(this).is(":disabled")&&An.test(this.nodeName)&&!En.test(e)&&(this.checked||!tn.test(e))}).map(function(e,t){var n=ut(this).val();return null==n?null:ut.isArray(n)?ut.map(n,function(e){return{name:t.name,value:e.replace(Tn,"\r\n")}}):{name:t.name,value:n.replace(Tn,"\r\n")}}).get()}}),ut.param=function(e,n){var i,r=[],o=function(e,t){t=ut.isFunction(t)?t():null==t?"":t,r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(n===t&&(n=ut.ajaxSettings&&ut.ajaxSettings.traditional),ut.isArray(e)||e.jquery&&!ut.isPlainObject(e))ut.each(e,function(){o(this.name,this.value)});else for(i in e)A(i,e[i],n,o);return r.join("&").replace(Mn,"+")},ut.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){ut.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),ut.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,i){return this.on(t,e,n,i)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}});var Dn,In,Pn=ut.now(),Nn=/\?/,Ln=/#.*$/,Bn=/([?&])_=[^&]*/,Fn=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,On=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Un=/^(?:GET|HEAD)$/,Rn=/^\/\//,qn=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,jn=ut.fn.load,Hn={},Vn={},zn="*/".concat("*");try{In=X.href}catch(Wn){In=Z.createElement("a"),In.href="",In=In.href}Dn=qn.exec(In.toLowerCase())||[],ut.fn.load=function(e,n,i){if("string"!=typeof e&&jn)return jn.apply(this,arguments);var r,o,a,s=this,c=e.indexOf(" ");return c>=0&&(r=e.slice(c,e.length),e=e.slice(0,c)),ut.isFunction(n)?(i=n,n=t):n&&"object"==typeof n&&(a="POST"),s.length>0&&ut.ajax({url:e,type:a,dataType:"html",data:n}).done(function(e){o=arguments,s.html(r?ut("<div>").append(ut.parseHTML(e)).find(r):e)}).complete(i&&function(e,t){s.each(i,o||[e.responseText,t,e])}),this},ut.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){ut.fn[t]=function(e){return this.on(t,e)}}),ut.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:In,type:"GET",isLocal:On.test(Dn[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":zn,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":ut.parseJSON,"text xml":ut.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?P(P(e,ut.ajaxSettings),t):P(ut.ajaxSettings,e)},ajaxPrefilter:D(Hn),ajaxTransport:D(Vn),ajax:function(e,n){function i(e,n,i,r){var o,p,v,_,w,S=n;2!==b&&(b=2,c&&clearTimeout(c),u=t,s=r||"",$.readyState=e>0?4:0,o=e>=200&&300>e||304===e,i&&(_=N(d,$,i)),_=L(d,_,$,o),o?(d.ifModified&&(w=$.getResponseHeader("Last-Modified"),w&&(ut.lastModified[a]=w),w=$.getResponseHeader("etag"),w&&(ut.etag[a]=w)),204===e||"HEAD"===d.type?S="nocontent":304===e?S="notmodified":(S=_.state,p=_.data,v=_.error,o=!v)):(v=S,(e||!S)&&(S="error",0>e&&(e=0))),$.status=e,$.statusText=(n||S)+"",o?g.resolveWith(f,[p,S,$]):g.rejectWith(f,[$,S,v]),$.statusCode(y),y=t,l&&h.trigger(o?"ajaxSuccess":"ajaxError",[$,d,o?p:v]),m.fireWith(f,[$,S]),l&&(h.trigger("ajaxComplete",[$,d]),--ut.active||ut.event.trigger("ajaxStop")))}"object"==typeof e&&(n=e,e=t),n=n||{};var r,o,a,s,c,l,u,p,d=ut.ajaxSetup({},n),f=d.context||d,h=d.context&&(f.nodeType||f.jquery)?ut(f):ut.event,g=ut.Deferred(),m=ut.Callbacks("once memory"),y=d.statusCode||{},v={},_={},b=0,w="canceled",$={readyState:0,getResponseHeader:function(e){var t;if(2===b){if(!p)for(p={};t=Fn.exec(s);)p[t[1].toLowerCase()]=t[2];t=p[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===b?s:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return b||(e=_[n]=_[n]||e,v[e]=t),this},overrideMimeType:function(e){return b||(d.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>b)for(t in e)y[t]=[y[t],e[t]];else $.always(e[$.status]);return this},abort:function(e){var t=e||w;return u&&u.abort(t),i(0,t),this}};if(g.promise($).complete=m.add,$.success=$.done,$.error=$.fail,d.url=((e||d.url||In)+"").replace(Ln,"").replace(Rn,Dn[1]+"//"),d.type=n.method||n.type||d.method||d.type,d.dataTypes=ut.trim(d.dataType||"*").toLowerCase().match(dt)||[""],null==d.crossDomain&&(r=qn.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]===Dn[1]&&r[2]===Dn[2]&&(r[3]||("http:"===r[1]?"80":"443"))===(Dn[3]||("http:"===Dn[1]?"80":"443")))),d.data&&d.processData&&"string"!=typeof d.data&&(d.data=ut.param(d.data,d.traditional)),I(Hn,d,n,$),2===b)return $;l=d.global,l&&0===ut.active++&&ut.event.trigger("ajaxStart"),d.type=d.type.toUpperCase(),d.hasContent=!Un.test(d.type),a=d.url,d.hasContent||(d.data&&(a=d.url+=(Nn.test(a)?"&":"?")+d.data,delete d.data),d.cache===!1&&(d.url=Bn.test(a)?a.replace(Bn,"$1_="+Pn++):a+(Nn.test(a)?"&":"?")+"_="+Pn++)),d.ifModified&&(ut.lastModified[a]&&$.setRequestHeader("If-Modified-Since",ut.lastModified[a]),ut.etag[a]&&$.setRequestHeader("If-None-Match",ut.etag[a])),(d.data&&d.hasContent&&d.contentType!==!1||n.contentType)&&$.setRequestHeader("Content-Type",d.contentType),$.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+("*"!==d.dataTypes[0]?", "+zn+"; q=0.01":""):d.accepts["*"]);for(o in d.headers)$.setRequestHeader(o,d.headers[o]);if(d.beforeSend&&(d.beforeSend.call(f,$,d)===!1||2===b))return $.abort();w="abort";for(o in{success:1,error:1,complete:1})$[o](d[o]);if(u=I(Vn,d,n,$)){$.readyState=1,l&&h.trigger("ajaxSend",[$,d]),d.async&&d.timeout>0&&(c=setTimeout(function(){$.abort("timeout")},d.timeout));try{b=1,u.send(v,i)}catch(S){if(!(2>b))throw S;i(-1,S)}}else i(-1,"No Transport");return $},getJSON:function(e,t,n){return ut.get(e,t,n,"json")},getScript:function(e,n){return ut.get(e,t,n,"script")}}),ut.each(["get","post"],function(e,n){ut[n]=function(e,i,r,o){return ut.isFunction(i)&&(o=o||r,r=i,i=t),ut.ajax({url:e,type:n,dataType:o,data:i,success:r})}}),ut.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return ut.globalEval(e),e}}}),ut.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),ut.ajaxTransport("script",function(e){if(e.crossDomain){var n,i=Z.head||ut("head")[0]||Z.documentElement;return{send:function(t,r){n=Z.createElement("script"),n.async=!0,e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,t){(t||!n.readyState||/loaded|complete/.test(n.readyState))&&(n.onload=n.onreadystatechange=null,n.parentNode&&n.parentNode.removeChild(n),n=null,t||r(200,"success"))},i.insertBefore(n,i.firstChild)},abort:function(){n&&n.onload(t,!0)}}}});var Gn=[],Kn=/(=)\?(?=&|$)|\?\?/;ut.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Gn.pop()||ut.expando+"_"+Pn++;return this[e]=!0,e}}),ut.ajaxPrefilter("json jsonp",function(n,i,r){var o,a,s,c=n.jsonp!==!1&&(Kn.test(n.url)?"url":"string"==typeof n.data&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Kn.test(n.data)&&"data");return c||"jsonp"===n.dataTypes[0]?(o=n.jsonpCallback=ut.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,c?n[c]=n[c].replace(Kn,"$1"+o):n.jsonp!==!1&&(n.url+=(Nn.test(n.url)?"&":"?")+n.jsonp+"="+o),n.converters["script json"]=function(){return s||ut.error(o+" was not called"),s[0]},n.dataTypes[0]="json",a=e[o],e[o]=function(){s=arguments},r.always(function(){e[o]=a,n[o]&&(n.jsonpCallback=i.jsonpCallback,Gn.push(o)),s&&ut.isFunction(a)&&a(s[0]),s=a=t}),"script"):t});var Xn,Zn,Yn=0,Qn=e.ActiveXObject&&function(){var e;for(e in Xn)Xn[e](t,!0)};ut.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&B()||F()}:B,Zn=ut.ajaxSettings.xhr(),ut.support.cors=!!Zn&&"withCredentials"in Zn,Zn=ut.support.ajax=!!Zn,Zn&&ut.ajaxTransport(function(n){if(!n.crossDomain||ut.support.cors){var i;return{send:function(r,o){var a,s,c=n.xhr();if(n.username?c.open(n.type,n.url,n.async,n.username,n.password):c.open(n.type,n.url,n.async),n.xhrFields)for(s in n.xhrFields)c[s]=n.xhrFields[s];n.mimeType&&c.overrideMimeType&&c.overrideMimeType(n.mimeType),n.crossDomain||r["X-Requested-With"]||(r["X-Requested-With"]="XMLHttpRequest");try{for(s in r)c.setRequestHeader(s,r[s])}catch(l){}c.send(n.hasContent&&n.data||null),i=function(e,r){var s,l,u,p;try{if(i&&(r||4===c.readyState))if(i=t,a&&(c.onreadystatechange=ut.noop,Qn&&delete Xn[a]),r)4!==c.readyState&&c.abort();else{p={},s=c.status,l=c.getAllResponseHeaders(),"string"==typeof c.responseText&&(p.text=c.responseText);try{u=c.statusText}catch(d){u=""}s||!n.isLocal||n.crossDomain?1223===s&&(s=204):s=p.text?200:404}}catch(f){r||o(-1,f)}p&&o(s,u,p,l)},n.async?4===c.readyState?setTimeout(i):(a=++Yn,Qn&&(Xn||(Xn={},ut(e).unload(Qn)),Xn[a]=i),c.onreadystatechange=i):i()},abort:function(){i&&i(t,!0)}}}});var Jn,ei,ti=/^(?:toggle|show|hide)$/,ni=RegExp("^(?:([+-])=|)("+pt+")([a-z%]*)$","i"),ii=/queueHooks$/,ri=[j],oi={"*":[function(e,t){var n=this.createTween(e,t),i=n.cur(),r=ni.exec(t),o=r&&r[3]||(ut.cssNumber[e]?"":"px"),a=(ut.cssNumber[e]||"px"!==o&&+i)&&ni.exec(ut.css(n.elem,e)),s=1,c=20;if(a&&a[3]!==o){o=o||a[3],r=r||[],a=+i||1;do s=s||".5",a/=s,ut.style(n.elem,e,a+o);while(s!==(s=n.cur()/i)&&1!==s&&--c)}return r&&(a=n.start=+a||+i||0,n.unit=o,n.end=r[1]?a+(r[1]+1)*r[2]:+r[2]),n}]};ut.Animation=ut.extend(R,{tweener:function(e,t){ut.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");for(var n,i=0,r=e.length;r>i;i++)n=e[i],oi[n]=oi[n]||[],oi[n].unshift(t)},prefilter:function(e,t){t?ri.unshift(e):ri.push(e)}}),ut.Tween=H,H.prototype={constructor:H,init:function(e,t,n,i,r,o){this.elem=e,this.prop=n,this.easing=r||"swing",this.options=t,this.start=this.now=this.cur(),this.end=i,this.unit=o||(ut.cssNumber[n]?"":"px")},cur:function(){var e=H.propHooks[this.prop];return e&&e.get?e.get(this):H.propHooks._default.get(this)},run:function(e){var t,n=H.propHooks[this.prop];return this.pos=t=this.options.duration?ut.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):H.propHooks._default.set(this),this}},H.prototype.init.prototype=H.prototype,H.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=ut.css(e.elem,e.prop,""),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){ut.fx.step[e.prop]?ut.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[ut.cssProps[e.prop]]||ut.cssHooks[e.prop])?ut.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},H.propHooks.scrollTop=H.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},ut.each(["toggle","show","hide"],function(e,t){var n=ut.fn[t];ut.fn[t]=function(e,i,r){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(V(t,!0),e,i,r)}}),ut.fn.extend({fadeTo:function(e,t,n,i){return this.filter(S).css("opacity",0).show().end().animate({opacity:t},e,n,i)},animate:function(e,t,n,i){var r=ut.isEmptyObject(e),o=ut.speed(t,n,i),a=function(){var t=R(this,ut.extend({},e),o);(r||ut._data(this,"finish"))&&t.stop(!0)};return a.finish=a,r||o.queue===!1?this.each(a):this.queue(o.queue,a)},stop:function(e,n,i){var r=function(e){var t=e.stop;delete e.stop,t(i)};return"string"!=typeof e&&(i=n,n=e,e=t),n&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,n=null!=e&&e+"queueHooks",o=ut.timers,a=ut._data(this);if(n)a[n]&&a[n].stop&&r(a[n]);else for(n in a)a[n]&&a[n].stop&&ii.test(n)&&r(a[n]);for(n=o.length;n--;)o[n].elem!==this||null!=e&&o[n].queue!==e||(o[n].anim.stop(i),t=!1,o.splice(n,1));(t||!i)&&ut.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=ut._data(this),i=n[e+"queue"],r=n[e+"queueHooks"],o=ut.timers,a=i?i.length:0;for(n.finish=!0,ut.queue(this,e,[]),r&&r.stop&&r.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;a>t;t++)i[t]&&i[t].finish&&i[t].finish.call(this);delete n.finish})}}),ut.each({slideDown:V("show"),slideUp:V("hide"),slideToggle:V("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){ut.fn[e]=function(e,n,i){return this.animate(t,e,n,i)}}),ut.speed=function(e,t,n){var i=e&&"object"==typeof e?ut.extend({},e):{complete:n||!n&&t||ut.isFunction(e)&&e,duration:e,easing:n&&t||t&&!ut.isFunction(t)&&t};return i.duration=ut.fx.off?0:"number"==typeof i.duration?i.duration:i.duration in ut.fx.speeds?ut.fx.speeds[i.duration]:ut.fx.speeds._default,(null==i.queue||i.queue===!0)&&(i.queue="fx"),i.old=i.complete,i.complete=function(){ut.isFunction(i.old)&&i.old.call(this),i.queue&&ut.dequeue(this,i.queue)},i},ut.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},ut.timers=[],ut.fx=H.prototype.init,ut.fx.tick=function(){var e,n=ut.timers,i=0;for(Jn=ut.now();n.length>i;i++)e=n[i],e()||n[i]!==e||n.splice(i--,1);n.length||ut.fx.stop(),Jn=t},ut.fx.timer=function(e){e()&&ut.timers.push(e)&&ut.fx.start()},ut.fx.interval=13,ut.fx.start=function(){ei||(ei=setInterval(ut.fx.tick,ut.fx.interval))},ut.fx.stop=function(){clearInterval(ei),ei=null},ut.fx.speeds={slow:600,fast:200,_default:400},ut.fx.step={},ut.expr&&ut.expr.filters&&(ut.expr.filters.animated=function(e){return ut.grep(ut.timers,function(t){return e===t.elem}).length}),ut.fn.offset=function(e){if(arguments.length)return e===t?this:this.each(function(t){ut.offset.setOffset(this,e,t)});var n,i,r={top:0,left:0},o=this[0],a=o&&o.ownerDocument;return a?(n=a.documentElement,ut.contains(n,o)?(typeof o.getBoundingClientRect!==K&&(r=o.getBoundingClientRect()),i=z(a),{top:r.top+(i.pageYOffset||n.scrollTop)-(n.clientTop||0),left:r.left+(i.pageXOffset||n.scrollLeft)-(n.clientLeft||0)}):r):void 0},ut.offset={setOffset:function(e,t,n){var i=ut.css(e,"position");"static"===i&&(e.style.position="relative");var r,o,a=ut(e),s=a.offset(),c=ut.css(e,"top"),l=ut.css(e,"left"),u=("absolute"===i||"fixed"===i)&&ut.inArray("auto",[c,l])>-1,p={},d={};u?(d=a.position(),r=d.top,o=d.left):(r=parseFloat(c)||0,o=parseFloat(l)||0),ut.isFunction(t)&&(t=t.call(e,n,s)),null!=t.top&&(p.top=t.top-s.top+r),null!=t.left&&(p.left=t.left-s.left+o),"using"in t?t.using.call(e,p):a.css(p)}},ut.fn.extend({position:function(){if(this[0]){var e,t,n={top:0,left:0},i=this[0];return"fixed"===ut.css(i,"position")?t=i.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),ut.nodeName(e[0],"html")||(n=e.offset()),n.top+=ut.css(e[0],"borderTopWidth",!0),n.left+=ut.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-ut.css(i,"marginTop",!0),left:t.left-n.left-ut.css(i,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent||Y;e&&!ut.nodeName(e,"html")&&"static"===ut.css(e,"position");)e=e.offsetParent;return e||Y})}}),ut.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var i=/Y/.test(n);ut.fn[e]=function(r){return ut.access(this,function(e,r,o){var a=z(e);return o===t?a?n in a?a[n]:a.document.documentElement[r]:e[r]:(a?a.scrollTo(i?ut(a).scrollLeft():o,i?o:ut(a).scrollTop()):e[r]=o,t)},e,r,arguments.length,null)}}),ut.each({Height:"height",Width:"width"},function(e,n){ut.each({padding:"inner"+e,content:n,"":"outer"+e},function(i,r){ut.fn[r]=function(r,o){var a=arguments.length&&(i||"boolean"!=typeof r),s=i||(r===!0||o===!0?"margin":"border");return ut.access(this,function(n,i,r){var o;return ut.isWindow(n)?n.document.documentElement["client"+e]:9===n.nodeType?(o=n.documentElement,Math.max(n.body["scroll"+e],o["scroll"+e],n.body["offset"+e],o["offset"+e],o["client"+e])):r===t?ut.css(n,i,s):ut.style(n,i,r,s)},n,a?r:t,a,null)}})}),ut.fn.size=function(){return this.length},ut.fn.andSelf=ut.fn.addBack,"object"==typeof module&&module&&"object"==typeof module.exports?module.exports=ut:(e.jQuery=e.$=ut,"function"==typeof define&&define.amd&&define("jquery",[],function(){return ut}))}(window),Config=window.Config||{},Config.App={id:2496,hash:"8da85b0d5bfe62527e5b244c209159c3",version:"0.1.9"},Config.Modes={test:location.search.indexOf("test=1")>0,debug:location.search.indexOf("debug=1")>0,packed:"app:"==location.protocol||"chrome-extension:"==location.protocol,ios_standalone:window.navigator.standalone&&navigator.userAgent.match(/iOS|iPhone|iPad/),chrome_packed:window.chrome&&chrome.app&&chrome.app.window&&!0||!1},Config.Navigator={osX:-1!=(navigator.platform||"").toLowerCase().indexOf("mac")||-1!=(navigator.userAgent||"").toLowerCase().indexOf("mac"),retina:window.devicePixelRatio>1,touch:screen.width<=768,mobile:screen.width<480},Config.Schema=Config.Schema||{},Config.Schema.MTProto={constructors:[{id:"481674261",predicate:"vector",params:[],type:"Vector t"},{id:"85337187",predicate:"resPQ",params:[{name:"nonce",type:"int128"},{name:"server_nonce",type:"int128"},{name:"pq",type:"bytes"},{name:"server_public_key_fingerprints",type:"Vector<long>"}],type:"ResPQ"},{id:"-2083955988",predicate:"p_q_inner_data",params:[{name:"pq",type:"bytes"},{name:"p",type:"bytes"},{name:"q",type:"bytes"},{name:"nonce",type:"int128"},{name:"server_nonce",type:"int128"},{name:"new_nonce",type:"int256"}],type:"P_Q_inner_data"},{id:"2043348061",predicate:"server_DH_params_fail",params:[{name:"nonce",type:"int128"},{name:"server_nonce",type:"int128"},{name:"new_nonce_hash",type:"int128"}],type:"Server_DH_Params"},{id:"-790100132",predicate:"server_DH_params_ok",params:[{name:"nonce",type:"int128"},{name:"server_nonce",type:"int128"},{name:"encrypted_answer",type:"bytes"}],type:"Server_DH_Params"},{id:"-1249309254",predicate:"server_DH_inner_data",params:[{name:"nonce",type:"int128"},{name:"server_nonce",type:"int128"},{name:"g",type:"int"},{name:"dh_prime",type:"bytes"},{name:"g_a",type:"bytes"},{name:"server_time",type:"int"}],type:"Server_DH_inner_data"},{id:"1715713620",predicate:"client_DH_inner_data",params:[{name:"nonce",type:"int128"},{name:"server_nonce",type:"int128"},{name:"retry_id",type:"long"},{name:"g_b",type:"bytes"}],type:"Client_DH_Inner_Data"},{id:"1003222836",predicate:"dh_gen_ok",params:[{name:"nonce",type:"int128"},{name:"server_nonce",type:"int128"},{name:"new_nonce_hash1",type:"int128"}],type:"Set_client_DH_params_answer"},{id:"1188831161",predicate:"dh_gen_retry",params:[{name:"nonce",type:"int128"},{name:"server_nonce",type:"int128"},{name:"new_nonce_hash2",type:"int128"}],type:"Set_client_DH_params_answer"},{id:"-1499615742",predicate:"dh_gen_fail",params:[{name:"nonce",type:"int128"},{name:"server_nonce",type:"int128"},{name:"new_nonce_hash3",type:"int128"}],type:"Set_client_DH_params_answer"},{id:"-212046591",predicate:"rpc_result",params:[{name:"req_msg_id",type:"long"},{name:"result",type:"Object"}],type:"RpcResult"},{id:"558156313",predicate:"rpc_error",params:[{name:"error_code",type:"int"},{name:"error_message",type:"string"}],type:"RpcError"},{id:"1579864942",predicate:"rpc_answer_unknown",params:[],type:"RpcDropAnswer"},{id:"-847714938",predicate:"rpc_answer_dropped_running",params:[],type:"RpcDropAnswer"},{id:"-1539647305",predicate:"rpc_answer_dropped",params:[{name:"msg_id",type:"long"},{name:"seq_no",type:"int"},{name:"bytes",type:"int"}],type:"RpcDropAnswer"},{id:"155834844",predicate:"future_salt",params:[{name:"valid_since",type:"int"},{name:"valid_until",type:"int"},{name:"salt",type:"long"}],type:"FutureSalt"},{id:"-1370486635",predicate:"future_salts",params:[{name:"req_msg_id",type:"long"},{name:"now",type:"int"},{name:"salts",type:"vector<future_salt>"}],type:"FutureSalts"},{id:"880243653",predicate:"pong",params:[{name:"msg_id",type:"long"},{name:"ping_id",type:"long"}],type:"Pong"},{id:"-501201412",predicate:"destroy_session_ok",params:[{name:"session_id",type:"long"}],type:"DestroySessionRes"},{id:"1658015945",predicate:"destroy_session_none",params:[{name:"session_id",type:"long"}],type:"DestroySessionRes"},{id:"-1631450872",predicate:"new_session_created",params:[{name:"first_msg_id",type:"long"},{name:"unique_id",type:"long"},{name:"server_salt",type:"long"}],type:"NewSession"},{id:"1945237724",predicate:"msg_container",params:[{name:"messages",type:"vector<%Message>"}],type:"MessageContainer"},{id:"1538843921",predicate:"message",params:[{name:"msg_id",type:"long"},{name:"seqno",type:"int"},{name:"bytes",type:"int"},{name:"body",type:"Object"}],type:"Message"},{id:"-530561358",predicate:"msg_copy",params:[{name:"orig_message",type:"Message"}],type:"MessageCopy"},{id:"812830625",predicate:"gzip_packed",params:[{name:"packed_data",type:"bytes"}],type:"Object"},{id:"1658238041",predicate:"msgs_ack",params:[{name:"msg_ids",type:"Vector<long>"}],type:"MsgsAck"},{id:"-1477445615",predicate:"bad_msg_notification",params:[{name:"bad_msg_id",type:"long"},{name:"bad_msg_seqno",type:"int"},{name:"error_code",type:"int"}],type:"BadMsgNotification"},{id:"-307542917",predicate:"bad_server_salt",params:[{name:"bad_msg_id",type:"long"},{name:"bad_msg_seqno",type:"int"},{name:"error_code",type:"int"},{name:"new_server_salt",type:"long"}],type:"BadMsgNotification"},{id:"2105940488",predicate:"msg_resend_req",params:[{name:"msg_ids",type:"Vector<long>"}],type:"MsgResendReq"},{id:"-630588590",predicate:"msgs_state_req",params:[{name:"msg_ids",type:"Vector<long>"}],type:"MsgsStateReq"},{id:"81704317",predicate:"msgs_state_info",params:[{name:"req_msg_id",type:"long"},{name:"info",type:"bytes"}],type:"MsgsStateInfo"},{id:"-1933520591",predicate:"msgs_all_info",params:[{name:"msg_ids",type:"Vector<long>"},{name:"info",type:"bytes"}],type:"MsgsAllInfo"},{id:"661470918",predicate:"msg_detailed_info",params:[{name:"msg_id",type:"long"},{name:"answer_msg_id",type:"long"},{name:"bytes",type:"int"},{name:"status",type:"int"}],type:"MsgDetailedInfo"},{id:"-2137147681",predicate:"msg_new_detailed_info",params:[{name:"answer_msg_id",type:"long"},{name:"bytes",type:"int"},{name:"status",type:"int"}],type:"MsgDetailedInfo"}],methods:[{id:"1615239032",method:"req_pq",params:[{name:"nonce",type:"int128"}],type:"ResPQ"},{id:"-686627650",method:"req_DH_params",params:[{name:"nonce",type:"int128"},{name:"server_nonce",type:"int128"},{name:"p",type:"bytes"},{name:"q",type:"bytes"},{name:"public_key_fingerprint",type:"long"},{name:"encrypted_data",type:"bytes"}],type:"Server_DH_Params"},{id:"-184262881",method:"set_client_DH_params",params:[{name:"nonce",type:"int128"},{name:"server_nonce",type:"int128"},{name:"encrypted_data",type:"bytes"}],type:"Set_client_DH_params_answer"},{id:"1491380032",method:"rpc_drop_answer",params:[{name:"req_msg_id",type:"long"}],type:"RpcDropAnswer"},{id:"-1188971260",method:"get_future_salts",params:[{name:"num",type:"int"}],type:"FutureSalts"},{id:"2059302892",method:"ping",params:[{name:"ping_id",type:"long"}],type:"Pong"},{id:"-213746804",method:"ping_delay_disconnect",params:[{name:"ping_id",type:"long"},{name:"disconnect_delay",type:"int"}],type:"Pong"},{id:"-414113498",method:"destroy_session",params:[{name:"session_id",type:"long"}],type:"DestroySessionRes"},{id:"-1835453025",method:"http_wait",params:[{name:"max_delay",type:"int"},{name:"wait_after",type:"int"},{name:"max_wait",type:"int"}],type:"HttpWait"}]},Config.Schema.API={constructors:[{id:"-1132882121",predicate:"boolFalse",params:[],type:"Bool"},{id:"-1720552011",predicate:"boolTrue",params:[],type:"Bool"},{id:"481674261",predicate:"vector",params:[],type:"Vector t"},{id:"-994444869",predicate:"error",params:[{name:"code",type:"int"},{name:"text",type:"string"}],type:"Error"},{id:"1450380236",predicate:"null",params:[],type:"Null"},{id:"2134579434",predicate:"inputPeerEmpty",params:[],type:"InputPeer"},{id:"2107670217",predicate:"inputPeerSelf",params:[],type:"InputPeer"},{id:"270785512",predicate:"inputPeerContact",params:[{name:"user_id",type:"int"}],type:"InputPeer"},{id:"-1690012891",predicate:"inputPeerForeign",params:[{name:"user_id",type:"int"},{name:"access_hash",type:"long"}],type:"InputPeer"},{id:"396093539",predicate:"inputPeerChat",params:[{name:"chat_id",type:"int"}],type:"InputPeer"},{id:"-1182234929",predicate:"inputUserEmpty",params:[],type:"InputUser"},{id:"-138301121",predicate:"inputUserSelf",params:[],type:"InputUser"},{id:"-2031530139",predicate:"inputUserContact",params:[{name:"user_id",type:"int"}],type:"InputUser"},{id:"1700689151",predicate:"inputUserForeign",params:[{name:"user_id",type:"int"},{name:"access_hash",type:"long"}],type:"InputUser"},{id:"-208488460",predicate:"inputPhoneContact",params:[{name:"client_id",type:"long"},{name:"phone",type:"string"},{name:"first_name",type:"string"},{name:"last_name",type:"string"}],type:"InputContact"},{id:"-181407105",predicate:"inputFile",params:[{name:"id",type:"long"},{name:"parts",type:"int"},{name:"name",type:"string"},{name:"md5_checksum",type:"string"}],type:"InputFile"},{id:"-1771768449",predicate:"inputMediaEmpty",params:[],type:"InputMedia"},{id:"767900285",predicate:"inputMediaUploadedPhoto",params:[{name:"file",type:"InputFile"}],type:"InputMedia"},{id:"-1893027092",predicate:"inputMediaPhoto",params:[{name:"id",type:"InputPhoto"}],type:"InputMedia"},{id:"-104578748",predicate:"inputMediaGeoPoint",params:[{name:"geo_point",type:"InputGeoPoint"}],type:"InputMedia"},{id:"-1494984313",predicate:"inputMediaContact",params:[{name:"phone_number",type:"string"},{name:"first_name",type:"string"},{name:"last_name",type:"string"}],type:"InputMedia"},{id:"322623222",predicate:"inputMediaUploadedVideo",params:[{name:"file",type:"InputFile"},{name:"duration",type:"int"},{name:"w",type:"int"},{name:"h",type:"int"},{name:"mime_type",type:"string"}],type:"InputMedia"},{id:"-1726817601",predicate:"inputMediaUploadedThumbVideo",params:[{name:"file",type:"InputFile"},{name:"thumb",type:"InputFile"},{name:"duration",type:"int"},{name:"w",type:"int"},{name:"h",type:"int"},{name:"mime_type",type:"string"}],type:"InputMedia"},{id:"2130852582",predicate:"inputMediaVideo",params:[{name:"id",type:"InputVideo"}],type:"InputMedia"},{id:"480546647",predicate:"inputChatPhotoEmpty",params:[],type:"InputChatPhoto"},{id:"-1809496270",predicate:"inputChatUploadedPhoto",params:[{name:"file",type:"InputFile"},{name:"crop",type:"InputPhotoCrop"}],type:"InputChatPhoto"},{id:"-1293828344",predicate:"inputChatPhoto",params:[{name:"id",type:"InputPhoto"},{name:"crop",type:"InputPhotoCrop"}],type:"InputChatPhoto"},{id:"-457104426",predicate:"inputGeoPointEmpty",params:[],type:"InputGeoPoint"},{id:"-206066487",predicate:"inputGeoPoint",params:[{name:"lat",type:"double"},{name:"long",type:"double"}],type:"InputGeoPoint"},{id:"483901197",predicate:"inputPhotoEmpty",params:[],type:"InputPhoto"},{id:"-74070332",predicate:"inputPhoto",params:[{name:"id",type:"long"},{name:"access_hash",type:"long"}],type:"InputPhoto"},{id:"1426648181",predicate:"inputVideoEmpty",params:[],type:"InputVideo"},{id:"-296249774",predicate:"inputVideo",params:[{name:"id",type:"long"},{name:"access_hash",type:"long"}],type:"InputVideo"},{id:"342061462",predicate:"inputFileLocation",params:[{name:"volume_id",type:"long"},{name:"local_id",type:"int"},{name:"secret",type:"long"}],type:"InputFileLocation"},{id:"1023632620",predicate:"inputVideoFileLocation",params:[{name:"id",type:"long"},{name:"access_hash",type:"long"}],type:"InputFileLocation"},{id:"-1377390588",predicate:"inputPhotoCropAuto",params:[],type:"InputPhotoCrop"},{id:"-644787419",predicate:"inputPhotoCrop",params:[{name:"crop_left",type:"double"},{name:"crop_top",type:"double"},{name:"crop_width",type:"double"}],type:"InputPhotoCrop"},{id:"1996904104",predicate:"inputAppEvent",params:[{name:"time",type:"double"},{name:"type",type:"string"},{name:"peer",type:"long"},{name:"data",type:"string"}],type:"InputAppEvent"},{id:"-1649296275",predicate:"peerUser",params:[{name:"user_id",type:"int"}],type:"Peer"},{id:"-1160714821",predicate:"peerChat",params:[{name:"chat_id",type:"int"}],type:"Peer"},{id:"-1432995067",predicate:"storage.fileUnknown",params:[],type:"storage.FileType"},{id:"8322574",predicate:"storage.fileJpeg",params:[],type:"storage.FileType"},{id:"-891180321",predicate:"storage.fileGif",params:[],type:"storage.FileType"},{id:"172975040",predicate:"storage.filePng",params:[],type:"storage.FileType"},{id:"-1373745011",predicate:"storage.filePdf",params:[],type:"storage.FileType"},{id:"1384777335",predicate:"storage.fileMp3",params:[],type:"storage.FileType"},{id:"1258941372",predicate:"storage.fileMov",params:[],type:"storage.FileType"},{id:"1086091090",predicate:"storage.filePartial",params:[],type:"storage.FileType"},{id:"-1278304028",predicate:"storage.fileMp4",params:[],type:"storage.FileType"},{id:"276907596",predicate:"storage.fileWebp",params:[],type:"storage.FileType"},{id:"2086234950",predicate:"fileLocationUnavailable",params:[{name:"volume_id",type:"long"},{name:"local_id",type:"int"},{name:"secret",type:"long"}],type:"FileLocation"},{id:"1406570614",predicate:"fileLocation",params:[{name:"dc_id",type:"int"},{name:"volume_id",type:"long"},{name:"local_id",type:"int"},{name:"secret",type:"long"}],type:"FileLocation"},{id:"537022650",predicate:"userEmpty",params:[{name:"id",type:"int"}],type:"User"},{id:"1912944108",predicate:"userSelf",params:[{name:"id",type:"int"},{name:"first_name",type:"string"},{name:"last_name",type:"string"},{name:"phone",type:"string"},{name:"photo",type:"UserProfilePhoto"},{name:"status",type:"UserStatus"},{name:"inactive",type:"Bool"}],type:"User"},{id:"-218397927",predicate:"userContact",params:[{name:"id",type:"int"},{name:"first_name",type:"string"},{name:"last_name",type:"string"},{name:"access_hash",type:"long"},{name:"phone",type:"string"},{name:"photo",type:"UserProfilePhoto"},{name:"status",type:"UserStatus"}],type:"User"},{id:"585682608",predicate:"userRequest",params:[{name:"id",type:"int"},{name:"first_name",type:"string"},{name:"last_name",type:"string"},{name:"access_hash",type:"long"},{name:"phone",type:"string"},{name:"photo",type:"UserProfilePhoto"},{name:"status",type:"UserStatus"}],type:"User"},{id:"1377093789",predicate:"userForeign",params:[{name:"id",type:"int"},{name:"first_name",type:"string"},{name:"last_name",type:"string"},{name:"access_hash",type:"long"},{name:"photo",type:"UserProfilePhoto"},{name:"status",type:"UserStatus"}],type:"User"},{id:"-1298475060",predicate:"userDeleted",params:[{name:"id",type:"int"},{name:"first_name",type:"string"},{name:"last_name",type:"string"}],type:"User"},{id:"1326562017",predicate:"userProfilePhotoEmpty",params:[],type:"UserProfilePhoto"},{id:"-715532088",predicate:"userProfilePhoto",params:[{name:"photo_id",type:"long"},{name:"photo_small",type:"FileLocation"},{name:"photo_big",type:"FileLocation"}],type:"UserProfilePhoto"},{id:"164646985",predicate:"userStatusEmpty",params:[],type:"UserStatus"},{id:"-306628279",predicate:"userStatusOnline",params:[{name:"expires",type:"int"}],type:"UserStatus"},{id:"9203775",predicate:"userStatusOffline",params:[{name:"was_online",type:"int"}],type:"UserStatus"},{id:"-1683826688",predicate:"chatEmpty",params:[{name:"id",type:"int"}],type:"Chat"},{id:"1855757255",predicate:"chat",params:[{name:"id",type:"int"},{name:"title",type:"string"},{name:"photo",type:"ChatPhoto"},{name:"participants_count",type:"int"},{name:"date",type:"int"},{name:"left",type:"Bool"},{name:"version",type:"int"}],type:"Chat"},{id:"-83047359",predicate:"chatForbidden",params:[{name:"id",type:"int"},{name:"title",type:"string"},{name:"date",type:"int"}],type:"Chat"},{id:"1661886910",predicate:"chatFull",params:[{name:"id",type:"int"},{name:"participants",type:"ChatParticipants"},{name:"chat_photo",type:"Photo"},{name:"notify_settings",type:"PeerNotifySettings"}],type:"ChatFull"},{id:"-925415106",predicate:"chatParticipant",params:[{name:"user_id",type:"int"},{name:"inviter_id",type:"int"},{name:"date",type:"int"}],type:"ChatParticipant"},{id:"265468810",predicate:"chatParticipantsForbidden",params:[{name:"chat_id",type:"int"}],type:"ChatParticipants"},{id:"2017571861",predicate:"chatParticipants",params:[{name:"chat_id",type:"int"},{name:"admin_id",type:"int"},{name:"participants",type:"Vector<ChatParticipant>"},{name:"version",type:"int"}],type:"ChatParticipants"},{id:"935395612",predicate:"chatPhotoEmpty",params:[],type:"ChatPhoto"},{id:"1632839530",predicate:"chatPhoto",params:[{name:"photo_small",type:"FileLocation"},{name:"photo_big",type:"FileLocation"}],type:"ChatPhoto"},{id:"-2082087340",predicate:"messageEmpty",params:[{name:"id",type:"int"}],type:"Message"},{id:"585853626",predicate:"message",params:[{name:"id",type:"int"},{name:"from_id",type:"int"},{name:"to_id",type:"Peer"},{name:"out",type:"Bool"},{name:"unread",type:"Bool"},{name:"date",type:"int"},{name:"message",type:"string"},{name:"media",type:"MessageMedia"}],type:"Message"},{id:"99903492",predicate:"messageForwarded",params:[{name:"id",type:"int"},{name:"fwd_from_id",type:"int"},{name:"fwd_date",type:"int"},{name:"from_id",type:"int"},{name:"to_id",type:"Peer"},{name:"out",type:"Bool"},{name:"unread",type:"Bool"},{name:"date",type:"int"},{name:"message",type:"string"},{name:"media",type:"MessageMedia"}],type:"Message"},{id:"-1618124613",predicate:"messageService",params:[{name:"id",type:"int"},{name:"from_id",type:"int"},{name:"to_id",type:"Peer"},{name:"out",type:"Bool"},{name:"unread",type:"Bool"},{name:"date",type:"int"},{name:"action",type:"MessageAction"}],type:"Message"},{id:"1038967584",predicate:"messageMediaEmpty",params:[],type:"MessageMedia"},{id:"-926655958",predicate:"messageMediaPhoto",params:[{name:"photo",type:"Photo"}],type:"MessageMedia"},{id:"-1563278704",predicate:"messageMediaVideo",params:[{name:"video",type:"Video"}],type:"MessageMedia"},{id:"1457575028",predicate:"messageMediaGeo",params:[{name:"geo",type:"GeoPoint"}],type:"MessageMedia"},{id:"1585262393",predicate:"messageMediaContact",params:[{name:"phone_number",type:"string"},{name:"first_name",type:"string"},{name:"last_name",type:"string"},{name:"user_id",type:"int"}],type:"MessageMedia"},{id:"694364726",predicate:"messageMediaUnsupported",params:[{name:"bytes",type:"bytes"}],type:"MessageMedia"},{id:"-1230047312",predicate:"messageActionEmpty",params:[],type:"MessageAction"},{id:"-1503425638",predicate:"messageActionChatCreate",params:[{name:"title",type:"string"},{name:"users",type:"Vector<int>"}],type:"MessageAction"},{id:"-1247687078",predicate:"messageActionChatEditTitle",params:[{name:"title",type:"string"}],type:"MessageAction"},{id:"2144015272",predicate:"messageActionChatEditPhoto",params:[{name:"photo",type:"Photo"}],type:"MessageAction"},{id:"-1780220945",predicate:"messageActionChatDeletePhoto",params:[],type:"MessageAction"},{id:"1581055051",predicate:"messageActionChatAddUser",params:[{name:"user_id",type:"int"}],type:"MessageAction"},{id:"-1297179892",predicate:"messageActionChatDeleteUser",params:[{name:"user_id",type:"int"}],type:"MessageAction"},{id:"-1422222932",predicate:"dialog",params:[{name:"peer",type:"Peer"},{name:"top_message",type:"int"},{name:"unread_count",type:"int"},{name:"notify_settings",type:"PeerNotifySettings"}],type:"Dialog"},{id:"590459437",predicate:"photoEmpty",params:[{name:"id",type:"long"}],type:"Photo"},{id:"582313809",predicate:"photo",params:[{name:"id",type:"long"},{name:"access_hash",type:"long"},{name:"user_id",type:"int"},{name:"date",type:"int"},{name:"caption",type:"string"},{name:"geo",type:"GeoPoint"},{name:"sizes",type:"Vector<PhotoSize>"}],type:"Photo"},{id:"236446268",predicate:"photoSizeEmpty",params:[{name:"type",type:"string"}],type:"PhotoSize"},{id:"2009052699",predicate:"photoSize",params:[{name:"type",type:"string"},{name:"location",type:"FileLocation"},{name:"w",type:"int"},{name:"h",type:"int"},{name:"size",type:"int"}],type:"PhotoSize"},{id:"-374917894",predicate:"photoCachedSize",params:[{name:"type",type:"string"},{name:"location",type:"FileLocation"},{name:"w",type:"int"},{name:"h",type:"int"},{name:"bytes",type:"bytes"}],type:"PhotoSize"},{id:"-1056548696",predicate:"videoEmpty",params:[{name:"id",type:"long"}],type:"Video"},{id:"948937617",predicate:"video",params:[{name:"id",type:"long"},{name:"access_hash",type:"long"},{name:"user_id",type:"int"},{name:"date",type:"int"},{name:"caption",type:"string"},{name:"duration",type:"int"},{name:"mime_type",type:"string"},{name:"size",type:"int"},{name:"thumb",type:"PhotoSize"},{name:"dc_id",type:"int"},{name:"w",type:"int"},{name:"h",type:"int"}],type:"Video"},{id:"286776671",predicate:"geoPointEmpty",params:[],type:"GeoPoint"},{id:"541710092",predicate:"geoPoint",params:[{name:"long",type:"double"},{name:"lat",type:"double"}],type:"GeoPoint"},{id:"-486486981",predicate:"auth.checkedPhone",params:[{name:"phone_registered",type:"Bool"},{name:"phone_invited",type:"Bool"}],type:"auth.CheckedPhone"},{id:"-269659687",predicate:"auth.sentCode",params:[{name:"phone_registered",type:"Bool"},{name:"phone_code_hash",type:"string"},{name:"send_call_timeout",type:"int"},{name:"is_password",type:"Bool"}],type:"auth.SentCode"},{id:"-155815004",predicate:"auth.authorization",params:[{name:"expires",type:"int"},{name:"user",type:"User"}],type:"auth.Authorization"},{id:"-543777747",predicate:"auth.exportedAuthorization",params:[{name:"id",type:"int"},{name:"bytes",type:"bytes"}],type:"auth.ExportedAuthorization"},{id:"-1195615476",predicate:"inputNotifyPeer",params:[{name:"peer",type:"InputPeer"}],type:"InputNotifyPeer"},{id:"423314455",predicate:"inputNotifyUsers",params:[],type:"InputNotifyPeer"},{id:"1251338318",predicate:"inputNotifyChats",params:[],type:"InputNotifyPeer"},{id:"-1540769658",predicate:"inputNotifyAll",params:[],type:"InputNotifyPeer"},{id:"-265263912",predicate:"inputPeerNotifyEventsEmpty",params:[],type:"InputPeerNotifyEvents"},{id:"-395694988",predicate:"inputPeerNotifyEventsAll",params:[],type:"InputPeerNotifyEvents"},{id:"1185074840",predicate:"inputPeerNotifySettings",params:[{name:"mute_until",type:"int"},{name:"sound",type:"string"},{name:"show_previews",type:"Bool"},{name:"events_mask",type:"int"}],type:"InputPeerNotifySettings"},{id:"-1378534221",predicate:"peerNotifyEventsEmpty",params:[],type:"PeerNotifyEvents"},{id:"1830677896",predicate:"peerNotifyEventsAll",params:[],type:"PeerNotifyEvents"},{id:"1889961234",predicate:"peerNotifySettingsEmpty",params:[],type:"PeerNotifySettings"},{id:"-1923214866",predicate:"peerNotifySettings",params:[{name:"mute_until",type:"int"},{name:"sound",type:"string"},{name:"show_previews",type:"Bool"},{name:"events_mask",type:"int"}],type:"PeerNotifySettings"},{id:"-860866985",predicate:"wallPaper",params:[{name:"id",type:"int"},{name:"title",type:"string"},{name:"sizes",type:"Vector<PhotoSize>"},{name:"color",type:"int"}],type:"WallPaper"},{id:"1997575642",predicate:"userFull",params:[{name:"user",type:"User"},{name:"link",type:"contacts.Link"},{name:"profile_photo",type:"Photo"},{name:"notify_settings",type:"PeerNotifySettings"},{name:"blocked",type:"Bool"},{name:"real_first_name",type:"string"},{name:"real_last_name",type:"string"}],type:"UserFull"},{id:"-116274796",predicate:"contact",params:[{name:"user_id",type:"int"},{name:"mutual",type:"Bool"}],type:"Contact"},{id:"-805141448",predicate:"importedContact",params:[{name:"user_id",type:"int"},{name:"client_id",type:"long"}],type:"ImportedContact"},{id:"1444661369",predicate:"contactBlocked",params:[{name:"user_id",type:"int"},{name:"date",type:"int"}],type:"ContactBlocked"},{id:"-360210539",predicate:"contactFound",params:[{name:"user_id",type:"int"}],type:"ContactFound"},{id:"1038193057",predicate:"contactSuggested",params:[{name:"user_id",type:"int"},{name:"mutual_contacts",type:"int"}],type:"ContactSuggested"},{id:"-1434994573",predicate:"contactStatus",params:[{name:"user_id",type:"int"},{name:"expires",type:"int"}],type:"ContactStatus"},{id:"909233996",predicate:"chatLocated",params:[{name:"chat_id",type:"int"},{name:"distance",type:"int"}],type:"ChatLocated"},{id:"322183672",predicate:"contacts.foreignLinkUnknown",params:[],type:"contacts.ForeignLink"},{id:"-1484775609",predicate:"contacts.foreignLinkRequested",params:[{name:"has_phone",type:"Bool"}],type:"contacts.ForeignLink"},{id:"468356321",predicate:"contacts.foreignLinkMutual",params:[],type:"contacts.ForeignLink"},{id:"-768992160",predicate:"contacts.myLinkEmpty",params:[],type:"contacts.MyLink"},{id:"1818882030",predicate:"contacts.myLinkRequested",params:[{name:"contact",type:"Bool"}],type:"contacts.MyLink"},{id:"-1035932711",predicate:"contacts.myLinkContact",params:[],type:"contacts.MyLink"},{id:"-322001931",predicate:"contacts.link",params:[{name:"my_link",type:"contacts.MyLink"},{name:"foreign_link",type:"contacts.ForeignLink"},{name:"user",type:"User"}],type:"contacts.Link"},{id:"1871416498",predicate:"contacts.contacts",params:[{name:"contacts",type:"Vector<Contact>"},{name:"users",type:"Vector<User>"}],type:"contacts.Contacts"},{id:"-1219778094",predicate:"contacts.contactsNotModified",params:[],type:"contacts.Contacts"},{id:"-1387117803",predicate:"contacts.importedContacts",params:[{name:"imported",type:"Vector<ImportedContact>"},{name:"retry_contacts",type:"Vector<long>"},{name:"users",type:"Vector<User>"}],type:"contacts.ImportedContacts"},{id:"471043349",predicate:"contacts.blocked",params:[{name:"blocked",type:"Vector<ContactBlocked>"},{name:"users",type:"Vector<User>"}],type:"contacts.Blocked"},{id:"-1878523231",predicate:"contacts.blockedSlice",params:[{name:"count",type:"int"},{name:"blocked",type:"Vector<ContactBlocked>"},{name:"users",type:"Vector<User>"}],type:"contacts.Blocked"},{id:"90570766",predicate:"contacts.found",params:[{name:"results",type:"Vector<ContactFound>"},{name:"users",type:"Vector<User>"}],type:"contacts.Found"},{id:"1447681221",predicate:"contacts.suggested",params:[{name:"results",type:"Vector<ContactSuggested>"},{name:"users",type:"Vector<User>"}],type:"contacts.Suggested"},{id:"364538944",predicate:"messages.dialogs",params:[{name:"dialogs",type:"Vector<Dialog>"},{name:"messages",type:"Vector<Message>"},{name:"chats",type:"Vector<Chat>"},{name:"users",type:"Vector<User>"}],type:"messages.Dialogs"},{id:"1910543603",predicate:"messages.dialogsSlice",params:[{name:"count",type:"int"},{name:"dialogs",type:"Vector<Dialog>"},{name:"messages",type:"Vector<Message>"},{name:"chats",type:"Vector<Chat>"},{name:"users",type:"Vector<User>"}],type:"messages.Dialogs"},{id:"-1938715001",predicate:"messages.messages",params:[{name:"messages",type:"Vector<Message>"},{name:"chats",type:"Vector<Chat>"},{name:"users",type:"Vector<User>"}],type:"messages.Messages"},{id:"189033187",predicate:"messages.messagesSlice",params:[{name:"count",type:"int"},{name:"messages",type:"Vector<Message>"},{name:"chats",type:"Vector<Chat>"},{name:"users",type:"Vector<User>"}],type:"messages.Messages"},{id:"1062078024",predicate:"messages.messageEmpty",params:[],type:"messages.Message"},{id:"-7289833",predicate:"messages.message",params:[{name:"message",type:"Message"},{name:"chats",type:"Vector<Chat>"},{name:"users",type:"Vector<User>"}],type:"messages.Message"},{id:"-1768654661",predicate:"messages.statedMessages",params:[{name:"messages",type:"Vector<Message>"},{name:"chats",type:"Vector<Chat>"},{name:"users",type:"Vector<User>"},{name:"pts",type:"int"},{name:"seq",type:"int"}],type:"messages.StatedMessages"},{id:"-797251802",predicate:"messages.statedMessage",params:[{name:"message",type:"Message"},{name:"chats",type:"Vector<Chat>"},{name:"users",type:"Vector<User>"},{name:"pts",type:"int"},{name:"seq",type:"int"}],type:"messages.StatedMessage"},{id:"-772484260",predicate:"messages.sentMessage",params:[{name:"id",type:"int"},{name:"date",type:"int"},{name:"pts",type:"int"},{name:"seq",type:"int"}],type:"messages.SentMessage"},{id:"1089011754",predicate:"messages.chat",params:[{name:"chat",type:"Chat"},{name:"users",type:"Vector<User>"}],type:"messages.Chat"},{id:"-2125411368",predicate:"messages.chats",params:[{name:"chats",type:"Vector<Chat>"},{name:"users",type:"Vector<User>"}],type:"messages.Chats"},{id:"-438840932",predicate:"messages.chatFull",params:[{name:"full_chat",type:"ChatFull"},{name:"chats",type:"Vector<Chat>"},{name:"users",type:"Vector<User>"}],type:"messages.ChatFull"},{id:"-1210173710",predicate:"messages.affectedHistory",params:[{name:"pts",type:"int"},{name:"seq",type:"int"},{name:"offset",type:"int"}],type:"messages.AffectedHistory"},{id:"1474492012",predicate:"inputMessagesFilterEmpty",params:[],type:"MessagesFilter"},{id:"-1777752804",predicate:"inputMessagesFilterPhotos",params:[],type:"MessagesFilter"},{id:"-1614803355",predicate:"inputMessagesFilterVideo",params:[],type:"MessagesFilter"},{id:"1458172132",predicate:"inputMessagesFilterPhotoVideo",params:[],type:"MessagesFilter"},{id:"-1629621880",predicate:"inputMessagesFilterDocument",params:[],type:"MessagesFilter"},{id:"-808946398",predicate:"inputMessagesFilterAudio",params:[],type:"MessagesFilter"},{id:"20626867",predicate:"updateNewMessage",params:[{name:"message",type:"Message"},{name:"pts",type:"int"}],type:"Update"},{id:"1318109142",predicate:"updateMessageID",params:[{name:"id",type:"int"},{name:"random_id",type:"long"}],type:"Update"},{id:"-966484431",predicate:"updateReadMessages",params:[{name:"messages",type:"Vector<int>"},{name:"pts",type:"int"}],type:"Update"},{id:"-1456734682",predicate:"updateDeleteMessages",params:[{name:"messages",type:"Vector<int>"},{name:"pts",type:"int"}],type:"Update"},{id:"-782376883",predicate:"updateRestoreMessages",params:[{name:"messages",type:"Vector<int>"},{name:"pts",type:"int"}],type:"Update"},{id:"1806337288",predicate:"updateUserTyping",params:[{name:"user_id",type:"int"}],type:"Update"},{id:"1011273702",predicate:"updateChatUserTyping",params:[{name:"chat_id",type:"int"},{name:"user_id",type:"int"}],type:"Update"},{id:"125178264",predicate:"updateChatParticipants",params:[{name:"participants",type:"ChatParticipants"}],type:"Update"},{id:"469489699",predicate:"updateUserStatus",params:[{name:"user_id",type:"int"},{name:"status",type:"UserStatus"}],type:"Update"},{id:"-635250259",predicate:"updateUserName",params:[{name:"user_id",type:"int"},{name:"first_name",type:"string"},{name:"last_name",type:"string"}],type:"Update"},{id:"-1791935732",predicate:"updateUserPhoto",params:[{name:"user_id",type:"int"},{name:"date",type:"int"},{name:"photo",type:"UserProfilePhoto"},{name:"previous",type:"Bool"}],type:"Update"},{id:"628472761",predicate:"updateContactRegistered",params:[{name:"user_id",type:"int"},{name:"date",type:"int"}],type:"Update"},{id:"1369737882",predicate:"updateContactLink",params:[{name:"user_id",type:"int"},{name:"my_link",type:"contacts.MyLink"},{name:"foreign_link",type:"contacts.ForeignLink"}],type:"Update"},{id:"1869154659",predicate:"updateActivation",params:[{name:"user_id",type:"int"}],type:"Update"},{id:"-1895411046",predicate:"updateNewAuthorization",params:[{name:"auth_key_id",type:"long"},{name:"date",type:"int"},{name:"device",type:"string"},{name:"location",type:"string"}],type:"Update"},{id:"-1519637954",predicate:"updates.state",params:[{name:"pts",type:"int"},{name:"qts",type:"int"},{name:"date",type:"int"},{name:"seq",type:"int"},{name:"unread_count",type:"int"}],type:"updates.State"},{id:"1567990072",predicate:"updates.differenceEmpty",params:[{name:"date",type:"int"},{name:"seq",type:"int"}],type:"updates.Difference"},{id:"16030880",predicate:"updates.difference",params:[{name:"new_messages",type:"Vector<Message>"},{name:"new_encrypted_messages",type:"Vector<EncryptedMessage>"},{name:"other_updates",type:"Vector<Update>"},{name:"chats",type:"Vector<Chat>"},{name:"users",type:"Vector<User>"},{name:"state",type:"updates.State"}],type:"updates.Difference"},{id:"-1459938943",predicate:"updates.differenceSlice",params:[{name:"new_messages",type:"Vector<Message>"},{name:"new_encrypted_messages",type:"Vector<EncryptedMessage>"},{name:"other_updates",type:"Vector<Update>"},{name:"chats",type:"Vector<Chat>"},{name:"users",type:"Vector<User>"},{name:"intermediate_state",type:"updates.State"}],type:"updates.Difference"},{id:"-484987010",predicate:"updatesTooLong",params:[],type:"Updates"},{id:"-738961532",predicate:"updateShortMessage",params:[{name:"id",type:"int"},{name:"from_id",type:"int"},{name:"message",type:"string"},{name:"pts",type:"int"},{name:"date",type:"int"},{name:"seq",type:"int"}],type:"Updates"},{id:"724548942",predicate:"updateShortChatMessage",params:[{name:"id",type:"int"},{name:"from_id",type:"int"},{name:"chat_id",type:"int"},{name:"message",type:"string"},{name:"pts",type:"int"},{name:"date",type:"int"},{name:"seq",type:"int"}],type:"Updates"},{id:"2027216577",predicate:"updateShort",params:[{name:"update",type:"Update"},{name:"date",type:"int"}],type:"Updates"},{id:"1918567619",predicate:"updatesCombined",params:[{name:"updates",type:"Vector<Update>"},{name:"users",type:"Vector<User>"},{name:"chats",type:"Vector<Chat>"},{name:"date",type:"int"},{name:"seq_start",type:"int"},{name:"seq",type:"int"}],type:"Updates"},{id:"1957577280",predicate:"updates",params:[{name:"updates",type:"Vector<Update>"},{name:"users",type:"Vector<User>"},{name:"chats",type:"Vector<Chat>"},{name:"date",type:"int"},{name:"seq",type:"int"}],type:"Updates"},{id:"-1916114267",predicate:"photos.photos",params:[{name:"photos",type:"Vector<Photo>"},{name:"users",type:"Vector<User>"}],type:"photos.Photos"},{id:"352657236",predicate:"photos.photosSlice",params:[{name:"count",type:"int"},{name:"photos",type:"Vector<Photo>"},{name:"users",type:"Vector<User>"}],type:"photos.Photos"},{id:"539045032",predicate:"photos.photo",params:[{name:"photo",type:"Photo"},{name:"users",type:"Vector<User>"}],type:"photos.Photo"},{id:"157948117",predicate:"upload.file",params:[{name:"type",type:"storage.FileType"},{name:"mtime",type:"int"},{name:"bytes",type:"bytes"}],type:"upload.File"},{id:"784507964",predicate:"dcOption",params:[{name:"id",type:"int"},{name:"hostname",type:"string"},{name:"ip_address",type:"string"},{name:"port",type:"int"}],type:"DcOption"},{id:"777313652",predicate:"config",params:[{name:"date",type:"int"},{name:"test_mode",type:"Bool"},{name:"this_dc",type:"int"},{name:"dc_options",type:"Vector<DcOption>"},{name:"chat_size_max",type:"int"},{name:"broadcast_size_max",type:"int"}],type:"Config"},{id:"-1910892683",predicate:"nearestDc",params:[{name:"country",type:"string"},{name:"this_dc",type:"int"},{name:"nearest_dc",type:"int"}],type:"NearestDc"},{id:"-1987579119",predicate:"help.appUpdate",params:[{name:"id",type:"int"},{name:"critical",type:"Bool"},{name:"url",type:"string"},{name:"text",type:"string"}],type:"help.AppUpdate"},{id:"-1000708810",predicate:"help.noAppUpdate",params:[],type:"help.AppUpdate"},{id:"415997816",predicate:"help.inviteText",params:[{name:"message",type:"string"}],type:"help.InviteText"},{id:"1047852486",predicate:"messages.statedMessagesLinks",params:[{name:"messages",type:"Vector<Message>"},{name:"chats",type:"Vector<Chat>"},{name:"users",type:"Vector<User>"},{name:"links",type:"Vector<contacts.Link>"},{name:"pts",type:"int"},{name:"seq",type:"int"}],type:"messages.StatedMessages"},{id:"-1448138623",predicate:"messages.statedMessageLink",params:[{name:"message",type:"Message"},{name:"chats",type:"Vector<Chat>"},{name:"users",type:"Vector<User>"},{name:"links",type:"Vector<contacts.Link>"},{name:"pts",type:"int"},{name:"seq",type:"int"}],type:"messages.StatedMessage"},{id:"-371504577",predicate:"messages.sentMessageLink",params:[{name:"id",type:"int"},{name:"date",type:"int"},{name:"pts",type:"int"},{name:"seq",type:"int"},{name:"links",type:"Vector<contacts.Link>"}],type:"messages.SentMessage"},{id:"1960072954",predicate:"inputGeoChat",params:[{name:"chat_id",type:"int"},{name:"access_hash",type:"long"}],type:"InputGeoChat"},{id:"1301143240",predicate:"inputNotifyGeoChatPeer",params:[{name:"peer",type:"InputGeoChat"}],type:"InputNotifyPeer"},{id:"1978329690",predicate:"geoChat",params:[{name:"id",type:"int"},{name:"access_hash",type:"long"},{name:"title",type:"string"},{name:"address",type:"string"},{name:"venue",type:"string"},{name:"geo",type:"GeoPoint"},{name:"photo",type:"ChatPhoto"},{name:"participants_count",type:"int"},{name:"date",type:"int"},{name:"checked_in",type:"Bool"},{name:"version",type:"int"}],type:"Chat"},{id:"1613830811",predicate:"geoChatMessageEmpty",params:[{name:"chat_id",type:"int"},{name:"id",type:"int"}],type:"GeoChatMessage"},{id:"1158019297",predicate:"geoChatMessage",params:[{name:"chat_id",type:"int"},{name:"id",type:"int"},{name:"from_id",type:"int"},{name:"date",type:"int"},{name:"message",type:"string"},{name:"media",type:"MessageMedia"}],type:"GeoChatMessage"},{id:"-749755826",predicate:"geoChatMessageService",params:[{name:"chat_id",type:"int"},{name:"id",type:"int"},{name:"from_id",type:"int"},{name:"date",type:"int"},{name:"action",type:"MessageAction"}],type:"GeoChatMessage"},{id:"397498251",predicate:"geochats.statedMessage",params:[{name:"message",type:"GeoChatMessage"},{name:"chats",type:"Vector<Chat>"},{name:"users",type:"Vector<User>"},{name:"seq",type:"int"}],type:"geochats.StatedMessage"},{id:"1224651367",predicate:"geochats.located",params:[{name:"results",type:"Vector<ChatLocated>"},{name:"messages",type:"Vector<GeoChatMessage>"},{name:"chats",type:"Vector<Chat>"},{name:"users",type:"Vector<User>"}],type:"geochats.Located"},{id:"-783127119",predicate:"geochats.messages",params:[{name:"messages",type:"Vector<GeoChatMessage>"},{name:"chats",type:"Vector<Chat>"},{name:"users",type:"Vector<User>"}],type:"geochats.Messages"},{id:"-1135057944",predicate:"geochats.messagesSlice",params:[{name:"count",type:"int"},{name:"messages",type:"Vector<GeoChatMessage>"},{name:"chats",type:"Vector<Chat>"},{name:"users",type:"Vector<User>"}],type:"geochats.Messages"},{id:"1862504124",predicate:"messageActionGeoChatCreate",params:[{name:"title",type:"string"},{name:"address",type:"string"}],type:"MessageAction"},{id:"209540062",predicate:"messageActionGeoChatCheckin",params:[],type:"MessageAction"},{id:"1516823543",predicate:"updateNewGeoChatMessage",params:[{name:"message",type:"GeoChatMessage"}],type:"Update"},{id:"1662091044",predicate:"wallPaperSolid",params:[{name:"id",type:"int"},{name:"title",type:"string"},{name:"bg_color",type:"int"},{name:"color",type:"int"}],type:"WallPaper"},{id:"314359194",predicate:"updateNewEncryptedMessage",params:[{name:"message",type:"EncryptedMessage"},{name:"qts",type:"int"}],type:"Update"},{id:"386986326",predicate:"updateEncryptedChatTyping",params:[{name:"chat_id",type:"int"}],type:"Update"},{id:"-1264392051",predicate:"updateEncryption",params:[{name:"chat",type:"EncryptedChat"},{name:"date",type:"int"}],type:"Update"},{id:"956179895",predicate:"updateEncryptedMessagesRead",params:[{name:"chat_id",type:"int"},{name:"max_date",type:"int"},{name:"date",type:"int"}],type:"Update"},{id:"-1417756512",predicate:"encryptedChatEmpty",params:[{name:"id",type:"int"}],type:"EncryptedChat"},{id:"1006044124",predicate:"encryptedChatWaiting",params:[{name:"id",type:"int"},{name:"access_hash",type:"long"},{name:"date",type:"int"},{name:"admin_id",type:"int"},{name:"participant_id",type:"int"}],type:"EncryptedChat"},{id:"-931638658",predicate:"encryptedChatRequested",params:[{name:"id",type:"int"},{name:"access_hash",type:"long"},{name:"date",type:"int"},{name:"admin_id",type:"int"},{name:"participant_id",type:"int"},{name:"g_a",type:"bytes"}],type:"EncryptedChat"},{id:"-94974410",predicate:"encryptedChat",params:[{name:"id",type:"int"},{name:"access_hash",type:"long"},{name:"date",type:"int"},{name:"admin_id",type:"int"},{name:"participant_id",type:"int"},{name:"g_a_or_b",type:"bytes"},{name:"key_fingerprint",type:"long"}],type:"EncryptedChat"},{id:"332848423",predicate:"encryptedChatDiscarded",params:[{name:"id",type:"int"}],type:"EncryptedChat"},{id:"-247351839",predicate:"inputEncryptedChat",params:[{name:"chat_id",type:"int"},{name:"access_hash",type:"long"}],type:"InputEncryptedChat"},{id:"-1038136962",predicate:"encryptedFileEmpty",params:[],type:"EncryptedFile"},{id:"1248893260",predicate:"encryptedFile",params:[{name:"id",type:"long"},{name:"access_hash",type:"long"},{name:"size",type:"int"},{name:"dc_id",type:"int"},{name:"key_fingerprint",type:"int"}],type:"EncryptedFile"},{id:"406307684",predicate:"inputEncryptedFileEmpty",params:[],type:"InputEncryptedFile"},{id:"1690108678",predicate:"inputEncryptedFileUploaded",params:[{name:"id",type:"long"},{name:"parts",type:"int"},{name:"md5_checksum",type:"string"},{name:"key_fingerprint",type:"int"}],type:"InputEncryptedFile"},{id:"1511503333",predicate:"inputEncryptedFile",params:[{name:"id",type:"long"},{name:"access_hash",type:"long"}],type:"InputEncryptedFile"},{id:"-182231723",predicate:"inputEncryptedFileLocation",params:[{name:"id",type:"long"},{name:"access_hash",type:"long"}],type:"InputFileLocation"},{id:"-317144808",predicate:"encryptedMessage",params:[{name:"random_id",type:"long"},{name:"chat_id",type:"int"},{name:"date",type:"int"},{name:"bytes",type:"bytes"},{name:"file",type:"EncryptedFile"}],type:"EncryptedMessage"},{id:"594758406",predicate:"encryptedMessageService",params:[{name:"random_id",type:"long"},{name:"chat_id",type:"int"},{name:"date",type:"int"},{name:"bytes",type:"bytes"}],type:"EncryptedMessage"},{id:"-1717290801",predicate:"decryptedMessageLayer",params:[{name:"layer",type:"int"},{name:"message",type:"DecryptedMessage"}],type:"DecryptedMessageLayer"},{id:"528568095",predicate:"decryptedMessage",params:[{name:"random_id",type:"long"},{name:"random_bytes",type:"bytes"},{name:"message",type:"string"},{name:"media",type:"DecryptedMessageMedia"}],type:"DecryptedMessage"},{id:"-1438109059",predicate:"decryptedMessageService",params:[{name:"random_id",type:"long"},{name:"random_bytes",type:"bytes"},{name:"action",type:"DecryptedMessageAction"}],type:"DecryptedMessage"},{id:"144661578",predicate:"decryptedMessageMediaEmpty",params:[],type:"DecryptedMessageMedia"},{id:"846826124",predicate:"decryptedMessageMediaPhoto",params:[{name:"thumb",type:"bytes"},{name:"thumb_w",type:"int"},{name:"thumb_h",type:"int"},{name:"w",type:"int"},{name:"h",type:"int"},{name:"size",type:"int"},{name:"key",type:"bytes"},{name:"iv",type:"bytes"}],type:"DecryptedMessageMedia"},{id:"1380598109",predicate:"decryptedMessageMediaVideo",params:[{name:"thumb",type:"bytes"},{name:"thumb_w",type:"int"},{name:"thumb_h",type:"int"},{name:"duration",type:"int"},{name:"mime_type",type:"string"},{name:"w",type:"int"},{name:"h",type:"int"},{name:"size",type:"int"},{name:"key",type:"bytes"},{name:"iv",type:"bytes"}],type:"DecryptedMessageMedia"},{id:"893913689",predicate:"decryptedMessageMediaGeoPoint",params:[{name:"lat",type:"double"},{name:"long",type:"double"}],type:"DecryptedMessageMedia"},{id:"1485441687",predicate:"decryptedMessageMediaContact",params:[{name:"phone_number",type:"string"},{name:"first_name",type:"string"},{name:"last_name",type:"string"},{name:"user_id",type:"int"}],type:"DecryptedMessageMedia"},{id:"-1586283796",predicate:"decryptedMessageActionSetMessageTTL",params:[{name:"ttl_seconds",type:"int"}],type:"DecryptedMessageAction"},{id:"-1058912715",predicate:"messages.dhConfigNotModified",params:[{name:"random",type:"bytes"}],type:"messages.DhConfig"},{id:"740433629",predicate:"messages.dhConfig",params:[{name:"g",type:"int"},{name:"p",type:"bytes"},{name:"version",type:"int"},{name:"random",type:"bytes"}],type:"messages.DhConfig"},{id:"1443858741",predicate:"messages.sentEncryptedMessage",params:[{name:"date",type:"int"}],type:"messages.SentEncryptedMessage"},{id:"-1802240206",predicate:"messages.sentEncryptedFile",params:[{name:"date",type:"int"},{name:"file",type:"EncryptedFile"}],type:"messages.SentEncryptedMessage"},{id:"-95482955",predicate:"inputFileBig",params:[{name:"id",type:"long"},{name:"parts",type:"int"},{name:"name",type:"string"}],type:"InputFile"},{id:"767652808",predicate:"inputEncryptedFileBigUploaded",params:[{name:"id",type:"long"},{name:"parts",type:"int"},{name:"key_fingerprint",type:"int"}],type:"InputEncryptedFile"},{id:"974056226",predicate:"updateChatParticipantAdd",params:[{name:"chat_id",type:"int"},{name:"user_id",type:"int"},{name:"inviter_id",type:"int"},{name:"version",type:"int"}],type:"Update"},{id:"1851755554",predicate:"updateChatParticipantDelete",params:[{name:"chat_id",type:"int"},{name:"user_id",type:"int"},{name:"version",type:"int"}],type:"Update"},{id:"-1906403213",predicate:"updateDcOptions",params:[{name:"dc_options",type:"Vector<DcOption>"}],type:"Update"},{id:"1313442987",predicate:"inputMediaUploadedAudio",params:[{name:"file",type:"InputFile"},{name:"duration",type:"int"},{name:"mime_type",type:"string"}],type:"InputMedia"},{id:"-1986820223",predicate:"inputMediaAudio",params:[{name:"id",type:"InputAudio"}],type:"InputMedia"},{id:"887592125",predicate:"inputMediaUploadedDocument",params:[{name:"file",type:"InputFile"},{name:"file_name",type:"string"},{name:"mime_type",type:"string"}],type:"InputMedia"},{id:"1044831837",predicate:"inputMediaUploadedThumbDocument",params:[{name:"file",type:"InputFile"},{name:"thumb",type:"InputFile"},{name:"file_name",type:"string"},{name:"mime_type",type:"string"}],type:"InputMedia"},{id:"-779818943",predicate:"inputMediaDocument",params:[{name:"id",type:"InputDocument"}],type:"InputMedia"},{id:"802824708",predicate:"messageMediaDocument",params:[{name:"document",type:"Document"}],type:"MessageMedia"},{id:"-961117440",predicate:"messageMediaAudio",params:[{name:"audio",type:"Audio"}],type:"MessageMedia"},{id:"-648356732",predicate:"inputAudioEmpty",params:[],type:"InputAudio"},{id:"2010398975",predicate:"inputAudio",params:[{name:"id",type:"long"},{name:"access_hash",type:"long"}],type:"InputAudio"},{id:"1928391342",predicate:"inputDocumentEmpty",params:[],type:"InputDocument"},{id:"410618194",predicate:"inputDocument",params:[{name:"id",type:"long"},{name:"access_hash",type:"long"}],type:"InputDocument"},{id:"1960591437",predicate:"inputAudioFileLocation",params:[{name:"id",type:"long"},{name:"access_hash",type:"long"}],type:"InputFileLocation"},{id:"1313188841",predicate:"inputDocumentFileLocation",params:[{name:"id",type:"long"},{name:"access_hash",type:"long"}],type:"InputFileLocation"},{id:"-1332395189",predicate:"decryptedMessageMediaDocument",params:[{name:"thumb",type:"bytes"},{name:"thumb_w",type:"int"},{name:"thumb_h",type:"int"},{name:"file_name",type:"string"},{name:"mime_type",type:"string"},{name:"size",type:"int"},{name:"key",type:"bytes"},{name:"iv",type:"bytes"}],type:"DecryptedMessageMedia"},{id:"1474341323",predicate:"decryptedMessageMediaAudio",params:[{name:"duration",type:"int"},{name:"mime_type",type:"string"},{name:"size",type:"int"},{name:"key",type:"bytes"},{name:"iv",type:"bytes"}],type:"DecryptedMessageMedia"},{id:"1483311320",predicate:"audioEmpty",params:[{name:"id",type:"long"}],type:"Audio"},{id:"-945003370",predicate:"audio",params:[{name:"id",type:"long"},{name:"access_hash",type:"long"},{name:"user_id",type:"int"},{name:"date",type:"int"},{name:"duration",type:"int"},{name:"mime_type",type:"string"},{name:"size",type:"int"},{name:"dc_id",type:"int"}],type:"Audio"},{id:"922273905",predicate:"documentEmpty",params:[{name:"id",type:"long"}],type:"Document"},{id:"-1627626714",predicate:"document",params:[{name:"id",type:"long"},{name:"access_hash",type:"long"},{name:"user_id",type:"int"},{name:"date",type:"int"},{name:"file_name",type:"string"},{name:"mime_type",type:"string"},{name:"size",type:"int"},{name:"thumb",type:"PhotoSize"},{name:"dc_id",type:"int"}],type:"Document"},{id:"398898678",predicate:"help.support",params:[{name:"phone_number",type:"string"},{name:"user",type:"User"}],type:"help.Support"},{id:"206520510",predicate:"decryptedMessageActionReadMessages",params:[{name:"random_ids",type:"Vector<long>"}],type:"DecryptedMessageAction"},{id:"1700872964",predicate:"decryptedMessageActionDeleteMessages",params:[{name:"random_ids",type:"Vector<long>"}],type:"DecryptedMessageAction"},{id:"-1967000459",predicate:"decryptedMessageActionScreenshotMessages",params:[{name:"random_ids",type:"Vector<long>"}],type:"DecryptedMessageAction"},{id:"1729750108",predicate:"decryptedMessageActionFlushHistory",params:[],type:"DecryptedMessageAction"},{id:"-217806717",predicate:"decryptedMessageActionNotifyLayer",params:[{name:"layer",type:"int"}],type:"DecryptedMessageAction"},{id:"-1613493288",predicate:"notifyPeer",params:[{name:"peer",type:"Peer"}],type:"NotifyPeer"},{id:"-1261946036",predicate:"notifyUsers",params:[],type:"NotifyPeer"},{id:"-1073230141",predicate:"notifyChats",params:[],type:"NotifyPeer"},{id:"1959820384",predicate:"notifyAll",params:[],type:"NotifyPeer"},{id:"-2131957734",predicate:"updateUserBlocked",params:[{name:"user_id",type:"int"},{name:"blocked",type:"Bool"}],type:"Update"},{id:"-1094555409",predicate:"updateNotifySettings",params:[{name:"peer",type:"NotifyPeer"},{name:"notify_settings",type:"PeerNotifySettings"}],type:"Update"}],methods:[{id:"-878758099",method:"invokeAfterMsg",params:[{name:"msg_id",type:"long"},{name:"query",type:"!X"}],type:"X"},{id:"1036301552",method:"invokeAfterMsgs",params:[{name:"msg_ids",type:"Vector<long>"},{name:"query",type:"!X"}],type:"X"},{id:"1877286395",method:"auth.checkPhone",params:[{name:"phone_number",type:"string"}],type:"auth.CheckedPhone"},{id:"1988976461",method:"auth.sendCode",params:[{name:"phone_number",type:"string"},{name:"sms_type",type:"int"},{name:"api_id",type:"int"},{name:"api_hash",type:"string"},{name:"lang_code",type:"string"}],type:"auth.SentCode"},{id:"63247716",method:"auth.sendCall",params:[{name:"phone_number",type:"string"},{name:"phone_code_hash",type:"string"}],type:"Bool"},{id:"453408308",method:"auth.signUp",params:[{name:"phone_number",type:"string"},{name:"phone_code_hash",type:"string"},{name:"phone_code",type:"string"},{name:"first_name",type:"string"},{name:"last_name",type:"string"}],type:"auth.Authorization"},{id:"-1126886015",method:"auth.signIn",params:[{name:"phone_number",type:"string"},{name:"phone_code_hash",type:"string"},{name:"phone_code",type:"string"}],type:"auth.Authorization"},{id:"1461180992",method:"auth.logOut",params:[],type:"Bool"},{id:"-1616179942",method:"auth.resetAuthorizations",params:[],type:"Bool"},{id:"1998331287",method:"auth.sendInvites",params:[{name:"phone_numbers",type:"Vector<string>"},{name:"message",type:"string"}],type:"Bool"},{id:"-440401971",method:"auth.exportAuthorization",params:[{name:"dc_id",type:"int"}],type:"auth.ExportedAuthorization"},{id:"-470837741",method:"auth.importAuthorization",params:[{name:"id",type:"int"},{name:"bytes",type:"bytes"}],type:"auth.Authorization"},{id:"1147957548",method:"account.registerDevice",params:[{name:"token_type",type:"int"},{name:"token",type:"string"},{name:"device_model",type:"string"},{name:"system_version",type:"string"},{name:"app_version",type:"string"},{name:"app_sandbox",type:"Bool"},{name:"lang_code",type:"string"}],type:"Bool"},{id:"1707432768",method:"account.unregisterDevice",params:[{name:"token_type",type:"int"},{name:"token",type:"string"}],type:"Bool"},{id:"-2067899501",method:"account.updateNotifySettings",params:[{name:"peer",type:"InputNotifyPeer"},{name:"settings",type:"InputPeerNotifySettings"}],type:"Bool"},{id:"313765169",method:"account.getNotifySettings",params:[{name:"peer",type:"InputNotifyPeer"}],type:"PeerNotifySettings"},{id:"-612493497",method:"account.resetNotifySettings",params:[],type:"Bool"},{id:"-259486360",method:"account.updateProfile",params:[{name:"first_name",type:"string"},{name:"last_name",type:"string"}],type:"User"},{id:"1713919532",method:"account.updateStatus",params:[{name:"offline",type:"Bool"}],type:"Bool"},{id:"-1068696894",method:"account.getWallPapers",params:[],type:"Vector<WallPaper>"},{id:"227648840",method:"users.getUsers",params:[{name:"id",type:"Vector<InputUser>"}],type:"Vector<User>"},{id:"-902781519",method:"users.getFullUser",params:[{name:"id",type:"InputUser"}],type:"UserFull"},{id:"-995929106",method:"contacts.getStatuses",params:[],type:"Vector<ContactStatus>"},{id:"583445000",method:"contacts.getContacts",params:[{name:"hash",type:"string"}],type:"contacts.Contacts"},{id:"-634342611",method:"contacts.importContacts",params:[{name:"contacts",type:"Vector<InputContact>"},{name:"replace",type:"Bool"}],type:"contacts.ImportedContacts"},{id:"301470424",method:"contacts.search",params:[{name:"q",type:"string"},{name:"limit",type:"int"}],type:"contacts.Found"},{id:"-847825880",method:"contacts.getSuggested",params:[{name:"limit",type:"int"}],type:"contacts.Suggested"},{id:"-1902823612",method:"contacts.deleteContact",params:[{name:"id",type:"InputUser"}],type:"contacts.Link"},{id:"1504393374",method:"contacts.deleteContacts",params:[{name:"id",type:"Vector<InputUser>"}],type:"Bool"},{id:"858475004",method:"contacts.block",params:[{name:"id",type:"InputUser"}],type:"Bool"},{id:"-448724803",method:"contacts.unblock",params:[{name:"id",type:"InputUser"}],type:"Bool"},{id:"-176409329",method:"contacts.getBlocked",params:[{name:"offset",type:"int"},{name:"limit",type:"int"}],type:"contacts.Blocked"},{id:"1109588596",method:"messages.getMessages",params:[{name:"id",type:"Vector<int>"}],type:"messages.Messages"},{id:"-321970698",method:"messages.getDialogs",params:[{name:"offset",type:"int"},{name:"max_id",type:"int"},{name:"limit",type:"int"}],type:"messages.Dialogs"},{id:"-1834885329",method:"messages.getHistory",params:[{name:"peer",type:"InputPeer"},{name:"offset",type:"int"},{name:"max_id",type:"int"},{name:"limit",type:"int"}],type:"messages.Messages"},{id:"132772523",method:"messages.search",params:[{name:"peer",type:"InputPeer"},{name:"q",type:"string"},{name:"filter",type:"MessagesFilter"},{name:"min_date",type:"int"},{name:"max_date",type:"int"},{name:"offset",type:"int"},{name:"max_id",type:"int"},{name:"limit",type:"int"}],type:"messages.Messages"},{id:"-1336990448",method:"messages.readHistory",params:[{name:"peer",type:"InputPeer"},{name:"max_id",type:"int"},{name:"offset",type:"int"}],type:"messages.AffectedHistory"},{id:"-185009311",method:"messages.deleteHistory",params:[{name:"peer",type:"InputPeer"},{name:"offset",type:"int"}],type:"messages.AffectedHistory"},{id:"351460618",method:"messages.deleteMessages",params:[{name:"id",type:"Vector<int>"}],type:"Vector<int>"},{id:"962567550",method:"messages.restoreMessages",params:[{name:"id",type:"Vector<int>"}],type:"Vector<int>"},{id:"682347368",method:"messages.receivedMessages",params:[{name:"max_id",type:"int"}],type:"Vector<int>"},{id:"1905801705",method:"messages.setTyping",params:[{name:"peer",type:"InputPeer"},{name:"typing",type:"Bool"}],type:"Bool"},{id:"1289620139",method:"messages.sendMessage",params:[{name:"peer",type:"InputPeer"},{name:"message",type:"string"},{name:"random_id",type:"long"}],type:"messages.SentMessage"},{id:"-1547149962",method:"messages.sendMedia",params:[{name:"peer",type:"InputPeer"},{name:"media",type:"InputMedia"},{name:"random_id",type:"long"}],type:"messages.StatedMessage"},{id:"1363988751",method:"messages.forwardMessages",params:[{name:"peer",type:"InputPeer"},{name:"id",type:"Vector<int>"}],type:"messages.StatedMessages"},{id:"1013621127",method:"messages.getChats",params:[{name:"id",type:"Vector<int>"}],type:"messages.Chats"},{id:"998448230",method:"messages.getFullChat",params:[{name:"chat_id",type:"int"}],type:"messages.ChatFull"},{id:"-1262720843",method:"messages.editChatTitle",params:[{name:"chat_id",type:"int"},{name:"title",type:"string"}],type:"messages.StatedMessage"},{id:"-662601187",method:"messages.editChatPhoto",params:[{name:"chat_id",type:"int"},{name:"photo",type:"InputChatPhoto"}],type:"messages.StatedMessage"},{id:"787082910",method:"messages.addChatUser",params:[{name:"chat_id",type:"int"},{name:"user_id",type:"InputUser"},{name:"fwd_limit",type:"int"}],type:"messages.StatedMessage"},{id:"-1010447069",method:"messages.deleteChatUser",params:[{name:"chat_id",type:"int"},{name:"user_id",type:"InputUser"}],type:"messages.StatedMessage"},{id:"1100847854",method:"messages.createChat",params:[{name:"users",type:"Vector<InputUser>"},{name:"title",type:"string"}],type:"messages.StatedMessage"},{id:"-304838614",method:"updates.getState",params:[],type:"updates.State"},{id:"168039573",method:"updates.getDifference",params:[{name:"pts",type:"int"},{name:"date",type:"int"},{name:"qts",type:"int"}],type:"updates.Difference"},{id:"-285902432",method:"photos.updateProfilePhoto",params:[{name:"id",type:"InputPhoto"},{name:"crop",type:"InputPhotoCrop"}],type:"UserProfilePhoto"},{id:"-720397176",method:"photos.uploadProfilePhoto",params:[{name:"file",type:"InputFile"},{name:"caption",type:"string"},{name:"geo_point",type:"InputGeoPoint"},{name:"crop",type:"InputPhotoCrop"}],type:"photos.Photo"},{id:"-1291540959",method:"upload.saveFilePart",params:[{name:"file_id",type:"long"},{name:"file_part",type:"int"},{name:"bytes",type:"bytes"}],type:"Bool"},{id:"-475607115",method:"upload.getFile",params:[{name:"location",type:"InputFileLocation"},{name:"offset",type:"int"},{name:"limit",type:"int"}],type:"upload.File"},{id:"-990308245",method:"help.getConfig",params:[],type:"Config"},{id:"531836966",method:"help.getNearestDc",params:[],type:"NearestDc"},{id:"-938300290",method:"help.getAppUpdate",params:[{name:"device_model",type:"string"},{name:"system_version",type:"string"},{name:"app_version",type:"string"},{name:"lang_code",type:"string"}],type:"help.AppUpdate"},{id:"1862465352",method:"help.saveAppLog",params:[{name:"events",type:"Vector<InputAppEvent>"}],type:"Bool"},{id:"-1532407418",method:"help.getInviteText",params:[{name:"lang_code",type:"string"}],type:"help.InviteText"},{id:"-1209117380",method:"photos.getUserPhotos",params:[{name:"user_id",type:"InputUser"},{name:"offset",type:"int"},{name:"max_id",type:"int"},{name:"limit",type:"int"}],type:"photos.Photos"},{id:"66319602",method:"messages.forwardMessage",params:[{name:"peer",type:"InputPeer"},{name:"id",type:"int"},{name:"random_id",type:"long"}],type:"messages.StatedMessage"},{id:"1102776690",method:"messages.sendBroadcast",params:[{name:"contacts",type:"Vector<InputUser>"},{name:"message",type:"string"},{name:"media",type:"InputMedia"}],type:"messages.StatedMessages"},{id:"2132356495",method:"geochats.getLocated",params:[{name:"geo_point",type:"InputGeoPoint"},{name:"radius",type:"int"},{name:"limit",type:"int"}],type:"geochats.Located"},{id:"-515735953",method:"geochats.getRecents",params:[{name:"offset",type:"int"},{name:"limit",type:"int"}],type:"geochats.Messages"},{id:"1437853947",method:"geochats.checkin",params:[{name:"peer",type:"InputGeoChat"}],type:"geochats.StatedMessage"},{id:"1730338159",method:"geochats.getFullChat",params:[{name:"peer",type:"InputGeoChat"}],type:"messages.ChatFull"},{id:"1284383347",method:"geochats.editChatTitle",params:[{name:"peer",type:"InputGeoChat"},{name:"title",type:"string"},{name:"address",type:"string"}],type:"geochats.StatedMessage"},{id:"903355029",method:"geochats.editChatPhoto",params:[{name:"peer",type:"InputGeoChat"},{name:"photo",type:"InputChatPhoto"}],type:"geochats.StatedMessage"},{id:"-808598451",method:"geochats.search",params:[{name:"peer",type:"InputGeoChat"},{name:"q",type:"string"},{name:"filter",type:"MessagesFilter"},{name:"min_date",type:"int"},{name:"max_date",type:"int"},{name:"offset",type:"int"},{name:"max_id",type:"int"},{name:"limit",type:"int"}],type:"geochats.Messages"},{id:"-1254131096",method:"geochats.getHistory",params:[{name:"peer",type:"InputGeoChat"},{name:"offset",type:"int"},{name:"max_id",type:"int"},{name:"limit",type:"int"}],type:"geochats.Messages"},{id:"146319145",method:"geochats.setTyping",params:[{name:"peer",type:"InputGeoChat"},{name:"typing",type:"Bool"}],type:"Bool"},{id:"102432836",method:"geochats.sendMessage",params:[{name:"peer",type:"InputGeoChat"},{name:"message",type:"string"},{name:"random_id",type:"long"}],type:"geochats.StatedMessage"},{id:"-1192173825",method:"geochats.sendMedia",params:[{name:"peer",type:"InputGeoChat"},{name:"media",type:"InputMedia"},{name:"random_id",type:"long"}],type:"geochats.StatedMessage"},{id:"235482646",method:"geochats.createGeoChat",params:[{name:"title",type:"string"},{name:"geo_point",type:"InputGeoPoint"},{name:"address",type:"string"},{name:"venue",type:"string"}],type:"geochats.StatedMessage"},{id:"651135312",method:"messages.getDhConfig",params:[{name:"version",type:"int"},{name:"random_length",type:"int"}],type:"messages.DhConfig"},{id:"-162681021",method:"messages.requestEncryption",params:[{name:"user_id",type:"InputUser"},{name:"random_id",type:"int"},{name:"g_a",type:"bytes"}],type:"EncryptedChat"},{id:"1035731989",method:"messages.acceptEncryption",params:[{name:"peer",type:"InputEncryptedChat"},{name:"g_b",type:"bytes"},{name:"key_fingerprint",type:"long"}],type:"EncryptedChat"},{id:"-304536635",method:"messages.discardEncryption",params:[{name:"chat_id",type:"int"}],type:"Bool"},{id:"2031374829",method:"messages.setEncryptedTyping",params:[{name:"peer",type:"InputEncryptedChat"},{name:"typing",type:"Bool"}],type:"Bool"},{id:"2135648522",method:"messages.readEncryptedHistory",params:[{name:"peer",type:"InputEncryptedChat"},{name:"max_date",type:"int"}],type:"Bool"},{id:"-1451792525",method:"messages.sendEncrypted",params:[{name:"peer",type:"InputEncryptedChat"},{name:"random_id",type:"long"},{name:"data",type:"bytes"}],type:"messages.SentEncryptedMessage"},{id:"-1701831834",method:"messages.sendEncryptedFile",params:[{name:"peer",type:"InputEncryptedChat"},{name:"random_id",type:"long"},{name:"data",type:"bytes"},{name:"file",type:"InputEncryptedFile"}],type:"messages.SentEncryptedMessage"},{id:"852769188",method:"messages.sendEncryptedService",params:[{name:"peer",type:"InputEncryptedChat"},{name:"random_id",type:"long"},{name:"data",type:"bytes"}],type:"messages.SentEncryptedMessage"},{id:"1436924774",method:"messages.receivedQueue",params:[{name:"max_qts",type:"int"}],type:"Vector<long>"},{id:"-562337987",method:"upload.saveBigFilePart",params:[{name:"file_id",type:"long"},{name:"file_part",type:"int"},{name:"file_total_parts",type:"int"},{name:"bytes",type:"bytes"}],type:"Bool"},{id:"1769565673",method:"initConnection",params:[{name:"api_id",type:"int"},{name:"device_model",type:"string"},{name:"system_version",type:"string"},{name:"app_version",type:"string"},{name:"lang_code",type:"string"},{name:"query",type:"!X"}],type:"X"},{id:"-1663104819",method:"help.getSupport",params:[],type:"help.Support"},{id:"-1270772892",method:"invokeWithLayer15",params:[{name:"query",type:"!X"}],type:"X"}]},Config.Schema.API.layer=15,Config.Emoji={"00a9":["©",["copyright"]],"00ae":["®",["registered"]],"203c":["‼",["bangbang"]],2049:["⁉",["interrobang"]],2122:["™",["tm"]],2139:["ℹ",["information_source"]],2194:["↔",["left_right_arrow"]],2195:["↕",["arrow_up_down"]],2196:["↖",["arrow_upper_left"]],2197:["↗",["arrow_upper_right"]],2198:["↘",["arrow_lower_right"]],2199:["↙",["arrow_lower_left"]],"21a9":["↩",["leftwards_arrow_with_hook"]],"21aa":["↪",["arrow_right_hook"]],"231a":["⌚",["watch"]],"231b":["⌛",["hourglass"]],"23e9":["⏩",["fast_forward"]],"23ea":["⏪",["rewind"]],"23eb":["⏫",["arrow_double_up"]],"23ec":["⏬",["arrow_double_down"]],"23f0":["⏰",["alarm_clock"]],"23f3":["⏳",["hourglass_flowing_sand"]],"24c2":["Ⓜ",["m"]],"25aa":["▪",["black_small_square"]],"25ab":["▫",["white_small_square"]],"25b6":["▶",["arrow_forward"]],"25c0":["◀",["arrow_backward"]],"25fb":["◻",["white_medium_square"]],"25fc":["◼",["black_medium_square"]],"25fd":["◽",["white_medium_small_square"]],"25fe":["◾",["black_medium_small_square"]],2600:["☀",["sunny"]],2601:["☁",["cloud"]],"260e":["☎",["phone","telephone"]],2611:["☑",["ballot_box_with_check"]],2614:["☔",["umbrella"]],2615:["☕",["coffee"]],"261d":["☝",["point_up"]],"263a":["☺",["relaxed"]],2648:["♈",["aries"]],2649:["♉",["taurus"]],"264a":["♊",["gemini"]],"264b":["♋",["cancer"]],"264c":["♌",["leo"]],"264d":["♍",["virgo"]],"264e":["♎",["libra"]],"264f":["♏",["scorpius"]],2650:["♐",["sagittarius"]],2651:["♑",["capricorn"]],2652:["♒",["aquarius"]],2653:["♓",["pisces"]],2660:["♠",["spades"]],2663:["♣",["clubs"]],2665:["♥",["hearts"]],2666:["♦",["diamonds"]],2668:["♨",["hotsprings"]],"267b":["♻",["recycle"]],"267f":["♿",["wheelchair"]],2693:["⚓",["anchor"]],"26a0":["⚠",["warning"]],"26a1":["⚡",["zap"]],"26aa":["⚪",["white_circle"]],"26ab":["⚫",["black_circle"]],"26bd":["⚽",["soccer"]],"26be":["⚾",["baseball"]],"26c4":["⛄",["snowman"]],"26c5":["⛅",["partly_sunny"]],"26ce":["⛎",["ophiuchus"]],"26d4":["⛔",["no_entry"]],"26ea":["⛪",["church"]],"26f2":["⛲",["fountain"]],"26f3":["⛳",["golf"]],"26f5":["⛵",["boat","sailboat"]],"26fa":["⛺",["tent"]],"26fd":["⛽",["fuelpump"]],2702:["✂",["scissors"]],2705:["✅",["white_check_mark"]],2708:["✈",["airplane"]],2709:["✉",["email","envelope"]],"270a":["✊",["fist"]],"270b":["✋",["hand","raised_hand"]],"270c":["✌",["v"]],"270f":["✏",["pencil2"]],2712:["✒",["black_nib"]],2714:["✔",["heavy_check_mark"]],2716:["✖",["heavy_multiplication_x"]],2728:["✨",["sparkles"]],2733:["✳",["eight_spoked_asterisk"]],2734:["✴",["eight_pointed_black_star"]],2744:["❄",["snowflake"]],2747:["❇",["sparkle"]],"274c":["❌",["x"]],"274e":["❎",["negative_squared_cross_mark"]],2753:["❓",["question"]],2754:["❔",["grey_question"]],2755:["❕",["grey_exclamation"]],2757:["❗",["exclamation","heavy_exclamation_mark"]],2764:["❤",["heart"],"<3"],2795:["➕",["heavy_plus_sign"]],2796:["➖",["heavy_minus_sign"]],2797:["➗",["heavy_division_sign"]],"27a1":["➡",["arrow_right"]],"27b0":["➰",["curly_loop"]],"27bf":["➿",["loop"]],2934:["⤴",["arrow_heading_up"]],2935:["⤵",["arrow_heading_down"]],"2b05":["⬅",["arrow_left"]],"2b06":["⬆",["arrow_up"]],"2b07":["⬇",["arrow_down"]],"2b1b":["⬛",["black_large_square"]],"2b1c":["⬜",["white_large_square"]],"2b50":["⭐",["star"]],"2b55":["⭕",["o"]],3030:["〰",["wavy_dash"]],"303d":["〽",["part_alternation_mark"]],3297:["㊗",["congratulations"]],3299:["㊙",["secret"]],"1f004":["🀄",["mahjong"]],"1f0cf":["🃏",["black_joker"]],"1f170":["🅰",["a"]],"1f171":["🅱",["b"]],"1f17e":["🅾",["o2"]],"1f17f":["🅿",["parking"]],"1f18e":["🆎",["ab"]],"1f191":["🆑",["cl"]],"1f192":["🆒",["cool"]],"1f193":["🆓",["free"]],"1f194":["🆔",["id"]],"1f195":["🆕",["new"]],"1f196":["🆖",["ng"]],"1f197":["🆗",["ok"]],"1f198":["🆘",["sos"]],"1f199":["🆙",["up"]],"1f19a":["🆚",["vs"]],"1f201":["🈁",["koko"]],"1f202":["🈂",["sa"]],"1f21a":["🈚",["u7121"]],"1f22f":["🈯",["u6307"]],"1f232":["🈲",["u7981"]],"1f233":["🈳",["u7a7a"]],"1f234":["🈴",["u5408"]],"1f235":["🈵",["u6e80"]],"1f236":["🈶",["u6709"]],"1f237":["🈷",["u6708"]],"1f238":["🈸",["u7533"]],"1f239":["🈹",["u5272"]],"1f23a":["🈺",["u55b6"]],"1f250":["🉐",["ideograph_advantage"]],"1f251":["🉑",["accept"]],"1f300":["🌀",["cyclone"]],"1f301":["🌁",["foggy"]],"1f302":["🌂",["closed_umbrella"]],"1f303":["🌃",["stars"]],"1f304":["🌄",["sunrise_over_mountains"]],"1f305":["🌅",["sunrise"]],"1f306":["🌆",["city_sunset"]],"1f307":["🌇",["city_sunrise"]],"1f308":["🌈",["rainbow"]],"1f309":["🌉",["bridge_at_night"]],"1f30a":["🌊",["ocean"]],"1f30b":["🌋",["volcano"]],"1f30c":["🌌",["milky_way"]],"1f30d":["🌍",["earth_africa"]],"1f30e":["🌎",["earth_americas"]],"1f30f":["🌏",["earth_asia"]],"1f310":["🌐",["globe_with_meridians"]],"1f311":["🌑",["new_moon"]],"1f312":["🌒",["waxing_crescent_moon"]],"1f313":["🌓",["first_quarter_moon"]],"1f314":["🌔",["moon","waxing_gibbous_moon"]],"1f315":["🌕",["full_moon"]],"1f316":["🌖",["waning_gibbous_moon"]],"1f317":["🌗",["last_quarter_moon"]],"1f318":["🌘",["waning_crescent_moon"]],"1f319":["🌙",["crescent_moon"]],"1f31a":["🌚",["new_moon_with_face"]],"1f31b":["🌛",["first_quarter_moon_with_face"]],"1f31c":["🌜",["last_quarter_moon_with_face"]],"1f31d":["🌝",["full_moon_with_face"]],"1f31e":["🌞",["sun_with_face"]],"1f31f":["🌟",["star2"]],"1f330":["🌰",["chestnut"]],"1f331":["🌱",["seedling"]],"1f332":["🌲",["evergreen_tree"]],"1f333":["🌳",["deciduous_tree"]],"1f334":["🌴",["palm_tree"]],"1f335":["🌵",["cactus"]],"1f337":["🌷",["tulip"]],"1f338":["🌸",["cherry_blossom"]],"1f339":["🌹",["rose"]],"1f33a":["🌺",["hibiscus"]],"1f33b":["🌻",["sunflower"]],"1f33c":["🌼",["blossom"]],"1f33d":["🌽",["corn"]],"1f33e":["🌾",["ear_of_rice"]],"1f33f":["🌿",["herb"]],"1f340":["🍀",["four_leaf_clover"]],"1f341":["🍁",["maple_leaf"]],"1f342":["🍂",["fallen_leaf"]],"1f343":["🍃",["leaves"]],"1f344":["🍄",["mushroom"]],"1f345":["🍅",["tomato"]],"1f346":["🍆",["eggplant"]],"1f347":["🍇",["grapes"]],"1f348":["🍈",["melon"]],"1f349":["🍉",["watermelon"]],"1f34a":["🍊",["tangerine"]],"1f34b":["🍋",["lemon"]],"1f34c":["🍌",["banana"]],"1f34d":["🍍",["pineapple"]],"1f34e":["🍎",["apple"]],"1f34f":["🍏",["green_apple"]],"1f350":["🍐",["pear"]],"1f351":["🍑",["peach"]],"1f352":["🍒",["cherries"]],"1f353":["🍓",["strawberry"]],"1f354":["🍔",["hamburger"]],"1f355":["🍕",["pizza"]],"1f356":["🍖",["meat_on_bone"]],"1f357":["🍗",["poultry_leg"]],"1f358":["🍘",["rice_cracker"]],"1f359":["🍙",["rice_ball"]],"1f35a":["🍚",["rice"]],"1f35b":["🍛",["curry"]],"1f35c":["🍜",["ramen"]],"1f35d":["🍝",["spaghetti"]],"1f35e":["🍞",["bread"]],"1f35f":["🍟",["fries"]],"1f360":["🍠",["sweet_potato"]],"1f361":["🍡",["dango"]],"1f362":["🍢",["oden"]],"1f363":["🍣",["sushi"]],"1f364":["🍤",["fried_shrimp"]],"1f365":["🍥",["fish_cake"]],"1f366":["🍦",["icecream"]],"1f367":["🍧",["shaved_ice"]],"1f368":["🍨",["ice_cream"]],"1f369":["🍩",["doughnut"]],"1f36a":["🍪",["cookie"]],"1f36b":["🍫",["chocolate_bar"]],"1f36c":["🍬",["candy"]],"1f36d":["🍭",["lollipop"]],"1f36e":["🍮",["custard"]],"1f36f":["🍯",["honey_pot"]],"1f370":["🍰",["cake"]],"1f371":["🍱",["bento"]],"1f372":["🍲",["stew"]],"1f373":["🍳",["egg"]],"1f374":["🍴",["fork_and_knife"]],"1f375":["🍵",["tea"]],"1f376":["🍶",["sake"]],"1f377":["🍷",["wine_glass"]],"1f378":["🍸",["cocktail"]],"1f379":["🍹",["tropical_drink"]],"1f37a":["🍺",["beer"]],"1f37b":["🍻",["beers"]],"1f37c":["🍼",["baby_bottle"]],"1f380":["🎀",["ribbon"]],"1f381":["🎁",["gift"]],"1f382":["🎂",["birthday"]],"1f383":["🎃",["jack_o_lantern"]],"1f384":["🎄",["christmas_tree"]],"1f385":["🎅",["santa"]],"1f386":["🎆",["fireworks"]],"1f387":["🎇",["sparkler"]],"1f388":["🎈",["balloon"]],"1f389":["🎉",["tada"]],"1f38a":["🎊",["confetti_ball"]],"1f38b":["🎋",["tanabata_tree"]],"1f38c":["🎌",["crossed_flags"]],"1f38d":["🎍",["bamboo"]],"1f38e":["🎎",["dolls"]],"1f38f":["🎏",["flags"]],"1f390":["🎐",["wind_chime"]],"1f391":["🎑",["rice_scene"]],"1f392":["🎒",["school_satchel"]],"1f393":["🎓",["mortar_board"]],"1f3a0":["🎠",["carousel_horse"]],"1f3a1":["🎡",["ferris_wheel"]],"1f3a2":["🎢",["roller_coaster"]],"1f3a3":["🎣",["fishing_pole_and_fish"]],"1f3a4":["🎤",["microphone"]],"1f3a5":["🎥",["movie_camera"]],"1f3a6":["🎦",["cinema"]],"1f3a7":["🎧",["headphones"]],"1f3a8":["🎨",["art"]],"1f3a9":["🎩",["tophat"]],"1f3aa":["🎪",["circus_tent"]],"1f3ab":["🎫",["ticket"]],"1f3ac":["🎬",["clapper"]],"1f3ad":["🎭",["performing_arts"]],"1f3ae":["🎮",["video_game"]],"1f3af":["🎯",["dart"]],"1f3b0":["🎰",["slot_machine"]],"1f3b1":["🎱",["8ball"]],"1f3b2":["🎲",["game_die"]],"1f3b3":["🎳",["bowling"]],"1f3b4":["🎴",["flower_playing_cards"]],"1f3b5":["🎵",["musical_note"]],"1f3b6":["🎶",["notes"]],"1f3b7":["🎷",["saxophone"]],"1f3b8":["🎸",["guitar"]],"1f3b9":["🎹",["musical_keyboard"]],"1f3ba":["🎺",["trumpet"]],"1f3bb":["🎻",["violin"]],"1f3bc":["🎼",["musical_score"]],"1f3bd":["🎽",["running_shirt_with_sash"]],"1f3be":["🎾",["tennis"]],"1f3bf":["🎿",["ski"]],"1f3c0":["🏀",["basketball"]],"1f3c1":["🏁",["checkered_flag"]],"1f3c2":["🏂",["snowboarder"]],"1f3c3":["🏃",["runner","running"]],"1f3c4":["🏄",["surfer"]],"1f3c6":["🏆",["trophy"]],"1f3c7":["🏇",["horse_racing"]],"1f3c8":["🏈",["football"]],"1f3c9":["🏉",["rugby_football"]],"1f3ca":["🏊",["swimmer"]],"1f3e0":["🏠",["house"]],"1f3e1":["🏡",["house_with_garden"]],"1f3e2":["🏢",["office"]],"1f3e3":["🏣",["post_office"]],"1f3e4":["🏤",["european_post_office"]],"1f3e5":["🏥",["hospital"]],"1f3e6":["🏦",["bank"]],"1f3e7":["🏧",["atm"]],"1f3e8":["🏨",["hotel"]],"1f3e9":["🏩",["love_hotel"]],"1f3ea":["🏪",["convenience_store"]],"1f3eb":["🏫",["school"]],"1f3ec":["🏬",["department_store"]],"1f3ed":["🏭",["factory"]],"1f3ee":["🏮",["izakaya_lantern","lantern"]],"1f3ef":["🏯",["japanese_castle"]],"1f3f0":["🏰",["european_castle"]],"1f400":["🐀",["rat"]],"1f401":["🐁",["mouse2"]],"1f402":["🐂",["ox"]],"1f403":["🐃",["water_buffalo"]],"1f404":["🐄",["cow2"]],"1f405":["🐅",["tiger2"]],"1f406":["🐆",["leopard"]],"1f407":["🐇",["rabbit2"]],"1f408":["🐈",["cat2"]],"1f409":["🐉",["dragon"]],"1f40a":["🐊",["crocodile"]],"1f40b":["🐋",["whale2"]],"1f40c":["🐌",["snail"]],"1f40d":["🐍",["snake"]],"1f40e":["🐎",["racehorse"]],"1f40f":["🐏",["ram"]],"1f410":["🐐",["goat"]],"1f411":["🐑",["sheep"]],"1f412":["🐒",["monkey"]],"1f413":["🐓",["rooster"]],"1f414":["🐔",["chicken"]],"1f415":["🐕",["dog2"]],"1f416":["🐖",["pig2"]],"1f417":["🐗",["boar"]],"1f418":["🐘",["elephant"]],"1f419":["🐙",["octopus"]],"1f41a":["🐚",["shell"]],"1f41b":["🐛",["bug"]],"1f41c":["🐜",["ant"]],"1f41d":["🐝",["bee","honeybee"]],"1f41e":["🐞",["beetle"]],"1f41f":["🐟",["fish"]],"1f420":["🐠",["tropical_fish"]],"1f421":["🐡",["blowfish"]],"1f422":["🐢",["turtle"]],"1f423":["🐣",["hatching_chick"]],"1f424":["🐤",["baby_chick"]],"1f425":["🐥",["hatched_chick"]],"1f426":["🐦",["bird"]],"1f427":["🐧",["penguin"]],"1f428":["🐨",["koala"]],"1f429":["🐩",["poodle"]],"1f42a":["🐪",["dromedary_camel"]],"1f42b":["🐫",["camel"]],"1f42c":["🐬",["dolphin","flipper"]],"1f42d":["🐭",["mouse"]],"1f42e":["🐮",["cow"]],"1f42f":["🐯",["tiger"]],"1f430":["🐰",["rabbit"]],"1f431":["🐱",["cat"]],"1f432":["🐲",["dragon_face"]],"1f433":["🐳",["whale"]],"1f434":["🐴",["horse"]],"1f435":["🐵",["monkey_face"]],"1f436":["🐶",["dog"]],"1f437":["🐷",["pig"]],"1f438":["🐸",["frog"]],"1f439":["🐹",["hamster"]],"1f43a":["🐺",["wolf"]],"1f43b":["🐻",["bear"]],"1f43c":["🐼",["panda_face"]],"1f43d":["🐽",["pig_nose"]],"1f43e":["🐾",["feet","paw_prints"]],"1f440":["👀",["eyes"]],"1f442":["👂",["ear"]],"1f443":["👃",["nose"]],"1f444":["👄",["lips"]],"1f445":["👅",["tongue"]],"1f446":["👆",["point_up_2"]],"1f447":["👇",["point_down"]],"1f448":["👈",["point_left"]],"1f449":["👉",["point_right"]],"1f44a":["👊",["facepunch","punch"]],"1f44b":["👋",["wave"]],"1f44c":["👌",["ok_hand"]],"1f44d":["👍",["+1","thumbsup"]],"1f44e":["👎",["-1","thumbsdown"]],"1f44f":["👏",["clap"]],"1f450":["👐",["open_hands"]],"1f451":["👑",["crown"]],"1f452":["👒",["womans_hat"]],"1f453":["👓",["eyeglasses"]],"1f454":["👔",["necktie"]],"1f455":["👕",["shirt","tshirt"]],"1f456":["👖",["jeans"]],"1f457":["👗",["dress"]],"1f458":["👘",["kimono"]],"1f459":["👙",["bikini"]],"1f45a":["👚",["womans_clothes"]],"1f45b":["👛",["purse"]],"1f45c":["👜",["handbag"]],"1f45d":["👝",["pouch"]],"1f45e":["👞",["mans_shoe","shoe"]],"1f45f":["👟",["athletic_shoe"]],"1f460":["👠",["high_heel"]],"1f461":["👡",["sandal"]],"1f462":["👢",["boot"]],"1f463":["👣",["footprints"]],"1f464":["👤",["bust_in_silhouette"]],"1f465":["👥",["busts_in_silhouette"]],"1f466":["👦",["boy"]],"1f467":["👧",["girl"]],"1f468":["👨",["man"]],"1f469":["👩",["woman"]],"1f46a":["👪",["family"]],"1f46b":["👫",["couple"]],"1f46c":["👬",["two_men_holding_hands"]],"1f46d":["👭",["two_women_holding_hands"]],"1f46e":["👮",["cop"]],"1f46f":["👯",["dancers"]],"1f470":["👰",["bride_with_veil"]],"1f471":["👱",["person_with_blond_hair"]],"1f472":["👲",["man_with_gua_pi_mao"]],"1f473":["👳",["man_with_turban"]],"1f474":["👴",["older_man"]],"1f475":["👵",["older_woman"]],"1f476":["👶",["baby"]],"1f477":["👷",["construction_worker"]],"1f478":["👸",["princess"]],"1f479":["👹",["japanese_ogre"]],"1f47a":["👺",["japanese_goblin"]],"1f47b":["👻",["ghost"]],"1f47c":["👼",["angel"]],"1f47d":["👽",["alien"]],"1f47e":["👾",["space_invader"]],"1f47f":["👿",["imp"]],"1f480":["💀",["skull"]],"1f481":["💁",["information_desk_person"]],"1f482":["💂",["guardsman"]],"1f483":["💃",["dancer"]],"1f484":["💄",["lipstick"]],"1f485":["💅",["nail_care"]],"1f486":["💆",["massage"]],"1f487":["💇",["haircut"]],"1f488":["💈",["barber"]],"1f489":["💉",["syringe"]],"1f48a":["💊",["pill"]],"1f48b":["💋",["kiss"]],"1f48c":["💌",["love_letter"]],"1f48d":["💍",["ring"]],"1f48e":["💎",["gem"]],"1f48f":["💏",["couplekiss"]],"1f490":["💐",["bouquet"]],"1f491":["💑",["couple_with_heart"]],"1f492":["💒",["wedding"]],"1f493":["💓",["heartbeat"]],"1f494":["💔",["broken_heart"],"</3"],"1f495":["💕",["two_hearts"]],"1f496":["💖",["sparkling_heart"]],"1f497":["💗",["heartpulse"]],"1f498":["💘",["cupid"]],"1f499":["💙",["blue_heart"],"<3"],"1f49a":["💚",["green_heart"],"<3"],"1f49b":["💛",["yellow_heart"],"<3"],"1f49c":["💜",["purple_heart"],"<3"],"1f49d":["💝",["gift_heart"]],"1f49e":["💞",["revolving_hearts"]],"1f49f":["💟",["heart_decoration"]],"1f4a0":["💠",["diamond_shape_with_a_dot_inside"]],"1f4a1":["💡",["bulb"]],"1f4a2":["💢",["anger"]],"1f4a3":["💣",["bomb"]],"1f4a4":["💤",["zzz"]],"1f4a5":["💥",["boom","collision"]],"1f4a6":["💦",["sweat_drops"]],"1f4a7":["💧",["droplet"]],"1f4a8":["💨",["dash"]],"1f4a9":["💩",["hankey","poop","shit"]],"1f4aa":["💪",["muscle"]],"1f4ab":["💫",["dizzy"]],"1f4ac":["💬",["speech_balloon"]],"1f4ad":["💭",["thought_balloon"]],"1f4ae":["💮",["white_flower"]],"1f4af":["💯",["100"]],"1f4b0":["💰",["moneybag"]],"1f4b1":["💱",["currency_exchange"]],"1f4b2":["💲",["heavy_dollar_sign"]],"1f4b3":["💳",["credit_card"]],"1f4b4":["💴",["yen"]],"1f4b5":["💵",["dollar"]],"1f4b6":["💶",["euro"]],"1f4b7":["💷",["pound"]],"1f4b8":["💸",["money_with_wings"]],"1f4b9":["💹",["chart"]],"1f4ba":["💺",["seat"]],"1f4bb":["💻",["computer"]],"1f4bc":["💼",["briefcase"]],"1f4bd":["💽",["minidisc"]],"1f4be":["💾",["floppy_disk"]],"1f4bf":["💿",["cd"]],"1f4c0":["📀",["dvd"]],"1f4c1":["📁",["file_folder"]],"1f4c2":["📂",["open_file_folder"]],"1f4c3":["📃",["page_with_curl"]],"1f4c4":["📄",["page_facing_up"]],"1f4c5":["📅",["date"]],"1f4c6":["📆",["calendar"]],"1f4c7":["📇",["card_index"]],"1f4c8":["📈",["chart_with_upwards_trend"]],"1f4c9":["📉",["chart_with_downwards_trend"]],"1f4ca":["📊",["bar_chart"]],"1f4cb":["📋",["clipboard"]],"1f4cc":["📌",["pushpin"]],"1f4cd":["📍",["round_pushpin"]],"1f4ce":["📎",["paperclip"]],"1f4cf":["📏",["straight_ruler"]],"1f4d0":["📐",["triangular_ruler"]],"1f4d1":["📑",["bookmark_tabs"]],"1f4d2":["📒",["ledger"]],"1f4d3":["📓",["notebook"]],"1f4d4":["📔",["notebook_with_decorative_cover"]],"1f4d5":["📕",["closed_book"]],"1f4d6":["📖",["book","open_book"]],"1f4d7":["📗",["green_book"]],"1f4d8":["📘",["blue_book"]],"1f4d9":["📙",["orange_book"]],"1f4da":["📚",["books"]],"1f4db":["📛",["name_badge"]],"1f4dc":["📜",["scroll"]],"1f4dd":["📝",["memo","pencil"]],"1f4de":["📞",["telephone_receiver"]],"1f4df":["📟",["pager"]],"1f4e0":["📠",["fax"]],"1f4e1":["📡",["satellite"]],"1f4e2":["📢",["loudspeaker"]],"1f4e3":["📣",["mega"]],"1f4e4":["📤",["outbox_tray"]],"1f4e5":["📥",["inbox_tray"]],"1f4e6":["📦",["package"]],"1f4e7":["📧",["e-mail"]],"1f4e8":["📨",["incoming_envelope"]],"1f4e9":["📩",["envelope_with_arrow"]],"1f4ea":["📪",["mailbox_closed"]],"1f4eb":["📫",["mailbox"]],"1f4ec":["📬",["mailbox_with_mail"]],"1f4ed":["📭",["mailbox_with_no_mail"]],"1f4ee":["📮",["postbox"]],"1f4ef":["📯",["postal_horn"]],"1f4f0":["📰",["newspaper"]],"1f4f1":["📱",["iphone"]],"1f4f2":["📲",["calling"]],"1f4f3":["📳",["vibration_mode"]],"1f4f4":["📴",["mobile_phone_off"]],"1f4f5":["📵",["no_mobile_phones"]],"1f4f6":["📶",["signal_strength"]],"1f4f7":["📷",["camera"]],"1f4f9":["📹",["video_camera"]],"1f4fa":["📺",["tv"]],"1f4fb":["📻",["radio"]],"1f4fc":["📼",["vhs"]],"1f500":["🔀",["twisted_rightwards_arrows"]],"1f501":["🔁",["repeat"]],"1f502":["🔂",["repeat_one"]],"1f503":["🔃",["arrows_clockwise"]],"1f504":["🔄",["arrows_counterclockwise"]],"1f505":["🔅",["low_brightness"]],"1f506":["🔆",["high_brightness"]],"1f507":["🔇",["mute"]],"1f509":["🔉",["sound"]],"1f50a":["🔊",["speaker"]],"1f50b":["🔋",["battery"]],"1f50c":["🔌",["electric_plug"]],"1f50d":["🔍",["mag"]],"1f50e":["🔎",["mag_right"]],"1f50f":["🔏",["lock_with_ink_pen"]],"1f510":["🔐",["closed_lock_with_key"]],"1f511":["🔑",["key"]],"1f512":["🔒",["lock"]],"1f513":["🔓",["unlock"]],"1f514":["🔔",["bell"]],"1f515":["🔕",["no_bell"]],"1f516":["🔖",["bookmark"]],"1f517":["🔗",["link"]],"1f518":["🔘",["radio_button"]],"1f519":["🔙",["back"]],"1f51a":["🔚",["end"]],"1f51b":["🔛",["on"]],"1f51c":["🔜",["soon"]],"1f51d":["🔝",["top"]],"1f51e":["🔞",["underage"]],"1f51f":["🔟",["keycap_ten"]],"1f520":["🔠",["capital_abcd"]],"1f521":["🔡",["abcd"]],"1f522":["🔢",["1234"]],"1f523":["🔣",["symbols"]],"1f524":["🔤",["abc"]],"1f525":["🔥",["fire"]],"1f526":["🔦",["flashlight"]],"1f527":["🔧",["wrench"]],"1f528":["🔨",["hammer"]],"1f529":["🔩",["nut_and_bolt"]],"1f52a":["🔪",["hocho"]],"1f52b":["🔫",["gun"]],"1f52c":["🔬",["microscope"]],"1f52d":["🔭",["telescope"]],"1f52e":["🔮",["crystal_ball"]],"1f52f":["🔯",["six_pointed_star"]],"1f530":["🔰",["beginner"]],"1f531":["🔱",["trident"]],"1f532":["🔲",["black_square_button"]],"1f533":["🔳",["white_square_button"]],"1f534":["🔴",["red_circle"]],"1f535":["🔵",["large_blue_circle"]],"1f536":["🔶",["large_orange_diamond"]],"1f537":["🔷",["large_blue_diamond"]],"1f538":["🔸",["small_orange_diamond"]],"1f539":["🔹",["small_blue_diamond"]],"1f53a":["🔺",["small_red_triangle"]],"1f53b":["🔻",["small_red_triangle_down"]],"1f53c":["🔼",["arrow_up_small"]],"1f53d":["🔽",["arrow_down_small"]],"1f550":["🕐",["clock1"]],"1f551":["🕑",["clock2"]],"1f552":["🕒",["clock3"]],"1f553":["🕓",["clock4"]],"1f554":["🕔",["clock5"]],"1f555":["🕕",["clock6"]],"1f556":["🕖",["clock7"]],"1f557":["🕗",["clock8"]],"1f558":["🕘",["clock9"]],"1f559":["🕙",["clock10"]],"1f55a":["🕚",["clock11"]],"1f55b":["🕛",["clock12"]],"1f55c":["🕜",["clock130"]],"1f55d":["🕝",["clock230"]],"1f55e":["🕞",["clock330"]],"1f55f":["🕟",["clock430"]],"1f560":["🕠",["clock530"]],"1f561":["🕡",["clock630"]],"1f562":["🕢",["clock730"]],"1f563":["🕣",["clock830"]],"1f564":["🕤",["clock930"]],"1f565":["🕥",["clock1030"]],"1f566":["🕦",["clock1130"]],"1f567":["🕧",["clock1230"]],"1f5fb":["🗻",["mount_fuji"]],"1f5fc":["🗼",["tokyo_tower"]],"1f5fd":["🗽",["statue_of_liberty"]],"1f5fe":["🗾",["japan"]],"1f5ff":["🗿",["moyai"]],"1f600":["😀",["grinning"]],"1f601":["😁",["grin"]],"1f602":["😂",["joy"]],"1f603":["😃",["smiley"],":)"],"1f604":["😄",["smile"],":)"],"1f605":["😅",["sweat_smile"]],"1f606":["😆",["laughing","satisfied"]],"1f607":["😇",["innocent"]],"1f608":["😈",["smiling_imp"]],"1f609":["😉",["wink"],";)"],"1f60a":["😊",["blush"]],"1f60b":["😋",["yum"]],"1f60c":["😌",["relieved"]],"1f60d":["😍",["heart_eyes"]],"1f60e":["😎",["sunglasses"]],"1f60f":["😏",["smirk"]],"1f610":["😐",["neutral_face"]],"1f611":["😑",["expressionless"]],"1f612":["😒",["unamused"]],"1f613":["😓",["sweat"]],"1f614":["😔",["pensive"]],"1f615":["😕",["confused"]],"1f616":["😖",["confounded"]],"1f617":["😗",["kissing"]],"1f618":["😘",["kissing_heart"]],"1f619":["😙",["kissing_smiling_eyes"]],"1f61a":["😚",["kissing_closed_eyes"]],"1f61b":["😛",["stuck_out_tongue"]],"1f61c":["😜",["stuck_out_tongue_winking_eye"],";p"],"1f61d":["😝",["stuck_out_tongue_closed_eyes"]],"1f61e":["😞",["disappointed"],":("],"1f61f":["😟",["worried"]],"1f620":["😠",["angry"]],"1f621":["😡",["rage"]],"1f622":["😢",["cry"],":'("],"1f623":["😣",["persevere"]],"1f624":["😤",["triumph"]],"1f625":["😥",["disappointed_relieved"]],"1f626":["😦",["frowning"]],"1f627":["😧",["anguished"]],"1f628":["😨",["fearful"]],"1f629":["😩",["weary"]],"1f62a":["😪",["sleepy"]],"1f62b":["😫",["tired_face"]],"1f62c":["😬",["grimacing"]],"1f62d":["😭",["sob"],":'("],"1f62e":["😮",["open_mouth"]],"1f62f":["😯",["hushed"]],"1f630":["😰",["cold_sweat"]],"1f631":["😱",["scream"]],"1f632":["😲",["astonished"]],"1f633":["😳",["flushed"]],"1f634":["😴",["sleeping"]],"1f635":["😵",["dizzy_face"]],"1f636":["😶",["no_mouth"]],"1f637":["😷",["mask"]],"1f638":["😸",["smile_cat"]],"1f639":["😹",["joy_cat"]],"1f63a":["😺",["smiley_cat"]],"1f63b":["😻",["heart_eyes_cat"]],"1f63c":["😼",["smirk_cat"]],"1f63d":["😽",["kissing_cat"]],"1f63e":["😾",["pouting_cat"]],"1f63f":["😿",["crying_cat_face"]],"1f640":["🙀",["scream_cat"]],"1f645":["🙅",["no_good"]],"1f646":["🙆",["ok_woman"]],"1f647":["🙇",["bow"]],"1f648":["🙈",["see_no_evil"]],"1f649":["🙉",["hear_no_evil"]],"1f64a":["🙊",["speak_no_evil"]],"1f64b":["🙋",["raising_hand"]],"1f64c":["🙌",["raised_hands"]],"1f64d":["🙍",["person_frowning"]],"1f64e":["🙎",["person_with_pouting_face"]],"1f64f":["🙏",["pray"]],"1f680":["🚀",["rocket"]],"1f681":["🚁",["helicopter"]],"1f682":["🚂",["steam_locomotive"]],"1f683":["🚃",["railway_car","train"]],"1f684":["🚄",["bullettrain_side"]],"1f685":["🚅",["bullettrain_front"]],"1f686":["🚆",["train2"]],"1f687":["🚇",["metro"]],"1f688":["🚈",["light_rail"]],"1f689":["🚉",["station"]],"1f68a":["🚊",["tram"]],"1f68c":["🚌",["bus"]],"1f68d":["🚍",["oncoming_bus"]],"1f68e":["🚎",["trolleybus"]],"1f68f":["🚏",["busstop"]],"1f690":["🚐",["minibus"]],"1f691":["🚑",["ambulance"]],"1f692":["🚒",["fire_engine"]],"1f693":["🚓",["police_car"]],"1f694":["🚔",["oncoming_police_car"]],"1f695":["🚕",["taxi"]],"1f696":["🚖",["oncoming_taxi"]],"1f697":["🚗",["car","red_car"]],"1f698":["🚘",["oncoming_automobile"]],"1f699":["🚙",["blue_car"]],"1f69a":["🚚",["truck"]],"1f69b":["🚛",["articulated_lorry"]],"1f69c":["🚜",["tractor"]],"1f69d":["🚝",["monorail"]],"1f69e":["🚞",["mountain_railway"]],"1f69f":["🚟",["suspension_railway"]],"1f6a0":["🚠",["mountain_cableway"]],"1f6a1":["🚡",["aerial_tramway"]],"1f6a2":["🚢",["ship"]],"1f6a3":["🚣",["rowboat"]],"1f6a4":["🚤",["speedboat"]],"1f6a5":["🚥",["traffic_light"]],"1f6a6":["🚦",["vertical_traffic_light"]],"1f6a7":["🚧",["construction"]],"1f6a8":["🚨",["rotating_light"]],"1f6a9":["🚩",["triangular_flag_on_post"]],"1f6aa":["🚪",["door"]],"1f6ab":["🚫",["no_entry_sign"]],"1f6ac":["🚬",["smoking"]],"1f6ad":["🚭",["no_smoking"]],"1f6ae":["🚮",["put_litter_in_its_place"]],"1f6af":["🚯",["do_not_litter"]],"1f6b0":["🚰",["potable_water"]],"1f6b1":["🚱",["non-potable_water"]],"1f6b2":["🚲",["bike"]],"1f6b3":["🚳",["no_bicycles"]],"1f6b4":["🚴",["bicyclist"]],"1f6b5":["🚵",["mountain_bicyclist"]],"1f6b6":["🚶",["walking"]],"1f6b7":["🚷",["no_pedestrians"]],"1f6b8":["🚸",["children_crossing"]],"1f6b9":["🚹",["mens"]],"1f6ba":["🚺",["womens"]],"1f6bb":["🚻",["restroom"]],"1f6bc":["🚼",["baby_symbol"]],"1f6bd":["🚽",["toilet"]],"1f6be":["🚾",["wc"]],"1f6bf":["🚿",["shower"]],"1f6c0":["🛀",["bath"]],"1f6c1":["🛁",["bathtub"]],"1f6c2":["🛂",["passport_control"]],"1f6c3":["🛃",["customs"]],"1f6c4":["🛄",["baggage_claim"]],"1f6c5":["🛅",["left_luggage"]],"0023":["#",["hash"]],"0030":["0",["zero"]],"0031":["1",["one"]],"0032":["2",["two"]],"0033":["3",["three"]],"0034":["4",["four"]],"0035":["5",["five"]],"0036":["6",["six"]],"0037":["7",["seven"]],"0038":["8",["eight"]],"0039":["9",["nine"]],"1f1e8-1f1f3":["🇨🇳",["cn"]],"1f1e9-1f1ea":["🇩🇪",["de"]],"1f1ea-1f1f8":["🇪🇸",["es"]],"1f1eb-1f1f7":["🇫🇷",["fr"]],"1f1ec-1f1e7":["🇬🇧",["gb","uk"]],"1f1ee-1f1f9":["🇮🇹",["it"]],"1f1ef-1f1f5":["🇯🇵",["jp"]],"1f1f0-1f1f7":["🇰🇷",["kr"]],"1f1f7-1f1fa":["🇷🇺",["ru"]],"1f1fa-1f1f8":["🇺🇸",["us"]]},Config.EmojiCategories=[["1f604","1f603","1f600","1f60a","263a","1f609","1f60d","1f618","1f61a","1f617","1f619","1f61c","1f61d","1f61b","1f633","1f601","1f614","1f60c","1f612","1f61e","1f623","1f622","1f602","1f62d","1f62a","1f625","1f630","1f605","1f613","1f629","1f62b","1f628","1f631","1f620","1f621","1f624","1f616","1f606","1f60b","1f637","1f60e","1f634","1f635","1f632","1f61f","1f626","1f627","1f608","1f47f","1f62e","1f62c","1f610","1f615","1f62f","1f636","1f607","1f60f","1f611","1f472","1f473","1f46e","1f477","1f482","1f476","1f466","1f467","1f468","1f469","1f474","1f475","1f471","1f47c","1f478","1f63a","1f638","1f63b","1f63d","1f63c","1f640","1f63f","1f639","1f63e","1f479","1f47a","1f648","1f649","1f64a","1f480","1f47d","1f4a9","1f525","2728","1f31f","1f4ab","1f4a5","1f4a2","1f4a6","1f4a7","1f4a4","1f4a8","1f442","1f440","1f443","1f445","1f444","1f44d","1f44e","1f44c","1f44a","270a","270c","1f44b","270b","1f450","1f446","1f447","1f449","1f448","1f64c","1f64f","261d","1f44f","1f4aa","1f6b6","1f3c3","1f483","1f46b","1f46a","1f46c","1f46d","1f48f","1f491","1f46f","1f646","1f645","1f481","1f64b","1f486","1f487","1f485","1f470","1f64e","1f64d","1f647","1f3a9","1f451","1f452","1f45f","1f45e","1f461","1f460","1f462","1f455","1f454","1f45a","1f457","1f3bd","1f456","1f458","1f459","1f4bc","1f45c","1f45d","1f45b","1f453","1f380","1f302","1f484","1f49b","1f499","1f49c","1f49a","2764","1f494","1f497","1f493","1f495","1f496","1f49e","1f498","1f48c","1f48b","1f48d","1f48e","1f464","1f465","1f4ac","1f463","1f4ad"],["1f436","1f43a","1f431","1f42d","1f439","1f430","1f438","1f42f","1f428","1f43b","1f437","1f43d","1f42e","1f417","1f435","1f412","1f434","1f411","1f418","1f43c","1f427","1f426","1f424","1f425","1f423","1f414","1f40d","1f422","1f41b","1f41d","1f41c","1f41e","1f40c","1f419","1f41a","1f420","1f41f","1f42c","1f433","1f40b","1f404","1f40f","1f400","1f403","1f405","1f407","1f409","1f40e","1f410","1f413","1f415","1f416","1f401","1f402","1f432","1f421","1f40a","1f42b","1f42a","1f406","1f408","1f429","1f43e","1f490","1f338","1f337","1f340","1f339","1f33b","1f33a","1f341","1f343","1f342","1f33f","1f33e","1f344","1f335","1f334","1f332","1f333","1f330","1f331","1f33c","1f310","1f31e","1f31d","1f31a","1f311","1f312","1f313","1f314","1f315","1f316","1f317","1f318","1f31c","1f31b","1f319","1f30d","1f30e","1f30f","1f30b","1f30c","1f30d","2b50","2600","26c5","2601","26a1","2614","2744","26c4","1f300","1f301","1f308","1f30a"],["1f38d","1f49d","1f38e","1f392","1f393","1f38f","1f386","1f387","1f390","1f391","1f383","1f47b","1f385","1f384","1f381","1f38b","1f389","1f38a","1f388","1f38c","1f52e","1f3a5","1f4f7","1f4f9","1f4fc","1f4bf","1f4c0","1f4bd","1f4be","1f4bb","1f4f1","260e","1f4de","1f4df","1f4e0","1f4e1","1f4fa","1f4fb","1f50a","1f509","1f509","1f507","1f514","1f514","1f4e2","1f4e3","23f3","231b","23f0","231a","1f513","1f512","1f50f","1f510","1f511","1f50e","1f4a1","1f526","1f506","1f505","1f50c","1f50b","1f50d","1f6c0","1f6bf","1f6bd","1f527","1f529","1f528","1f6aa","1f6ac","1f4a3","1f52b","1f52a","1f48a","1f489","1f4b0","1f4b4","1f4b5","1f4b7","1f4b6","1f4b3","1f4b8","1f4f2","1f4e7","1f4e5","1f4e4","2709","1f4e9","1f4e8","1f4ef","1f4eb","1f4ea","1f4ec","1f4ed","1f4ee","1f4e6","1f4dd","1f4c4","1f4c3","1f4d1","1f4ca","1f4c8","1f4c9","1f4dc","1f4cb","1f4c5","1f4c6","1f4c7","1f4c1","1f4c2","2702","1f4cc","1f4ce","2712","270f","1f4cf","1f4d0","1f4d5","1f4d7","1f4d8","1f4d9","1f4d3","1f4d4","1f4d2","1f4da","1f4d6","1f516","1f4db","1f52c","1f52d","1f4f0","1f3a8","1f3ac","1f3a4","1f3a7","1f3bc","1f3b5","1f3b6","1f3b9","1f3bb","1f3ba","1f3b7","1f3b8","1f47e","1f3ae","1f0cf","1f3b4","1f004","1f3b2","1f3af","1f3c8","1f3c0","26bd","26be","1f3be","1f3b1","1f3c9","1f3b3","26f3","1f6b5","1f6b4","1f3c1","1f3c7","1f3c6","1f3bf","1f3c2","1f3ca","1f3c4","1f3a3","2615","1f375","1f376","1f37c","1f37a","1f37b","1f378","1f379","1f377","1f374","1f355","1f354","1f35f","1f357","1f356","1f35d","1f35b","1f364","1f371","1f363","1f365","1f359","1f358","1f35a","1f35c","1f372","1f362","1f361","1f373","1f35e","1f369","1f36e","1f366","1f368","1f367","1f382","1f370","1f36a","1f36b","1f36c","1f36d","1f36f","1f34e","1f34f","1f34a","1f34b","1f352","1f347","1f349","1f353","1f351","1f348","1f34c","1f350","1f34d","1f360","1f346","1f345","1f33d"],["1f3e0","1f3e1","1f3eb","1f3e2","1f3e3","1f3e5","1f3e6","1f3ea","1f3e9","1f3e8","1f492","26ea","1f3ec","1f3e4","1f307","1f306","1f3ef","1f3f0","26fa","1f3ed","1f5fc","1f5fe","1f5fb","1f304","1f305","1f303","1f5fd","1f309","1f3a0","1f3a1","26f2","1f3a2","1f6a2","26f5","1f6a4","1f6a3","2693","1f680","2708","1f4ba","1f681","1f682","1f68a","1f689","1f69e","1f686","1f684","1f685","1f688","1f687","1f69d","1f69d","1f683","1f68e","1f68c","1f68d","1f699","1f698","1f697","1f695","1f696","1f69b","1f69a","1f6a8","1f693","1f694","1f692","1f691","1f690","1f6b2","1f6a1","1f69f","1f6a0","1f69c","1f488","1f68f","1f3ab","1f6a6","1f6a5","26a0","1f6a7","1f530","26fd","1f3ee","1f3b0","2668","1f5ff","1f3aa","1f3ad","1f4cd","1f6a9","1f1ef-1f1f5","1f1f0-1f1f7","1f1e9-1f1ea","1f1e8-1f1f3","1f1fa-1f1f8","1f1eb-1f1f7","1f1ea-1f1f8","1f1ee-1f1f9","1f1f7-1f1fa","1f1ec-1f1e7"],["0031","0032","0033","0034","0035","0036","0037","0038","0039","0030","1f51f","1f522","0023","1f523","2b06","2b07","2b05","27a1","1f520","1f521","1f524","2197","2196","2198","2199","2194","2195","1f504","25c0","25b6","1f53c","1f53d","21a9","21aa","2139","23ea","23e9","23eb","23ec","2935","2934","1f197","1f500","1f501","1f502","1f195","1f199","1f192","1f193","1f196","1f4f6","1f3a6","1f201","1f22f","1f233","1f235","1f232","1f234","1f232","1f250","1f239","1f23a","1f236","1f21a","1f6bb","1f6b9","1f6ba","1f6bc","1f6be","1f6b0","1f6ae","1f17f","267f","1f6ad","1f237","1f238","1f202","24c2","1f251","3299","3297","1f191","1f198","1f194","1f6ab","1f51e","1f4f5","1f6af","1f6b1","1f6b3","1f6b7","1f6b8","26d4","2733","2747","274e","2705","2734","1f49f","1f19a","1f4f3","1f4f4","1f170","1f171","1f18e","1f17e","1f4a0","27bf","267b","2648","2649","264a","264b","264c","264d","264e","264f","2650","2651","2652","2653","26ce","1f52f","1f3e7","1f4b9","1f4b2","1f4b1","00a9","00ae","2122","303d","3030","1f51d","1f51a","1f519","1f51b","1f51c","274c","2b55","2757","2753","2755","2754","1f503","1f55b","1f567","1f550","1f55c","1f551","1f55d","1f552","1f55e","1f553","1f55f","1f554","1f560","1f555","1f556","1f557","1f558","1f559","1f55a","1f561","1f562","1f563","1f564","1f565","1f566","2716","2795","2796","2797","2660","2665","2663","2666","1f4ae","1f4af","2714","2611","1f518","1f517","27b0","1f531","1f532","1f533","25fc","25fb","25fe","25fd","25aa","25ab","1f53a","2b1c","2b1b","26ab","26aa","1f534","1f535","1f53b","1f536","1f537","1f538","1f539"]],Config.EmojiCategorySpritesheetDimens=[[7,27],[4,29],[7,33],[3,34],[6,34]],Config.CountryCodes=[["Abkhazia","+7 840","+7 940","+995 44"],["Afghanistan","+93"],["Åland Islands","+358 18"],["Albania","+355"],["Algeria","+213"],["American Samoa","+1 684"],["Andorra","+376"],["Angola","+244"],["Anguilla","+1 264"],["Antigua and Barbuda","+1 268"],["Argentina","+54"],["Armenia","+374"],["Aruba","+297"],["Ascension","+247"],["Australia","+61"],["Australian External Territories","+672"],["Austria","+43"],["Azerbaijan","+994"],["Bahamas","+1 242"],["Bahrain","+973"],["Bangladesh","+880"],["Barbados","+1 246"],["Barbuda","+1 268"],["Belarus","+375"],["Belgium","+32"],["Belize","+501"],["Benin","+229"],["Bermuda","+1 441"],["Bhutan","+975"],["Bolivia","+591"],["Bonaire","+599 7"],["Bosnia and Herzegovina","+387"],["Botswana","+267"],["Brazil","+55"],["British Indian Ocean Territory","+246"],["British Virgin Islands","+1 284"],["Brunei Darussalam","+673"],["Bulgaria","+359"],["Burkina Faso","+226"],["Burma","+95"],["Burundi","+257"],["Cambodia","+855"],["Cameroon","+237"],["Canada","+1"],["Cape Verde","+238"],["Caribbean Netherlands","+599 3","+599 4","+599 7"],["Cayman Islands","+1 345"],["Central African Republic","+236"],["Chad","+235"],["Chatham Island, New Zealand","+64"],["Chile","+56"],["China","+86"],["Christmas Island","+61"],["Cocos (Keeling) Islands","+61"],["Colombia","+57"],["Comoros","+269"],["Congo","+242"],["Congo, Democratic Republic of the (Zaire)","+243"],["Cook Islands","+682"],["Costa Rica","+506"],["Côte d'Ivoire","+225"],["Croatia","+385"],["Cuba","+53"],["Guantanamo Bay, Cuba","+53 99"],["Curaçao","+599 9"],["Cyprus","+357"],["Czech Republic","+420"],["Denmark","+45"],["Diego Garcia","+246"],["Djibouti","+253"],["Dominica","+1 767"],["Dominican Republic","+1 809","+1 829","+1 849"],["East Timor","+670"],["Easter Island","+56"],["Ecuador","+593"],["Egypt","+20"],["El Salvador","+503"],["Ellipso (Mobile Satellite service)","+881 2","+881 3"],["EMSAT (Mobile Satellite service)","+882 13"],["Equatorial Guinea","+240"],["Eritrea","+291"],["Estonia","+372"],["Ethiopia","+251"],["Falkland Islands","+500"],["Faroe Islands","+298"],["Fiji","+679"],["Finland","+358"],["France","+33"],["French Antilles","+596"],["French Guiana","+594"],["French Polynesia","+689"],["Gabon","+241"],["Gambia","+220"],["Georgia","+995"],["Germany","+49"],["Ghana","+233"],["Gibraltar","+350"],["Global Mobile Satellite System (GMSS)","+881"],["Globalstar (Mobile Satellite Service)","+881 8","+881 9"],["Greece","+30"],["Greenland","+299"],["Grenada","+1 473"],["Guadeloupe","+590"],["Guam","+1 671"],["Guatemala","+502"],["Guernsey","+44"],["Guinea","+224"],["Guinea-Bissau","+245"],["Guyana","+592"],["Haiti","+509"],["Honduras","+504"],["Hong Kong","+852"],["Hungary","+36"],["Iceland","+354"],["ICO Global (Mobile Satellite Service)","+881 0","+881 1"],["India","+91"],["Indonesia","+62"],["Inmarsat SNAC","+870"],["International Freephone Service","+800"],["International Shared Cost Service (ISCS)","+808"],["Iran","+98"],["Iraq","+964"],["Ireland","+353"],["Iridium (Mobile Satellite service)","+881 6","+881 7"],["Isle of Man","+44"],["Israel","+972"],["Italy","+39"],["Jamaica","+1 876"],["Jan Mayen","+47 79"],["Japan","+81"],["Jersey","+44"],["Jordan","+962"],["Kazakhstan","+7 6","+7 7"],["Kenya","+254"],["Kiribati","+686"],["Korea, North","+850"],["Korea, South","+82"],["Kuwait","+965"],["Kyrgyzstan","+996"],["Laos","+856"],["Latvia","+371"],["Lebanon","+961"],["Lesotho","+266"],["Liberia","+231"],["Libya","+218"],["Liechtenstein","+423"],["Lithuania","+370"],["Luxembourg","+352"],["Macau","+853"],["Macedonia","+389"],["Madagascar","+261"],["Malawi","+265"],["Malaysia","+60"],["Maldives","+960"],["Mali","+223"],["Malta","+356"],["Marshall Islands","+692"],["Martinique","+596"],["Mauritania","+222"],["Mauritius","+230"],["Mayotte","+262"],["Mexico","+52"],["Micronesia, Federated States of","+691"],["Midway Island, USA","+1 808"],["Moldova","+373"],["Monaco","+377"],["Mongolia","+976"],["Montenegro","+382"],["Montserrat","+1 664"],["Morocco","+212"],["Mozambique","+258"],["Namibia","+264"],["Nauru","+674"],["Nepal","+977"],["Netherlands","+31"],["Nevis","+1 869"],["New Caledonia","+687"],["New Zealand","+64"],["Nicaragua","+505"],["Niger","+227"],["Nigeria","+234"],["Niue","+683"],["Norfolk Island","+672"],["Northern Mariana Islands","+1 670"],["Norway","+47"],["Oman","+968"],["Pakistan","+92"],["Palau","+680"],["Palestinian territories","+970"],["Panama","+507"],["Papua New Guinea","+675"],["Paraguay","+595"],["Peru","+51"],["Philippines","+63"],["Pitcairn Islands","+64"],["Poland","+48"],["Portugal","+351"],["Puerto Rico","+1 787","+1 939"],["Qatar","+974"],["Réunion","+262"],["Romania","+40"],["Russia","+7"],["Rwanda","+250"],["Saba","+599 4"],["Saint Barthélemy","+590"],["Saint Helena","+290"],["Saint Kitts and Nevis","+1 869"],["Saint Lucia","+1 758"],["Saint Martin (France)","+590"],["Saint Pierre and Miquelon","+508"],["Saint Vincent and the Grenadines","+1 784"],["Samoa","+685"],["San Marino","+378"],["São Tomé and Príncipe","+239"],["Saudi Arabia","+966"],["Senegal","+221"],["Serbia","+381"],["Seychelles","+248"],["Sierra Leone","+232"],["Singapore","+65"],["Sint Eustatius","+599 3"],["Sint Maarten (Netherlands)","+1 721"],["Slovakia","+421"],["Slovenia","+386"],["Solomon Islands","+677"],["Somalia","+252"],["South Africa","+27"],["South Georgia and the South Sandwich Islands","+500"],["South Ossetia","+995 34"],["South Sudan","+211"],["Spain","+34"],["Sri Lanka","+94"],["Sudan","+249"],["Suriname","+597"],["Svalbard","+47 79"],["Swaziland","+268"],["Sweden","+46"],["Switzerland","+41"],["Syria","+963"],["Taiwan","+886"],["Tajikistan","+992"],["Tanzania","+255"],["Thailand","+66"],["Thuraya (Mobile Satellite service)","+882 16"],["Togo","+228"],["Tokelau","+690"],["Tonga","+676"],["Trinidad and Tobago","+1 868"],["Tristan da Cunha","+290 8"],["Tunisia","+216"],["Turkey","+90"],["Turkmenistan","+993"],["Turks and Caicos Islands","+1 649"],["Tuvalu","+688"],["Uganda","+256"],["Ukraine","+380"],["United Arab Emirates","+971"],["United Kingdom","+44"],["United States","+1"],["Universal Personal Telecommunications (UPT)","+878"],["Uruguay","+598"],["US Virgin Islands","+1 340"],["Uzbekistan","+998"],["Vanuatu","+678"],["Venezuela","+58"],["Vatican City State (Holy See)","+39 06 698","+379"],["Vietnam","+84"],["Wake Island, USA","+1 808"],["Wallis and Futuna","+681"],["Yemen","+967"],["Zambia","+260"],["Zanzibar","+255"],["Zimbabwe","+263"]],function(){try{window==window.top||window.chrome&&chrome.app&&chrome.app.window?document.documentElement.style.display="block":top.location=self.location
}catch(e){console.error("CJ protection",e)}if(window.safeConfirm=function(e,t){"string"==typeof e&&(e={message:e});var n=!1;try{n=confirm(e.message)}catch(i){n=!0}setTimeout(function(){t(n)},10)},window.applicationCache&&!Config.Modes.packed&&window.addEventListener){var t=window.applicationCache,n=!1,i=!1,r=function(e){clearTimeout(i),i=setTimeout(function(){try{t.update()}catch(e){console.log("appCache.update: "+e)}},e||3e5)},o=function(){t.addEventListener("updateready",function(){t.status==t.UPDATEREADY&&(n||(safeConfirm({type:"WEBOGRAM_UPDATED_RELOAD",message:"A new version of Webogram is downloaded. Launch it?"},function(e){e?window.location.reload():n=!0}),r()))},!1),t.addEventListener("noupdate",function(){r()},!1),t.addEventListener("error",function(){r()},!1)};r(3e3),window.addEventListener("load",o)}}(),function(e,t,n){"use strict";var i,r,o,a,s,c,l,u,p,d,f,h,g,m,y,v,_,b,w,$,S,C,k,M,x,T,E,A,D;S={paneClass:"nano-pane",sliderClass:"nano-slider",contentClass:"nano-content",iOSNativeScrolling:!1,preventPageScrolling:!1,disableResize:!1,alwaysVisible:!1,flashDelay:1500,sliderMinHeight:20,sliderMaxHeight:null,documentContext:null,windowContext:null},v="scrollbar",y="scroll",u="mousedown",p="mousemove",f="mousewheel",d="mouseup",m="resize",s="drag",b="up",g="panedown",o="DOMMouseScroll",a="down",w="wheel",c="keydown",l="keyup",_="touchmove",i="Microsoft Internet Explorer"===t.navigator.appName&&/msie 7./i.test(t.navigator.appVersion)&&t.ActiveXObject,r=null,x=t.requestAnimationFrame,$=t.cancelAnimationFrame,E=n.createElement("div").style,D=function(){var e,t,n,i,r,o;for(i=["t","webkitT","MozT","msT","OT"],e=r=0,o=i.length;o>r;e=++r)if(n=i[e],t=i[e]+"ransform",t in E)return i[e].substr(0,i[e].length-1);return!1}(),A=function(e){return D===!1?!1:""===D?e:D+e.charAt(0).toUpperCase()+e.substr(1)},T=A("transform"),k=T!==!1,C=function(){var e,t,i;return e=n.createElement("div"),t=e.style,t.position="absolute",t.width="100px",t.height="100px",t.overflow=y,t.top="-9999px",n.body.appendChild(e),i=e.offsetWidth-e.clientWidth,n.body.removeChild(e),i},M=function(){var e,n,i;return n=t.navigator.userAgent,(e=/(?=.+Mac OS X)(?=.+Firefox)/.test(n))?(i=/Firefox\/\d{2}\./.exec(n),i&&(i=i[0].replace(/\D+/g,"")),e&&+i>23):!1},h=function(){function c(i,o){this.el=i,this.options=o,r||(r=C()),this.$el=e(this.el),this.doc=e(this.options.documentContext||n),this.win=e(this.options.windowContext||t),this.$content=this.$el.children("."+o.contentClass),this.$content.attr("tabindex",this.options.tabIndex||0),this.content=this.$content[0],this.previousPosition=0,this.options.iOSNativeScrolling&&null!=this.el.style.WebkitOverflowScrolling?this.nativeScrolling():this.generate(),this.createEvents(),this.addEvents(),this.reset()}return c.prototype.preventScrolling=function(e,t){if(this.isActive)if(e.type===o)(t===a&&e.originalEvent.detail>0||t===b&&e.originalEvent.detail<0)&&e.preventDefault();else if(e.type===f){if(!e.originalEvent||!e.originalEvent.wheelDelta)return;(t===a&&e.originalEvent.wheelDelta<0||t===b&&e.originalEvent.wheelDelta>0)&&e.preventDefault()}},c.prototype.nativeScrolling=function(){this.$content.css({WebkitOverflowScrolling:"touch"}),this.iOSNativeScrolling=!0,this.isActive=!0},c.prototype.updateScrollValues=function(){var e,t;e=this.content,this.maxScrollTop=e.scrollHeight-e.clientHeight,this.prevScrollTop=this.contentScrollTop||0,this.contentScrollTop=e.scrollTop,t=this.contentScrollTop>this.previousPosition?"down":this.contentScrollTop<this.previousPosition?"up":"same",this.previousPosition=this.contentScrollTop,"same"!==t&&this.$el.trigger("update",{position:this.contentScrollTop,maximum:this.maxScrollTop,direction:t}),this.iOSNativeScrolling||(this.maxSliderTop=this.paneHeight-this.sliderHeight,this.sliderTop=0===this.maxScrollTop?0:this.contentScrollTop*this.maxSliderTop/this.maxScrollTop)},c.prototype.setOnScrollStyles=function(){var e;k?(e={},e[T]="translate(0, "+this.sliderTop+"px)"):e={top:this.sliderTop},x?this.scrollRAF||(this.scrollRAF=x(function(t){return function(){t.scrollRAF=null,t.slider.css(e)}}(this))):this.slider.css(e)},c.prototype.createEvents=function(){this.events={down:function(e){return function(t){return e.isBeingDragged=!0,e.offsetY=t.pageY-e.slider.offset().top,e.pane.addClass("active"),e.doc.bind(p,e.events[s]).bind(d,e.events[b]),!1}}(this),drag:function(e){return function(t){return e.sliderY=t.pageY-e.$el.offset().top-e.offsetY,e.scroll(),e.contentScrollTop>=e.maxScrollTop&&e.prevScrollTop!==e.maxScrollTop?e.$el.trigger("scrollend"):0===e.contentScrollTop&&0!==e.prevScrollTop&&e.$el.trigger("scrolltop"),!1}}(this),up:function(e){return function(){return e.isBeingDragged=!1,e.pane.removeClass("active"),e.doc.unbind(p,e.events[s]).unbind(d,e.events[b]),!1}}(this),resize:function(e){return function(){e.reset()}}(this),panedown:function(e){return function(t){return e.sliderY=(t.offsetY||t.originalEvent.layerY)-.5*e.sliderHeight,e.scroll(),e.events.down(t),!1}}(this),scroll:function(e){return function(t){e.updateScrollValues(),e.isBeingDragged||(e.iOSNativeScrolling||(e.sliderY=e.sliderTop,e.setOnScrollStyles()),null!=t&&(e.contentScrollTop>=e.maxScrollTop?(e.options.preventPageScrolling&&e.preventScrolling(t,a),e.prevScrollTop!==e.maxScrollTop&&e.$el.trigger("scrollend")):0===e.contentScrollTop&&(e.options.preventPageScrolling&&e.preventScrolling(t,b),0!==e.prevScrollTop&&e.$el.trigger("scrolltop"))))}}(this),wheel:function(e){return function(t){var n;if(null!=t)return n=t.delta||t.wheelDelta||t.originalEvent&&t.originalEvent.wheelDelta||-t.detail||t.originalEvent&&-t.originalEvent.detail,n&&(e.sliderY+=-n/3),e.scroll(),!1}}(this)}},c.prototype.addEvents=function(){var e;this.removeEvents(),e=this.events,this.options.disableResize||this.win.bind(m,e[m]),this.iOSNativeScrolling||(this.slider.bind(u,e[a]),this.pane.bind(u,e[g]).bind(""+f+" "+o,e[w])),this.$content.bind(""+y+" "+f+" "+o+" "+_,e[y])},c.prototype.removeEvents=function(){var e;e=this.events,this.win.unbind(m,e[m]),this.iOSNativeScrolling||(this.slider.unbind(),this.pane.unbind()),this.$content.unbind(""+y+" "+f+" "+o+" "+_,e[y])},c.prototype.generate=function(){var e,n,i,o,a,s,c;return o=this.options,s=o.paneClass,c=o.sliderClass,e=o.contentClass,(a=this.$el.children("."+s)).length||a.children("."+c).length||this.$el.append('<div class="'+s+'"><div class="'+c+'" /></div>'),this.pane=this.$el.children("."+s),this.slider=this.pane.find("."+c),0===r&&M()?(i=t.getComputedStyle(this.content,null).getPropertyValue("padding-right").replace(/\D+/g,""),n={right:-14,paddingRight:+i+14}):r&&(n={right:-r},this.$el.addClass("has-scrollbar")),null!=n&&this.$content.css(n),this},c.prototype.restore=function(){this.stopped=!1,this.iOSNativeScrolling||this.pane.show(),this.addEvents()},c.prototype.reset=function(){var e,t,n,o,a,s,c,l,u,p,d,f;return this.iOSNativeScrolling?void(this.contentHeight=this.content.scrollHeight):(this.$el.find("."+this.options.paneClass).length||this.generate().stop(),this.stopped&&this.restore(),e=this.content,o=e.style,a=o.overflowY,i&&this.$content.css({height:this.$content.height()}),t=e.scrollHeight+r,p=parseInt(this.$el.css("max-height"),10),p>0&&(this.$el.height(""),this.$el.height(e.scrollHeight>p?p:e.scrollHeight)),c=this.pane.outerHeight(!1),u=parseInt(this.pane.css("top"),10),s=parseInt(this.pane.css("bottom"),10),l=c+u+s,f=Math.round(l/t*l),f<this.options.sliderMinHeight?f=this.options.sliderMinHeight:null!=this.options.sliderMaxHeight&&f>this.options.sliderMaxHeight&&(f=this.options.sliderMaxHeight),a===y&&o.overflowX!==y&&(f+=r),this.maxSliderTop=l-f,this.contentHeight=t,this.paneHeight=c,this.paneOuterHeight=l,this.sliderHeight=f,this.slider.height(f),this.events.scroll(),this.pane.show(),this.isActive=!0,e.scrollHeight===e.clientHeight||this.pane.outerHeight(!0)>=e.scrollHeight&&a!==y?(this.pane.hide(),this.isActive=!1):this.el.clientHeight===e.scrollHeight&&a===y?this.slider.hide():this.slider.show(),this.pane.css({opacity:this.options.alwaysVisible?1:"",visibility:this.options.alwaysVisible?"visible":""}),n=this.$content.css("position"),("static"===n||"relative"===n)&&(d=parseInt(this.$content.css("right"),10),d&&this.$content.css({right:"",marginRight:d})),this)},c.prototype.scroll=function(){return this.isActive?(this.sliderY=Math.max(0,this.sliderY),this.sliderY=Math.min(this.maxSliderTop,this.sliderY),this.$content.scrollTop((this.paneHeight-this.contentHeight+r)*this.sliderY/this.maxSliderTop*-1),this.iOSNativeScrolling||(this.updateScrollValues(),this.setOnScrollStyles()),this):void 0},c.prototype.scrollBottom=function(e){return this.isActive?(this.$content.scrollTop(this.contentHeight-this.$content.height()-e).trigger(f),this.stop().restore(),this):void 0},c.prototype.scrollTop=function(e){return this.isActive?(this.$content.scrollTop(+e).trigger(f),this.stop().restore(),this):void 0},c.prototype.scrollTo=function(e){return this.isActive?(this.scrollTop(this.$el.find(e).get(0).offsetTop),this):void 0},c.prototype.stop=function(){return $&&this.scrollRAF&&($(this.scrollRAF),this.scrollRAF=null),this.stopped=!0,this.removeEvents(),this.iOSNativeScrolling||this.pane.hide(),this},c.prototype.destroy=function(){return this.stopped||this.stop(),!this.iOSNativeScrolling&&this.pane.length&&this.pane.remove(),i&&this.$content.height(""),this.$content.removeAttr("tabindex"),this.$el.hasClass("has-scrollbar")&&(this.$el.removeClass("has-scrollbar"),this.$content.css({right:""})),this},c.prototype.flash=function(){return!this.iOSNativeScrolling&&this.isActive?(this.reset(),this.pane.addClass("flashed"),setTimeout(function(e){return function(){e.pane.removeClass("flashed")}}(this),this.options.flashDelay),this):void 0},c}(),e.fn.nanoScroller=function(t){return this.each(function(){var n,i;if((i=this.nanoscroller)||(n=e.extend({},S,t),this.nanoscroller=i=new h(this,n)),t&&"object"==typeof t){if(e.extend(i.options,t),null!=t.scrollBottom)return i.scrollBottom(t.scrollBottom);if(null!=t.scrollTop)return i.scrollTop(t.scrollTop);if(t.scrollTo)return i.scrollTo(t.scrollTo);if("bottom"===t.scroll)return i.scrollBottom(0);if("top"===t.scroll)return i.scrollTop(0);if(t.scroll&&t.scroll instanceof e)return i.scrollTo(t.scroll);if(t.stop)return i.stop();if(t.destroy)return i.destroy();if(t.flash)return i.flash()}return i.reset()})},e.fn.nanoScroller.Constructor=h}(jQuery,window,document),function(e,t,n){var i=1,r=3,o=["p","div","pre","form"],a=27,s=9;e.emojiarea={path:"",spritesheetPath:"",spritesheetDimens:[],iconSize:20,icons:{},defaults:{button:null,buttonLabel:"Emojis",buttonPosition:"after"}},e.fn.emojiarea=function(t){return t=e.extend({},e.emojiarea.defaults,t),this.each(function(){var i=e(this);"contentEditable"in n.body&&t.wysiwyg!==!1?new p(i,t):new u(i,t)})};var c={};c.restoreSelection=function(){return t.getSelection?function(e){var n=t.getSelection();n.removeAllRanges();for(var i=0,r=e.length;r>i;++i)n.addRange(e[i])}:n.selection&&n.selection.createRange?function(e){e&&e.select()}:void 0}(),c.saveSelection=function(){return t.getSelection?function(){var e=t.getSelection(),n=[];if(e.rangeCount)for(var i=0,r=e.rangeCount;r>i;++i)n.push(e.getRangeAt(i));return n}:n.selection&&n.selection.createRange?function(){var e=n.selection;return"none"!==e.type.toLowerCase()?e.createRange():null}:void 0}(),c.replaceSelection=function(){return t.getSelection?function(e){var i,r=t.getSelection(),o="string"==typeof e?n.createTextNode(e):e;r.getRangeAt&&r.rangeCount&&(i=r.getRangeAt(0),i.deleteContents(),i.insertNode(n.createTextNode(" ")),i.insertNode(o),i.setStart(o,0),t.setTimeout(function(){i=n.createRange(),i.setStartAfter(o),i.collapse(!0),r.removeAllRanges(),r.addRange(i)},0))}:n.selection&&n.selection.createRange?function(e){var t=n.selection.createRange();"string"==typeof e?t.text=e:t.pasteHTML(e.outerHTML)}:void 0}(),c.insertAtCursor=function(e,t){e=" "+e;var i,r,o,a=t.value;"undefined"!=typeof t.selectionStart&&"undefined"!=typeof t.selectionEnd?(r=t.selectionStart,i=t.selectionEnd,t.value=a.substring(0,r)+e+a.substring(t.selectionEnd),t.selectionStart=t.selectionEnd=r+e.length):"undefined"!=typeof n.selection&&"undefined"!=typeof n.selection.createRange&&(t.focus(),o=n.selection.createRange(),o.text=e,o.select())},c.extend=function(e,t){if("undefined"!=typeof e&&e||(e={}),"object"==typeof t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e},c.escapeRegex=function(e){return(e+"").replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")},c.htmlEntities=function(e){return String(e).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")},c.emojiInserted=function(e,t){try{var n=localStorage.getItem("emojis_recent")}catch(i){return!1}var r=n&&n.split(",")||[],o=r.indexOf(e);return o?(-1!=o&&r.splice(o,1),r.unshift(e),r.length>42&&(r=r.slice(42)),localStorage.setItem("emojis_recent",r.join(",")),void(t&&t.updateRecentTab(r))):!1};var l=function(){};l.prototype.setup=function(){var e=this;this.$editor.on("focus",function(){e.hasFocus=!0}),this.$editor.on("blur",function(){e.hasFocus=!1}),this.setupButton()},l.prototype.setupButton=function(){var t,n=this;this.options.button?t=e(this.options.button):this.options.button!==!1?(t=e('<a href="javascript:void(0)">'),t.html(this.options.buttonLabel),t.addClass("emoji-button"),t.attr({title:this.options.buttonLabel}),this.$editor[this.options.buttonPosition](t)):t=e(""),t.on("click",function(e){d.show(n),e.stopPropagation()}),this.$button=t},l.createIcon=function(t){var n=t[0],i=t[1],r=t[2],o=t[3],a=e.emojiarea.spritesheetPath,s=-(e.emojiarea.iconSize*r),l=-(e.emojiarea.iconSize*i),u=e.emojiarea.spritesheetDimens[n][1]*e.emojiarea.iconSize,p=e.emojiarea.spritesheetDimens[n][0]*e.emojiarea.iconSize,d="display:inline-block;";return d+="width:"+e.emojiarea.iconSize+"px;",d+="height:"+e.emojiarea.iconSize+"px;",d+="background:url('"+a.replace("!",n)+"') "+s+"px "+l+"px no-repeat;",d+="background-size:"+u+"px "+p+"px;",'<img src="img/blank.gif" class="img" style="'+d+'" alt="'+c.htmlEntities(o)+'">'};var u=function(e,t){this.options=t,this.$textarea=e,this.$editor=e,this.setup()};u.prototype.insert=function(t){e.emojiarea.icons.hasOwnProperty(t)&&(c.insertAtCursor(t,this.$textarea[0]),c.emojiInserted(t,this.menu),this.$textarea.trigger("change"))},u.prototype.val=function(){return this.$textarea.val()},c.extend(u.prototype,l.prototype);var p=function(t,i){var r=this;this.options=i||{},this.$textarea=t,this.$editor=e("<div>").addClass("emoji-wysiwyg-editor"),this.$editor.text(t.val()),this.$editor.attr({contenteditable:"true"});var o="blur change";this.options.norealTime||(o+=" keyup"),this.$editor.on(o,function(e){return r.onChange.apply(r,[e])}),this.$editor.on("paste",function(e){return r.onPaste.apply(r,[e])}),this.$editor.on("mousedown focus",function(){n.execCommand("enableObjectResizing",!1,!1)}),this.$editor.on("blur",function(){n.execCommand("enableObjectResizing",!0,!0)});var a=this.$editor.text(),s=e.emojiarea.icons;for(var u in s)s.hasOwnProperty(u)&&(a=a.replace(new RegExp(c.escapeRegex(u),"g"),l.createIcon(s[u])));this.$editor.html(a),t.hide().after(this.$editor),this.setup(),e(n.body).on("mousedown",function(){r.hasFocus&&(r.selection=c.saveSelection())})};p.prototype.onPaste=function(e){var t,i=(e.originalEvent||e).clipboardData,r=i&&i.items||[];for(t=0;t<r.length;t++)if("file"==r[t].kind)return e.preventDefault(),!0;var o=(e.originalEvent||e).clipboardData.getData("text/plain"),a=this;return setTimeout(function(){a.onChange()},0),o.length?(n.execCommand("insertText",!1,o),cancelEvent(e)):!0},p.prototype.onChange=function(){this.$textarea.val(this.val()).trigger("change")},p.prototype.insert=function(t){var n=e(l.createIcon(e.emojiarea.icons[t]));n[0].attachEvent&&n[0].attachEvent("onresizestart",function(e){e.returnValue=!1},!1),this.$editor.trigger("focus"),this.selection&&c.restoreSelection(this.selection);try{c.replaceSelection(n[0])}catch(i){}var r=this;setTimeout(function(){r.selection=c.saveSelection()},100),c.emojiInserted(t,this.menu),this.onChange()},p.prototype.val=function(){for(var e=[],t=[],n=function(){e.push(t.join("")),t=[]},a=function(e){if(e.nodeType===r)t.push(e.nodeValue);else if(e.nodeType===i){var s=e.tagName.toLowerCase(),c=-1!==o.indexOf(s);if(c&&t.length&&n(),"img"===s){var l=e.getAttribute("alt")||"";return void(l&&t.push(l))}"br"===s&&n();for(var u=e.childNodes,p=0;p<u.length;p++)a(u[p]);c&&t.length&&n()}},s=this.$editor[0].childNodes,c=0;c<s.length;c++)a(s[c]);return t.length&&n(),e.join("\n")},c.extend(p.prototype,l.prototype);var d=function(){var i=this,r=e(n.body),o=e(t);this.visible=!1,this.emojiarea=null,this.$menu=e("<div>"),this.$menu.addClass("emoji-menu"),this.$menu.hide(),this.hasRecent=!0,this.$itemsTailWrap=e('<div class="emoji-items-wrap1"></div>').appendTo(this.$menu),this.$categoryTabs=e('<table class="emoji-menu-tabs"><tr><td><a class="emoji-menu-tab icon-recent" ></a></td><td><a class="emoji-menu-tab icon-smile" ></a></td><td><a class="emoji-menu-tab icon-flower"></a></td><td><a class="emoji-menu-tab icon-bell"></a></td><td><a class="emoji-menu-tab icon-car"></a></td><td><a class="emoji-menu-tab icon-grid"></a></td></tr></table>').appendTo(this.$itemsTailWrap),this.$itemsWrap=e('<div class="emoji-items-wrap nano"></div>').appendTo(this.$itemsTailWrap),this.$items=e('<div class="emoji-items nano-content">').appendTo(this.$itemsWrap),e('<div class="emoji-menu-tail">').appendTo(this.$menu),r.append(this.$menu),this.$itemsWrap.nanoScroller({preventPageScrolling:!0,tabIndex:-1}),r.on("keydown",function(e){(e.keyCode===a||e.keyCode===s)&&i.hide()}),r.on("message_send",function(){i.hide()}),r.on("mouseup",function(e){e=e.originalEvent||e;for(var n=e.originalTarget||e.target||t;n&&n!=t;)if(n=n.parentNode,n==i.$menu[0]||i.emojiarea&&n==i.emojiarea.$button[0])return;i.hide()}),o.on("resize",function(){i.visible&&i.reposition()}),this.$menu.on("mouseup","a",function(e){return e.stopPropagation(),!1}),this.$menu.on("click","a",function(n){if(e(this).hasClass("emoji-menu-tab"))return i.getTabIndex(this)!==i.currentCategory&&i.selectCategory(i.getTabIndex(this)),!1;var r=e(".label",e(this)).text();return t.setTimeout(function(){i.onItemSelected(r),(n.ctrlKey||n.metaKey)&&i.hide()},0),n.stopPropagation(),!1}),this.selectCategory(0),this.updateRecentTab()};d.prototype.getTabIndex=function(e){return this.$categoryTabs.find(".emoji-menu-tab").index(e)},d.prototype.selectCategory=function(e){this.$categoryTabs.find(".emoji-menu-tab").each(function(t){t===e?this.className+="-selected":this.className=this.className.replace("-selected","")}),this.currentCategory=e,this.load(e),this.$itemsWrap.nanoScroller({scroll:"top"})},d.prototype.onItemSelected=function(e){this.emojiarea.insert(e)},d.prototype.load=function(t){var n=[],i=e.emojiarea.icons,r=e.emojiarea.path;if(r.length&&"/"!==r.charAt(r.length-1)&&(r+="/"),t>0)for(var o in i)i.hasOwnProperty(o)&&i[o][0]===t-1&&n.push('<a href="javascript:void(0)" title="'+c.htmlEntities(o)+'">'+l.createIcon(i[o])+'<span class="label">'+c.htmlEntities(o)+"</span></a>");else try{var o,a,s=(localStorage.getItem("emojis_recent")||"").split(",");for(a=0;a<s.length;a++)o=s[a],i[o]&&n.push('<a href="javascript:void(0)" title="'+c.htmlEntities(o)+'">'+l.createIcon(i[o])+'<span class="label">'+c.htmlEntities(o)+"</span></a>")}catch(u){}this.$items.html(n.join(""));var p=this;setTimeout(function(){p.$itemsWrap.nanoScroller()},100)},d.prototype.updateRecentTab=function(e){if(void 0===e)try{var t=localStorage.getItem("emojis_recent");e=t&&t.split(",")||[]}catch(n){e=[]}if(this.hasRecent!=e.length>1){var i=this.$categoryTabs.find(".emoji-menu-tab").eq(0);this.hasRecent?(i.hide(),this.currentCategory||this.selectCategory(1)):i.show(),this.hasRecent=!this.hasRecent}},d.prototype.reposition=function(){var e=this.emojiarea.$button,t=e.offset();t.top+=e.outerHeight(),t.left+=Math.round(e.outerWidth()/2),this.$menu.css({top:t.top,left:t.left})},d.prototype.hide=function(){this.emojiarea&&(this.emojiarea.menu=null,this.emojiarea.$button.removeClass("on"),this.emojiarea=null),this.visible=!1,this.$menu.hide()},d.prototype.show=function(e){return this.emojiarea&&this.emojiarea===e?this.hide():(e.$button.addClass("on"),this.emojiarea=e,this.emojiarea.menu=this,this.reposition(),this.$menu.show(),this.currentCategory||this.load(0),void(this.visible=!0))},d.show=function(){var e=null;return function(t){e=e||new d,e.show(t)}}()}(jQuery,window,document),function(e,t,n){"use strict";function i(e){return function(){var t,n,i=arguments[0],r="["+(e?e+":":"")+i+"] ",o=arguments[1],a=arguments,s=function(e){return"function"==typeof e?e.toString().replace(/ \{[\s\S]*$/,""):"undefined"==typeof e?"undefined":"string"!=typeof e?JSON.stringify(e):e};for(t=r+o.replace(/\{\d+\}/g,function(e){var t,n=+e.slice(1,-1);return n+2<a.length?(t=a[n+2],"function"==typeof t?t.toString().replace(/ ?\{[\s\S]*$/,""):"undefined"==typeof t?"undefined":"string"!=typeof t?V(t):t):e}),t=t+"\nhttp://errors.angularjs.org/1.3.0-beta.8/"+(e?e+"/":"")+i,n=2;n<arguments.length;n++)t=t+(2==n?"?":"&")+"p"+(n-2)+"="+encodeURIComponent(s(arguments[n]));return new Error(t)}}function r(e){if(null==e||M(e))return!1;var t=e.length;return 1===e.nodeType&&t?!0:b(e)||S(e)||0===t||"number"==typeof t&&t>0&&t-1 in e}function o(e,t,n){var i;if(e)if(C(e))for(i in e)"prototype"==i||"length"==i||"name"==i||e.hasOwnProperty&&!e.hasOwnProperty(i)||t.call(n,e[i],i);else if(e.forEach&&e.forEach!==o)e.forEach(t,n);else if(r(e))for(i=0;i<e.length;i++)t.call(n,e[i],i);else for(i in e)e.hasOwnProperty(i)&&t.call(n,e[i],i);return e}function a(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t.sort()}function s(e,t,n){for(var i=a(e),r=0;r<i.length;r++)t.call(n,e[i[r]],i[r]);return i}function c(e){return function(t,n){e(n,t)}}function l(){for(var e,t=Fi.length;t;){if(t--,e=Fi[t].charCodeAt(0),57==e)return Fi[t]="A",Fi.join("");if(90!=e)return Fi[t]=String.fromCharCode(e+1),Fi.join("");Fi[t]="0"}return Fi.unshift("0"),Fi.join("")}function u(e,t){t?e.$$hashKey=t:delete e.$$hashKey}function p(e){var t=e.$$hashKey;return o(arguments,function(t){t!==e&&o(t,function(t,n){e[n]=t})}),u(e,t),e}function d(e){return parseInt(e,10)}function f(e,t){return p(new(p(function(){},{prototype:e})),t)}function h(){}function g(e){return e}function m(e){return function(){return e}}function y(e){return"undefined"==typeof e}function v(e){return"undefined"!=typeof e}function _(e){return null!=e&&"object"==typeof e}function b(e){return"string"==typeof e}function w(e){return"number"==typeof e}function $(e){return"[object Date]"===Ni.call(e)}function S(e){return"[object Array]"===Ni.call(e)}function C(e){return"function"==typeof e}function k(e){return"[object RegExp]"===Ni.call(e)}function M(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function x(e){return e&&e.$evalAsync&&e.$watch}function T(e){return"[object File]"===Ni.call(e)}function E(e){return"[object Blob]"===Ni.call(e)}function A(e){return!(!e||!(e.nodeName||e.prop&&e.attr&&e.find))}function D(e){var t,n={},i=e.split(",");for(t=0;t<i.length;t++)n[i[t]]=!0;return n}function I(e,t,n){var i=[];return o(e,function(e,r,o){i.push(t.call(n,e,r,o))}),i}function P(e,t){return-1!=N(e,t)}function N(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0;n<e.length;n++)if(t===e[n])return n;return-1}function L(e,t){var n=N(e,t);return n>=0&&e.splice(n,1),t}function B(e,t){if(M(e)||x(e))throw Li("cpws","Can't copy! Making copies of Window or Scope instances is not supported.");if(t){if(e===t)throw Li("cpi","Can't copy! Source and destination are identical.");if(S(e)){t.length=0;for(var n=0;n<e.length;n++)t.push(B(e[n]))}else{var i=t.$$hashKey;o(t,function(e,n){delete t[n]});for(var r in e)t[r]=B(e[r]);u(t,i)}}else t=e,e&&(S(e)?t=B(e,[]):$(e)?t=new Date(e.getTime()):k(e)?t=new RegExp(e.source):_(e)&&(t=B(e,{})));return t}function F(e,t){t=t||{};for(var n in e)!e.hasOwnProperty(n)||"$"===n.charAt(0)&&"$"===n.charAt(1)||(t[n]=e[n]);return t}function O(e,t){if(e===t)return!0;if(null===e||null===t)return!1;if(e!==e&&t!==t)return!0;var i,r,o,a=typeof e,s=typeof t;if(a==s&&"object"==a){if(!S(e)){if($(e))return $(t)&&e.getTime()==t.getTime();if(k(e)&&k(t))return e.toString()==t.toString();if(x(e)||x(t)||M(e)||M(t)||S(t))return!1;o={};for(r in e)if("$"!==r.charAt(0)&&!C(e[r])){if(!O(e[r],t[r]))return!1;o[r]=!0}for(r in t)if(!o.hasOwnProperty(r)&&"$"!==r.charAt(0)&&t[r]!==n&&!C(t[r]))return!1;return!0}if(!S(t))return!1;if((i=e.length)==t.length){for(r=0;i>r;r++)if(!O(e[r],t[r]))return!1;return!0}}return!1}function U(){return t.securityPolicy&&t.securityPolicy.isActive||t.querySelector&&!(!t.querySelector("[ng-csp]")&&!t.querySelector("[data-ng-csp]"))}function R(e,t,n){return e.concat(Ii.call(t,n))}function q(e,t){return Ii.call(e,t||0)}function j(e,t){var n=arguments.length>2?q(arguments,2):[];return!C(t)||t instanceof RegExp?t:n.length?function(){return arguments.length?t.apply(e,n.concat(Ii.call(arguments,0))):t.apply(e,n)}:function(){return arguments.length?t.apply(e,arguments):t.call(e)}}function H(e,i){var r=i;return"string"==typeof e&&"$"===e.charAt(0)?r=n:M(i)?r="$WINDOW":i&&t===i?r="$DOCUMENT":x(i)&&(r="$SCOPE"),r}function V(e,t){return"undefined"==typeof e?n:JSON.stringify(e,H,t?" ":null)}function z(e){return b(e)?JSON.parse(e):e}function W(e){if("function"==typeof e)e=!0;else if(e&&0!==e.length){var t=$i(""+e);e=!("f"==t||"0"==t||"false"==t||"no"==t||"n"==t||"[]"==t)}else e=!1;return e}function G(e){e=Ti(e).clone();try{e.empty()}catch(t){}var n=3,i=Ti("<div>").append(e).html();try{return e[0].nodeType===n?$i(i):i.match(/^(<[^>]+>)/)[1].replace(/^<([\w\-]+)/,function(e,t){return"<"+$i(t)})}catch(t){return $i(i)}}function K(e){try{return decodeURIComponent(e)}catch(t){}}function X(e){var t,n,i={};return o((e||"").split("&"),function(e){if(e&&(t=e.split("="),n=K(t[0]),v(n))){var r=v(t[1])?K(t[1]):!0;i[n]?S(i[n])?i[n].push(r):i[n]=[i[n],r]:i[n]=r}}),i}function Z(e){var t=[];return o(e,function(e,n){S(e)?o(e,function(e){t.push(Q(n,!0)+(e===!0?"":"="+Q(e,!0)))}):t.push(Q(n,!0)+(e===!0?"":"="+Q(e,!0)))}),t.length?t.join("&"):""}function Y(e){return Q(e,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function Q(e,t){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,t?"%20":"+")}function J(e,t){var n,i,r=Ui.length;for(e=Ti(e),i=0;r>i;++i)if(n=Ui[i]+t,b(n=e.attr(n)))return n;return null}function et(e,n){function i(e){e&&s.push(e)}var r,a,s=[e],c={},l=["ng:app","ng-app","x-ng-app","data-ng-app"],u=/\sng[:\-]app(:\s*([\w\d_]+);?)?\s/;o(l,function(n){l[n]=!0,i(t.getElementById(n)),n=n.replace(":","\\:"),e.querySelectorAll&&(o(e.querySelectorAll("."+n),i),o(e.querySelectorAll("."+n+"\\:"),i),o(e.querySelectorAll("["+n+"]"),i))}),o(s,function(e){if(!r){var t=" "+e.className+" ",n=u.exec(t);n?(r=e,a=(n[2]||"").replace(/\s+/g,",")):o(e.attributes,function(t){!r&&l[t.name]&&(r=e,a=t.value)})}}),r&&(c.strictDi=null!==J(r,"strict-di"),n(r,a?[a]:[],c))}function tt(n,i,r){_(r)||(r={});var a={strictDi:!1};r=p(a,r);var s=function(){if(n=Ti(n),n.injector()){var e=n[0]===t?"document":G(n);throw Li("btstrpd","App Already Bootstrapped with this Element '{0}'",e)}i=i||[],i.unshift(["$provide",function(e){e.value("$rootElement",n)}]),i.unshift("ng");var o=Ft(i,r.strictDi);return o.invoke(["$rootScope","$rootElement","$compile","$injector","$animate",function(e,t,n,i){e.$apply(function(){t.data("$injector",i),n(t)(e)})}]),o},c=/^NG_DEFER_BOOTSTRAP!/;return e&&!c.test(e.name)?s():(e.name=e.name.replace(c,""),void(Bi.resumeBootstrap=function(e){o(e,function(e){i.push(e)}),s()}))}function nt(e,t){return t=t||"_",e.replace(Ri,function(e,n){return(n?t:"")+e.toLowerCase()})}function it(){Ei=e.jQuery,Ei?(Ti=Ei,p(Ei.fn,{scope:tr.scope,isolateScope:tr.isolateScope,controller:tr.controller,injector:tr.injector,inheritedData:tr.inheritedData}),ft("remove",!0,!0,!1),ft("empty",!1,!1,!1),ft("html",!1,!1,!0)):Ti=yt,Bi.element=Ti}function rt(e,t,n){if(!e)throw Li("areq","Argument '{0}' is {1}",t||"?",n||"required");return e}function ot(e,t,n){return n&&S(e)&&(e=e[e.length-1]),rt(C(e),t,"not a function, got "+(e&&"object"==typeof e?e.constructor.name||"Object":typeof e)),e}function at(e,t){if("hasOwnProperty"===e)throw Li("badname","hasOwnProperty is not a valid {0} name",t)}function st(e,t,n){if(!t)return e;for(var i,r=t.split("."),o=e,a=r.length,s=0;a>s;s++)i=r[s],e&&(e=(o=e)[i]);return!n&&C(e)?j(o,e):e}function ct(e){var t=e[0],n=e[e.length-1];if(t===n)return Ti(t);var i=t,r=[i];do{if(i=i.nextSibling,!i)break;r.push(i)}while(i!==n);return Ti(r)}function lt(e){function t(e,t,n){return e[t]||(e[t]=n())}var n=i("$injector"),r=i("ng"),o=t(e,"angular",Object);return o.$$minErr=o.$$minErr||i,t(o,"module",function(){var e={};return function(i,o,a){var s=function(e,t){if("hasOwnProperty"===e)throw r("badname","hasOwnProperty is not a valid {0} name",t)};return s(i,"module"),o&&e.hasOwnProperty(i)&&(e[i]=null),t(e,i,function(){function e(e,n,i,r){return r||(r=t),function(){return r[i||"push"]([e,n,arguments]),l}}if(!o)throw n("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.",i);var t=[],r=[],s=[],c=e("$injector","invoke","push",r),l={_invokeQueue:t,_configBlocks:r,_runBlocks:s,requires:o,name:i,provider:e("$provide","provider"),factory:e("$provide","factory"),service:e("$provide","service"),value:e("$provide","value"),constant:e("$provide","constant","unshift"),animation:e("$animateProvider","register"),filter:e("$filterProvider","register"),controller:e("$controllerProvider","register"),directive:e("$compileProvider","directive"),config:c,run:function(e){return s.push(e),this}};return a&&c(a),l})}})}function ut(t){p(t,{bootstrap:tt,copy:B,extend:p,equals:O,element:Ti,forEach:o,injector:Ft,noop:h,bind:j,toJson:V,fromJson:z,identity:g,isUndefined:y,isDefined:v,isString:b,isFunction:C,isObject:_,isNumber:w,isElement:A,isArray:S,version:qi,isDate:$,lowercase:$i,uppercase:Ci,callbacks:{counter:0},$$minErr:i,$$csp:U}),Ai=lt(e);try{Ai("ngLocale")}catch(n){Ai("ngLocale",[]).provider("$locale",sn)}Ai("ng",["ngLocale"],["$provide",function(e){e.provider({$$sanitizeUri:Nn}),e.provider("$compile",Vt).directive({a:Lr,input:Yr,textarea:Yr,form:Ur,script:No,select:Fo,style:Uo,option:Oo,ngBind:uo,ngBindHtml:fo,ngBindTemplate:po,ngClass:ho,ngClassEven:mo,ngClassOdd:go,ngCloak:yo,ngController:vo,ngForm:Rr,ngHide:To,ngIf:bo,ngInclude:wo,ngInit:So,ngNonBindable:Co,ngPluralize:ko,ngRepeat:Mo,ngShow:xo,ngStyle:Eo,ngSwitch:Ao,ngSwitchWhen:Do,ngSwitchDefault:Io,ngOptions:Bo,ngTransclude:Po,ngModel:io,ngList:ao,ngChange:ro,required:oo,ngRequired:oo,ngValue:co,ngModelOptions:lo}).directive({ngInclude:$o}).directive(Br).directive(_o),e.provider({$anchorScroll:Ot,$animate:ur,$browser:qt,$cacheFactory:jt,$controller:Gt,$document:Kt,$exceptionHandler:Xt,$filter:zn,$interpolate:on,$interval:an,$http:en,$httpBackend:nn,$location:bn,$log:wn,$parse:En,$rootScope:Pn,$q:An,$sce:Un,$sceDelegate:On,$sniffer:Rn,$templateCache:Ht,$timeout:qn,$window:Vn,$$rAF:In,$$asyncCallback:Ut})}])}function pt(){return++Vi}function dt(e){return e.replace(Gi,function(e,t,n,i){return i?n.toUpperCase():n}).replace(Ki,"Moz$1")}function ft(e,t,n,i){function r(e){var r,a,s,c,l,u,p,d=n&&e?[this.filter(e)]:[this],f=t;if(!i||null!=e)for(;d.length;)for(r=d.shift(),a=0,s=r.length;s>a;a++)for(c=Ti(r[a]),f?c.triggerHandler("$destroy"):f=!f,l=0,u=(p=c.children()).length;u>l;l++)d.push(Ei(p[l]));return o.apply(this,arguments)}var o=Ei.fn[e];o=o.$original||o,r.$original=o,Ei.fn[e]=r}function ht(e){return!Yi.test(e)}function gt(e,t){var n,i,r,a,s=t.createDocumentFragment(),c=[];if(ht(e))c.push(t.createTextNode(e));else{for(n=n||s.appendChild(t.createElement("div")),i=(Qi.exec(e)||["",""])[1].toLowerCase(),r=er[i]||er._default,n.innerHTML=r[1]+e.replace(Ji,"<$1></$2>")+r[2],a=r[0];a--;)n=n.lastChild;
c=R(c,n.childNodes),n=s.firstChild,n.textContent=""}return s.textContent="",s.innerHTML="",o(c,function(e){s.appendChild(e)}),s}function mt(e,n){n=n||t;var i;return(i=Zi.exec(e))?[n.createElement(i[1])]:(i=gt(e,n))?i.childNodes:[]}function yt(e){if(e instanceof yt)return e;if(b(e)&&(e=Oi(e)),!(this instanceof yt)){if(b(e)&&"<"!=e.charAt(0))throw Xi("nosel","Looking up elements via selectors is not supported by jqLite! See: http://docs.angularjs.org/api/angular.element");return new yt(e)}b(e)?xt(this,mt(e)):xt(this,e)}function vt(e){return e.cloneNode(!0)}function _t(e){wt(e);for(var t=0,n=e.childNodes||[];t<n.length;t++)_t(n[t])}function bt(e,t,n,i){if(v(i))throw Xi("offargs","jqLite#off() does not support the `selector` argument");var r=$t(e,"events"),a=$t(e,"handle");a&&(y(t)?o(r,function(t,n){Wi(e,n,t),delete r[n]}):o(t.split(" "),function(t){y(n)?(Wi(e,t,r[t]),delete r[t]):L(r[t]||[],n)}))}function wt(e,t){var i=e[Hi],r=ji[i];if(r){if(t)return void delete ji[i].data[t];r.handle&&(r.events.$destroy&&r.handle({},"$destroy"),bt(e)),delete ji[i],e[Hi]=n}}function $t(e,t,n){var i=e[Hi],r=ji[i||-1];return v(n)?(r||(e[Hi]=i=pt(),r=ji[i]={}),void(r[t]=n)):r&&r[t]}function St(e,t,n){var i=$t(e,"data"),r=v(n),o=!r&&v(t),a=o&&!_(t);if(i||a||$t(e,"data",i={}),r)i[t]=n;else{if(!o)return i;if(a)return i&&i[t];p(i,t)}}function Ct(e,t){return e.getAttribute?(" "+(e.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").indexOf(" "+t+" ")>-1:!1}function kt(e,t){t&&e.setAttribute&&o(t.split(" "),function(t){e.setAttribute("class",Oi((" "+(e.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").replace(" "+Oi(t)+" "," ")))})}function Mt(e,t){if(t&&e.setAttribute){var n=(" "+(e.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ");o(t.split(" "),function(e){e=Oi(e),-1===n.indexOf(" "+e+" ")&&(n+=e+" ")}),e.setAttribute("class",Oi(n))}}function xt(e,t){if(t){t=t.nodeName||!v(t.length)||M(t)?[t]:t;for(var n=0;n<t.length;n++)e.push(t[n])}}function Tt(e,t){return Et(e,"$"+(t||"ngController")+"Controller")}function Et(e,t,i){e=Ti(e),9==e[0].nodeType&&(e=e.find("html"));for(var r=S(t)?t:[t];e.length;){for(var o=e[0],a=0,s=r.length;s>a;a++)if((i=e.data(r[a]))!==n)return i;e=Ti(o.parentNode||11===o.nodeType&&o.host)}}function At(e){for(var t=0,n=e.childNodes;t<n.length;t++)_t(n[t]);for(;e.firstChild;)e.removeChild(e.firstChild)}function Dt(e,t){var n=nr[t.toLowerCase()];return n&&ir[e.nodeName]&&n}function It(e,n){var i=function(i,r){if(i.preventDefault||(i.preventDefault=function(){i.returnValue=!1}),i.stopPropagation||(i.stopPropagation=function(){i.cancelBubble=!0}),i.target||(i.target=i.srcElement||t),y(i.defaultPrevented)){var a=i.preventDefault;i.preventDefault=function(){i.defaultPrevented=!0,a.call(i)},i.defaultPrevented=!1}i.isDefaultPrevented=function(){return i.defaultPrevented||i.returnValue===!1};var s=F(n[r||i.type]||[]);o(s,function(t){t.call(e,i)}),8>=xi?(i.preventDefault=null,i.stopPropagation=null,i.isDefaultPrevented=null):(delete i.preventDefault,delete i.stopPropagation,delete i.isDefaultPrevented)};return i.elem=e,i}function Pt(e){var t,i=typeof e;return"object"==i&&null!==e?"function"==typeof(t=e.$$hashKey)?t=e.$$hashKey():t===n&&(t=e.$$hashKey=l()):t=e,i+":"+t}function Nt(e){o(e,this.put,this)}function Lt(e){var t=e.toString().replace(sr,""),n=t.match(rr);return n?"function("+(n[1]||"").replace(/[\s\r\n]+/," ")+")":"fn"}function Bt(e,t,n){var i,r,a,s;if("function"==typeof e){if(!(i=e.$inject)){if(i=[],e.length){if(t)throw b(n)&&n||(n=e.name||Lt(e)),cr("strictdi","{0} is not using explicit annotation and cannot be invoked in strict mode",n);r=e.toString().replace(sr,""),a=r.match(rr),o(a[1].split(or),function(e){e.replace(ar,function(e,t,n){i.push(n)})})}e.$inject=i}}else S(e)?(s=e.length-1,ot(e[s],"fn"),i=e.slice(0,s)):ot(e,"fn",!0);return i}function Ft(e,t){function i(e){return function(t,n){return _(t)?void o(t,c(e)):e(t,n)}}function r(e,t){if(at(e,"service"),(C(t)||S(t))&&(t=k.instantiate(t)),!t.$get)throw cr("pget","Provider '{0}' must define $get factory method.",e);return $[e+y]=t}function a(e,t){return r(e,{$get:t})}function s(e,t){return a(e,["$injector",function(e){return e.instantiate(t)}])}function l(e,t){return a(e,m(t))}function u(e,t){at(e,"constant"),$[e]=t,M[e]=t}function p(e,t){var n=k.get(e+y),i=n.$get;n.$get=function(){var e=x.invoke(i,n);return x.invoke(t,null,{$delegate:e})}}function d(e){var t,n=[];return o(e,function(e){function i(e){var t,n;for(t=0,n=e.length;n>t;t++){var i=e[t],r=k.get(i[0]);r[i[1]].apply(r,i[2])}}if(!w.get(e)){w.put(e,!0);try{b(e)?(t=Ai(e),n=n.concat(d(t.requires)).concat(t._runBlocks),i(t._invokeQueue),i(t._configBlocks)):C(e)?n.push(k.invoke(e)):S(e)?n.push(k.invoke(e)):ot(e,"module")}catch(r){throw S(e)&&(e=e[e.length-1]),r.message&&r.stack&&-1==r.stack.indexOf(r.message)&&(r=r.message+"\n"+r.stack),cr("modulerr","Failed to instantiate module {0} due to:\n{1}",e,r.stack||r.message||r)}}}),n}function f(e,n){function i(t){if(e.hasOwnProperty(t)){if(e[t]===g)throw cr("cdep","Circular dependency found: {0}",v.join(" <- "));return e[t]}try{return v.unshift(t),e[t]=g,e[t]=n(t)}catch(i){throw e[t]===g&&delete e[t],i}finally{v.shift()}}function r(e,n,r,o){"string"==typeof r&&(o=r,r=null);var a,s,c,l=[],u=Bt(e,t,o);for(s=0,a=u.length;a>s;s++){if(c=u[s],"string"!=typeof c)throw cr("itkn","Incorrect injection token! Expected service name as string, got {0}",c);l.push(r&&r.hasOwnProperty(c)?r[c]:i(c))}return e.$inject||(e=e[a]),e.apply(n,l)}function o(e,t,n){var i,o,a=function(){};return a.prototype=(S(e)?e[e.length-1]:e).prototype,i=new a,o=r(e,i,t,n),_(o)||C(o)?o:i}return{invoke:r,instantiate:o,get:i,annotate:Bt,has:function(t){return $.hasOwnProperty(t+y)||e.hasOwnProperty(t)}}}t=t===!0;var g={},y="Provider",v=[],w=new Nt,$={$provide:{provider:i(r),factory:i(a),service:i(s),value:i(l),constant:i(u),decorator:p}},k=$.$injector=f($,function(){throw cr("unpr","Unknown provider: {0}",v.join(" <- "))},t),M={},x=M.$injector=f(M,function(e){var t=k.get(e+y);return x.invoke(t.$get,t,n,e)},t);return o(d(e),function(e){x.invoke(e||h)}),x}function Ot(){var e=!0;this.disableAutoScrolling=function(){e=!1},this.$get=["$window","$location","$rootScope",function(t,n,i){function r(e){var t=null;return o(e,function(e){t||"a"!==$i(e.nodeName)||(t=e)}),t}function a(){var e,i=n.hash();i?(e=s.getElementById(i))?e.scrollIntoView():(e=r(s.getElementsByName(i)))?e.scrollIntoView():"top"===i&&t.scrollTo(0,0):t.scrollTo(0,0)}var s=t.document;return e&&i.$watch(function(){return n.hash()},function(){i.$evalAsync(a)}),a}]}function Ut(){this.$get=["$$rAF","$timeout",function(e,t){return e.supported?function(t){return e(t)}:function(e){return t(e,0,!1)}}]}function Rt(e,t,i,r){function a(e){try{e.apply(null,q(arguments,1))}finally{if(v--,0===v)for(;_.length;)try{_.pop()()}catch(t){i.error(t)}}}function s(e,t){!function n(){o($,function(e){e()}),w=t(n,e)}()}function c(){k=null,S!=l.url()&&(S=l.url(),o(M,function(e){e(l.url())}))}var l=this,u=t[0],p=e.location,d=e.history,f=e.setTimeout,g=e.clearTimeout,m={};l.isMock=!1;var v=0,_=[];l.$$completeOutstandingRequest=a,l.$$incOutstandingRequestCount=function(){v++},l.notifyWhenNoOutstandingRequests=function(e){o($,function(e){e()}),0===v?e():_.push(e)};var w,$=[];l.addPollFn=function(e){return y(w)&&s(100,f),$.push(e),e};var S=p.href,C=t.find("base"),k=null;l.url=function(t,n){if(p!==e.location&&(p=e.location),d!==e.history&&(d=e.history),t){if(S==t)return;return S=t,r.history?n?d.replaceState(null,"",t):(d.pushState(null,"",t),C.attr("href",C.attr("href"))):(k=t,n?p.replace(t):p.href=t),l}return k||p.href.replace(/%27/g,"'")};var M=[],x=!1;l.onUrlChange=function(t){return x||(r.history&&Ti(e).on("popstate",c),r.hashchange?Ti(e).on("hashchange",c):l.addPollFn(c),x=!0),M.push(t),t},l.baseHref=function(){var e=C.attr("href");return e?e.replace(/^(https?\:)?\/\/[^\/]*/,""):""};var T={},E="",A=l.baseHref();l.cookies=function(e,t){var r,o,a,s,c;if(!e){if(u.cookie!==E)for(E=u.cookie,o=E.split("; "),T={},s=0;s<o.length;s++)a=o[s],c=a.indexOf("="),c>0&&(e=unescape(a.substring(0,c)),T[e]===n&&(T[e]=unescape(a.substring(c+1))));return T}t===n?u.cookie=escape(e)+"=;path="+A+";expires=Thu, 01 Jan 1970 00:00:00 GMT":b(t)&&(r=(u.cookie=escape(e)+"="+escape(t)+";path="+A).length+1,r>4096&&i.warn("Cookie '"+e+"' possibly not set or overflowed because it was too large ("+r+" > 4096 bytes)!"))},l.defer=function(e,t){var n;return v++,n=f(function(){delete m[n],a(e)},t||0),m[n]=!0,n},l.defer.cancel=function(e){return m[e]?(delete m[e],g(e),a(h),!0):!1}}function qt(){this.$get=["$window","$log","$sniffer","$document",function(e,t,n,i){return new Rt(e,i,t,n)}]}function jt(){this.$get=function(){function e(e,n){function r(e){e!=d&&(f?f==e&&(f=e.n):f=e,o(e.n,e.p),o(e,d),d=e,d.n=null)}function o(e,t){e!=t&&(e&&(e.p=t),t&&(t.n=e))}if(e in t)throw i("$cacheFactory")("iid","CacheId '{0}' is already taken!",e);var a=0,s=p({},n,{id:e}),c={},l=n&&n.capacity||Number.MAX_VALUE,u={},d=null,f=null;return t[e]={put:function(e,t){if(l<Number.MAX_VALUE){var n=u[e]||(u[e]={key:e});r(n)}if(!y(t))return e in c||a++,c[e]=t,a>l&&this.remove(f.key),t},get:function(e){if(l<Number.MAX_VALUE){var t=u[e];if(!t)return;r(t)}return c[e]},remove:function(e){if(l<Number.MAX_VALUE){var t=u[e];if(!t)return;t==d&&(d=t.p),t==f&&(f=t.n),o(t.n,t.p),delete u[e]}delete c[e],a--},removeAll:function(){c={},a=0,u={},d=f=null},destroy:function(){c=null,s=null,u=null,delete t[e]},info:function(){return p({},s,{size:a})}}}var t={};return e.info=function(){var e={};return o(t,function(t,n){e[n]=t.info()}),e},e.get=function(e){return t[e]},e}}function Ht(){this.$get=["$cacheFactory",function(e){return e("templates")}]}function Vt(e,i){var r={},a="Directive",s=/^\s*directive\:\s*([\d\w\-_]+)\s+(.*)$/,l=/(([\d\w\-_]+)(?:\:([^;]+))?;?)/,u=D("ngSrc,ngSrcset,src,srcset"),d=/^(on[a-z]+|formaction)$/;this.directive=function h(t,n){return at(t,"directive"),b(t)?(rt(n,"directiveFactory"),r.hasOwnProperty(t)||(r[t]=[],e.factory(t+a,["$injector","$exceptionHandler",function(e,n){var i=[];return o(r[t],function(r,o){try{var a=e.invoke(r);C(a)?a={compile:m(a)}:!a.compile&&a.link&&(a.compile=m(a.link)),a.priority=a.priority||0,a.index=o,a.name=a.name||t,a.require=a.require||a.controller&&a.name,a.restrict=a.restrict||"A",i.push(a)}catch(s){n(s)}}),i}])),r[t].push(n)):o(t,c(h)),this},this.aHrefSanitizationWhitelist=function(e){return v(e)?(i.aHrefSanitizationWhitelist(e),this):i.aHrefSanitizationWhitelist()},this.imgSrcSanitizationWhitelist=function(e){return v(e)?(i.imgSrcSanitizationWhitelist(e),this):i.imgSrcSanitizationWhitelist()},this.$get=["$injector","$interpolate","$exceptionHandler","$http","$templateCache","$parse","$controller","$rootScope","$document","$sce","$animate","$$sanitizeUri",function(e,i,c,h,y,v,w,$,k,M,x,T){function E(e,t,n,i,r){e instanceof Ti||(e=Ti(e)),o(e,function(t,n){3==t.nodeType&&t.nodeValue.match(/\S+/)&&(e[n]=t=Ti(t).wrap("<span></span>").parent()[0])});var a=D(e,t,e,n,i,r);return A(e,"ng-scope"),function(t,n,i){rt(t,"scope");var r=n?tr.clone.call(e):e;o(i,function(e,t){r.data("$"+t+"Controller",e)});for(var s=0,c=r.length;c>s;s++){var l=r[s],u=l.nodeType;(1===u||9===u)&&r.eq(s).data("$scope",t)}return n&&n(r,t),a&&a(t,r,r),r}}function A(e,t){try{e.addClass(t)}catch(n){}}function D(e,t,i,r,o,a){function s(e,i,r,o){var a,s,c,l,u,p,d,f,g,m=i.length,y=new Array(m);for(d=0;m>d;d++)y[d]=i[d];for(d=0,g=0,f=h.length;f>d;g++)c=y[g],a=h[d++],s=h[d++],l=Ti(c),a?(a.scope?(u=e.$new(),l.data("$scope",u)):u=e,p=a.transclude,p||!o&&t?a(s,u,c,r,I(e,p||t)):a(s,u,c,r,o)):s&&s(e,c.childNodes,n,o)}for(var c,l,u,p,d,f,h=[],g=0;g<e.length;g++)c=new tt,l=P(e[g],[],c,0===g?r:n,o),u=l.length?U(l,e[g],c,t,i,null,[],[],a):null,u&&u.scope&&A(Ti(e[g]),"ng-scope"),d=u&&u.terminal||!(p=e[g].childNodes)||!p.length?null:D(p,u?u.transclude:t),h.push(u,d),f=f||u||d,a=null;return f?s:null}function I(e,t){return function(n,i,r){var o=!1;n||(n=e.$new(),n.$$transcluded=!0,o=!0);var a=t(n,i,r);return o&&a.on("$destroy",j(n,n.$destroy)),a}}function P(e,t,n,i,r){var o,a,c=e.nodeType,u=n.$attr;switch(c){case 1:H(t,zt(Di(e).toLowerCase()),"E",i,r);for(var p,d,f,h,g,m=e.attributes,y=0,v=m&&m.length;v>y;y++){var _=!1,w=!1;if(p=m[y],!xi||xi>=8||p.specified){d=p.name,h=zt(d),st.test(h)&&(d=nt(h.substr(6),"-"));var $=h.replace(/(Start|End)$/,"");h===$+"Start"&&(_=d,w=d.substr(0,d.length-5)+"end",d=d.substr(0,d.length-6)),f=zt(d.toLowerCase()),u[f]=d,n[f]=g=Oi(p.value),Dt(e,f)&&(n[f]=!0),Q(e,t,g,f),H(t,f,"A",i,r,_,w)}}if(a=e.className,b(a)&&""!==a)for(;o=l.exec(a);)f=zt(o[2]),H(t,f,"C",i,r)&&(n[f]=Oi(o[3])),a=a.substr(o.index+o[0].length);break;case 3:X(t,e.nodeValue);break;case 8:try{o=s.exec(e.nodeValue),o&&(f=zt(o[1]),H(t,f,"M",i,r)&&(n[f]=Oi(o[2])))}catch(S){}}return t.sort(W),t}function N(e,t,n){var i=[],r=0;if(t&&e.hasAttribute&&e.hasAttribute(t)){do{if(!e)throw pr("uterdir","Unterminated attribute, found '{0}' but no matching '{1}' found.",t,n);1==e.nodeType&&(e.hasAttribute(t)&&r++,e.hasAttribute(n)&&r--),i.push(e),e=e.nextSibling}while(r>0)}else i.push(e);return Ti(i)}function B(e,t,n){return function(i,r,o,a,s){return r=N(r[0],t,n),e(i,r,o,a,s)}}function U(e,r,a,s,l,u,p,d,f){function h(e,t,n,i){e&&(n&&(e=B(e,n,i)),e.require=$.require,e.directiveName=k,(L===$||$.$$isolateScope)&&(e=et(e,{isolateScope:!0})),p.push(e)),t&&(n&&(t=B(t,n,i)),t.require=$.require,t.directiveName=k,(L===$||$.$$isolateScope)&&(t=et(t,{isolateScope:!0})),d.push(t))}function g(e,t,n,i){var r,a="data",s=!1;if(b(t)){for(;"^"==(r=t.charAt(0))||"?"==r;)t=t.substr(1),"^"==r&&(a="inheritedData"),s=s||"?"==r;if(r=null,i&&"data"===a&&(r=i[t]),r=r||n[a]("$"+t+"Controller"),!r&&!s)throw pr("ctreq","Controller '{0}', required by directive '{1}', can't be found!",t,e);return r}return S(t)&&(r=[],o(t,function(t){r.push(g(e,t,n,i))})),r}function m(e,t,s,l,u){function f(e,t){var i;return arguments.length<2&&(t=e,e=n),W&&(i=k),u(e,t,i)}var h,m,y,_,b,$,S,C,k={};if(h=r===s?a:F(a,new tt(Ti(s),a.$attr)),m=h.$$element,L){var M=/^\s*([@=&])(\??)\s*(\w*)\s*$/,x=Ti(s);S=t.$new(!0),!U||U!==L&&U!==L.$$originalDirective?x.data("$isolateScopeNoTemplate",S):x.data("$isolateScope",S),A(x,"ng-isolate-scope"),o(L.scope,function(e,n){var r,o,a,s,c=e.match(M)||[],l=c[3]||n,u="?"==c[2],p=c[1];switch(S.$$isolateBindings[n]=p+l,p){case"@":h.$observe(l,function(e){S[n]=e}),h.$$observers[l].$$scope=t,h[l]&&(S[n]=i(h[l])(t));break;case"=":if(u&&!h[l])return;o=v(h[l]),s=o.literal?O:function(e,t){return e===t},a=o.assign||function(){throw r=S[n]=o(t),pr("nonassign","Expression '{0}' used with directive '{1}' is non-assignable!",h[l],L.name)},r=S[n]=o(t),S.$watch(function(){var e=o(t);return s(e,S[n])||(s(e,r)?a(t,e=S[n]):S[n]=e),r=e},null,o.literal);break;case"&":o=v(h[l]),S[n]=function(e){return o(t,e)};break;default:throw pr("iscp","Invalid isolate scope definition for directive '{0}'. Definition: {... {1}: '{2}' ...}",L.name,n,e)}})}for(C=u&&f,I&&o(I,function(e){var n,i={$scope:e===L||e.$$isolateScope?S:t,$element:m,$attrs:h,$transclude:C};$=e.controller,"@"==$&&($=h[e.name]),n=w($,i),k[e.name]=n,W||m.data("$"+e.name+"Controller",n),e.controllerAs&&(i.$scope[e.controllerAs]=n)}),y=0,_=p.length;_>y;y++)try{b=p[y],b(b.isolateScope?S:t,m,h,b.require&&g(b.directiveName,b.require,m,k),C)}catch(T){c(T,G(m))}var E=t;for(L&&(L.template||null===L.templateUrl)&&(E=S),e&&e(E,s.childNodes,n,u),y=d.length-1;y>=0;y--)try{b=d[y],b(b.isolateScope?S:t,m,h,b.require&&g(b.directiveName,b.require,m,k),C)}catch(T){c(T,G(m))}}f=f||{};for(var y,$,k,M,x,T,D=-Number.MAX_VALUE,I=f.controllerDirectives,L=f.newIsolateScopeDirective,U=f.templateDirective,j=f.nonTlbTranscludeDirective,H=!1,W=f.hasElementTranscludeDirective,X=a.$$element=Ti(r),Y=u,Q=s,nt=0,it=e.length;it>nt;nt++){$=e[nt];var rt=$.$$start,ot=$.$$end;if(rt&&(X=N(r,rt,ot)),M=n,D>$.priority)break;if((T=$.scope)&&(y=y||$,$.templateUrl||(K("new/isolated scope",L,$,X),_(T)&&(L=$))),k=$.name,!$.templateUrl&&$.controller&&(T=$.controller,I=I||{},K("'"+k+"' controller",I[k],$,X),I[k]=$),(T=$.transclude)&&(H=!0,$.$$tlb||(K("transclusion",j,$,X),j=$),"element"==T?(W=!0,D=$.priority,M=N(r,rt,ot),X=a.$$element=Ti(t.createComment(" "+k+": "+a[k]+" ")),r=X[0],J(l,Ti(q(M)),r),Q=E(M,s,D,Y&&Y.name,{nonTlbTranscludeDirective:j})):(M=Ti(vt(r)).contents(),X.empty(),Q=E(M,s))),$.template)if(K("template",U,$,X),U=$,T=C($.template)?$.template(X,a):$.template,T=at(T),$.replace){if(Y=$,M=ht(T)?[]:Ti(Z($.type,Oi(T))),r=M[0],1!=M.length||1!==r.nodeType)throw pr("tplrt","Template for directive '{0}' must have exactly one root element. {1}",k,"");J(l,X,r);var st={$attr:{}},ct=P(r,[],st),lt=e.splice(nt+1,e.length-(nt+1));L&&R(ct),e=e.concat(ct).concat(lt),V(a,st),it=e.length}else X.html(T);if($.templateUrl)K("template",U,$,X),U=$,$.replace&&(Y=$),m=z(e.splice(nt,e.length-nt),X,a,l,Q,p,d,{controllerDirectives:I,newIsolateScopeDirective:L,templateDirective:U,nonTlbTranscludeDirective:j}),it=e.length;else if($.compile)try{x=$.compile(X,a,Q),C(x)?h(null,x,rt,ot):x&&h(x.pre,x.post,rt,ot)}catch(ut){c(ut,G(X))}$.terminal&&(m.terminal=!0,D=Math.max(D,$.priority))}return m.scope=y&&y.scope===!0,m.transclude=H&&Q,f.hasElementTranscludeDirective=W,m}function R(e){for(var t=0,n=e.length;n>t;t++)e[t]=f(e[t],{$$isolateScope:!0})}function H(t,i,o,s,l,u,p){if(i===l)return null;var d=null;if(r.hasOwnProperty(i))for(var h,g=e.get(i+a),m=0,y=g.length;y>m;m++)try{h=g[m],(s===n||s>h.priority)&&-1!=h.restrict.indexOf(o)&&(u&&(h=f(h,{$$start:u,$$end:p})),t.push(h),d=h)}catch(v){c(v)}return d}function V(e,t){var n=t.$attr,i=e.$attr,r=e.$$element;o(e,function(i,r){"$"!=r.charAt(0)&&(t[r]&&(i+=("style"===r?";":" ")+t[r]),e.$set(r,i,!0,n[r]))}),o(t,function(t,o){"class"==o?(A(r,t),e["class"]=(e["class"]?e["class"]+" ":"")+t):"style"==o?(r.attr("style",r.attr("style")+";"+t),e.style=(e.style?e.style+";":"")+t):"$"==o.charAt(0)||e.hasOwnProperty(o)||(e[o]=t,i[o]=n[o])})}function z(e,t,n,i,r,a,s,c){var l,u,d=[],f=t[0],g=e.shift(),m=p({},g,{templateUrl:null,transclude:null,replace:null,$$originalDirective:g}),v=C(g.templateUrl)?g.templateUrl(t,n):g.templateUrl,b=g.type;return t.empty(),h.get(M.getTrustedResourceUrl(v),{cache:y}).success(function(p){var h,y,w,$;if(p=at(p),g.replace){if(w=ht(p)?[]:Ti(Z(b,Oi(p))),h=w[0],1!=w.length||1!==h.nodeType)throw pr("tplrt","Template for directive '{0}' must have exactly one root element. {1}",g.name,v);y={$attr:{}},J(i,t,h);var S=P(h,[],y);_(g.scope)&&R(S),e=S.concat(e),V(n,y)}else h=f,t.html(p);for(e.unshift(m),l=U(e,h,n,r,t,g,a,s,c),o(i,function(e,n){e==h&&(i[n]=t[0])}),u=D(t[0].childNodes,r);d.length;){var C=d.shift(),k=d.shift(),M=d.shift(),x=d.shift(),T=t[0];if(k!==f){var E=k.className;c.hasElementTranscludeDirective&&g.replace||(T=vt(h)),J(M,Ti(k),T),A(Ti(T),E)}$=l.transclude?I(C,l.transclude):x,l(u,C,T,i,$)}d=null}).error(function(e,t,n,i){throw pr("tpload","Failed to load template: {0}",i.url)}),function(e,t,n,i,r){d?(d.push(t),d.push(n),d.push(i),d.push(r)):l(u,t,n,i,r)}}function W(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 K(e,t,n,i){if(t)throw pr("multidir","Multiple directives [{0}, {1}] asking for {2} on: {3}",t.name,n.name,e,G(i))}function X(e,t){var n=i(t,!0);n&&e.push({priority:0,compile:m(function(e,t){var i=t.parent(),r=i.data("$binding")||[];r.push(n),A(i.data("$binding",r),"ng-binding"),e.$watch(n,function(e){t[0].nodeValue=e})})})}function Z(e,n){switch(e=$i(e||"html")){case"svg":case"math":var i=t.createElement("div");return i.innerHTML="<"+e+">"+n+"</"+e+">",i.childNodes[0].childNodes;default:return n}}function Y(e,t){if("srcdoc"==t)return M.HTML;var n=Di(e);return"xlinkHref"==t||"FORM"==n&&"action"==t||"IMG"!=n&&("src"==t||"ngSrc"==t)?M.RESOURCE_URL:void 0}function Q(e,t,n,r){var o=i(n,!0);if(o){if("multiple"===r&&"SELECT"===Di(e))throw pr("selmulti","Binding to the 'multiple' attribute is not supported. Element: {0}",G(e));t.push({priority:100,compile:function(){return{pre:function(t,n,a){var s=a.$$observers||(a.$$observers={});if(d.test(r))throw pr("nodomevents","Interpolations for HTML DOM event attributes are disallowed. Please use the ng- versions (such as ng-click instead of onclick) instead.");o=i(a[r],!0,Y(e,r),u[r]),o&&(a[r]=o(t),(s[r]||(s[r]=[])).$$inter=!0,(a.$$observers&&a.$$observers[r].$$scope||t).$watch(o,function(e,t){"class"===r&&e!=t?a.$updateClass(e,t):a.$set(r,e)}))}}}})}}function J(e,n,i){var r,o,a=n[0],s=n.length,c=a.parentNode;if(e)for(r=0,o=e.length;o>r;r++)if(e[r]==a){e[r++]=i;for(var l=r,u=l+s-1,p=e.length;p>l;l++,u++)p>u?e[l]=e[u]:delete e[l];e.length-=s-1;break}c&&c.replaceChild(i,a);var d=t.createDocumentFragment();d.appendChild(a),i[Ti.expando]=a[Ti.expando];for(var f=1,h=n.length;h>f;f++){var g=n[f];Ti(g).remove(),d.appendChild(g),delete n[f]}n[0]=i,n.length=1}function et(e,t){return p(function(){return e.apply(null,arguments)},e,t)}var tt=function(e,t){this.$$element=e,this.$attr=t||{}};tt.prototype={$normalize:zt,$addClass:function(e){e&&e.length>0&&x.addClass(this.$$element,e)},$removeClass:function(e){e&&e.length>0&&x.removeClass(this.$$element,e)},$updateClass:function(e,t){var n=Wt(e,t),i=Wt(t,e);0===n.length?x.removeClass(this.$$element,i):0===i.length?x.addClass(this.$$element,n):x.setClass(this.$$element,n,i)},$set:function(e,t,i,r){var a,s=Dt(this.$$element[0],e);s&&(this.$$element.prop(e,t),r=s),this[e]=t,r?this.$attr[e]=r:(r=this.$attr[e],r||(this.$attr[e]=r=nt(e,"-"))),a=Di(this.$$element),("A"===a&&"href"===e||"IMG"===a&&"src"===e)&&(this[e]=t=T(t,"src"===e)),i!==!1&&(null===t||t===n?this.$$element.removeAttr(r):this.$$element.attr(r,t));var l=this.$$observers;l&&o(l[e],function(e){try{e(t)}catch(n){c(n)}})},$observe:function(e,t){var n=this,i=n.$$observers||(n.$$observers={}),r=i[e]||(i[e]=[]);return r.push(t),$.$evalAsync(function(){r.$$inter||t(n[e])}),function(){L(r,t)}}};var it=i.startSymbol(),ot=i.endSymbol(),at="{{"==it||"}}"==ot?g:function(e){return e.replace(/\{\{/g,it).replace(/}}/g,ot)},st=/^ngAttr[A-Z]/;return E}]}function zt(e){return dt(e.replace(dr,""))}function Wt(e,t){var n="",i=e.split(/\s+/),r=t.split(/\s+/);e:for(var o=0;o<i.length;o++){for(var a=i[o],s=0;s<r.length;s++)if(a==r[s])continue e;n+=(n.length>0?" ":"")+a}return n}function Gt(){var e={},t=/^(\S+)(\s+as\s+(\w+))?$/;this.register=function(t,n){at(t,"controller"),_(t)?p(e,t):e[t]=n},this.$get=["$injector","$window",function(n,r){return function(o,a){var s,c,l,u;if(b(o)&&(c=o.match(t),l=c[1],u=c[3],o=e.hasOwnProperty(l)?e[l]:st(a.$scope,l,!0)||st(r,l,!0),ot(o,l,!0)),s=n.instantiate(o,a,l),u){if(!a||"object"!=typeof a.$scope)throw i("$controller")("noscp","Cannot export controller '{0}' as '{1}'! No $scope object provided via `locals`.",l||o.name,u);a.$scope[u]=s}return s}}]}function Kt(){this.$get=["$window",function(e){return Ti(e.document)}]}function Xt(){this.$get=["$log",function(e){return function(){e.error.apply(e,arguments)}}]}function Zt(e){var t,n,i,r={};return e?(o(e.split("\n"),function(e){i=e.indexOf(":"),t=$i(Oi(e.substr(0,i))),n=Oi(e.substr(i+1)),t&&(r[t]?r[t]+=", "+n:r[t]=n)}),r):r}function Yt(e){var t=_(e)?e:n;return function(n){return t||(t=Zt(e)),n?t[$i(n)]||null:t}}function Qt(e,t,n){return C(n)?n(e,t):(o(n,function(n){e=n(e,t)}),e)}function Jt(e){return e>=200&&300>e}function en(){var e=/^\s*(\[|\{[^\{])/,t=/[\}\]]\s*$/,i=/^\)\]\}',?\n/,r={"Content-Type":"application/json;charset=utf-8"},a=this.defaults={transformResponse:[function(n){return b(n)&&(n=n.replace(i,""),e.test(n)&&t.test(n)&&(n=z(n))),n}],transformRequest:[function(e){return!_(e)||T(e)||E(e)?e:V(e)}],headers:{common:{Accept:"application/json, text/plain, */*"},post:B(r),put:B(r),patch:B(r)},xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN"},c=this.interceptors=[];this.$get=["$httpBackend","$browser","$cacheFactory","$rootScope","$q","$injector",function(e,t,i,r,l,u){function d(e){function i(e){var t=p({},e,{data:Qt(e.data,e.headers,s.transformResponse)});return Jt(e.status)?t:l.reject(t)}function r(e){function t(e){var t;o(e,function(n,i){C(n)&&(t=n(),null!=t?e[i]=t:delete e[i])})}var n,i,r,s=a.headers,c=p({},e.headers);s=p({},s.common,s[$i(e.method)]),t(s),t(c);e:for(n in s){i=$i(n);for(r in c)if($i(r)===i)continue e;c[n]=s[n]}return c}var s={method:"get",transformRequest:a.transformRequest,transformResponse:a.transformResponse},c=r(e);p(s,e),s.headers=c,s.method=Ci(s.method);var u=Hn(s.url)?t.cookies()[s.xsrfCookieName||a.xsrfCookieName]:n;u&&(c[s.xsrfHeaderName||a.xsrfHeaderName]=u);var d=function(e){c=e.headers;var t=Qt(e.data,Yt(c),e.transformRequest);return y(e.data)&&o(c,function(e,t){"content-type"===$i(t)&&delete c[t]}),y(e.withCredentials)&&!y(a.withCredentials)&&(e.withCredentials=a.withCredentials),g(e,t,c).then(i,i)},f=[d,n],h=l.when(s);for(o($,function(e){(e.request||e.requestError)&&f.unshift(e.request,e.requestError),(e.response||e.responseError)&&f.push(e.response,e.responseError)});f.length;){var m=f.shift(),v=f.shift();h=h.then(m,v)}return h.success=function(e){return h.then(function(t){e(t.data,t.status,t.headers,s)}),h},h.error=function(e){return h.then(null,function(t){e(t.data,t.status,t.headers,s)}),h},h}function f(){o(arguments,function(e){d[e]=function(t,n){return d(p(n||{},{method:e,url:t}))}})}function h(){o(arguments,function(e){d[e]=function(t,n,i){return d(p(i||{},{method:e,url:t,data:n}))}})}function g(t,n,i){function o(e,t,n,i){u&&(Jt(e)?u.put(g,[e,t,Zt(n),i]):u.remove(g)),s(t,e,n,i),r.$$phase||r.$apply()}function s(e,n,i,r){n=Math.max(n,0),(Jt(n)?f.resolve:f.reject)({data:e,status:n,headers:Yt(i),config:t,statusText:r})}function c(){var e=N(d.pendingRequests,t);-1!==e&&d.pendingRequests.splice(e,1)}var u,p,f=l.defer(),h=f.promise,g=m(t.url,t.params);if(d.pendingRequests.push(t),h.then(c,c),(t.cache||a.cache)&&t.cache!==!1&&"GET"==t.method&&(u=_(t.cache)?t.cache:_(a.cache)?a.cache:w),u)if(p=u.get(g),v(p)){if(p.then)return p.then(c,c),p;S(p)?s(p[1],p[0],B(p[2]),p[3]):s(p,200,{},"OK")}else u.put(g,h);return y(p)&&e(t.method,g,n,o,i,t.timeout,t.withCredentials,t.responseType),h}function m(e,t){if(!t)return e;var n=[];return s(t,function(e,t){null===e||y(e)||(S(e)||(e=[e]),o(e,function(e){_(e)&&(e=V(e)),n.push(Q(t)+"="+Q(e))}))}),n.length>0&&(e+=(-1==e.indexOf("?")?"?":"&")+n.join("&")),e}var w=i("$http"),$=[];return o(c,function(e){$.unshift(b(e)?u.get(e):u.invoke(e))}),d.pendingRequests=[],f("get","delete","head","jsonp"),h("post","put"),d.defaults=a,d}]}function tn(t){if(8>=xi&&(!t.match(/^(get|post|head|put|delete|options)$/i)||!e.XMLHttpRequest))return new e.ActiveXObject("Microsoft.XMLHTTP");if(e.XMLHttpRequest)return new e.XMLHttpRequest;throw i("$httpBackend")("noxhr","This browser does not support XMLHttpRequest.")}function nn(){this.$get=["$browser","$window","$document",function(e,t,n){return rn(e,tn,e.defer,t.angular.callbacks,n[0])}]}function rn(e,t,n,i,r){function a(e,t,n){var o=r.createElement("script"),a=null;return o.type="text/javascript",o.src=e,o.async=!0,a=function(e){Wi(o,"load",a),Wi(o,"error",a),r.body.removeChild(o),o=null;var s=-1,c="unknown";e&&("load"!==e.type||i[t].called||(e={type:"error"}),c=e.type,s="error"===e.type?404:200),n&&n(s,c)},zi(o,"load",a),zi(o,"error",a),r.body.appendChild(o),a}var s=-1;return function(r,c,l,u,p,d,f,g){function m(){_=s,w&&w(),$&&$.abort()}function y(t,i,r,o,a){C&&n.cancel(C),w=$=null,0===i&&(i=r?200:"file"==jn(c).protocol?404:0),i=1223===i?204:i,a=a||"",t(i,r,o,a),e.$$completeOutstandingRequest(h)}var _;if(e.$$incOutstandingRequestCount(),c=c||e.url(),"jsonp"==$i(r)){var b="_"+(i.counter++).toString(36);i[b]=function(e){i[b].data=e,i[b].called=!0};var w=a(c.replace("JSON_CALLBACK","angular.callbacks."+b),b,function(e,t){y(u,e,i[b].data,"",t),i[b]=h})}else{var $=t(r);if($.open(r,c,!0),o(p,function(e,t){v(e)&&$.setRequestHeader(t,e)}),$.onreadystatechange=function(){if($&&4==$.readyState){var e=null,t=null;_!==s&&(e=$.getAllResponseHeaders(),t="response"in $?$.response:$.responseText),y(u,_||$.status,t,e,$.statusText||"")}},f&&($.withCredentials=!0),g)try{$.responseType=g}catch(S){if("json"!==g)throw S}$.send(l||null)}if(d>0)var C=n(m,d);else d&&d.then&&d.then(m)}}function on(){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(i,r,o){function a(a,l,u,d){d=!!d;for(var f,h,g,m=0,v=[],_=[],b=[],w=a.length,$=!1,S=!1,C=[],k={values:{},results:{}};w>m;){if(-1==(f=a.indexOf(e,m))||-1==(h=a.indexOf(t,f+s))){m!==w&&(S=!0,v.push(a.substring(m)));break}m!==f&&(S=!0),v.push(a.substring(m,f)),g=a.substring(f+s,h),_.push(g),b.push(i(g)),m=h+c,$=!0}if(v.length===_.length&&v.push(""),u&&$&&(S||_.length>1))throw fr("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",a);if(!l||$){C.length=v.length+_.length;var M=function(e){for(var t=0,n=_.length;n>t;t++)C[2*t]=v[t],C[2*t+1]=e[t];return C[2*n]=v[n],C.join("")},x=function(e){return e=u?o.getTrusted(u,e):o.valueOf(e)},T=function(e){return(y(e)||null===e)&&(e=""),"string"!=typeof e&&(e=V(e)),e};return p(function(e){var t,i=e&&e.$id||"notAScope",o=k.values[i],s=k.results[i],c=0,l=_.length,u=new Array(l),p=s===n?!0:!1;o||(o=[],p=!0,e&&e.$on&&e.$on("$destroy",function(){k.values[i]=null,k.results[i]=null}));try{for(;l>c;c++){if(t=x(b[c](e)),d&&y(t))return;t=T(t),t!==o[c]&&(p=!0),u[c]=t}p&&(k.values[i]=u,k.results[i]=s=M(u))}catch(f){var h=fr("interr","Can't interpolate: {0}\n{1}",a,f.toString());r(h)}return s},{exp:a,separators:v,expressions:_})}}var s=e.length,c=t.length;return a.startSymbol=function(){return e},a.endSymbol=function(){return t},a}]}function an(){this.$get=["$rootScope","$window","$q",function(e,t,n){function i(i,o,a,s){var c=t.setInterval,l=t.clearInterval,u=n.defer(),p=u.promise,d=0,f=v(s)&&!s;return a=v(a)?a:0,p.then(null,null,i),p.$$intervalId=c(function(){u.notify(d++),a>0&&d>=a&&(u.resolve(d),l(p.$$intervalId),delete r[p.$$intervalId]),f||e.$apply()},o),r[p.$$intervalId]=u,p}var r={};return i.cancel=function(e){return e&&e.$$intervalId in r?(r[e.$$intervalId].reject("canceled"),clearInterval(e.$$intervalId),delete r[e.$$intervalId],!0):!1},i}]}function sn(){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"}}}}function cn(e){for(var t=e.split("/"),n=t.length;n--;)t[n]=Y(t[n]);return t.join("/")}function ln(e,t,n){var i=jn(e,n);t.$$protocol=i.protocol,t.$$host=i.hostname,t.$$port=d(i.port)||gr[i.protocol]||null}function un(e,t,n){var i="/"!==e.charAt(0);i&&(e="/"+e);var r=jn(e,n);t.$$path=decodeURIComponent(i&&"/"===r.pathname.charAt(0)?r.pathname.substring(1):r.pathname),t.$$search=X(r.search),t.$$hash=decodeURIComponent(r.hash),t.$$path&&"/"!=t.$$path.charAt(0)&&(t.$$path="/"+t.$$path)}function pn(e,t){return 0===t.indexOf(e)?t.substr(e.length):void 0}function dn(e){var t=e.indexOf("#");return-1==t?e:e.substr(0,t)}function fn(e){return e.substr(0,dn(e).lastIndexOf("/")+1)}function hn(e){return e.substring(0,e.indexOf("/",e.indexOf("//")+2))}function gn(e,t){this.$$html5=!0,t=t||"";var i=fn(e);ln(e,this,e),this.$$parse=function(t){var n=pn(i,t);if(!b(n))throw mr("ipthprfx",'Invalid url "{0}", missing path prefix "{1}".',t,i);
un(n,this,e),this.$$path||(this.$$path="/"),this.$$compose()},this.$$compose=function(){var e=Z(this.$$search),t=this.$$hash?"#"+Y(this.$$hash):"";this.$$url=cn(this.$$path)+(e?"?"+e:"")+t,this.$$absUrl=i+this.$$url.substr(1)},this.$$rewrite=function(r){var o,a;return(o=pn(e,r))!==n?(a=o,(o=pn(t,o))!==n?i+(pn("/",o)||o):e+a):(o=pn(i,r))!==n?i+o:i==r+"/"?i:void 0}}function mn(e,t){var n=fn(e);ln(e,this,e),this.$$parse=function(i){function r(e,t,n){var i,r=/^\/[A-Z]:(\/.*)/;return 0===t.indexOf(n)&&(t=t.replace(n,"")),r.exec(t)?e:(i=r.exec(e),i?i[1]:e)}var o=pn(e,i)||pn(n,i),a="#"==o.charAt(0)?pn(t,o):this.$$html5?o:"";if(!b(a))throw mr("ihshprfx",'Invalid url "{0}", missing hash prefix "{1}".',i,t);un(a,this,e),this.$$path=r(this.$$path,a,e),this.$$compose()},this.$$compose=function(){var n=Z(this.$$search),i=this.$$hash?"#"+Y(this.$$hash):"";this.$$url=cn(this.$$path)+(n?"?"+n:"")+i,this.$$absUrl=e+(this.$$url?t+this.$$url:"")},this.$$rewrite=function(t){return dn(e)==dn(t)?t:void 0}}function yn(e,t){this.$$html5=!0,mn.apply(this,arguments);var n=fn(e);this.$$rewrite=function(i){var r;return e==dn(i)?i:(r=pn(n,i))?e+t+r:n===i+"/"?n:void 0},this.$$compose=function(){var n=Z(this.$$search),i=this.$$hash?"#"+Y(this.$$hash):"";this.$$url=cn(this.$$path)+(n?"?"+n:"")+i,this.$$absUrl=e+t+this.$$url}}function vn(e){return function(){return this[e]}}function _n(e,t){return function(n){return y(n)?this[e]:(this[e]=t(n),this.$$compose(),this)}}function bn(){var t="",n=!1;this.hashPrefix=function(e){return v(e)?(t=e,this):t},this.html5Mode=function(e){return v(e)?(n=e,this):n},this.$get=["$rootScope","$browser","$sniffer","$rootElement",function(i,r,o,a){function s(e){i.$broadcast("$locationChangeSuccess",c.absUrl(),e)}var c,l,u,p=r.baseHref(),d=r.url();n?(u=hn(d)+(p||"/"),l=o.history?gn:yn):(u=dn(d),l=mn),c=new l(u,"#"+t),c.$$parse(c.$$rewrite(d)),a.on("click",function(n){if(!n.ctrlKey&&!n.metaKey&&2!=n.which){for(var o=Ti(n.target);"a"!==$i(o[0].nodeName);)if(o[0]===a[0]||!(o=o.parent())[0])return;var s=o.prop("href");if(_(s)&&"[object SVGAnimatedString]"===s.toString()&&(s=jn(s.animVal).href),l===yn){var p=o.attr("href")||o.attr("xlink:href");if(p.indexOf("://")<0){var d="#"+t;if("/"==p[0])s=u+d+p;else if("#"==p[0])s=u+d+(c.path()||"/")+p;else{for(var f=c.path().split("/"),h=p.split("/"),g=0;g<h.length;g++)"."!=h[g]&&(".."==h[g]?f.pop():h[g].length&&f.push(h[g]));s=u+d+f.join("/")}}}var m=c.$$rewrite(s);s&&!o.attr("target")&&m&&!n.isDefaultPrevented()&&(n.preventDefault(),m!=r.url()&&(c.$$parse(m),i.$apply(),e.angular["ff-684208-preventDefault"]=!0))}}),c.absUrl()!=d&&r.url(c.absUrl(),!0),r.onUrlChange(function(e){c.absUrl()!=e&&(i.$evalAsync(function(){var t=c.absUrl();c.$$parse(e),i.$broadcast("$locationChangeStart",e,t).defaultPrevented?(c.$$parse(t),r.url(t)):s(t)}),i.$$phase||i.$digest())});var f=0;return i.$watch(function(){var e=r.url(),t=c.$$replace;return f&&e==c.absUrl()||(f++,i.$evalAsync(function(){i.$broadcast("$locationChangeStart",c.absUrl(),e).defaultPrevented?c.$$parse(e):(r.url(c.absUrl(),t),s(e))})),c.$$replace=!1,f}),c}]}function wn(){var e=!0,t=this;this.debugEnabled=function(t){return v(t)?(e=t,this):e},this.$get=["$window",function(n){function i(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}function r(e){var t=n.console||{},r=t[e]||t.log||h,a=!1;try{a=!!r.apply}catch(s){}return a?function(){var e=[];return o(arguments,function(t){e.push(i(t))}),r.apply(t,e)}:function(e,t){r(e,null==t?"":t)}}return{log:r("log"),info:r("info"),warn:r("warn"),error:r("error"),debug:function(){var n=r("debug");return function(){e&&n.apply(t,arguments)}}()}}]}function $n(e,t){if("constructor"===e)throw vr("isecfld",'Referencing "constructor" field in Angular expressions is disallowed! Expression: {0}',t);return e}function Sn(e,t){if(e){if(e.constructor===e)throw vr("isecfn","Referencing Function in Angular expressions is disallowed! Expression: {0}",t);if(e.document&&e.location&&e.alert&&e.setInterval)throw vr("isecwindow","Referencing the Window in Angular expressions is disallowed! Expression: {0}",t);if(e.children&&(e.nodeName||e.prop&&e.attr&&e.find))throw vr("isecdom","Referencing DOM nodes in Angular expressions is disallowed! Expression: {0}",t)}return e}function Cn(e,t,i,r,o){o=o||{};for(var a,s=t.split("."),c=0;s.length>1;c++){a=$n(s.shift(),r);var l=e[a];l||(l={},e[a]=l),e=l,e.then&&o.unwrapPromises&&(yr(r),"$$v"in e||!function(e){e.then(function(t){e.$$v=t})}(e),e.$$v===n&&(e.$$v={}),e=e.$$v)}return a=$n(s.shift(),r),e[a]=i,i}function kn(e,t,i,r,o,a,s){return $n(e,a),$n(t,a),$n(i,a),$n(r,a),$n(o,a),s.unwrapPromises?function(s,c){var l,u=c&&c.hasOwnProperty(e)?c:s;return null==u?u:(u=u[e],u&&u.then&&(yr(a),"$$v"in u||(l=u,l.$$v=n,l.then(function(e){l.$$v=e})),u=u.$$v),t?null==u?n:(u=u[t],u&&u.then&&(yr(a),"$$v"in u||(l=u,l.$$v=n,l.then(function(e){l.$$v=e})),u=u.$$v),i?null==u?n:(u=u[i],u&&u.then&&(yr(a),"$$v"in u||(l=u,l.$$v=n,l.then(function(e){l.$$v=e})),u=u.$$v),r?null==u?n:(u=u[r],u&&u.then&&(yr(a),"$$v"in u||(l=u,l.$$v=n,l.then(function(e){l.$$v=e})),u=u.$$v),o?null==u?n:(u=u[o],u&&u.then&&(yr(a),"$$v"in u||(l=u,l.$$v=n,l.then(function(e){l.$$v=e})),u=u.$$v),u):u):u):u):u)}:function(a,s){var c=s&&s.hasOwnProperty(e)?s:a;return null==c?c:(c=c[e],t?null==c?n:(c=c[t],i?null==c?n:(c=c[i],r?null==c?n:(c=c[r],o?null==c?n:c=c[o]:c):c):c):c)}}function Mn(e,t){return $n(e,t),function(t,i){return null==t?n:(i&&i.hasOwnProperty(e)?i:t)[e]}}function xn(e,t,i){return $n(e,i),$n(t,i),function(i,r){return null==i?n:(i=(r&&r.hasOwnProperty(e)?r:i)[e],null==i?n:i[t])}}function Tn(e,t,i){if(Cr.hasOwnProperty(e))return Cr[e];var r,a=e.split("."),s=a.length;if(t.unwrapPromises||1!==s)if(t.unwrapPromises||2!==s)if(t.csp)r=6>s?kn(a[0],a[1],a[2],a[3],a[4],i,t):function(e,r){var o,c=0;do o=kn(a[c++],a[c++],a[c++],a[c++],a[c++],i,t)(e,r),r=n,e=o;while(s>c);return o};else{var c="var p;\n";o(a,function(e,n){$n(e,i),c+="if(s == null) return undefined;\ns="+(n?"s":'((k&&k.hasOwnProperty("'+e+'"))?k:s)')+'["'+e+'"];\n'+(t.unwrapPromises?'if (s && s.then) {\n pw("'+i.replace(/(["\r\n])/g,"\\$1")+'");\n if (!("$$v" in s)) {\n p=s;\n p.$$v = undefined;\n p.then(function(v) {p.$$v=v;});\n}\n s=s.$$v\n}\n':"")}),c+="return s;";var l=new Function("s","k","pw",c);l.toString=m(c),r=t.unwrapPromises?function(e,t){return l(e,t,yr)}:l}else r=xn(a[0],a[1],i);else r=Mn(a[0],i);return"hasOwnProperty"!==e&&(Cr[e]=r),r}function En(){var e={},t={csp:!1,unwrapPromises:!1,logPromiseWarnings:!0};this.unwrapPromises=function(e){return v(e)?(t.unwrapPromises=!!e,this):t.unwrapPromises},this.logPromiseWarnings=function(e){return v(e)?(t.logPromiseWarnings=e,this):t.logPromiseWarnings},this.$get=["$filter","$sniffer","$log",function(n,i,r){return t.csp=i.csp,yr=function(e){t.logPromiseWarnings&&!_r.hasOwnProperty(e)&&(_r[e]=!0,r.warn("[$parse] Promise found in the expression `"+e+"`. Automatic unwrapping of promises in Angular expressions is deprecated."))},function(i){var r;switch(typeof i){case"string":if(e.hasOwnProperty(i))return e[i];var o=new $r(t),a=new Sr(o,n,t);return r=a.parse(i,!1),"hasOwnProperty"!==i&&(e[i]=r),r;case"function":return i;default:return h}}}]}function An(){this.$get=["$rootScope","$exceptionHandler",function(e,t){return Dn(function(t){e.$evalAsync(t)},t)}]}function Dn(e,t){function i(e){return e}function r(e){return l(e)}function a(e){var t=s(),n=0,i=S(e)?[]:{};return o(e,function(e,r){n++,c(e).then(function(e){i.hasOwnProperty(r)||(i[r]=e,--n||t.resolve(i))},function(e){i.hasOwnProperty(r)||t.reject(e)})}),0===n&&t.resolve(i),t.promise}var s=function(){var o,a,l=[];return a={resolve:function(t){if(l){var i=l;l=n,o=c(t),i.length&&e(function(){for(var e,t=0,n=i.length;n>t;t++)e=i[t],o.then(e[0],e[1],e[2])})}},reject:function(e){a.resolve(u(e))},notify:function(t){if(l){var n=l;l.length&&e(function(){for(var e,i=0,r=n.length;r>i;i++)e=n[i],e[2](t)})}},promise:{then:function(e,n,a){var c=s(),u=function(n){try{c.resolve((C(e)?e:i)(n))}catch(r){c.reject(r),t(r)}},p=function(e){try{c.resolve((C(n)?n:r)(e))}catch(i){c.reject(i),t(i)}},d=function(e){try{c.notify((C(a)?a:i)(e))}catch(n){t(n)}};return l?l.push([u,p,d]):o.then(u,p,d),c.promise},"catch":function(e){return this.then(null,e)},"finally":function(e){function t(e,t){var n=s();return t?n.resolve(e):n.reject(e),n.promise}function n(n,r){var o=null;try{o=(e||i)()}catch(a){return t(a,!1)}return o&&C(o.then)?o.then(function(){return t(n,r)},function(e){return t(e,!1)}):t(n,r)}return this.then(function(e){return n(e,!0)},function(e){return n(e,!1)})}}}},c=function(t){return t&&C(t.then)?t:{then:function(n){var i=s();return e(function(){i.resolve(n(t))}),i.promise}}},l=function(e){var t=s();return t.reject(e),t.promise},u=function(n){return{then:function(i,o){var a=s();return e(function(){try{a.resolve((C(o)?o:r)(n))}catch(e){a.reject(e),t(e)}}),a.promise}}},p=function(n,o,a,u){var p,d=s(),f=function(e){try{return(C(o)?o:i)(e)}catch(n){return t(n),l(n)}},h=function(e){try{return(C(a)?a:r)(e)}catch(n){return t(n),l(n)}},g=function(e){try{return(C(u)?u:i)(e)}catch(n){t(n)}};return e(function(){c(n).then(function(e){p||(p=!0,d.resolve(c(e).then(f,h,g)))},function(e){p||(p=!0,d.resolve(h(e)))},function(e){p||d.notify(g(e))})}),d.promise};return{defer:s,reject:l,when:p,all:a}}function In(){this.$get=["$window","$timeout",function(e,t){var n=e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame,i=e.cancelAnimationFrame||e.webkitCancelAnimationFrame||e.mozCancelAnimationFrame||e.webkitCancelRequestAnimationFrame,r=!!n,o=r?function(e){var t=n(e);return function(){i(t)}}:function(e){var n=t(e,16.66,!1);return function(){t.cancel(n)}};return o.supported=r,o}]}function Pn(){var e=10,t=i("$rootScope"),n=null;this.digestTtl=function(t){return arguments.length&&(e=t),e},this.$get=["$injector","$exceptionHandler","$parse","$browser",function(i,a,s,c){function u(){this.$id=l(),this.$$phase=this.$parent=this.$$watchers=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null,this["this"]=this.$root=this,this.$$destroyed=!1,this.$$asyncQueue=[],this.$$postDigestQueue=[],this.$$listeners={},this.$$listenerCount={},this.$$isolateBindings={}}function p(e){if(y.$$phase)throw t("inprog","{0} already in progress",y.$$phase);y.$$phase=e}function d(){y.$$phase=null}function f(e,t){var n=s(e);return ot(n,t),n}function g(e,t,n){do e.$$listenerCount[n]-=t,0===e.$$listenerCount[n]&&delete e.$$listenerCount[n];while(e=e.$parent)}function m(){}u.prototype={constructor:u,$new:function(e){var t;return e?(t=new u,t.$root=this.$root,t.$$asyncQueue=this.$$asyncQueue,t.$$postDigestQueue=this.$$postDigestQueue):(this.$$childScopeClass||(this.$$childScopeClass=function(){this.$$watchers=this.$$nextSibling=this.$$childHead=this.$$childTail=null,this.$$listeners={},this.$$listenerCount={},this.$id=l(),this.$$childScopeClass=null},this.$$childScopeClass.prototype=this),t=new this.$$childScopeClass),t["this"]=t,t.$parent=this,t.$$prevSibling=this.$$childTail,this.$$childHead?(this.$$childTail.$$nextSibling=t,this.$$childTail=t):this.$$childHead=this.$$childTail=t,t},$watch:function(e,t,i){var r=this,o=f(e,"watch"),a=r.$$watchers,s={fn:t,last:m,get:o,exp:e,eq:!!i};if(n=null,!C(t)){var c=f(t||h,"listener");s.fn=function(e,t,n){c(n)}}if("string"==typeof e&&o.constant){var l=s.fn;s.fn=function(e,t,n){l.call(this,e,t,n),L(a,s)}}return a||(a=r.$$watchers=[]),a.unshift(s),function(){L(a,s),n=null}},$watchGroup:function(e,t){var n=new Array(e.length),i=new Array(e.length),r=[],a=0,s=this;return o(e,function(e,t){r.push(s.$watch(e,function(e,r){i[t]=e,n[t]=r,a++}))},this),r.push(s.$watch(function(){return a},function(){t(i,n,s)})),function(){o(r,function(e){e()})}},$watchCollection:function(e,t){function n(){o=d(l);var e,t;if(_(o))if(r(o)){a!==f&&(a=f,m=a.length=0,p++),e=o.length,m!==e&&(p++,a.length=m=e);for(var n=0;e>n;n++){var i=a[n]!==a[n]&&o[n]!==o[n];i||a[n]===o[n]||(p++,a[n]=o[n])}}else{a!==h&&(a=h={},m=0,p++),e=0;for(t in o)o.hasOwnProperty(t)&&(e++,a.hasOwnProperty(t)?a[t]!==o[t]&&(p++,a[t]=o[t]):(m++,a[t]=o[t],p++));if(m>e){p++;for(t in a)a.hasOwnProperty(t)&&!o.hasOwnProperty(t)&&(m--,delete a[t])}}else a!==o&&(a=o,p++);return p}function i(){if(g?(g=!1,t(o,o,l)):t(o,c,l),u)if(_(o))if(r(o)){c=new Array(o.length);for(var e=0;e<o.length;e++)c[e]=o[e]}else{c={};for(var n in o)Si.call(o,n)&&(c[n]=o[n])}else c=o}var o,a,c,l=this,u=t.length>1,p=0,d=s(e),f=[],h={},g=!0,m=0;return this.$watch(n,i)},$digest:function(){var i,r,o,s,c,l,u,f,h,g,y,v=this.$$asyncQueue,_=this.$$postDigestQueue,b=e,w=this,$=[];p("$digest"),n=null;do{for(l=!1,f=w;v.length;){try{y=v.shift(),y.scope.$eval(y.expression)}catch(S){d(),a(S)}n=null}e:do{if(s=f.$$watchers)for(c=s.length;c--;)try{if(i=s[c])if((r=i.get(f))===(o=i.last)||(i.eq?O(r,o):"number"==typeof r&&"number"==typeof o&&isNaN(r)&&isNaN(o))){if(i===n){l=!1;break e}}else l=!0,n=i,i.last=i.eq?B(r):r,i.fn(r,o===m?r:o,f),5>b&&(h=4-b,$[h]||($[h]=[]),g=C(i.exp)?"fn: "+(i.exp.name||i.exp.toString()):i.exp,g+="; newVal: "+V(r)+"; oldVal: "+V(o),$[h].push(g))}catch(S){d(),a(S)}if(!(u=f.$$childHead||f!==w&&f.$$nextSibling))for(;f!==w&&!(u=f.$$nextSibling);)f=f.$parent}while(f=u);if((l||v.length)&&!b--)throw d(),t("infdig","{0} $digest() iterations reached. Aborting!\nWatchers fired in the last 5 iterations: {1}",e,V($))}while(l||v.length);for(d();_.length;)try{_.shift()()}catch(S){a(S)}},$destroy:function(){if(!this.$$destroyed){var e=this.$parent;this.$broadcast("$destroy"),this.$$destroyed=!0,this!==y&&(o(this.$$listenerCount,j(null,g,this)),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.$parent=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=this.$root=null,this.$$listeners={},this.$$watchers=this.$$asyncQueue=this.$$postDigestQueue=[],this.$destroy=this.$digest=this.$apply=h,this.$on=this.$watch=this.$watchGroup=function(){return h})}},$eval:function(e,t){return s(e)(this,t)},$evalAsync:function(e){y.$$phase||y.$$asyncQueue.length||c.defer(function(){y.$$asyncQueue.length&&y.$digest()}),this.$$asyncQueue.push({scope:this,expression:e})},$$postDigest:function(e){this.$$postDigestQueue.push(e)},$apply:function(e){try{return p("$apply"),this.$eval(e)}catch(t){a(t)}finally{d();try{y.$digest()}catch(t){throw a(t),t}}},$on:function(e,t){var n=this.$$listeners[e];n||(this.$$listeners[e]=n=[]),n.push(t);var i=this;do i.$$listenerCount[e]||(i.$$listenerCount[e]=0),i.$$listenerCount[e]++;while(i=i.$parent);var r=this;return function(){n[N(n,t)]=null,g(r,1,e)}},$emit:function(e){var t,n,i,r=[],o=this,s=!1,c={name:e,targetScope:o,stopPropagation:function(){s=!0},preventDefault:function(){c.defaultPrevented=!0},defaultPrevented:!1},l=R([c],arguments,1);do{for(t=o.$$listeners[e]||r,c.currentScope=o,n=0,i=t.length;i>n;n++)if(t[n])try{t[n].apply(null,l)}catch(u){a(u)}else t.splice(n,1),n--,i--;if(s)return c;o=o.$parent}while(o);return c},$broadcast:function(e){for(var t,n,i,r=this,o=r,s=r,c={name:e,targetScope:r,preventDefault:function(){c.defaultPrevented=!0},defaultPrevented:!1},l=R([c],arguments,1);o=s;){for(c.currentScope=o,t=o.$$listeners[e]||[],n=0,i=t.length;i>n;n++)if(t[n])try{t[n].apply(null,l)}catch(u){a(u)}else t.splice(n,1),n--,i--;if(!(s=o.$$listenerCount[e]&&o.$$childHead||o!==r&&o.$$nextSibling))for(;o!==r&&!(s=o.$$nextSibling);)o=o.$parent}return c}};var y=new u;return y}]}function Nn(){var e=/^\s*(https?|ftp|mailto|tel|file):/,t=/^\s*(https?|ftp|file|blob):|data:image\//;this.aHrefSanitizationWhitelist=function(t){return v(t)?(e=t,this):e},this.imgSrcSanitizationWhitelist=function(e){return v(e)?(t=e,this):t},this.$get=function(){return function(n,i){var r,o=i?t:e;return xi&&!(xi>=8)||(r=jn(n).href,""===r||r.match(o))?n:"unsafe:"+r}}}function Ln(e){return e.replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08")}function Bn(e){if("self"===e)return e;if(b(e)){if(e.indexOf("***")>-1)throw kr("iwcard","Illegal sequence *** in string matcher. String: {0}",e);return e=Ln(e).replace("\\*\\*",".*").replace("\\*","[^:/.?&;]*"),new RegExp("^"+e+"$")}if(k(e))return new RegExp("^"+e.source+"$");throw kr("imatcher",'Matchers may only be "self", string patterns or RegExp objects')}function Fn(e){var t=[];return v(e)&&o(e,function(e){t.push(Bn(e))}),t}function On(){this.SCE_CONTEXTS=Mr;var e=["self"],t=[];this.resourceUrlWhitelist=function(t){return arguments.length&&(e=Fn(t)),e},this.resourceUrlBlacklist=function(e){return arguments.length&&(t=Fn(e)),t},this.$get=["$injector",function(i){function r(e,t){return"self"===e?Hn(t):!!e.exec(t.href)}function o(n){var i,o,a=jn(n.toString()),s=!1;for(i=0,o=e.length;o>i;i++)if(r(e[i],a)){s=!0;break}if(s)for(i=0,o=t.length;o>i;i++)if(r(t[i],a)){s=!1;break}return s}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}function s(e,t){var i=d.hasOwnProperty(e)?d[e]:null;if(!i)throw kr("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 kr("itype","Attempted to trust a non-string value in a content requiring a string: Context: {0}",e);return new i(t)}function c(e){return e instanceof p?e.$$unwrapTrustedValue():e}function l(e,t){if(null===t||t===n||""===t)return t;var i=d.hasOwnProperty(e)?d[e]:null;if(i&&t instanceof i)return t.$$unwrapTrustedValue();if(e===Mr.RESOURCE_URL){if(o(t))return t;throw kr("insecurl","Blocked loading resource from url not allowed by $sceDelegate policy. URL: {0}",t.toString())}if(e===Mr.HTML)return u(t);throw kr("unsafe","Attempting to use an unsafe value in a safe context.")}var u=function(){throw kr("unsafe","Attempting to use an unsafe value in a safe context.")};i.has("$sanitize")&&(u=i.get("$sanitize"));var p=a(),d={};return d[Mr.HTML]=a(p),d[Mr.CSS]=a(p),d[Mr.URL]=a(p),d[Mr.JS]=a(p),d[Mr.RESOURCE_URL]=a(d[Mr.URL]),{trustAs:s,getTrusted:l,valueOf:c}}]}function Un(){var e=!0;this.enabled=function(t){return arguments.length&&(e=!!t),e},this.$get=["$parse","$sniffer","$sceDelegate",function(t,n,i){if(e&&n.msie&&n.msieDocumentMode<8)throw kr("iequirks","Strict Contextual Escaping does not support Internet Explorer version < 9 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 r=B(Mr);r.isEnabled=function(){return e},r.trustAs=i.trustAs,r.getTrusted=i.getTrusted,r.valueOf=i.valueOf,e||(r.trustAs=r.getTrusted=function(e,t){return t},r.valueOf=g),r.parseAs=function(e,n){var i=t(n);return i.literal&&i.constant?i:function(t,n){return r.getTrusted(e,i(t,n))}};var a=r.parseAs,s=r.getTrusted,c=r.trustAs;return o(Mr,function(e,t){var n=$i(t);r[dt("parse_as_"+n)]=function(t){return a(e,t)},r[dt("get_trusted_"+n)]=function(t){return s(e,t)},r[dt("trust_as_"+n)]=function(t){return c(e,t)}}),r}]}function Rn(){this.$get=["$window","$document",function(e,t){var n,i,r={},o=d((/android (\d+)/.exec($i((e.navigator||{}).userAgent))||[])[1]),a=/Boxee/i.test((e.navigator||{}).userAgent),s=t[0]||{},c=s.documentMode,l=/^(Moz|webkit|O|ms)(?=[A-Z])/,u=s.body&&s.body.style,p=!1,f=!1;if(u){for(var h in u)if(i=l.exec(h)){n=i[0],n=n.substr(0,1).toUpperCase()+n.substr(1);break}n||(n="WebkitOpacity"in u&&"webkit"),p=!!("transition"in u||n+"Transition"in u),f=!!("animation"in u||n+"Animation"in u),!o||p&&f||(p=b(s.body.style.webkitTransition),f=b(s.body.style.webkitAnimation))}return{history:!(!e.history||!e.history.pushState||4>o||a),hashchange:"onhashchange"in e&&(!c||c>7),hasEvent:function(e){if("input"==e&&9==xi)return!1;if(y(r[e])){var t=s.createElement("div");r[e]="on"+e in t}return r[e]},csp:U(),vendorPrefix:n,transitions:p,animations:f,android:o,msie:xi,msieDocumentMode:c}}]}function qn(){this.$get=["$rootScope","$browser","$q","$exceptionHandler",function(e,t,n,i){function r(r,a,s){var c,l=n.defer(),u=l.promise,p=v(s)&&!s;return c=t.defer(function(){try{l.resolve(r())}catch(t){l.reject(t),i(t)}finally{delete o[u.$$timeoutId]}p||e.$apply()},a),u.$$timeoutId=c,o[c]=l,u}var o={};return r.cancel=function(e){return e&&e.$$timeoutId in o?(o[e.$$timeoutId].reject("canceled"),delete o[e.$$timeoutId],t.defer.cancel(e.$$timeoutId)):!1},r}]}function jn(e){var t=e;return xi&&(xr.setAttribute("href",t),t=xr.href),xr.setAttribute("href",t),{href:xr.href,protocol:xr.protocol?xr.protocol.replace(/:$/,""):"",host:xr.host,search:xr.search?xr.search.replace(/^\?/,""):"",hash:xr.hash?xr.hash.replace(/^#/,""):"",hostname:xr.hostname,port:xr.port,pathname:"/"===xr.pathname.charAt(0)?xr.pathname:"/"+xr.pathname}}function Hn(e){var t=b(e)?jn(e):e;return t.protocol===Tr.protocol&&t.host===Tr.host}function Vn(){this.$get=m(e)}function zn(e){function t(i,r){if(_(i)){var a={};return o(i,function(e,n){a[n]=t(n,e)}),a}return e.factory(i+n,r)}var n="Filter";this.register=t,this.$get=["$injector",function(e){return function(t){return e.get(t+n)}}],t("currency",Gn),t("date",ri),t("filter",Wn),t("json",oi),t("limitTo",ai),t("lowercase",Pr),t("number",Kn),t("orderBy",si),t("uppercase",Nr)}function Wn(){return function(e,t,n){if(!S(e))return e;var i=typeof n,r=[];r.check=function(e){for(var t=0;t<r.length;t++)if(!r[t](e))return!1;return!0},"function"!==i&&(n="boolean"===i&&n?function(e,t){return Bi.equals(e,t)}:function(e,t){if(e&&t&&"object"==typeof e&&"object"==typeof t){for(var i in e)if("$"!==i.charAt(0)&&Si.call(e,i)&&n(e[i],t[i]))return!0;return!1}return t=(""+t).toLowerCase(),(""+e).toLowerCase().indexOf(t)>-1});var o=function(e,t){if("string"==typeof t&&"!"===t.charAt(0))return!o(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 i in e)if("$"!==i.charAt(0)&&o(e[i],t))return!0}return!1;case"array":for(var r=0;r<e.length;r++)if(o(e[r],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){"undefined"!=typeof t[e]&&r.push(function(n){return o("$"==e?n:n&&n[e],t[e])})}(a);break;case"function":r.push(t);break;default:return e}for(var s=[],c=0;c<e.length;c++){var l=e[c];r.check(l)&&s.push(l)}return s}}function Gn(e){var t=e.NUMBER_FORMATS;return function(e,n){return y(n)&&(n=t.CURRENCY_SYM),Xn(e,t.PATTERNS[1],t.GROUP_SEP,t.DECIMAL_SEP,2).replace(/\u00A4/g,n)}}function Kn(e){var t=e.NUMBER_FORMATS;return function(e,n){return Xn(e,t.PATTERNS[0],t.GROUP_SEP,t.DECIMAL_SEP,n)}}function Xn(e,t,n,i,r){if(null==e||!isFinite(e)||_(e))return"";var o=0>e;e=Math.abs(e);var a=e+"",s="",c=[],l=!1;if(-1!==a.indexOf("e")){var u=a.match(/([\d\.]+)e(-?)(\d+)/);u&&"-"==u[2]&&u[3]>r+1?a="0":(s=a,l=!0)}if(l)r>0&&e>-1&&1>e&&(s=e.toFixed(r));else{var p=(a.split(Er)[1]||"").length;y(r)&&(r=Math.min(Math.max(t.minFrac,p),t.maxFrac));var d=Math.pow(10,r);e=Math.round(e*d)/d;var f=(""+e).split(Er),h=f[0];f=f[1]||"";var g,m=0,v=t.lgSize,b=t.gSize;if(h.length>=v+b)for(m=h.length-v,g=0;m>g;g++)(m-g)%b===0&&0!==g&&(s+=n),s+=h.charAt(g);for(g=m;g<h.length;g++)(h.length-g)%v===0&&0!==g&&(s+=n),s+=h.charAt(g);for(;f.length<r;)f+="0";r&&"0"!==r&&(s+=i+f.substr(0,r))}return c.push(o?t.negPre:t.posPre),c.push(s),c.push(o?t.negSuf:t.posSuf),c.join("")}function Zn(e,t,n){var i="";for(0>e&&(i="-",e=-e),e=""+e;e.length<t;)e="0"+e;return n&&(e=e.substr(e.length-t)),i+e}function Yn(e,t,n,i){return n=n||0,function(r){var o=r["get"+e]();return(n>0||o>-n)&&(o+=n),0===o&&-12==n&&(o=12),Zn(o,t,i)}}function Qn(e,t){return function(n,i){var r=n["get"+e](),o=Ci(t?"SHORT"+e:e);return i[o][r]}}function Jn(e){var t=-1*e.getTimezoneOffset(),n=t>=0?"+":"";return n+=Zn(Math[t>0?"floor":"ceil"](t/60),2)+Zn(Math.abs(t%60),2)}function ei(e){var t=new Date(e,0,1).getDay();return new Date(e,0,(4>=t?5:12)-t)}function ti(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate()+(4-e.getDay()))}function ni(e){return function(t){var n=ei(t.getFullYear()),i=ti(t),r=+i-+n,o=1+Math.round(r/6048e5);return Zn(o,e)}}function ii(e,t){return e.getHours()<12?t.AMPMS[0]:t.AMPMS[1]}function ri(e){function t(e){var t;if(t=e.match(n)){var i=new Date(0),r=0,o=0,a=t[8]?i.setUTCFullYear:i.setFullYear,s=t[8]?i.setUTCHours:i.setHours;t[9]&&(r=d(t[9]+t[10]),o=d(t[9]+t[11])),a.call(i,d(t[1]),d(t[2])-1,d(t[3]));var c=d(t[4]||0)-r,l=d(t[5]||0)-o,u=d(t[6]||0),p=Math.round(1e3*parseFloat("0."+(t[7]||0)));return s.call(i,c,l,u,p),i}return e}var n=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;return function(n,i){var r,a,s="",c=[];if(i=i||"mediumDate",i=e.DATETIME_FORMATS[i]||i,b(n)&&(n=Ir.test(n)?d(n):t(n)),w(n)&&(n=new Date(n)),!$(n))return n;for(;i;)a=Dr.exec(i),a?(c=R(c,a,1),i=c.pop()):(c.push(i),i=null);return o(c,function(t){r=Ar[t],s+=r?r(n,e.DATETIME_FORMATS):t.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),s}}function oi(){return function(e){return V(e,!0)}}function ai(){return function(e,t){if(!S(e)&&!b(e))return e;if(t=1/0===Math.abs(Number(t))?Number(t):d(t),b(e))return t?t>=0?e.slice(0,t):e.slice(t,e.length):"";var n,i,r=[];for(t>e.length?t=e.length:t<-e.length&&(t=-e.length),t>0?(n=0,i=t):(n=e.length+t,i=e.length);i>n;n++)r.push(e[n]);return r}}function si(e){return function(t,n,i){function r(e,t){for(var i=0;i<n.length;i++){var r=n[i](e,t);if(0!==r)return r}return 0}function o(e,t){return W(t)?function(t,n){return e(n,t)}:e}function a(e,t){var n=typeof e,i=typeof t;return n==i?("string"==n&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t?0:t>e?-1:1):i>n?-1:1}if(!S(t))return t;if(!n)return t;n=S(n)?n:[n],n=I(n,function(t){var n=!1,i=t||g;if(b(t)&&(("+"==t.charAt(0)||"-"==t.charAt(0))&&(n="-"==t.charAt(0),t=t.substring(1)),i=e(t),i.constant)){var r=i();return o(function(e,t){return a(e[r],t[r])},n)}return o(function(e,t){return a(i(e),i(t))},n)});for(var s=[],c=0;c<t.length;c++)s.push(t[c]);return s.sort(o(r,i))}}function ci(e){return C(e)&&(e={link:e}),e.restrict=e.restrict||"AC",m(e)}function li(e,t,n,i){function r(t,n){n=n?"-"+nt(n,"-"):"",i.removeClass(e,(t?Jr:Qr)+n),i.addClass(e,(t?Qr:Jr)+n)}var a=this,s=e.parent().controller("form")||Fr,c=0,l=a.$error={},u=[];a.$name=t.name||t.ngForm,a.$dirty=!1,a.$pristine=!0,a.$valid=!0,a.$invalid=!1,s.$addControl(a),e.addClass(eo),r(!0),a.$commitViewValue=function(){o(u,function(e){e.$commitViewValue()})},a.$addControl=function(e){at(e.$name,"input"),u.push(e),e.$name&&(a[e.$name]=e)},a.$removeControl=function(e){e.$name&&a[e.$name]===e&&delete a[e.$name],o(l,function(t,n){a.$setValidity(n,!0,e)}),L(u,e)},a.$setValidity=function(e,t,n){var i=l[e];if(t)i&&(L(i,n),i.length||(c--,c||(r(t),a.$valid=!0,a.$invalid=!1),l[e]=!1,r(!0,e),s.$setValidity(e,!0,a)));else{if(c||r(t),i){if(P(i,n))return}else l[e]=i=[],c++,r(!1,e),s.$setValidity(e,!1,a);i.push(n),a.$valid=!1,a.$invalid=!0}},a.$setDirty=function(){i.removeClass(e,eo),i.addClass(e,to),a.$dirty=!0,a.$pristine=!1,s.$setDirty()},a.$setPristine=function(){i.removeClass(e,to),i.addClass(e,eo),a.$dirty=!1,a.$pristine=!0,o(u,function(e){e.$setPristine()})}}function ui(e,t,i,r){return e.$setValidity(t,i),i?r:n}function pi(e,t,n){var i=n.prop("validity");if(_(i)){var r=function(n){return e.$error[t]||!(i.badInput||i.customError||i.typeMismatch)||i.valueMissing?n:void e.$setValidity(t,!1)};e.$parsers.push(r)}}function di(e,t,n,r,o,a){var s=t.prop("validity"),c=t[0].placeholder,l={};if(!o.android){var u=!1;t.on("compositionstart",function(){u=!0}),t.on("compositionend",function(){u=!1,p()})}var p=function(i){if(!u){var o=t.val(),a=i&&i.type;if(xi&&"input"===(i||l).type&&t[0].placeholder!==c)return void(c=t[0].placeholder);W(n.ngTrim||"T")&&(o=Oi(o)),(r.$viewValue!==o||s&&""===o&&!s.valueMissing)&&(e.$$phase?r.$setViewValue(o,a):e.$apply(function(){r.$setViewValue(o,a)}))}};if(o.hasEvent("input"))t.on("input",p);else{var f,h=function(e){f||(f=a.defer(function(){p(e),f=null}))};t.on("keydown",function(e){var t=e.keyCode;91===t||t>15&&19>t||t>=37&&40>=t||h(e)}),o.hasEvent("paste")&&t.on("paste cut",h)}t.on("change",p),r.$render=function(){t.val(r.$isEmpty(r.$viewValue)?"":r.$viewValue)};var g,m,y=n.ngPattern;if(y){var v=function(e,t){return ui(r,"pattern",r.$isEmpty(t)||e.test(t),t)};m=y.match(/^\/(.*)\/([gim]*)$/),m?(y=new RegExp(m[1],m[2]),g=function(e){return v(y,e)}):g=function(n){var r=e.$eval(y);if(!r||!r.test)throw i("ngPattern")("noregexp","Expected {0} to be a RegExp but was {1}. Element: {2}",y,r,G(t));return v(r,n)},r.$formatters.push(g),r.$parsers.push(g)}if(n.ngMinlength){var _=d(n.ngMinlength),b=function(e){return ui(r,"minlength",r.$isEmpty(e)||e.length>=_,e)};r.$parsers.push(b),r.$formatters.push(b)}if(n.ngMaxlength){var w=d(n.ngMaxlength),$=function(e){return ui(r,"maxlength",r.$isEmpty(e)||e.length<=w,e)};r.$parsers.push($),r.$formatters.push($)}}function fi(e){if($(e))return e;if(b(e)){Wr.lastIndex=0;var t=Wr.exec(e);if(t){var n=+t[1],i=+t[2],r=ei(n),o=7*(i-1);return new Date(n,0,r.getDate()+o)}}return 0/0}function hi(e,t){return function(n){var i,r;return $(n)?n:b(n)&&(e.lastIndex=0,i=e.exec(n))?(i.shift(),r={yyyy:0,MM:1,dd:1,HH:0,mm:0},o(i,function(e,n){n<t.length&&(r[t[n]]=+e)}),new Date(r.yyyy,r.MM-1,r.dd,r.HH,r.mm)):0/0}}function gi(e,t,i,r){return function(o,a,s,c,l,u,p){if(di(o,a,s,c,l,u),c.$parsers.push(function(r){return c.$isEmpty(r)?(c.$setValidity(e,!0),null):t.test(r)?(c.$setValidity(e,!0),i(r)):(c.$setValidity(e,!1),n)}),c.$formatters.push(function(e){return $(e)?p("date")(e,r):""}),s.min){var d=function(e){var t=c.$isEmpty(e)||i(e)>=i(s.min);return c.$setValidity("min",t),t?e:n};c.$parsers.push(d),c.$formatters.push(d)}if(s.max){var f=function(e){var t=c.$isEmpty(e)||i(e)<=i(s.max);return c.$setValidity("max",t),t?e:n};c.$parsers.push(f),c.$formatters.push(f)}}}function mi(e,t,i,r,o,a){if(di(e,t,i,r,o,a),r.$parsers.push(function(e){var t=r.$isEmpty(e);return t||Hr.test(e)?(r.$setValidity("number",!0),""===e?null:t?e:parseFloat(e)):(r.$setValidity("number",!1),n)}),pi(r,"number",t),r.$formatters.push(function(e){return r.$isEmpty(e)?"":""+e}),i.min){var s=function(e){var t=parseFloat(i.min);return ui(r,"min",r.$isEmpty(e)||e>=t,e)};r.$parsers.push(s),r.$formatters.push(s)}if(i.max){var c=function(e){var t=parseFloat(i.max);return ui(r,"max",r.$isEmpty(e)||t>=e,e)};r.$parsers.push(c),r.$formatters.push(c)}r.$formatters.push(function(e){return ui(r,"number",r.$isEmpty(e)||w(e),e)})}function yi(e,t,n,i,r,o){di(e,t,n,i,r,o);var a=function(e){return ui(i,"url",i.$isEmpty(e)||qr.test(e),e)};i.$formatters.push(a),i.$parsers.push(a)}function vi(e,t,n,i,r,o){di(e,t,n,i,r,o);var a=function(e){return ui(i,"email",i.$isEmpty(e)||jr.test(e),e)};i.$formatters.push(a),i.$parsers.push(a)}function _i(e,t,n,i){y(n.name)&&t.attr("name",l());var r=function(r){t[0].checked&&e.$apply(function(){i.$setViewValue(n.value,r&&r.type)})};t.on("click",r),i.$render=function(){var e=n.value;t[0].checked=e==i.$viewValue},n.$observe("value",i.$render)}function bi(e,t,n,i){var r=n.ngTrueValue,o=n.ngFalseValue;b(r)||(r=!0),b(o)||(o=!1);var a=function(n){e.$apply(function(){i.$setViewValue(t[0].checked,n&&n.type)})};t.on("click",a),i.$render=function(){t[0].checked=i.$viewValue},i.$isEmpty=function(e){return e!==r},i.$formatters.push(function(e){return e===r}),i.$parsers.push(function(e){return e?r:o})}function wi(e,t){return e="ngClass"+e,["$animate",function(n){function i(e,t){var n=[];e:for(var i=0;i<e.length;i++){for(var r=e[i],o=0;o<t.length;o++)if(r==t[o])continue e;n.push(r)}return n}function r(e){if(S(e))return e;if(b(e))return e.split(" ");if(_(e)){var t=[];return o(e,function(e,n){e&&t.push(n)
}),t}return e}return{restrict:"AC",link:function(a,s,c){function l(e){var t=p(e,1);c.$addClass(t)}function u(e){var t=p(e,-1);c.$removeClass(t)}function p(e,t){var n=s.data("$classCounts")||{},i=[];return o(e,function(e){(t>0||n[e])&&(n[e]=(n[e]||0)+t,n[e]===+(t>0)&&i.push(e))}),s.data("$classCounts",n),i.join(" ")}function d(e,t){var r=i(t,e),o=i(e,t);o=p(o,-1),r=p(r,1),0===r.length?n.removeClass(s,o):0===o.length?n.addClass(s,r):n.setClass(s,r,o)}function f(e){if(t===!0||a.$index%2===t){var n=r(e||[]);if(h){if(!O(e,h)){var i=r(h);d(i,n)}}else l(n)}h=B(e)}var h;a.$watch(c[e],f,!0),c.$observe("class",function(){f(a.$eval(c[e]))}),"ngClass"!==e&&a.$watch("$index",function(n,i){var o=1&n;if(o!==i&1){var s=r(a.$eval(c[e]));o===t?l(s):u(s)}})}}}]}var $i=function(e){return b(e)?e.toLowerCase():e},Si=Object.prototype.hasOwnProperty,Ci=function(e){return b(e)?e.toUpperCase():e},ki=function(e){return b(e)?e.replace(/[A-Z]/g,function(e){return String.fromCharCode(32|e.charCodeAt(0))}):e},Mi=function(e){return b(e)?e.replace(/[a-z]/g,function(e){return String.fromCharCode(-33&e.charCodeAt(0))}):e};"i"!=="I".toLowerCase()&&($i=ki,Ci=Mi);var xi,Ti,Ei,Ai,Di,Ii=[].slice,Pi=[].push,Ni=Object.prototype.toString,Li=i("ng"),Bi=e.angular||(e.angular={}),Fi=["0","0","0"];xi=d((/msie (\d+)/.exec($i(navigator.userAgent))||[])[1]),isNaN(xi)&&(xi=d((/trident\/.*; rv:(\d+)/.exec($i(navigator.userAgent))||[])[1])),h.$inject=[],g.$inject=[];var Oi=function(){return String.prototype.trim?function(e){return b(e)?e.trim():e}:function(e){return b(e)?e.replace(/^\s\s*/,"").replace(/\s\s*$/,""):e}}();Di=9>xi?function(e){return e=e.nodeName?e:e[0],e.scopeName&&"HTML"!=e.scopeName?Ci(e.scopeName+":"+e.nodeName):e.nodeName}:function(e){return e.nodeName?e.nodeName:e[0].nodeName};var Ui=["ng-","data-ng-","ng:","x-ng-"],Ri=/[A-Z]/g,qi={full:"1.3.0-beta.8",major:1,minor:3,dot:0,codeName:"accidental-haiku"},ji=yt.cache={},Hi=yt.expando="ng-"+(new Date).getTime(),Vi=1,zi=e.document.addEventListener?function(e,t,n){e.addEventListener(t,n,!1)}:function(e,t,n){e.attachEvent("on"+t,n)},Wi=e.document.removeEventListener?function(e,t,n){e.removeEventListener(t,n,!1)}:function(e,t,n){e.detachEvent("on"+t,n)},Gi=(yt._data=function(e){return this.cache[e[this.expando]]||{}},/([\:\-\_]+(.))/g),Ki=/^moz([A-Z])/,Xi=i("jqLite"),Zi=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,Yi=/<|&#?\w+;/,Qi=/<([\w:]+)/,Ji=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,er={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,"",""]};er.optgroup=er.option,er.tbody=er.tfoot=er.colgroup=er.caption=er.thead,er.th=er.td;var tr=yt.prototype={ready:function(n){function i(){r||(r=!0,n())}var r=!1;"complete"===t.readyState?setTimeout(i):(this.on("DOMContentLoaded",i),yt(e).on("load",i))},toString:function(){var e=[];return o(this,function(t){e.push(""+t)}),"["+e.join(", ")+"]"},eq:function(e){return Ti(e>=0?this[e]:this[this.length+e])},length:0,push:Pi,sort:[].sort,splice:[].splice},nr={};o("multiple,selected,checked,disabled,readOnly,required,open".split(","),function(e){nr[$i(e)]=e});var ir={};o("input,select,option,textarea,button,form,details".split(","),function(e){ir[Ci(e)]=!0}),o({data:St,inheritedData:Et,scope:function(e){return Ti(e).data("$scope")||Et(e.parentNode||e,["$isolateScope","$scope"])},isolateScope:function(e){return Ti(e).data("$isolateScope")||Ti(e).data("$isolateScopeNoTemplate")},controller:Tt,injector:function(e){return Et(e,"$injector")},removeAttr:function(e,t){e.removeAttribute(t)},hasClass:Ct,css:function(e,t,i){if(t=dt(t),!v(i)){var r;return 8>=xi&&(r=e.currentStyle&&e.currentStyle[t],""===r&&(r="auto")),r=r||e.style[t],8>=xi&&(r=""===r?n:r),r}e.style[t]=i},attr:function(e,t,i){var r=$i(t);if(nr[r]){if(!v(i))return e[t]||(e.attributes.getNamedItem(t)||h).specified?r:n;i?(e[t]=!0,e.setAttribute(t,r)):(e[t]=!1,e.removeAttribute(r))}else if(v(i))e.setAttribute(t,i);else if(e.getAttribute){var o=e.getAttribute(t,2);return null===o?n:o}},prop:function(e,t,n){return v(n)?void(e[t]=n):e[t]},text:function(){function e(e,n){var i=t[e.nodeType];return y(n)?i?e[i]:"":void(e[i]=n)}var t=[];return 9>xi?(t[1]="innerText",t[3]="nodeValue"):t[1]=t[3]="textContent",e.$dv="",e}(),val:function(e,t){if(y(t)){if("SELECT"===Di(e)&&e.multiple){var n=[];return o(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(y(t))return e.innerHTML;for(var n=0,i=e.childNodes;n<i.length;n++)_t(i[n]);e.innerHTML=t},empty:At},function(e,t){yt.prototype[t]=function(t,i){var r,o;if(e!==At&&(2==e.length&&e!==Ct&&e!==Tt?t:i)===n){if(_(t)){for(r=0;r<this.length;r++)if(e===St)e(this[r],t);else for(o in t)e(this[r],o,t[o]);return this}for(var a=e.$dv,s=a===n?Math.min(this.length,1):this.length,c=0;s>c;c++){var l=e(this[c],t,i);a=a?a+l:l}return a}for(r=0;r<this.length;r++)e(this[r],t,i);return this}}),o({removeData:wt,dealoc:_t,on:function Ro(e,n,i,r){if(v(r))throw Xi("onargs","jqLite#on() does not support the `selector` or `eventData` parameters");var a=$t(e,"events"),s=$t(e,"handle");a||$t(e,"events",a={}),s||$t(e,"handle",s=It(e,a)),o(n.split(" "),function(n){var r=a[n];if(!r){if("mouseenter"==n||"mouseleave"==n){var o=t.body.contains||t.body.compareDocumentPosition?function(e,t){var n=9===e.nodeType?e.documentElement:e,i=t&&t.parentNode;return e===i||!(!i||1!==i.nodeType||!(n.contains?n.contains(i):e.compareDocumentPosition&&16&e.compareDocumentPosition(i)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1};a[n]=[];var c={mouseleave:"mouseout",mouseenter:"mouseover"};Ro(e,c[n],function(e){var t=this,i=e.relatedTarget;(!i||i!==t&&!o(t,i))&&s(e,n)})}else zi(e,n,s),a[n]=[];r=a[n]}r.push(i)})},off:bt,one:function(e,t,n){e=Ti(e),e.on(t,function i(){e.off(t,n),e.off(t,i)}),e.on(t,n)},replaceWith:function(e,t){var n,i=e.parentNode;_t(e),o(new yt(t),function(t){n?i.insertBefore(t,n.nextSibling):i.replaceChild(t,e),n=t})},children:function(e){var t=[];return o(e.childNodes,function(e){1===e.nodeType&&t.push(e)}),t},contents:function(e){return e.contentDocument||e.childNodes||[]},append:function(e,t){o(new yt(t),function(t){(1===e.nodeType||11===e.nodeType)&&e.appendChild(t)})},prepend:function(e,t){if(1===e.nodeType){var n=e.firstChild;o(new yt(t),function(t){e.insertBefore(t,n)})}},wrap:function(e,t){t=Ti(t)[0];var n=e.parentNode;n&&n.replaceChild(t,e),t.appendChild(e)},remove:function(e){_t(e);var t=e.parentNode;t&&t.removeChild(e)},after:function(e,t){var n=e,i=e.parentNode;o(new yt(t),function(e){i.insertBefore(e,n.nextSibling),n=e})},addClass:Mt,removeClass:kt,toggleClass:function(e,t,n){t&&o(t.split(" "),function(t){var i=n;y(i)&&(i=!Ct(e,t)),(i?Mt:kt)(e,t)})},parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},next:function(e){if(e.nextElementSibling)return e.nextElementSibling;for(var t=e.nextSibling;null!=t&&1!==t.nodeType;)t=t.nextSibling;return t},find:function(e,t){return e.getElementsByTagName?e.getElementsByTagName(t):[]},clone:vt,triggerHandler:function(e,t,n){var i=($t(e,"events")||{})[t];n=n||[];var r=[{preventDefault:h,stopPropagation:h}];o(i,function(t){t.apply(e,r.concat(n))})}},function(e,t){yt.prototype[t]=function(t,n,i){for(var r,o=0;o<this.length;o++)y(r)?(r=e(this[o],t,n,i),v(r)&&(r=Ti(r))):xt(r,e(this[o],t,n,i));return v(r)?r:this},yt.prototype.bind=yt.prototype.on,yt.prototype.unbind=yt.prototype.off}),Nt.prototype={put:function(e,t){this[Pt(e)]=t},get:function(e){return this[Pt(e)]},remove:function(e){var t=this[e=Pt(e)];return delete this[e],t}};var rr=/^function\s*[^\(]*\(\s*([^\)]*)\)/m,or=/,/,ar=/^\s*(_?)(\S+?)\1\s*$/,sr=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm,cr=i("$injector");Ft.$$annotate=Bt;var lr=i("$animate"),ur=["$provide",function(e){this.$$selectors={},this.register=function(t,n){var i=t+"-animation";if(t&&"."!=t.charAt(0))throw lr("notcsel","Expecting class selector starting with '.' got '{0}'.",t);this.$$selectors[t.substr(1)]=i,e.factory(i,n)},this.classNameFilter=function(e){return 1===arguments.length&&(this.$$classNameFilter=e instanceof RegExp?e:null),this.$$classNameFilter},this.$get=["$timeout","$$asyncCallback",function(e,t){function n(e){e&&t(e)}return{enter:function(e,t,i,r){i?i.after(e):t.prepend(e),n(r)},leave:function(e,t){e.remove(),n(t)},move:function(e,t,n,i){this.enter(e,t,n,i)},addClass:function(e,t,i){t=b(t)?t:S(t)?t.join(" "):"",o(e,function(e){Mt(e,t)}),n(i)},removeClass:function(e,t,i){t=b(t)?t:S(t)?t.join(" "):"",o(e,function(e){kt(e,t)}),n(i)},setClass:function(e,t,i,r){o(e,function(e){Mt(e,t),kt(e,i)}),n(r)},enabled:h}}]}],pr=i("$compile");Vt.$inject=["$provide","$$sanitizeUriProvider"];var dr=/^(x[\:\-_]|data[\:\-_])/i,fr=i("$interpolate"),hr=/^([^\?#]*)(\?([^#]*))?(#(.*))?$/,gr={http:80,https:443,ftp:21},mr=i("$location");yn.prototype=mn.prototype=gn.prototype={$$html5:!1,$$replace:!1,absUrl:vn("$$absUrl"),url:function(e,t){if(y(e))return this.$$url;var n=hr.exec(e);return n[1]&&this.path(decodeURIComponent(n[1])),(n[2]||n[1])&&this.search(n[3]||""),this.hash(n[5]||"",t),this},protocol:vn("$$protocol"),host:vn("$$host"),port:vn("$$port"),path:_n("$$path",function(e){return"/"==e.charAt(0)?e:"/"+e}),search:function(e,t){switch(arguments.length){case 0:return this.$$search;case 1:if(b(e))this.$$search=X(e);else{if(!_(e))throw mr("isrcharg","The first argument of the `$location#search()` call must be a string or an object.");this.$$search=e}break;default:y(t)||null===t?delete this.$$search[e]:this.$$search[e]=t}return this.$$compose(),this},hash:_n("$$hash",g),replace:function(){return this.$$replace=!0,this}};var yr,vr=i("$parse"),_r={},br={"null":function(){return null},"true":function(){return!0},"false":function(){return!1},undefined:h,"+":function(e,t,i,r){return i=i(e,t),r=r(e,t),v(i)?v(r)?i+r:i:v(r)?r:n},"-":function(e,t,n,i){return n=n(e,t),i=i(e,t),(v(n)?n:0)-(v(i)?i:0)},"*":function(e,t,n,i){return n(e,t)*i(e,t)},"/":function(e,t,n,i){return n(e,t)/i(e,t)},"%":function(e,t,n,i){return n(e,t)%i(e,t)},"^":function(e,t,n,i){return n(e,t)^i(e,t)},"=":h,"===":function(e,t,n,i){return n(e,t)===i(e,t)},"!==":function(e,t,n,i){return n(e,t)!==i(e,t)},"==":function(e,t,n,i){return n(e,t)==i(e,t)},"!=":function(e,t,n,i){return n(e,t)!=i(e,t)},"<":function(e,t,n,i){return n(e,t)<i(e,t)},">":function(e,t,n,i){return n(e,t)>i(e,t)},"<=":function(e,t,n,i){return n(e,t)<=i(e,t)},">=":function(e,t,n,i){return n(e,t)>=i(e,t)},"&&":function(e,t,n,i){return n(e,t)&&i(e,t)},"||":function(e,t,n,i){return n(e,t)||i(e,t)},"&":function(e,t,n,i){return n(e,t)&i(e,t)},"|":function(e,t,n,i){return i(e,t)(e,t,n(e,t))},"!":function(e,t,n){return!n(e,t)}},wr={n:"\n",f:"\f",r:"\r",t:" ",v:" ","'":"'",'"':'"'},$r=function(e){this.options=e};$r.prototype={constructor:$r,lex:function(e){this.text=e,this.index=0,this.ch=n,this.lastCh=":",this.tokens=[];for(var t,i=[];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(),this.was("{,")&&"{"===i[0]&&(t=this.tokens[this.tokens.length-1])&&(t.json=-1===t.text.indexOf("."));else if(this.is("(){}[].,;:?"))this.tokens.push({index:this.index,text:this.ch,json:this.was(":[,")&&this.is("{[")||this.is("}]:,")}),this.is("{[")&&i.unshift(this.ch),this.is("}]")&&i.shift(),this.index++;else{if(this.isWhitespace(this.ch)){this.index++;continue}var r=this.ch+this.peek(),o=r+this.peek(2),a=br[this.ch],s=br[r],c=br[o];c?(this.tokens.push({index:this.index,text:o,fn:c}),this.index+=3):s?(this.tokens.push({index:this.index,text:r,fn:s}),this.index+=2):a?(this.tokens.push({index:this.index,text:this.ch,fn:a,json:this.was("[,:")&&this.is("+-")}),this.index+=1):this.throwError("Unexpected next character ",this.index,this.index+1)}this.lastCh=this.ch}return this.tokens},is:function(e){return-1!==e.indexOf(this.ch)},was:function(e){return-1!==e.indexOf(this.lastCh)},peek:function(e){var t=e||1;return this.index+t<this.text.length?this.text.charAt(this.index+t):!1},isNumber:function(e){return e>="0"&&"9">=e},isWhitespace:function(e){return" "===e||"\r"===e||" "===e||"\n"===e||" "===e||" "===e},isIdent:function(e){return e>="a"&&"z">=e||e>="A"&&"Z">=e||"_"===e||"$"===e},isExpOperator:function(e){return"-"===e||"+"===e||this.isNumber(e)},throwError:function(e,t,n){n=n||this.index;var i=v(t)?"s "+t+"-"+this.index+" ["+this.text.substring(t,n)+"]":" "+n;throw vr("lexerr","Lexer Error: {0} at column{1} in expression [{2}].",e,i,this.text)},readNumber:function(){for(var e="",t=this.index;this.index<this.text.length;){var n=$i(this.text.charAt(this.index));if("."==n||this.isNumber(n))e+=n;else{var i=this.peek();if("e"==n&&this.isExpOperator(i))e+=n;else if(this.isExpOperator(n)&&i&&this.isNumber(i)&&"e"==e.charAt(e.length-1))e+=n;else{if(!this.isExpOperator(n)||i&&this.isNumber(i)||"e"!=e.charAt(e.length-1))break;this.throwError("Invalid exponent")}}this.index++}e=1*e,this.tokens.push({index:t,text:e,json:!0,fn:function(){return e}})},readIdent:function(){for(var e,t,n,i,r=this,o="",a=this.index;this.index<this.text.length&&(i=this.text.charAt(this.index),"."===i||this.isIdent(i)||this.isNumber(i));)"."===i&&(e=this.index),o+=i,this.index++;if(e)for(t=this.index;t<this.text.length;){if(i=this.text.charAt(t),"("===i){n=o.substr(e-a+1),o=o.substr(0,e-a),this.index=t;break}if(!this.isWhitespace(i))break;t++}var s={index:a,text:o};if(br.hasOwnProperty(o))s.fn=br[o],s.json=br[o];else{var c=Tn(o,this.options,this.text);s.fn=p(function(e,t){return c(e,t)},{assign:function(e,t){return Cn(e,o,t,r.text,r.options)}})}this.tokens.push(s),n&&(this.tokens.push({index:e,text:".",json:!1}),this.tokens.push({index:e+1,text:n,json:!1}))},readString:function(e){var t=this.index;this.index++;for(var n="",i=e,r=!1;this.index<this.text.length;){var o=this.text.charAt(this.index);if(i+=o,r){if("u"===o){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{var s=wr[o];n+=s?s:o}r=!1}else if("\\"===o)r=!0;else{if(o===e)return this.index++,void this.tokens.push({index:t,text:i,string:n,json:!0,fn:function(){return n}});n+=o}this.index++}this.throwError("Unterminated quote",t)}};var Sr=function(e,t,n){this.lexer=e,this.$filter=t,this.options=n};Sr.ZERO=p(function(){return 0},{constant:!0}),Sr.prototype={constructor:Sr,parse:function(e,t){this.text=e,this.json=t,this.tokens=this.lexer.lex(e),t&&(this.assignment=this.logicalOR,this.functionCall=this.fieldAccess=this.objectIndex=this.filterChain=function(){this.throwError("is not valid json",{text:e,index:0})});var n=t?this.primary():this.statements();return 0!==this.tokens.length&&this.throwError("is an unexpected token",this.tokens[0]),n.literal=!!n.literal,n.constant=!!n.constant,n},primary:function(){var e;if(this.expect("("))e=this.filterChain(),this.consume(")");else if(this.expect("["))e=this.arrayDeclaration();else if(this.expect("{"))e=this.object();else{var t=this.expect();e=t.fn,e||this.throwError("not a primary expression",t),t.json&&(e.constant=!0,e.literal=!0)}for(var n,i;n=this.expect("(","[",".");)"("===n.text?(e=this.functionCall(e,i),i=null):"["===n.text?(i=e,e=this.objectIndex(e)):"."===n.text?(i=e,e=this.fieldAccess(e)):this.throwError("IMPOSSIBLE");return e},throwError:function(e,t){throw vr("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 vr("ueoe","Unexpected end of expression: {0}",this.text);return this.tokens[0]},peek:function(e,t,n,i){if(this.tokens.length>0){var r=this.tokens[0],o=r.text;if(o===e||o===t||o===n||o===i||!e&&!t&&!n&&!i)return r}return!1},expect:function(e,t,n,i){var r=this.peek(e,t,n,i);return r?(this.json&&!r.json&&this.throwError("is not valid json",r),this.tokens.shift(),r):!1},consume:function(e){this.expect(e)||this.throwError("is unexpected, expecting ["+e+"]",this.peek())},unaryFn:function(e,t){return p(function(n,i){return e(n,i,t)},{constant:t.constant})},ternaryFn:function(e,t,n){return p(function(i,r){return e(i,r)?t(i,r):n(i,r)},{constant:e.constant&&t.constant&&n.constant})},binaryFn:function(e,t,n){return p(function(i,r){return t(i,r,e,n)},{constant:e.constant&&n.constant})},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 i,r=0;r<e.length;r++){var o=e[r];o&&(i=o(t,n))}return i}},filterChain:function(){for(var e,t=this.expression();;){if(!(e=this.expect("|")))return t;t=this.binaryFn(t,e.fn,this.filter())}},filter:function(){for(var e=this.expect(),t=this.$filter(e.text),n=[];;){if(!(e=this.expect(":"))){var i=function(e,i,r){for(var o=[r],a=0;a<n.length;a++)o.push(n[a](e,i));return t.apply(e,o)};return function(){return i}}n.push(this.expression())}},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(),function(t,i){return n.assign(t,e(t,i),i)}):n},ternary:function(){var e,t,n=this.logicalOR();return(t=this.expect("?"))?(e=this.ternary(),(t=this.expect(":"))?this.ternaryFn(n,e,this.ternary()):void this.throwError("expected :",t)):n},logicalOR:function(){for(var e,t=this.logicalAND();;){if(!(e=this.expect("||")))return t;t=this.binaryFn(t,e.fn,this.logicalAND())}},logicalAND:function(){var e,t=this.equality();return(e=this.expect("&&"))&&(t=this.binaryFn(t,e.fn,this.logicalAND())),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(Sr.ZERO,e.fn,this.unary()):(e=this.expect("!"))?this.unaryFn(e.fn,this.unary()):this.primary()},fieldAccess:function(e){var t=this,n=this.expect().text,i=Tn(n,this.options,this.text);return p(function(t,n,r){return i(r||e(t,n))},{assign:function(i,r,o){return Cn(e(i,o),n,r,t.text,t.options)}})},objectIndex:function(e){var t=this,i=this.expression();return this.consume("]"),p(function(r,o){var a,s,c=e(r,o),l=i(r,o);return c?(a=Sn(c[l],t.text),a&&a.then&&t.options.unwrapPromises&&(s=a,"$$v"in a||(s.$$v=n,s.then(function(e){s.$$v=e})),a=a.$$v),a):n},{assign:function(n,r,o){var a=i(n,o),s=Sn(e(n,o),t.text);return s[a]=r}})},functionCall:function(e,t){var n=[];if(")"!==this.peekToken().text)do n.push(this.expression());while(this.expect(","));this.consume(")");var i=this;return function(r,o){for(var a=[],s=t?t(r,o):r,c=0;c<n.length;c++)a.push(n[c](r,o));var l=e(r,o,s)||h;Sn(s,i.text),Sn(l,i.text);var u=l.apply?l.apply(s,a):l(a[0],a[1],a[2],a[3],a[4]);return Sn(u,i.text)}},arrayDeclaration:function(){var e=[],t=!0;if("]"!==this.peekToken().text)do{if(this.peek("]"))break;var n=this.expression();e.push(n),n.constant||(t=!1)}while(this.expect(","));return this.consume("]"),p(function(t,n){for(var i=[],r=0;r<e.length;r++)i.push(e[r](t,n));return i},{literal:!0,constant:t})},object:function(){var e=[],t=!0;if("}"!==this.peekToken().text)do{if(this.peek("}"))break;var n=this.expect(),i=n.string||n.text;this.consume(":");var r=this.expression();e.push({key:i,value:r}),r.constant||(t=!1)}while(this.expect(","));return this.consume("}"),p(function(t,n){for(var i={},r=0;r<e.length;r++){var o=e[r];i[o.key]=o.value(t,n)}return i},{literal:!0,constant:t})}};var Cr={},kr=i("$sce"),Mr={HTML:"html",CSS:"css",URL:"url",RESOURCE_URL:"resourceUrl",JS:"js"},xr=t.createElement("a"),Tr=jn(e.location.href,!0);zn.$inject=["$provide"],Gn.$inject=["$locale"],Kn.$inject=["$locale"];var Er=".",Ar={yyyy:Yn("FullYear",4),yy:Yn("FullYear",2,0,!0),y:Yn("FullYear",1),MMMM:Qn("Month"),MMM:Qn("Month",!0),MM:Yn("Month",2,1),M:Yn("Month",1,1),dd:Yn("Date",2),d:Yn("Date",1),HH:Yn("Hours",2),H:Yn("Hours",1),hh:Yn("Hours",2,-12),h:Yn("Hours",1,-12),mm:Yn("Minutes",2),m:Yn("Minutes",1),ss:Yn("Seconds",2),s:Yn("Seconds",1),sss:Yn("Milliseconds",3),EEEE:Qn("Day"),EEE:Qn("Day",!0),a:ii,Z:Jn,ww:ni(2),w:ni(1)},Dr=/((?:[^yMdHhmsaZEw']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z|w+))(.*)/,Ir=/^\-?\d+$/;ri.$inject=["$locale"];var Pr=m($i),Nr=m(Ci);si.$inject=["$parse"];var Lr=m({restrict:"E",compile:function(e,n){return 8>=xi&&(n.href||n.name||n.$set("href",""),e.append(t.createComment("IE fix"))),n.href||n.xlinkHref||n.name?void 0:function(e,t){var n="[object SVGAnimatedString]"===Ni.call(t.prop("href"))?"xlink:href":"href";t.on("click",function(e){t.attr(n)||e.preventDefault()})}}}),Br={};o(nr,function(e,t){if("multiple"!=e){var n=zt("ng-"+t);Br[n]=function(){return{priority:100,link:function(e,i,r){e.$watch(r[n],function(e){r.$set(t,!!e)})}}}}}),o(["src","srcset","href"],function(e){var t=zt("ng-"+e);Br[t]=function(){return{priority:99,link:function(n,i,r){var o=e,a=e;"href"===e&&"[object SVGAnimatedString]"===Ni.call(i.prop("href"))&&(a="xlinkHref",r.$attr[a]="xlink:href",o=null),r.$observe(t,function(e){e&&(r.$set(a,e),xi&&o&&i.prop(o,r[a]))})}}}});var Fr={$addControl:h,$removeControl:h,$setValidity:h,$setDirty:h,$setPristine:h};li.$inject=["$element","$attrs","$scope","$animate"];var Or=function(e){return["$timeout",function(t){var i={name:"form",restrict:e?"EAC":"E",controller:li,compile:function(){return{pre:function(e,i,r,o){if(!r.action){var a=function(t){e.$apply(function(){o.$commitViewValue()}),t.preventDefault?t.preventDefault():t.returnValue=!1};zi(i[0],"submit",a),i.on("$destroy",function(){t(function(){Wi(i[0],"submit",a)},0,!1)})}var s=i.parent().controller("form"),c=r.name||r.ngForm;c&&Cn(e,c,o,c),s&&i.on("$destroy",function(){s.$removeControl(o),c&&Cn(e,c,n,c),p(o,Fr)})}}}};return i}]},Ur=Or(),Rr=Or(!0),qr=/^(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?$/,jr=/^[a-z0-9!#$%&'*+/=?^_`{|}~.-]+@[a-z0-9-]+(\.[a-z0-9-]+)*$/i,Hr=/^\s*(\-|\+)?(\d+|(\d*(\.\d*)))\s*$/,Vr=/^(\d{4})-(\d{2})-(\d{2})$/,zr=/^(\d{4})-(\d\d)-(\d\d)T(\d\d):(\d\d)$/,Wr=/^(\d{4})-W(\d\d)$/,Gr=/^(\d{4})-(\d\d)$/,Kr=/^(\d\d):(\d\d)$/,Xr=/(\s+|^)default(\s+|$)/,Zr={text:di,date:gi("date",Vr,hi(Vr,["yyyy","MM","dd"]),"yyyy-MM-dd"),"datetime-local":gi("datetimelocal",zr,hi(zr,["yyyy","MM","dd","HH","mm"]),"yyyy-MM-ddTHH:mm"),time:gi("time",Kr,hi(Kr,["HH","mm"]),"HH:mm"),week:gi("week",Wr,fi,"yyyy-Www"),month:gi("month",Gr,hi(Gr,["yyyy","MM"]),"yyyy-MM"),number:mi,url:yi,email:vi,radio:_i,checkbox:bi,hidden:h,button:h,submit:h,reset:h,file:h},Yr=["$browser","$sniffer","$filter",function(e,t,n){return{restrict:"E",require:["?ngModel"],link:function(i,r,o,a){a[0]&&(Zr[$i(o.type)]||Zr.text)(i,r,o,a[0],t,e,n)}}}],Qr="ng-valid",Jr="ng-invalid",eo="ng-pristine",to="ng-dirty",no=["$scope","$exceptionHandler","$attrs","$element","$parse","$animate","$timeout",function(e,t,n,r,a,s,c){function l(e,t){t=t?"-"+nt(t,"-"):"",s.removeClass(r,(e?Jr:Qr)+t),s.addClass(r,(e?Qr:Jr)+t)}this.$viewValue=Number.NaN,this.$modelValue=Number.NaN,this.$parsers=[],this.$formatters=[],this.$viewChangeListeners=[],this.$pristine=!0,this.$dirty=!1,this.$valid=!0,this.$invalid=!1,this.$name=n.name;var u=a(n.ngModel),p=u.assign,d=null,f=this;if(!p)throw i("ngModel")("nonassign","Expression '{0}' is non-assignable. Element: {1}",n.ngModel,G(r));this.$render=h,this.$isEmpty=function(e){return y(e)||""===e||null===e||e!==e};var g=r.inheritedData("$formController")||Fr,m=0,_=this.$error={};r.addClass(eo),l(!0),this.$setValidity=function(e,t){_[e]!==!t&&(t?(_[e]&&m--,m||(l(!0),f.$valid=!0,f.$invalid=!1)):(l(!1),f.$invalid=!0,f.$valid=!1,m++),_[e]=!t,l(t,e),g.$setValidity(e,t,f))},this.$setPristine=function(){f.$dirty=!1,f.$pristine=!0,s.removeClass(r,to),s.addClass(r,eo)},this.$rollbackViewValue=function(){c.cancel(d),f.$viewValue=f.$$lastCommittedViewValue,f.$render()},this.$commitViewValue=function(){var n=f.$viewValue;f.$$lastCommittedViewValue=n,c.cancel(d),f.$pristine&&(f.$dirty=!0,f.$pristine=!1,s.removeClass(r,eo),s.addClass(r,to),g.$setDirty()),o(f.$parsers,function(e){n=e(n)}),f.$modelValue!==n&&(f.$modelValue=n,p(e,n),o(f.$viewChangeListeners,function(e){try{e()}catch(n){t(n)}}))},this.$setViewValue=function(e,t){f.$viewValue=e,(!f.$options||f.$options.updateOnDefault)&&f.$$debounceViewValueCommit(t)},this.$$debounceViewValueCommit=function(e){var t,n=0,i=f.$options;i&&v(i.debounce)&&(t=i.debounce,w(t)?n=t:w(t[e])?n=t[e]:w(t["default"])&&(n=t["default"])),c.cancel(d),n?d=c(function(){f.$commitViewValue()},n):f.$commitViewValue()},e.$watch(function(){var t=u(e);if(f.$modelValue!==t){var n=f.$formatters,i=n.length;for(f.$modelValue=t;i--;)t=n[i](t);f.$viewValue!==t&&(f.$viewValue=f.$$lastCommittedViewValue=t,f.$render())}return t})}],io=function(){return{require:["ngModel","^?form","^?ngModelOptions"],controller:no,link:{pre:function(e,t,n,i){i[2]&&(i[0].$options=i[2].$options);var r=i[0],o=i[1]||Fr;o.$addControl(r),e.$on("$destroy",function(){o.$removeControl(r)})},post:function(e,t,n,i){var r=i[0];r.$options&&r.$options.updateOn&&t.on(r.$options.updateOn,function(t){e.$apply(function(){r.$$debounceViewValueCommit(t&&t.type)})})}}}},ro=m({require:"ngModel",link:function(e,t,n,i){i.$viewChangeListeners.push(function(){e.$eval(n.ngChange)})}}),oo=function(){return{require:"?ngModel",link:function(e,t,n,i){if(i){n.required=!0;var r=function(e){return n.required&&i.$isEmpty(e)?void i.$setValidity("required",!1):(i.$setValidity("required",!0),e)};i.$formatters.push(r),i.$parsers.unshift(r),n.$observe("required",function(){r(i.$viewValue)})}}}},ao=function(){return{require:"ngModel",link:function(e,t,i,r){var a=/\/(.*)\//.exec(i.ngList),s=a&&new RegExp(a[1])||i.ngList||",",c=function(e){if(!y(e)){var t=[];return e&&o(e.split(s),function(e){e&&t.push(Oi(e))}),t}};r.$parsers.push(c),r.$formatters.push(function(e){return S(e)?e.join(", "):n}),r.$isEmpty=function(e){return!e||!e.length}}}},so=/^(true|false|\d+)$/,co=function(){return{priority:100,compile:function(e,t){return so.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{controller:["$scope","$attrs",function(e,t){var i=this;this.$options=e.$eval(t.ngModelOptions),this.$options.updateOn!==n?(this.$options.updateOnDefault=!1,this.$options.updateOn=Oi(this.$options.updateOn.replace(Xr,function(){return i.$options.updateOnDefault=!0," "}))):this.$options.updateOnDefault=!0}]}},uo=ci(function(e,t,i){t.addClass("ng-binding").data("$binding",i.ngBind),e.$watch(i.ngBind,function(e){t.text(e==n?"":e)})}),po=["$interpolate",function(e){return function(t,n,i){var r=e(n.attr(i.$attr.ngBindTemplate));n.addClass("ng-binding").data("$binding",r),i.$observe("ngBindTemplate",function(e){n.text(e)})}}],fo=["$sce","$parse",function(e,t){return function(n,i,r){function o(){return(a(n)||"").toString()}i.addClass("ng-binding").data("$binding",r.ngBindHtml);var a=t(r.ngBindHtml);n.$watch(o,function(){i.html(e.getTrustedHtml(a(n))||"")})}}],ho=wi("",!0),go=wi("Odd",0),mo=wi("Even",1),yo=ci({compile:function(e,t){t.$set("ngCloak",n),e.removeClass("ng-cloak")}}),vo=[function(){return{scope:!0,controller:"@",priority:500}}],_o={};o("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "),function(e){var t=zt("ng-"+e);_o[t]=["$parse",function(n){return{compile:function(i,r){var o=n(r[t]);return function(t,n){n.on($i(e),function(e){t.$apply(function(){o(t,{$event:e})})})}}}}]});var bo=["$animate",function(e){return{transclude:"element",priority:600,terminal:!0,restrict:"A",$$tlb:!0,link:function(n,i,r,o,a){var s,c,l;n.$watch(r.ngIf,function(o){W(o)?c||(c=n.$new(),a(c,function(n){n[n.length++]=t.createComment(" end ngIf: "+r.ngIf+" "),s={clone:n},e.enter(n,i.parent(),i)})):(l&&(l.remove(),l=null),c&&(c.$destroy(),c=null),s&&(l=ct(s.clone),e.leave(l,function(){l=null}),s=null))})}}}],wo=["$http","$templateCache","$anchorScroll","$animate","$sce",function(e,t,n,i,r){return{restrict:"ECA",priority:400,terminal:!0,transclude:"element",controller:Bi.noop,compile:function(o,a){var s=a.ngInclude||a.src,c=a.onload||"",l=a.autoscroll;return function(o,a,u,p,d){var f,h,g,m=0,y=function(){h&&(h.remove(),h=null),f&&(f.$destroy(),f=null),g&&(i.leave(g,function(){h=null}),h=g,g=null)};o.$watch(r.parseAsResourceUrl(s),function(r){var s=function(){!v(l)||l&&!o.$eval(l)||n()},u=++m;r?(e.get(r,{cache:t}).success(function(e){if(u===m){var t=o.$new();p.template=e;var n=d(t,function(e){y(),i.enter(e,null,a,s)});f=t,g=n,f.$emit("$includeContentLoaded"),o.$eval(c)}}).error(function(){u===m&&y()}),o.$emit("$includeContentRequested")):(y(),p.template=null)})}}}}],$o=["$compile",function(e){return{restrict:"ECA",priority:-400,require:"ngInclude",link:function(t,n,i,r){n.html(r.template),e(n.contents())(t)}}}],So=ci({priority:450,compile:function(){return{pre:function(e,t,n){e.$eval(n.ngInit)}}}}),Co=ci({terminal:!0,priority:1e3}),ko=["$locale","$interpolate",function(e,t){var n=/{}/g;return{restrict:"EA",link:function(i,r,a){var s=a.count,c=a.$attr.when&&r.attr(a.$attr.when),l=a.offset||0,u=i.$eval(c)||{},p={},d=t.startSymbol(),f=t.endSymbol(),h=/^when(Minus)?(.+)$/;o(a,function(e,t){h.test(t)&&(u[$i(t.replace("when","").replace("Minus","-"))]=r.attr(a.$attr[t]))}),o(u,function(e,i){p[i]=t(e.replace(n,d+s+"-"+l+f))}),i.$watch(function(){var t=parseFloat(i.$eval(s));return isNaN(t)?"":(t in u||(t=e.pluralCat(t-l)),p[t](i))},function(e){r.text(e)})}}}],Mo=["$parse","$animate",function(e,n){function a(e){return e.clone[0]}function s(e){return e.clone[e.clone.length-1]}var c="$$NG_REMOVED",l=i("ngRepeat");return{transclude:"element",priority:1e3,terminal:!0,$$tlb:!0,link:function(i,u,p,d,f){var h,g,m,y,v,_,b,w,$,S=p.ngRepeat,C=S.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+track\s+by\s+([\s\S]+?))?\s*$/),k={$id:Pt};if(!C)throw l("iexp","Expected expression in form of '_item_ in _collection_[ track by _id_]' but got '{0}'.",S);if(_=C[1],b=C[2],h=C[3],h?(g=e(h),m=function(e,t,n){return $&&(k[$]=e),k[w]=t,k.$index=n,g(i,k)}):(y=function(e,t){return Pt(t)},v=function(e){return e}),C=_.match(/^(?:([\$\w]+)|\(([\$\w]+)\s*,\s*([\$\w]+)\))$/),!C)throw l("iidexp","'_item_' in '_item_ in _collection_' should be an identifier or '(_key_, _value_)' expression, but got '{0}'.",_);w=C[3]||C[1],$=C[2];var M={};i.$watchCollection(b,function(e){var p,d,h,g,_,b,C,k,x,T,E,A,D=u[0],I={},P=[];if(r(e))T=e,x=m||y;else{x=m||v,T=[];for(b in e)e.hasOwnProperty(b)&&"$"!=b.charAt(0)&&T.push(b);T.sort()}for(g=T.length,d=P.length=T.length,p=0;d>p;p++)if(b=e===T?p:T[p],C=e[b],k=x(b,C,p),at(k,"`track by` id"),M.hasOwnProperty(k))E=M[k],delete M[k],I[k]=E,P[p]=E;else{if(I.hasOwnProperty(k))throw o(P,function(e){e&&e.scope&&(M[e.id]=e)}),l("dupes","Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: {0}, Duplicate key: {1}",S,k);P[p]={id:k},I[k]=!1}for(b in M)M.hasOwnProperty(b)&&(E=M[b],A=ct(E.clone),n.leave(A),o(A,function(e){e[c]=!0}),E.scope.$destroy());for(p=0,d=T.length;d>p;p++){if(b=e===T?p:T[p],C=e[b],E=P[p],P[p-1]&&(D=s(P[p-1])),E.scope){_=E.scope,h=D;do h=h.nextSibling;while(h&&h[c]);
a(E)!=h&&n.move(ct(E.clone),null,Ti(D)),D=s(E)}else _=i.$new();_[w]=C,$&&(_[$]=b),_.$index=p,_.$first=0===p,_.$last=p===g-1,_.$middle=!(_.$first||_.$last),_.$odd=!(_.$even=0===(1&p)),E.scope||f(_,function(e){e[e.length++]=t.createComment(" end ngRepeat: "+S+" "),n.enter(e,null,Ti(D)),D=e,E.scope=_,E.clone=e,I[E.id]=E})}M=I})}}}],xo=["$animate",function(e){return function(t,n,i){t.$watch(i.ngShow,function(t){e[W(t)?"removeClass":"addClass"](n,"ng-hide")})}}],To=["$animate",function(e){return function(t,n,i){t.$watch(i.ngHide,function(t){e[W(t)?"addClass":"removeClass"](n,"ng-hide")})}}],Eo=ci(function(e,t,n){e.$watch(n.ngStyle,function(e,n){n&&e!==n&&o(n,function(e,n){t.css(n,"")}),e&&t.css(e)},!0)}),Ao=["$animate",function(e){return{restrict:"EA",require:"ngSwitch",controller:["$scope",function(){this.cases={}}],link:function(t,n,i,r){var a=i.ngSwitch||i.on,s=[],c=[],l=[],u=[];t.$watch(a,function(n){var a,p;for(a=0,p=l.length;p>a;++a)l[a].remove();for(l.length=0,a=0,p=u.length;p>a;++a){var d=c[a];u[a].$destroy(),l[a]=d,e.leave(d,function(){l.splice(a,1)})}c.length=0,u.length=0,(s=r.cases["!"+n]||r.cases["?"])&&(t.$eval(i.change),o(s,function(n){var i=t.$new();u.push(i),n.transclude(i,function(t){var i=n.element;c.push(t),e.enter(t,i.parent(),i)})}))})}}}],Do=ci({transclude:"element",priority:800,require:"^ngSwitch",link:function(e,t,n,i,r){i.cases["!"+n.ngSwitchWhen]=i.cases["!"+n.ngSwitchWhen]||[],i.cases["!"+n.ngSwitchWhen].push({transclude:r,element:t})}}),Io=ci({transclude:"element",priority:800,require:"^ngSwitch",link:function(e,t,n,i,r){i.cases["?"]=i.cases["?"]||[],i.cases["?"].push({transclude:r,element:t})}}),Po=ci({link:function(e,t,n,r,o){if(!o)throw i("ngTransclude")("orphan","Illegal use of ngTransclude directive in the template! No parent directive that requires a transclusion found. Element: {0}",G(t));o(function(e){t.empty(),t.append(e)})}}),No=["$templateCache",function(e){return{restrict:"E",terminal:!0,compile:function(t,n){if("text/ng-template"==n.type){var i=n.id,r=t[0].text;e.put(i,r)}}}}],Lo=i("ngOptions"),Bo=m({terminal:!0}),Fo=["$compile","$parse",function(e,i){var r=/^\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]+?))?$/,s={$setViewValue:h};return{restrict:"E",require:["select","?ngModel"],controller:["$element","$scope","$attrs",function(e,t,n){var i,r,o=this,a={},c=s;o.databound=n.ngModel,o.init=function(e,t,n){c=e,i=t,r=n},o.addOption=function(t){at(t,'"option value"'),a[t]=!0,c.$viewValue==t&&(e.val(t),r.parent()&&r.remove())},o.removeOption=function(e){this.hasOption(e)&&(delete a[e],c.$viewValue==e&&this.renderUnknownOption(e))},o.renderUnknownOption=function(t){var n="? "+Pt(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=h})}],link:function(s,c,l,u){function p(e,t,n,i){n.$render=function(){var e=n.$viewValue;i.hasOption(e)?(k.parent()&&k.remove(),t.val(e),""===e&&h.prop("selected",!0)):y(e)&&h?t.val(""):i.renderUnknownOption(e)},t.on("change",function(){e.$apply(function(){k.parent()&&k.remove(),n.$setViewValue(t.val())})})}function d(e,t,n){var i;n.$render=function(){var e=new Nt(n.$viewValue);o(t.find("option"),function(t){t.selected=v(e.get(t.value))})},e.$watch(function(){O(i,n.$viewValue)||(i=B(n.$viewValue),n.$render())}),t.on("change",function(){e.$apply(function(){var e=[];o(t.find("option"),function(t){t.selected&&e.push(t.value)}),n.$setViewValue(e)})})}function f(t,o,s){function c(){var e,n,i,r,c,l,m,b,M,x,T,E,A,D,I,P={"":[]},N=[""],L=s.$modelValue,B=g(t)||[],F=d?a(B):B,O={},U=!1;if(_)if(y&&S(L)){U=new Nt([]);for(var R=0;R<L.length;R++)O[p]=L[R],U.put(y(t,O),L[R])}else U=new Nt(L);for(T=0;M=F.length,M>T;T++){if(m=T,d){if(m=F[T],"$"===m.charAt(0))continue;O[d]=m}if(O[p]=B[m],e=f(t,O)||"",(n=P[e])||(n=P[e]=[],N.push(e)),_)E=v(U.remove(y?y(t,O):h(t,O)));else{if(y){var q={};q[p]=L,E=y(t,q)===y(t,O)}else E=L===h(t,O);U=U||E}I=u(t,O),I=v(I)?I:"",n.push({id:y?y(t,O):d?F[T]:T,label:I,selected:E})}for(_||(w||null===L?P[""].unshift({id:"",label:"",selected:!U}):U||P[""].unshift({id:"?",label:"",selected:!0})),x=0,b=N.length;b>x;x++){for(e=N[x],n=P[e],k.length<=x?(r={element:C.clone().attr("label",e),label:n.label},c=[r],k.push(c),o.append(r.element)):(c=k[x],r=c[0],r.label!=e&&r.element.attr("label",r.label=e)),A=null,T=0,M=n.length;M>T;T++)i=n[T],(l=c[T+1])?(A=l.element,l.label!==i.label&&A.text(l.label=i.label),l.id!==i.id&&A.val(l.id=i.id),l.selected!==i.selected&&A.prop("selected",l.selected=i.selected)):(""===i.id&&w?D=w:(D=$.clone()).val(i.id).attr("selected",i.selected).text(i.label),c.push(l={element:D,label:i.label,id:i.id,selected:i.selected}),A?A.after(D):r.element.append(D),A=D);for(T++;c.length>T;)c.pop().element.remove()}for(;k.length>x;)k.pop()[0].element.remove()}var l;if(!(l=b.match(r)))throw Lo("iexp","Expected expression in form of '_select_ (as _label_)? for (_key_,)?_value_ in _collection_' but got '{0}'. Element: {1}",b,G(o));var u=i(l[2]||l[1]),p=l[4]||l[6],d=l[5],f=i(l[3]||""),h=i(l[2]?l[1]:p),g=i(l[7]),m=l[8],y=m?i(l[8]):null,k=[[{element:o,label:""}]];w&&(e(w)(t),w.removeClass("ng-scope"),w.remove()),o.empty(),o.on("change",function(){t.$apply(function(){var e,i,r,a,c,l,u,f,m,v=g(t)||[],b={};if(_){for(r=[],l=0,f=k.length;f>l;l++)for(e=k[l],c=1,u=e.length;u>c;c++)if((a=e[c].element)[0].selected){if(i=a.val(),d&&(b[d]=i),y)for(m=0;m<v.length&&(b[p]=v[m],y(t,b)!=i);m++);else b[p]=v[i];r.push(h(t,b))}}else{if(i=o.val(),"?"==i)r=n;else if(""===i)r=null;else if(y){for(m=0;m<v.length;m++)if(b[p]=v[m],y(t,b)==i){r=h(t,b);break}}else b[p]=v[i],d&&(b[d]=i),r=h(t,b);k[0].length>1&&k[0][1].id!==i&&(k[0][1].selected=!1)}s.$setViewValue(r)})}),s.$render=c,t.$watch(c)}if(u[1]){for(var h,g=u[0],m=u[1],_=l.multiple,b=l.ngOptions,w=!1,$=Ti(t.createElement("option")),C=Ti(t.createElement("optgroup")),k=$.clone(),M=0,x=c.children(),T=x.length;T>M;M++)if(""===x[M].value){h=w=x.eq(M);break}g.init(m,w,k),_&&(m.$isEmpty=function(e){return!e||0===e.length}),b?f(s,c,m):_?d(s,c,m):p(s,c,m,g)}}}}],Oo=["$interpolate",function(e){var t={addOption:h,removeOption:h};return{restrict:"E",priority:100,compile:function(n,i){if(y(i.value)){var r=e(n.text(),!0);r||i.$set("value",n.text())}return function(e,n,i){var o="$selectController",a=n.parent(),s=a.data(o)||a.parent().data(o);s&&s.databound?n.prop("selected",!1):s=t,r?e.$watch(r,function(e,t){i.$set("value",e),t!==e&&s.removeOption(t),s.addOption(e)}):s.addOption(i.value),n.on("$destroy",function(){s.removeOption(i.value)})}}}}],Uo=m({restrict:"E",terminal:!1});return e.angular.bootstrap?void console.log("WARNING: Tried to load angular more than once."):(it(),ut(Bi),void Ti(t).ready(function(){et(t,tt)}))}(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{display:none !important;}ng\\:form{display:block;}</style>'),function(e,t){"use strict";function n(){function e(e,n){return t.extend(new(t.extend(function(){},{prototype:e})),n)}function n(e,t){var n=t.caseInsensitiveMatch,i={originalPath:e,regexp:e},r=i.keys=[];return e=e.replace(/([().])/g,"\\$1").replace(/(\/)?:(\w+)([\?\*])?/g,function(e,t,n,i){var o="?"===i?i:null,a="*"===i?i:null;return r.push({name:n,optional:!!o}),t=t||"",""+(o?"":t)+"(?:"+(o?t:"")+(a&&"(.+?)"||"([^/]+)")+(o||"")+")"+(o||"")}).replace(/([\/$\*])/g,"\\$1"),i.regexp=new RegExp("^"+e+"$",n?"i":""),i}var i={};this.when=function(e,r){if(i[e]=t.extend({reloadOnSearch:!0},r,e&&n(e,r)),e){var o="/"==e[e.length-1]?e.substr(0,e.length-1):e+"/";i[o]=t.extend({redirectTo:e},n(o,r))}return this},this.otherwise=function(e){return this.when(null,e),this},this.$get=["$rootScope","$location","$routeParams","$q","$injector","$http","$templateCache","$sce",function(n,r,o,a,s,c,l,u){function p(e,t){var n=t.keys,i={};if(!t.regexp)return null;var r=t.regexp.exec(e);if(!r)return null;for(var o=1,a=r.length;a>o;++o){var s=n[o-1],c="string"==typeof r[o]?decodeURIComponent(r[o]):r[o];s&&c&&(i[s.name]=c)}return i}function d(){var e=f(),i=m.current;e&&i&&e.$$route===i.$$route&&t.equals(e.pathParams,i.pathParams)&&!e.reloadOnSearch&&!g?(i.params=e.params,t.copy(i.params,o),n.$broadcast("$routeUpdate",i)):(e||i)&&(g=!1,n.$broadcast("$routeChangeStart",e,i),m.current=e,e&&e.redirectTo&&(t.isString(e.redirectTo)?r.path(h(e.redirectTo,e.params)).search(e.params).replace():r.url(e.redirectTo(e.pathParams,r.path(),r.search())).replace()),a.when(e).then(function(){if(e){var n,i,r=t.extend({},e.resolve);return t.forEach(r,function(e,n){r[n]=t.isString(e)?s.get(e):s.invoke(e,null,null,n)}),t.isDefined(n=e.template)?t.isFunction(n)&&(n=n(e.params)):t.isDefined(i=e.templateUrl)&&(t.isFunction(i)&&(i=i(e.params)),i=u.getTrustedResourceUrl(i),t.isDefined(i)&&(e.loadedTemplateUrl=i,n=c.get(i,{cache:l}).then(function(e){return e.data}))),t.isDefined(n)&&(r.$template=n),a.all(r)}}).then(function(r){e==m.current&&(e&&(e.locals=r,t.copy(e.params,o)),n.$broadcast("$routeChangeSuccess",e,i))},function(t){e==m.current&&n.$broadcast("$routeChangeError",e,i,t)}))}function f(){var n,o;return t.forEach(i,function(i){!o&&(n=p(r.path(),i))&&(o=e(i,{params:t.extend({},r.search(),n),pathParams:n}),o.$$route=i)}),o||i[null]&&e(i[null],{params:{},pathParams:{}})}function h(e,n){var i=[];return t.forEach((e||"").split(":"),function(e,t){if(0===t)i.push(e);else{var r=e.match(/(\w+)(.*)/),o=r[1];i.push(n[o]),i.push(r[2]||""),delete n[o]}}),i.join("")}var g=!1,m={routes:i,reload:function(){g=!0,n.$evalAsync(d)}};return n.$on("$locationChangeSuccess",d),m}]}function i(){this.$get=function(){return{}}}function r(e,n,i){return{restrict:"ECA",terminal:!0,priority:400,transclude:"element",link:function(r,o,a,s,c){function l(){f&&(f.remove(),f=null),p&&(p.$destroy(),p=null),d&&(i.leave(d,function(){f=null}),f=d,d=null)}function u(){var a=e.current&&e.current.locals,s=a&&a.$template;if(t.isDefined(s)){var u=r.$new(),f=e.current,m=c(u,function(e){i.enter(e,null,d||o,function(){!t.isDefined(h)||h&&!r.$eval(h)||n()}),l()});d=m,p=f.scope=u,p.$emit("$viewContentLoaded"),p.$eval(g)}else l()}var p,d,f,h=a.autoscroll,g=a.onload||"";r.$on("$routeChangeSuccess",u),u()}}}function o(e,t,n){return{restrict:"ECA",priority:-400,link:function(i,r){var o=n.current,a=o.locals;r.html(a.$template);var s=e(r.contents());if(o.controller){a.$scope=i;var c=t(o.controller,a);o.controllerAs&&(i[o.controllerAs]=c),r.data("$ngControllerController",c),r.children().data("$ngControllerController",c)}s(i)}}}var a=t.module("ngRoute",["ng"]).provider("$route",n);a.provider("$routeParams",i),a.directive("ngView",r),a.directive("ngView",o),r.$inject=["$route","$anchorScroll","$animate"],o.$inject=["$compile","$controller","$route"]}(window,window.angular),function(e,t,n){"use strict";t.module("ngAnimate",["ng"]).factory("$$animateReflow",["$$rAF","$document",function(e,t){var n=t[0].body;return function(t){return e(function(){n.offsetWidth+1;t()})}}]).config(["$provide","$animateProvider",function(i,r){function o(e){for(var t=0;t<e.length;t++){var n=e[t];if(n.nodeType==p)return n}}function a(e){return t.element(o(e))}function s(e,t){return o(e)==o(t)}var c=t.noop,l=t.forEach,u=r.$$selectors,p=1,d="$$ngAnimateState",f="ng-animate",h={running:!0};i.decorator("$animate",["$delegate","$injector","$sniffer","$rootElement","$$asyncCallback","$rootScope","$document",function(e,n,i,p,g,m){function y(e){if(e){var t=[],r={},o=e.substr(1).split(".");(i.transitions||i.animations)&&t.push(n.get(u[""]));for(var a=0;a<o.length;a++){var s=o[a],c=u[s];c&&!r[s]&&(t.push(n.get(c)),r[s]=!0)}return t}}function v(e,n,i){function r(e,t){var n=e[t],i=e["before"+t.charAt(0).toUpperCase()+t.substr(1)];return n||i?("leave"==t&&(i=n,n=null),w.push({event:t,fn:n}),v.push({event:t,fn:i}),!0):void 0}function o(t,n,r){function o(e){if(n){if((n[e]||c)(),++p<a.length)return;n=null}r()}var a=[];l(t,function(e){e.fn&&a.push(e)});var p=0;l(a,function(t,r){var a=function(){o(r)};switch(t.event){case"setClass":n.push(t.fn(e,s,u,a));break;case"addClass":n.push(t.fn(e,s||i,a));break;case"removeClass":n.push(t.fn(e,u||i,a));break;default:n.push(t.fn(e,a))}}),n&&0===n.length&&r()}var a=e[0];if(a){var s,u,p="setClass"==n,d=p||"addClass"==n||"removeClass"==n;t.isArray(i)&&(s=i[0],u=i[1],i=s+" "+u);var f=e.attr("class"),h=f+" "+i;if(k(h)){var g=c,m=[],v=[],_=c,b=[],w=[],$=(" "+h).replace(/\s+/g,".");return l(y($),function(e){var t=r(e,n);!t&&p&&(r(e,"addClass"),r(e,"removeClass"))}),{node:a,event:n,className:i,isClassBased:d,isSetClassOperation:p,before:function(e){g=e,o(v,m,function(){g=c,e()})},after:function(e){_=e,o(w,b,function(){_=c,e()})},cancel:function(){m&&(l(m,function(e){(e||c)(!0)}),g(!0)),b&&(l(b,function(e){(e||c)(!0)}),_(!0))}}}}}function _(e,n,i,r,o,a,s){function c(t){var r="$animate:"+t;b&&b[r]&&b[r].length>0&&g(function(){i.triggerHandler(r,{event:e,className:n})})}function u(){c("before")}function p(){c("after")}function h(){c("close"),s&&g(function(){s()})}function m(){m.hasBeenRun||(m.hasBeenRun=!0,a())}function y(){if(!y.hasBeenRun){y.hasBeenRun=!0;var t=i.data(d);t&&(_&&_.isClassBased?w(i,n):(g(function(){var t=i.data(d)||{};P==t.index&&w(i,n,e)}),i.data(d,t))),h()}}var _=v(i,e,n);if(!_)return m(),u(),p(),void y();n=_.className;var b=t.element._data(_.node);b=b&&b.events,r||(r=o?o.parent():i.parent());var C=i.data(d)||{},k=C.active||{},M=C.totalActive||0,x=C.last,T=_.isClassBased?C.disabled||x&&!x.isClassBased:!1;if(T||$(i,r))return m(),u(),p(),void y();var E=!1;if(M>0){var A=[];if(_.isClassBased){if("setClass"==x.event)A.push(x),w(i,n);else if(k[n]){var D=k[n];D.event==e?E=!0:(A.push(D),w(i,n))}}else if("leave"==e&&k["ng-leave"])E=!0;else{for(var I in k)A.push(k[I]),w(i,I);k={},M=0}A.length>0&&l(A,function(e){e.cancel()})}if(!_.isClassBased||_.isSetClassOperation||E||(E="addClass"==e==i.hasClass(n)),E)return m(),u(),p(),void h();"leave"==e&&i.one("$destroy",function(){var e=t.element(this),n=e.data(d);if(n){var i=n.active["ng-leave"];i&&(i.cancel(),w(e,"ng-leave"))}}),i.addClass(f);var P=S++;M++,k[n]=_,i.data(d,{last:_,active:k,index:P,totalActive:M}),u(),_.before(function(t){var r=i.data(d);t=t||!r||!r.active[n]||_.isClassBased&&r.active[n].event!=e,m(),t===!0?y():(p(),_.after(y))})}function b(e){var n=o(e);if(n){var i=t.isFunction(n.getElementsByClassName)?n.getElementsByClassName(f):n.querySelectorAll("."+f);l(i,function(e){e=t.element(e);var n=e.data(d);n&&n.active&&l(n.active,function(e){e.cancel()})})}}function w(e,t){if(s(e,p))h.disabled||(h.running=!1,h.structural=!1);else if(t){var n=e.data(d)||{},i=t===!0;!i&&n.active&&n.active[t]&&(n.totalActive--,delete n.active[t]),(i||!n.totalActive)&&(e.removeClass(f),e.removeData(d))}}function $(e,t){if(h.disabled)return!0;if(s(e,p))return h.disabled||h.running;do{if(0===t.length)break;var n=s(t,p),i=n?h:t.data(d)||{},r=i.disabled||i.running?!0:i.last&&!i.last.isClassBased;if(n||r)return r;if(n)return!0}while(t=t.parent());return!0}var S=0;p.data(d,h),m.$$postDigest(function(){m.$$postDigest(function(){h.running=!1})});var C=r.classNameFilter(),k=C?function(e){return C.test(e)}:function(){return!0};return{enter:function(t,n,i,r){this.enabled(!1,t),e.enter(t,n,i),m.$$postDigest(function(){t=a(t),_("enter","ng-enter",t,n,i,c,r)})},leave:function(t,n){b(t),this.enabled(!1,t),m.$$postDigest(function(){_("leave","ng-leave",a(t),null,null,function(){e.leave(t)},n)})},move:function(t,n,i,r){b(t),this.enabled(!1,t),e.move(t,n,i),m.$$postDigest(function(){t=a(t),_("move","ng-move",t,n,i,c,r)})},addClass:function(t,n,i){t=a(t),_("addClass",n,t,null,null,function(){e.addClass(t,n)},i)},removeClass:function(t,n,i){t=a(t),_("removeClass",n,t,null,null,function(){e.removeClass(t,n)},i)},setClass:function(t,n,i,r){t=a(t),_("setClass",[n,i],t,null,null,function(){e.setClass(t,n,i)},r)},enabled:function(e,t){switch(arguments.length){case 2:if(e)w(t);else{var n=t.data(d)||{};n.disabled=!0,t.data(d,n)}break;case 1:h.disabled=!e;break;default:e=!h.disabled}return!!e}}}]),r.register("",["$window","$sniffer","$timeout","$$animateReflow",function(i,r,a,s){function u(e,t){A&&A(),j.push(t),A=s(function(){l(j,function(e){e()}),j=[],A=null,R={}})}function d(e,n){var i=o(e);e=t.element(i),z.push(e);var r=Date.now()+n;V>=r||(a.cancel(H),V=r,H=a(function(){f(z),z=[]},n,!1))}function f(e){l(e,function(e){var t=e.data(B);t&&(t.closeAnimationFn||c)()})}function h(e,t){var n=t?R[t]:null;if(!n){var r,o,a,s,c=0,u=0,d=0,f=0;l(e,function(e){if(e.nodeType==p){var t=i.getComputedStyle(e)||{};a=t[k+D],c=Math.max(g(a),c),s=t[k+I],r=t[k+P],u=Math.max(g(r),u),o=t[x+P],f=Math.max(g(o),f);var n=g(t[x+D]);n>0&&(n*=parseInt(t[x+N],10)||1),d=Math.max(n,d)}}),n={total:0,transitionPropertyStyle:s,transitionDurationStyle:a,transitionDelayStyle:r,transitionDelay:u,transitionDuration:c,animationDelayStyle:o,animationDelay:f,animationDuration:d},t&&(R[t]=n)}return n}function g(e){var n=0,i=t.isString(e)?e.split(/\s*,\s*/):[];return l(i,function(e){n=Math.max(parseFloat(e)||0,n)}),n}function m(e){var t=e.parent(),n=t.data(L);return n||(t.data(L,++q),n=q),n+"-"+o(e).getAttribute("class")}function y(e,t,n){var i=["ng-enter","ng-leave","ng-move"].indexOf(n)>=0,r=m(t),a=r+" "+n,s=R[a]?++R[a].total:0,l={};if(s>0){var u=n+"-stagger",p=r+" "+u,d=!R[p];d&&t.addClass(u),l=h(t,p),d&&t.removeClass(u)}t.addClass(n);var f=t.data(B)||{},g=h(t,a),y=g.transitionDuration,v=g.animationDuration;if(i&&0===y&&0===v)return t.removeClass(n),!1;var _=i&&y>0,b=v>0&&l.animationDelay>0&&0===l.animationDuration;t.data(B,{stagger:l,cacheKey:a,running:f.running||0,itemIndex:s,blockTransition:_,blockAnimation:b,closeAnimationFn:c});var w=o(t);return _&&(w.style[k+I]="none"),b&&(w.style[x]="none 0s"),!0}function v(e,t,n,i){function r(){t.off(N,a),t.removeClass(u),S(t,n);var e=o(t);for(var i in $)e.style.removeProperty($[i])}function a(e){e.stopPropagation();var t=e.originalEvent||e,n=t.$manualTimeStamp||t.timeStamp||Date.now(),r=parseFloat(t.elapsedTime.toFixed(F));Math.max(n-P,0)>=b&&r>=g&&i()}var s=o(t),c=t.data(B);if(-1==s.getAttribute("class").indexOf(n)||!c)return void i();c.blockTransition&&(s.style[k+I]=""),c.blockAnimation&&(s.style[x]="");var u="";l(n.split(" "),function(e,t){u+=(t>0?" ":"")+e+"-active"}),t.addClass(u);var p=c.eventCacheKey+" "+u,f=h(t,p),g=Math.max(f.transitionDuration,f.animationDuration);if(0===g)return t.removeClass(u),S(t,n),void i();var m=Math.max(f.transitionDelay,f.animationDelay),y=c.stagger,v=c.itemIndex,b=m*U,w="",$=[];if(f.transitionDuration>0){var C=f.transitionPropertyStyle;-1==C.indexOf("all")&&(w+=E+"transition-property: "+C+";",w+=E+"transition-duration: "+f.transitionDurationStyle+";",$.push(E+"transition-property"),$.push(E+"transition-duration"))}if(v>0){if(y.transitionDelay>0&&0===y.transitionDuration){var A=f.transitionDelayStyle;w+=E+"transition-delay: "+_(A,y.transitionDelay,v)+"; ",$.push(E+"transition-delay")}y.animationDelay>0&&0===y.animationDuration&&(w+=E+"animation-delay: "+_(f.animationDelayStyle,y.animationDelay,v)+"; ",$.push(E+"animation-delay"))}if($.length>0){var D=s.getAttribute("style")||"";s.setAttribute("style",D+" "+w)}var P=Date.now(),N=T+" "+M;t.on(N,a),c.closeAnimationFn=function(){r(),i()};var L=v*(Math.max(y.animationDelay,y.transitionDelay)||0),R=(m+g)*O,q=(L+R)*U;return c.running++,d(t,q),r}function _(e,t,n){var i="";return l(e.split(","),function(e,r){i+=(r>0?",":"")+(n*t+parseInt(e,10))+"s"}),i}function b(e,t,n,i){return y(e,t,n,i)?function(e){e&&S(t,n)}:void 0}function w(e,t,n,i){return t.data(B)?v(e,t,n,i):(S(t,n),void i())}function $(e,t,n,i){var r=b(e,t,n);if(!r)return void i();var o=r;return u(t,function(){o=w(e,t,n,i)}),function(e){(o||c)(e)}}function S(e,t){e.removeClass(t);var n=e.data(B);n&&(n.running&&n.running--,n.running&&0!==n.running||e.removeData(B))}function C(e,n){var i="";return e=t.isArray(e)?e:e.split(/\s+/),l(e,function(e,t){e&&e.length>0&&(i+=(t>0?" ":"")+e+n)}),i}var k,M,x,T,E="";e.ontransitionend===n&&e.onwebkittransitionend!==n?(E="-webkit-",k="WebkitTransition",M="webkitTransitionEnd transitionend"):(k="transition",M="transitionend"),e.onanimationend===n&&e.onwebkitanimationend!==n?(E="-webkit-",x="WebkitAnimation",T="webkitAnimationEnd animationend"):(x="animation",T="animationend");var A,D="Duration",I="Property",P="Delay",N="IterationCount",L="$$ngAnimateKey",B="$$ngAnimateCSS3Data",F=3,O=1.5,U=1e3,R={},q=0,j=[],H=null,V=0,z=[];return{enter:function(e,t){return $("enter",e,"ng-enter",t)},leave:function(e,t){return $("leave",e,"ng-leave",t)},move:function(e,t){return $("move",e,"ng-move",t)},beforeSetClass:function(e,t,n,i){var r=C(n,"-remove")+" "+C(t,"-add"),o=b("setClass",e,r);return o?(u(e,i),o):void i()},beforeAddClass:function(e,t,n){var i=b("addClass",e,C(t,"-add"));return i?(u(e,n),i):void n()},beforeRemoveClass:function(e,t,n){var i=b("removeClass",e,C(t,"-remove"));return i?(u(e,n),i):void n()},setClass:function(e,t,n,i){n=C(n,"-remove"),t=C(t,"-add");var r=n+" "+t;return w("setClass",e,r,i)},addClass:function(e,t,n){return w("addClass",e,C(t,"-add"),n)},removeClass:function(e,t,n){return w("removeClass",e,C(t,"-remove"),n)}}}])}])}(window,window.angular),function(e,t){"use strict";function n(){this.$get=["$$sanitizeUri",function(e){return function(t){var n=[];return o(t,c(n,function(t,n){return!/^unsafe/.test(e(t,n))})),n.join("")}}]}function i(e){var n=[],i=c(n,t.noop);return i.chars(e),n.join("")}function r(e){var t,n={},i=e.split(",");for(t=0;t<i.length;t++)n[i[t]]=!0;return n}function o(e,n){function i(e,i,o,s){if(i=t.lowercase(i),C[i])for(;v.last()&&k[v.last()];)r("",v.last());S[i]&&v.last()==i&&r("",i),s=b[i]||!!s,s||v.push(i);var c={};o.replace(d,function(e,t,n,i,r){var o=n||i||r||"";c[t]=a(o)}),n.start&&n.start(i,c,s)}function r(e,i){var r,o=0;if(i=t.lowercase(i))for(o=v.length-1;o>=0&&v[o]!=i;o--);if(o>=0){for(r=v.length-1;r>=o;r--)n.end&&n.end(v[r]);v.length=o}}var o,s,c,v=[],_=e;for(v.last=function(){return v[v.length-1]};e;){if(s=!0,v.last()&&M[v.last()])e=e.replace(new RegExp("(.*)<\\s*\\/\\s*"+v.last()+"[^>]*>","i"),function(e,t){return t=t.replace(g,"$1").replace(y,"$1"),n.chars&&n.chars(a(t)),""}),r("",v.last());else if(0===e.indexOf("<!--")?(o=e.indexOf("--",4),o>=0&&e.lastIndexOf("-->",o)===o&&(n.comment&&n.comment(e.substring(4,o)),e=e.substring(o+3),s=!1)):m.test(e)?(c=e.match(m),c&&(e=e.replace(c[0],""),s=!1)):h.test(e)?(c=e.match(p),c&&(e=e.substring(c[0].length),c[0].replace(p,r),s=!1)):f.test(e)&&(c=e.match(u),c&&(e=e.substring(c[0].length),c[0].replace(u,i),s=!1)),s){o=e.indexOf("<");var w=0>o?e:e.substring(0,o);e=0>o?"":e.substring(o),n.chars&&n.chars(a(w))}if(e==_)throw l("badparse","The sanitizer was unable to parse the following block of html: {0}",e);_=e}r()}function a(e){if(!e)return"";var t=D.exec(e),n=t[1],i=t[3],r=t[2];return r&&(A.innerHTML=r.replace(/</g,"&lt;"),r="textContent"in A?A.textContent:A.innerText),n+r+i}function s(e){return e.replace(/&/g,"&amp;").replace(v,function(e){var t=e.charCodeAt(0),n=e.charCodeAt(1);return"&#"+(1024*(t-55296)+(n-56320)+65536)+";"}).replace(_,function(e){return"&#"+e.charCodeAt(0)+";"}).replace(/</g,"&lt;").replace(/>/g,"&gt;")}function c(e,n){var i=!1,r=t.bind(e,e.push);return{start:function(e,o,a){e=t.lowercase(e),!i&&M[e]&&(i=e),i||x[e]!==!0||(r("<"),r(e),t.forEach(o,function(i,o){var a=t.lowercase(o),c="img"===e&&"src"===a||"background"===a;E[a]!==!0||T[a]===!0&&!n(i,c)||(r(" "),r(o),r('="'),r(s(i)),r('"'))}),r(a?"/>":">"))},end:function(e){e=t.lowercase(e),i||x[e]!==!0||(r("</"),r(e),r(">")),e==i&&(i=!1)},chars:function(e){i||r(s(e))}}}var l=t.$$minErr("$sanitize"),u=/^<\s*([\w:-]+)((?:\s+[\w:-]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)\s*>/,p=/^<\s*\/\s*([\w:-]+)[^>]*>/,d=/([\w:-]+)(?:\s*=\s*(?:(?:"((?:[^"])*)")|(?:'((?:[^'])*)')|([^>\s]+)))?/g,f=/^</,h=/^<\s*\//,g=/<!--(.*?)-->/g,m=/<!DOCTYPE([^>]*?)>/i,y=/<!\[CDATA\[(.*?)]]>/g,v=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,_=/([^\#-~| |!])/g,b=r("area,br,col,hr,img,wbr"),w=r("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),$=r("rp,rt"),S=t.extend({},$,w),C=t.extend({},w,r("address,article,aside,blockquote,caption,center,del,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,map,menu,nav,ol,pre,script,section,table,ul")),k=t.extend({},$,r("a,abbr,acronym,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,q,ruby,rp,rt,s,samp,small,span,strike,strong,sub,sup,time,tt,u,var")),M=r("script,style"),x=t.extend({},b,C,k,S),T=r("background,cite,href,longdesc,src,usemap"),E=t.extend({},T,r("abbr,align,alt,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,coords,dir,face,headers,height,hreflang,hspace,ismap,lang,language,nohref,nowrap,rel,rev,rows,rowspan,rules,scope,scrolling,shape,size,span,start,summary,target,title,type,valign,value,vspace,width")),A=document.createElement("pre"),D=/^(\s*)([\s\S]*?)(\s*)$/;t.module("ngSanitize",[]).provider("$sanitize",n),t.module("ngSanitize").filter("linky",["$sanitize",function(e){var n=/((ftp|https?):\/\/|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s.;,(){}<>]/,r=/^mailto:/;return function(o,a){function s(e){e&&f.push(i(e))}function c(e,n){f.push("<a "),t.isDefined(a)&&(f.push('target="'),f.push(a),f.push('" ')),f.push('href="'),f.push(e),f.push('">'),s(n),f.push("</a>")}if(!o)return o;for(var l,u,p,d=o,f=[];l=d.match(n);)u=l[0],l[2]==l[3]&&(u="mailto:"+u),p=l.index,s(d.substr(0,p)),c(u,l[0].replace(r,"")),d=d.substring(p+l[0].length);return s(d),e(f.join(""))}}])}(window,window.angular),function(e,t){"use strict";function n(e,t,n){i.directive(e,["$parse","$swipe",function(i,r){var o=75,a=.3,s=30;return function(c,l,u){function p(e){if(!d)return!1;var n=Math.abs(e.y-d.y),i=(e.x-d.x)*t;return f&&o>n&&i>0&&i>s&&a>n/i}var d,f,h=i(u[e]);r.bind(l,{start:function(e){d=e,f=!0},cancel:function(){f=!1},end:function(e,t){p(e)&&c.$apply(function(){l.triggerHandler(n),h(c,{$event:t})})}})}}])}var i=t.module("ngTouch",[]);i.factory("$swipe",[function(){function e(e){var t=e.touches&&e.touches.length?e.touches:[e],n=e.changedTouches&&e.changedTouches[0]||e.originalEvent&&e.originalEvent.changedTouches&&e.originalEvent.changedTouches[0]||t[0].originalEvent||t[0];return{x:n.clientX,y:n.clientY}}var t=10;return{bind:function(n,i){var r,o,a,s,c=!1;n.on("touchstart mousedown",function(t){a=e(t),c=!0,r=0,o=0,s=a,i.start&&i.start(a,t)}),n.on("touchcancel",function(e){c=!1,i.cancel&&i.cancel(e)}),n.on("touchmove mousemove",function(n){if(c&&a){var l=e(n);if(r+=Math.abs(l.x-s.x),o+=Math.abs(l.y-s.y),s=l,!(t>r&&t>o))return o>r?(c=!1,void(i.cancel&&i.cancel(n))):(n.preventDefault(),void(i.move&&i.move(l,n)))}}),n.on("touchend mouseup",function(t){c&&(c=!1,i.end&&i.end(e(t),t))})}}}]),i.config(["$provide",function(e){e.decorator("ngClickDirective",["$delegate",function(e){return e.shift(),e}])}]),i.directive("ngClick",["$parse","$timeout","$rootElement",function(e,n,i){function r(e,t,n,i){return Math.abs(e-n)<g&&Math.abs(t-i)<g}function o(e,t,n){for(var i=0;i<e.length;i+=2)if(r(e[i],e[i+1],t,n))return e.splice(i,i+2),!0;return!1}function a(e){if(!(Date.now()-l>h)){var t=e.touches&&e.touches.length?e.touches:[e],n=t[0].clientX,i=t[0].clientY;1>n&&1>i||p&&p[0]===n&&p[1]===i||(p&&(p=null),"label"===e.target.tagName.toLowerCase()&&(p=[n,i]),o(u,n,i)||(e.stopPropagation(),e.preventDefault(),e.target&&e.target.blur()))}}function s(e){var t=e.touches&&e.touches.length?e.touches:[e],i=t[0].clientX,r=t[0].clientY;u.push(i,r),n(function(){for(var e=0;e<u.length;e+=2)if(u[e]==i&&u[e+1]==r)return void u.splice(e,e+2)},h,!1)}function c(e,t){u||(i[0].addEventListener("click",a,!0),i[0].addEventListener("touchstart",s,!0),u=[]),l=Date.now(),o(u,e,t)}var l,u,p,d=750,f=12,h=2500,g=25,m="ng-click-active";return function(n,i,r){function o(){h=!1,i.removeClass(m)}var a,s,l,u,p=e(r.ngClick),h=!1;i.on("touchstart",function(e){h=!0,a=e.target?e.target:e.srcElement,3==a.nodeType&&(a=a.parentNode),i.addClass(m),s=Date.now();var t=e.touches&&e.touches.length?e.touches:[e],n=t[0].originalEvent||t[0];l=n.clientX,u=n.clientY}),i.on("touchmove",function(){o()}),i.on("touchcancel",function(){o()}),i.on("touchend",function(e){var n=Date.now()-s,p=e.changedTouches&&e.changedTouches.length?e.changedTouches:e.touches&&e.touches.length?e.touches:[e],g=p[0].originalEvent||p[0],m=g.clientX,y=g.clientY,v=Math.sqrt(Math.pow(m-l,2)+Math.pow(y-u,2));h&&d>n&&f>v&&(c(m,y),a&&a.blur(),t.isDefined(r.disabled)&&r.disabled!==!1||i.triggerHandler("click",[e])),o()}),i.onclick=function(){},i.on("click",function(e,t){n.$apply(function(){p(n,{$event:t||e})})}),i.on("mousedown",function(){i.addClass(m)}),i.on("mousemove mouseup",function(){i.removeClass(m)})}}]),n("ngSwipeLeft",-1,"swipeleft"),n("ngSwipeRight",1,"swiperight")}(window,window.angular),angular.module("ui.bootstrap",["ui.bootstrap.tpls","ui.bootstrap.transition","ui.bootstrap.collapse","ui.bootstrap.dropdownToggle","ui.bootstrap.modal","ui.bootstrap.position","ui.bootstrap.bindHtml","ui.bootstrap.tooltip"]),angular.module("ui.bootstrap.tpls",["template/modal/backdrop.html","template/modal/window.html","template/tooltip/tooltip-html-unsafe-popup.html","template/tooltip/tooltip-popup.html"]),angular.module("ui.bootstrap.transition",[]).factory("$transition",["$q","$timeout","$rootScope",function(e,t,n){function i(e){for(var t in e)if(void 0!==o.style[t])return e[t]}var r=function(i,o,a){a=a||{};var s=e.defer(),c=r[a.animation?"animationEndEventName":"transitionEndEventName"],l=function(){n.$apply(function(){i.unbind(c,l),s.resolve(i)})};return c&&i.bind(c,l),t(function(){angular.isString(o)?i.addClass(o):angular.isFunction(o)?o(i):angular.isObject(o)&&i.css(o),c||s.resolve(i)}),s.promise.cancel=function(){c&&i.unbind(c,l),s.reject("Transition cancelled")},s.promise},o=document.createElement("trans"),a={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd",transition:"transitionend"},s={WebkitTransition:"webkitAnimationEnd",MozTransition:"animationend",OTransition:"oAnimationEnd",transition:"animationend"};return r.transitionEndEventName=i(a),r.animationEndEventName=i(s),r}]),angular.module("ui.bootstrap.collapse",["ui.bootstrap.transition"]).directive("collapse",["$transition",function(e){return{link:function(t,n,i){function r(t){function i(){l===r&&(l=void 0)}var r=e(n,t);return l&&l.cancel(),l=r,r.then(i,i),r}function o(){u?(u=!1,a()):(n.removeClass("collapse").addClass("collapsing"),r({height:n[0].scrollHeight+"px"}).then(a))}function a(){n.removeClass("collapsing"),n.addClass("collapse in"),n.css({height:"auto"})}function s(){if(u)u=!1,c(),n.css({height:0});else{n.css({height:n[0].scrollHeight+"px"});{n[0].offsetWidth}n.removeClass("collapse in").addClass("collapsing"),r({height:0}).then(c)}}function c(){n.removeClass("collapsing"),n.addClass("collapse")}var l,u=!0;t.$watch(i.collapse,function(e){e?s():o()})}}}]),angular.module("ui.bootstrap.dropdownToggle",[]).directive("dropdownToggle",["$document","$location",function(e){var t=null,n=angular.noop;return{restrict:"CA",link:function(i,r){i.$watch("$location.path",function(){n()}),r.parent().bind("click",function(){n()}),r.bind("click",function(i){var o=r===t;i.preventDefault(),i.stopPropagation(),t&&n(),o||r.hasClass("disabled")||r.prop("disabled")||(r.parent().addClass("open"),t=r,n=function(i){i&&(i.preventDefault(),i.stopPropagation()),e.unbind("click",n),r.parent().removeClass("open"),n=angular.noop,t=null},e.bind("click",n))})}}}]),angular.module("ui.bootstrap.modal",["ui.bootstrap.transition"]).factory("$$stackedMap",function(){return{createNew:function(){var e=[];return{add:function(t,n){e.push({key:t,value:n})},get:function(t){for(var n=0;n<e.length;n++)if(t==e[n].key)return e[n]},keys:function(){for(var t=[],n=0;n<e.length;n++)t.push(e[n].key);return t},top:function(){return e[e.length-1]
},remove:function(t){for(var n=-1,i=0;i<e.length;i++)if(t==e[i].key){n=i;break}return e.splice(n,1)[0]},removeTop:function(){return e.splice(e.length-1,1)[0]},length:function(){return e.length}}}}}).directive("modalBackdrop",["$timeout",function(e){return{restrict:"EA",replace:!0,templateUrl:"template/modal/backdrop.html",link:function(t){t.animate=!1,e(function(){t.animate=!0})}}}]).directive("modalWindow",["$modalStack","$timeout",function(e,t){return{restrict:"EA",scope:{index:"@",animate:"=",nav:"="},replace:!0,transclude:!0,templateUrl:"template/modal/window.html",link:function(n,i,r){n.windowClass=r.windowClass||"",t(function(){n.animate=!0,i[0].focus()}),n.close=function(t){var n=e.getTop();n&&n.value.backdrop&&"static"!=n.value.backdrop&&t.target===t.currentTarget&&(t.preventDefault(),t.stopPropagation(),e.dismiss(n.key,"backdrop click"))}}}}]).factory("$modalStack",["$transition","$timeout","$document","$compile","$rootScope","$$stackedMap",function(e,t,n,i,r,o){function a(){for(var e=-1,t=f.keys(),n=0;n<t.length;n++)f.get(t[n]).value.backdrop&&(e=n);return e}function s(e){var t=n.find("body").eq(0),i=f.get(e).value;f.remove(e),l(i.modalDomEl,i.modalScope,0,c),t.toggleClass(d,f.length()>0)}function c(){if(u&&-1==a()){var e=p;l(u,p,0,function(){e.$destroy(),e=null}),u=void 0,p=void 0}}function l(n,i,r,o){function a(){a.done||(a.done=!0,n.remove(),o&&o())}i.animate=!1;var s=e.transitionEndEventName;if(s){var c=t(a,r);n.bind(s,function(){t.cancel(c),a(),i.$apply()})}else t(a,0)}var u,p,d="modal-open",f=o.createNew(),h={};return r.$watch(a,function(e){p&&(p.index=e)}),n.bind("keydown",function(e){var t;27===e.which&&(t=f.top(),t&&t.value.keyboard&&r.$apply(function(){h.dismiss(t.key)}))}),h.open=function(e,t){f.add(e,{deferred:t.deferred,modalScope:t.scope,backdrop:t.backdrop,keyboard:t.keyboard});var o=n.find("body").eq(0),s=a();s>=0&&!u&&(p=r.$new(!0),p.index=s,u=i("<div modal-backdrop></div>")(p),o.append(u));var c=angular.element("<div modal-window></div>");c.attr("window-class",t.windowClass),c.attr("index",f.length()-1),c.attr("animate","animate"),c.attr("nav","nav"),c.html(t.content);var l=i(c)(t.scope);f.top().value.modalDomEl=l,o.append(l),o.addClass(d)},h.close=function(e,t){var n=f.get(e).value;n&&(n.deferred.resolve(t),s(e))},h.dismiss=function(e,t){var n=f.get(e).value;n&&(n.deferred.reject(t),s(e))},h.dismissAll=function(e){for(var t=this.getTop();t;)this.dismiss(t.key,e),t=this.getTop()},h.getTop=function(){return f.top()},h}]).provider("$modal",function(){var e={options:{backdrop:!0,keyboard:!0},$get:["$injector","$rootScope","$q","$http","$templateCache","$controller","$modalStack",function(t,n,i,r,o,a,s){function c(e){return e.template?i.when(e.template):r.get(e.templateUrl,{cache:o}).then(function(e){return e.data})}function l(e){var n=[];return angular.forEach(e,function(e){(angular.isFunction(e)||angular.isArray(e))&&n.push(i.when(t.invoke(e)))}),n}var u={};return u.open=function(t){var r=i.defer(),o=i.defer(),u={result:r.promise,opened:o.promise,close:function(e){s.close(u,e)},dismiss:function(e){s.dismiss(u,e)}};if(t=angular.extend({},e.options,t),t.resolve=t.resolve||{},!t.template&&!t.templateUrl)throw new Error("One of template or templateUrl options is required.");var p=i.all([c(t)].concat(l(t.resolve)));return p.then(function(e){var i=(t.scope||n).$new();i.$close=u.close,i.$dismiss=u.dismiss;var o,c={},l=1;t.controller&&(c.$scope=i,c.$modalInstance=u,angular.forEach(t.resolve,function(t,n){c[n]=e[l++]}),o=a(t.controller,c)),s.open(u,{scope:i,deferred:r,content:e[0],backdrop:t.backdrop,keyboard:t.keyboard,windowClass:t.windowClass})},function(e){r.reject(e)}),p.then(function(){o.resolve(!0)},function(){o.reject(!1)}),u},u}]};return e}),angular.module("ui.bootstrap.position",[]).factory("$position",["$document","$window",function(e,t){function n(e,n){return e.currentStyle?e.currentStyle[n]:t.getComputedStyle?t.getComputedStyle(e)[n]:e.style[n]}function i(e){return"static"===(n(e,"position")||"static")}var r=function(t){for(var n=e[0],r=t.offsetParent||n;r&&r!==n&&i(r);)r=r.offsetParent;return r||n};return{position:function(t){var n=this.offset(t),i={top:0,left:0},o=r(t[0]);o!=e[0]&&(i=this.offset(angular.element(o)),i.top+=o.clientTop-o.scrollTop,i.left+=o.clientLeft-o.scrollLeft);var a=t[0].getBoundingClientRect();return{width:a.width||t.prop("offsetWidth"),height:a.height||t.prop("offsetHeight"),top:n.top-i.top,left:n.left-i.left}},offset:function(n){var i=n[0].getBoundingClientRect();return{width:i.width||n.prop("offsetWidth"),height:i.height||n.prop("offsetHeight"),top:i.top+(t.pageYOffset||e[0].body.scrollTop||e[0].documentElement.scrollTop),left:i.left+(t.pageXOffset||e[0].body.scrollLeft||e[0].documentElement.scrollLeft)}}}}]),angular.module("ui.bootstrap.bindHtml",[]).directive("bindHtmlUnsafe",function(){return function(e,t,n){t.addClass("ng-binding").data("$binding",n.bindHtmlUnsafe),e.$watch(n.bindHtmlUnsafe,function(e){t.html(e||"")})}}),angular.module("ui.bootstrap.tooltip",["ui.bootstrap.position","ui.bootstrap.bindHtml"]).provider("$tooltip",function(){function e(e){var t=/[A-Z]/g,n="-";return e.replace(t,function(e,t){return(t?n:"")+e.toLowerCase()})}var t={placement:"top",animation:!0,popupDelay:0},n={mouseenter:"mouseleave",click:"click",focus:"blur"},i={};this.options=function(e){angular.extend(i,e)},this.setTriggers=function(e){angular.extend(n,e)},this.$get=["$window","$compile","$timeout","$parse","$document","$position","$interpolate",function(r,o,a,s,c,l,u){return function(r,p,d){function f(e){var t=e||h.trigger||d,i=n[t]||t;return{show:t,hide:i}}var h=angular.extend({},t,i),g=e(r),m=u.startSymbol(),y=u.endSymbol(),v="<div "+g+'-popup title="'+m+"tt_title"+y+'" content="'+m+"tt_content"+y+'" placement="'+m+"tt_placement"+y+'" animation="tt_animation" is-open="tt_isOpen"></div>';return{restrict:"EA",scope:!0,compile:function(){var e=o(v);return function(t,n,i){function o(){t.tt_isOpen?d():u()}function u(){(!k||t.$eval(i[p+"Enable"]))&&(t.tt_popupDelay?(w=a(g,t.tt_popupDelay,!1),w.then(function(e){e()})):g()())}function d(){t.$apply(function(){m()})}function g(){return t.tt_content?(y(),b&&a.cancel(b),_.css({top:0,left:0,display:"block"}),$?c.find("body").append(_):n.after(_),M(),t.tt_isOpen=!0,t.$digest(),M):angular.noop}function m(){t.tt_isOpen=!1,a.cancel(w),t.tt_animation?b=a(v,500):v()}function y(){_&&v(),_=e(t,function(){}),t.$digest()}function v(){_&&(_.remove(),_=null)}var _,b,w,$=angular.isDefined(h.appendToBody)?h.appendToBody:!1,S=f(void 0),C=!1,k=angular.isDefined(i[p+"Enable"]),M=function(){var e,i,r,o;switch(e=$?l.offset(n):l.position(n),i=_.prop("offsetWidth"),r=_.prop("offsetHeight"),t.tt_placement){case"right":o={top:e.top+e.height/2-r/2,left:e.left+e.width};break;case"bottom":o={top:e.top+e.height,left:e.left+e.width/2-i/2};break;case"left":o={top:e.top+e.height/2-r/2,left:e.left-i};break;default:o={top:e.top-r,left:e.left+e.width/2-i/2}}o.top+="px",o.left+="px",_.css(o)};t.tt_isOpen=!1,i.$observe(r,function(e){t.tt_content=e,!e&&t.tt_isOpen&&m()}),i.$observe(p+"Title",function(e){t.tt_title=e}),i.$observe(p+"Placement",function(e){t.tt_placement=angular.isDefined(e)?e:h.placement}),i.$observe(p+"PopupDelay",function(e){var n=parseInt(e,10);t.tt_popupDelay=isNaN(n)?h.popupDelay:n});var x=function(){C&&(n.unbind(S.show,u),n.unbind(S.hide,d))};i.$observe(p+"Trigger",function(e){x(),S=f(e),S.show===S.hide?n.bind(S.show,o):(n.bind(S.show,u),n.bind(S.hide,d)),C=!0});var T=t.$eval(i[p+"Animation"]);t.tt_animation=angular.isDefined(T)?!!T:h.animation,i.$observe(p+"AppendToBody",function(e){$=angular.isDefined(e)?s(e)(t):$}),$&&t.$on("$locationChangeSuccess",function(){t.tt_isOpen&&m()}),t.$on("$destroy",function(){a.cancel(b),a.cancel(w),x(),v()})}}}}}]}).directive("tooltipPopup",function(){return{restrict:"EA",replace:!0,scope:{content:"@",placement:"@",animation:"&",isOpen:"&"},templateUrl:"template/tooltip/tooltip-popup.html"}}).directive("tooltip",["$tooltip",function(e){return e("tooltip","tooltip","mouseenter")}]).directive("tooltipHtmlUnsafePopup",function(){return{restrict:"EA",replace:!0,scope:{content:"@",placement:"@",animation:"&",isOpen:"&"},templateUrl:"template/tooltip/tooltip-html-unsafe-popup.html"}}).directive("tooltipHtmlUnsafe",["$tooltip",function(e){return e("tooltipHtmlUnsafe","tooltip","mouseenter")}]),angular.module("template/modal/backdrop.html",[]).run(["$templateCache",function(e){e.put("template/modal/backdrop.html",'<div class="modal-backdrop fade" ng-class="{in: animate}" ng-style="{\'z-index\': 1040 + index*10 + 1}"></div>')}]),angular.module("template/modal/window.html",[]).run(["$templateCache",function(e){e.put("template/modal/window.html",'<div tabindex="-1" class="modal fade {{ windowClass }}" ng-class="{in: animate}" ng-style="{\'z-index\': 1050 + index*10, display: \'block\'}" ng-click="close($event)">\n <div class="modal_prev_wrap hidden-xs hidden-sm" ng-show="nav.hasPrev" ng-click="nav.prev($event)">\n <div class="modal_prev"></div>\n </div>\n <div class="modal_close_wrap hidden-xs hidden-sm" ng-click="close($event)">\n <div class="modal_close"></div>\n </div>\n <div class="modal-dialog"><div class="modal-content" ng-transclude></div></div>\n</div>')}]),angular.module("template/tooltip/tooltip-html-unsafe-popup.html",[]).run(["$templateCache",function(e){e.put("template/tooltip/tooltip-html-unsafe-popup.html",'<div class="tooltip {{placement}}" ng-class="{ in: isOpen(), fade: animation() }">\n <div class="tooltip-arrow"></div>\n <div class="tooltip-inner" bind-html-unsafe="content"></div>\n</div>\n')}]),angular.module("template/tooltip/tooltip-popup.html",[]).run(["$templateCache",function(e){e.put("template/tooltip/tooltip-popup.html",'<div class="tooltip {{placement}}" ng-class="{ in: isOpen(), fade: animation() }">\n <div class="tooltip-arrow"></div>\n <div class="tooltip-inner" ng-bind="content"></div>\n</div>\n')}]),function(){"use strict";var e=angular.module("pasvaz.bindonce",[]);e.directive("bindonce",function(){var e=function(e){if(e&&0!==e.length){var t=angular.lowercase(""+e);e=!("f"===t||"0"===t||"false"===t||"no"===t||"n"===t||"[]"===t)}else e=!1;return e},t=parseInt((/msie (\d+)/.exec(angular.lowercase(navigator.userAgent))||[])[1],10);isNaN(t)&&(t=parseInt((/trident\/.*; rv:(\d+)/.exec(angular.lowercase(navigator.userAgent))||[])[1],10));var n={restrict:"AM",controller:["$scope","$element","$attrs","$interpolate",function(n,i,r,o){var a=function(t,n,i){var r="show"===n?"":"none",o="hide"===n?"":"none";t.css("display",e(i)?r:o)},s=function(e,t){if(angular.isObject(t)&&!angular.isArray(t)){var n=[];angular.forEach(t,function(e,t){e&&n.push(t)}),t=n}t&&e.addClass(angular.isArray(t)?t.join(" "):t)},c=function(e,t){e.transclude(t,function(t){var n=e.element.parent(),i=e.element&&e.element[e.element.length-1],r=n&&n[0]||i&&i.parentNode,o=i&&i.nextSibling||null;angular.forEach(t,function(e){r.insertBefore(e,o)})})},l={watcherRemover:void 0,binders:[],group:r.boName,element:i,ran:!1,addBinder:function(e){this.binders.push(e),this.ran&&this.runBinders()},setupWatcher:function(e){var t=this;this.watcherRemover=n.$watch(e,function(e){void 0!==e&&(t.removeWatcher(),t.checkBindonce(e))},!0)},checkBindonce:function(e){var t=this,n=e.$promise?e.$promise.then:e.then;"function"==typeof n?n(function(){t.runBinders()}):t.runBinders()},removeWatcher:function(){void 0!==this.watcherRemover&&(this.watcherRemover(),this.watcherRemover=void 0)},runBinders:function(){for(;this.binders.length>0;){var n=this.binders.shift();if(!this.group||this.group==n.group){var i=n.scope.$eval(n.interpolate?o(n.value):n.value);switch(n.attr){case"boIf":e(i)&&c(n,n.scope.$new());break;case"boSwitch":var r,l=n.controller[0];(r=l.cases["!"+i]||l.cases["?"])&&(n.scope.$eval(n.attrs.change),angular.forEach(r,function(e){c(e,n.scope.$new())}));break;case"boSwitchWhen":var u=n.controller[0];u.cases["!"+n.attrs.boSwitchWhen]=u.cases["!"+n.attrs.boSwitchWhen]||[],u.cases["!"+n.attrs.boSwitchWhen].push({transclude:n.transclude,element:n.element});break;case"boSwitchDefault":var u=n.controller[0];u.cases["?"]=u.cases["?"]||[],u.cases["?"].push({transclude:n.transclude,element:n.element});break;case"hide":case"show":a(n.element,n.attr,i);break;case"class":s(n.element,i);break;case"text":n.element.text(i);break;case"html":n.element.html(i);break;case"style":n.element.css(i);break;case"src":n.element.attr(n.attr,i),t&&n.element.prop("src",i);break;case"attr":angular.forEach(n.attrs,function(e,t){var i,r;t.match(/^boAttr./)&&n.attrs[t]&&(i=t.replace(/^boAttr/,"").replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),r=n.scope.$eval(n.attrs[t]),n.element.attr(i,r))});break;case"href":case"alt":case"title":case"id":case"value":n.element.attr(n.attr,i)}}}this.ran=!0}};return l}],link:function(e,t,n,i){var r=n.bindonce&&e.$eval(n.bindonce);void 0!==r?i.checkBindonce(r):(i.setupWatcher(n.bindonce),t.bind("$destroy",i.removeWatcher))}};return n}),angular.forEach([{directiveName:"boShow",attribute:"show"},{directiveName:"boHide",attribute:"hide"},{directiveName:"boClass",attribute:"class"},{directiveName:"boText",attribute:"text"},{directiveName:"boBind",attribute:"text"},{directiveName:"boHtml",attribute:"html"},{directiveName:"boSrcI",attribute:"src",interpolate:!0},{directiveName:"boSrc",attribute:"src"},{directiveName:"boHrefI",attribute:"href",interpolate:!0},{directiveName:"boHref",attribute:"href"},{directiveName:"boAlt",attribute:"alt"},{directiveName:"boTitle",attribute:"title"},{directiveName:"boId",attribute:"id"},{directiveName:"boStyle",attribute:"style"},{directiveName:"boValue",attribute:"value"},{directiveName:"boAttr",attribute:"attr"},{directiveName:"boIf",transclude:"element",terminal:!0,priority:1e3},{directiveName:"boSwitch",require:"boSwitch",controller:function(){this.cases={}}},{directiveName:"boSwitchWhen",transclude:"element",priority:800,require:"^boSwitch"},{directiveName:"boSwitchDefault",transclude:"element",priority:800,require:"^boSwitch"}],function(t){var n=200;return e.directive(t.directiveName,function(){var e={priority:t.priority||n,transclude:t.transclude||!1,terminal:t.terminal||!1,require:["^bindonce"].concat(t.require||[]),controller:t.controller,compile:function(e,n,i){return function(e,n,r,o){var a=o[0],s=r.boParent;if(s&&a.group!==s){var c=a.element.parent();a=void 0;for(var l;9!==c[0].nodeType&&c.length;){if((l=c.data("$bindonceController"))&&l.group===s){a=l;break}c=c.parent()}if(!a)throw new Error("No bindonce controller: "+s)}a.addBinder({element:n,attr:t.attribute||t.directiveName,attrs:r,value:r[t.directiveName],interpolate:t.interpolate,group:s,transclude:i,controller:o.slice(1),scope:e})}}};return e})})}();var dbits,canary=0xdeadbeefcafe,j_lm=15715070==(16777215&canary);j_lm&&"Microsoft Internet Explorer"==navigator.appName?(BigInteger.prototype.am=am2,dbits=30):j_lm&&"Netscape"!=navigator.appName?(BigInteger.prototype.am=am1,dbits=26):(BigInteger.prototype.am=am3,dbits=28),BigInteger.prototype.DB=dbits,BigInteger.prototype.DM=(1<<dbits)-1,BigInteger.prototype.DV=1<<dbits;var BI_FP=52;BigInteger.prototype.FV=Math.pow(2,BI_FP),BigInteger.prototype.F1=BI_FP-dbits,BigInteger.prototype.F2=2*dbits-BI_FP;var BI_RM="0123456789abcdefghijklmnopqrstuvwxyz",BI_RC=new Array,rr,vv;for(rr="0".charCodeAt(0),vv=0;9>=vv;++vv)BI_RC[rr++]=vv;for(rr="a".charCodeAt(0),vv=10;36>vv;++vv)BI_RC[rr++]=vv;for(rr="A".charCodeAt(0),vv=10;36>vv;++vv)BI_RC[rr++]=vv;Classic.prototype.convert=cConvert,Classic.prototype.revert=cRevert,Classic.prototype.reduce=cReduce,Classic.prototype.mulTo=cMulTo,Classic.prototype.sqrTo=cSqrTo,Montgomery.prototype.convert=montConvert,Montgomery.prototype.revert=montRevert,Montgomery.prototype.reduce=montReduce,Montgomery.prototype.mulTo=montMulTo,Montgomery.prototype.sqrTo=montSqrTo,BigInteger.prototype.copyTo=bnpCopyTo,BigInteger.prototype.fromInt=bnpFromInt,BigInteger.prototype.fromString=bnpFromString,BigInteger.prototype.clamp=bnpClamp,BigInteger.prototype.dlShiftTo=bnpDLShiftTo,BigInteger.prototype.drShiftTo=bnpDRShiftTo,BigInteger.prototype.lShiftTo=bnpLShiftTo,BigInteger.prototype.rShiftTo=bnpRShiftTo,BigInteger.prototype.subTo=bnpSubTo,BigInteger.prototype.multiplyTo=bnpMultiplyTo,BigInteger.prototype.squareTo=bnpSquareTo,BigInteger.prototype.divRemTo=bnpDivRemTo,BigInteger.prototype.invDigit=bnpInvDigit,BigInteger.prototype.isEven=bnpIsEven,BigInteger.prototype.exp=bnpExp,BigInteger.prototype.toString=bnToString,BigInteger.prototype.negate=bnNegate,BigInteger.prototype.abs=bnAbs,BigInteger.prototype.compareTo=bnCompareTo,BigInteger.prototype.bitLength=bnBitLength,BigInteger.prototype.mod=bnMod,BigInteger.prototype.modPowInt=bnModPowInt,BigInteger.ZERO=nbv(0),BigInteger.ONE=nbv(1),NullExp.prototype.convert=nNop,NullExp.prototype.revert=nNop,NullExp.prototype.mulTo=nMulTo,NullExp.prototype.sqrTo=nSqrTo,Barrett.prototype.convert=barrettConvert,Barrett.prototype.revert=barrettRevert,Barrett.prototype.reduce=barrettReduce,Barrett.prototype.mulTo=barrettMulTo,Barrett.prototype.sqrTo=barrettSqrTo;var lowprimes=[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],lplim=(1<<26)/lowprimes[lowprimes.length-1];BigInteger.prototype.chunkSize=bnpChunkSize,BigInteger.prototype.toRadix=bnpToRadix,BigInteger.prototype.fromRadix=bnpFromRadix,BigInteger.prototype.fromNumber=bnpFromNumber,BigInteger.prototype.bitwiseTo=bnpBitwiseTo,BigInteger.prototype.changeBit=bnpChangeBit,BigInteger.prototype.addTo=bnpAddTo,BigInteger.prototype.dMultiply=bnpDMultiply,BigInteger.prototype.dAddOffset=bnpDAddOffset,BigInteger.prototype.multiplyLowerTo=bnpMultiplyLowerTo,BigInteger.prototype.multiplyUpperTo=bnpMultiplyUpperTo,BigInteger.prototype.modInt=bnpModInt,BigInteger.prototype.millerRabin=bnpMillerRabin,BigInteger.prototype.clone=bnClone,BigInteger.prototype.intValue=bnIntValue,BigInteger.prototype.byteValue=bnByteValue,BigInteger.prototype.shortValue=bnShortValue,BigInteger.prototype.signum=bnSigNum,BigInteger.prototype.toByteArray=bnToByteArray,BigInteger.prototype.equals=bnEquals,BigInteger.prototype.min=bnMin,BigInteger.prototype.max=bnMax,BigInteger.prototype.and=bnAnd,BigInteger.prototype.or=bnOr,BigInteger.prototype.xor=bnXor,BigInteger.prototype.andNot=bnAndNot,BigInteger.prototype.not=bnNot,BigInteger.prototype.shiftLeft=bnShiftLeft,BigInteger.prototype.shiftRight=bnShiftRight,BigInteger.prototype.getLowestSetBit=bnGetLowestSetBit,BigInteger.prototype.bitCount=bnBitCount,BigInteger.prototype.testBit=bnTestBit,BigInteger.prototype.setBit=bnSetBit,BigInteger.prototype.clearBit=bnClearBit,BigInteger.prototype.flipBit=bnFlipBit,BigInteger.prototype.add=bnAdd,BigInteger.prototype.subtract=bnSubtract,BigInteger.prototype.multiply=bnMultiply,BigInteger.prototype.divide=bnDivide,BigInteger.prototype.remainder=bnRemainder,BigInteger.prototype.divideAndRemainder=bnDivideAndRemainder,BigInteger.prototype.modPow=bnModPow,BigInteger.prototype.modInverse=bnModInverse,BigInteger.prototype.pow=bnPow,BigInteger.prototype.gcd=bnGCD,BigInteger.prototype.isProbablePrime=bnIsProbablePrime,BigInteger.prototype.square=bnSquare;var rng_state,rng_pool,rng_pptr;if(null==rng_pool){rng_pool=new Array,rng_pptr=0;var global="undefined"!=typeof window?window:this,t;if(global&&global.crypto&&global.crypto.getRandomValues){var ua=new Uint8Array(32);for(global.crypto.getRandomValues(ua),t=0;32>t;++t)rng_pool[rng_pptr++]=ua[t]}if("Netscape"==navigator.appName&&navigator.appVersion<"5"&&global&&global.crypto){var z=global.crypto.random(32);for(t=0;t<z.length;++t)rng_pool[rng_pptr++]=255&z.charCodeAt(t)}for(;rng_psize>rng_pptr;)t=Math.floor(65536*Math.random()),rng_pool[rng_pptr++]=t>>>8,rng_pool[rng_pptr++]=255&t;rng_pptr=0,rng_seed_time()}SecureRandom.prototype.nextBytes=rng_get_bytes,Arcfour.prototype.init=ARC4init,Arcfour.prototype.next=ARC4next;var rng_psize=256,CryptoJS=CryptoJS||function(e,t){var n={},i=n.lib={},r=i.Base=function(){function e(){}return{extend:function(t){e.prototype=this;var n=new e;return t&&n.mixIn(t),n.hasOwnProperty("init")||(n.init=function(){n.$super.init.apply(this,arguments)}),n.init.prototype=n,n.$super=this,n},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),o=i.WordArray=r.extend({init:function(e,n){e=this.words=e||[],this.sigBytes=n!=t?n:4*e.length},toString:function(e){return(e||s).stringify(this)},concat:function(e){var t=this.words,n=e.words,i=this.sigBytes,r=e.sigBytes;if(this.clamp(),i%4)for(var o=0;r>o;o++){var a=n[o>>>2]>>>24-o%4*8&255;t[i+o>>>2]|=a<<24-(i+o)%4*8}else if(n.length>65535)for(var o=0;r>o;o+=4)t[i+o>>>2]=n[o>>>2];else for(var o=0;o<n.length;o++)t.push(n[o]);return this.sigBytes+=r,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=r.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var n=[],i=0;t>i;i+=4)n.push(4294967296*e.random()|0);return new o.init(n,t)}}),a=n.enc={},s=a.Hex={stringify:function(e){for(var t=e.words,n=e.sigBytes,i=[],r=0;n>r;r++){var o=t[r>>>2]>>>24-r%4*8&255;i.push((o>>>4).toString(16)),i.push((15&o).toString(16))}return i.join("")},parse:function(e){for(var t=e.length,n=[],i=0;t>i;i+=2)n[i>>>3]|=parseInt(e.substr(i,2),16)<<24-i%8*4;return new o.init(n,t/2)}},c=a.Latin1={stringify:function(e){for(var t=e.words,n=e.sigBytes,i=[],r=0;n>r;r++){var o=t[r>>>2]>>>24-r%4*8&255;i.push(String.fromCharCode(o))}return i.join("")},parse:function(e){for(var t=e.length,n=[],i=0;t>i;i++)n[i>>>2]|=(255&e.charCodeAt(i))<<24-i%4*8;return new o.init(n,t)}},l=a.Utf8={stringify:function(e){try{return decodeURIComponent(escape(c.stringify(e)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(e){return c.parse(unescape(encodeURIComponent(e)))}},u=i.BufferedBlockAlgorithm=r.extend({reset:function(){this._data=new o.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=l.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n=this._data,i=n.words,r=n.sigBytes,a=this.blockSize,s=4*a,c=r/s;c=t?e.ceil(c):e.max((0|c)-this._minBufferSize,0);var l=c*a,u=e.min(4*l,r);if(l){for(var p=0;l>p;p+=a)this._doProcessBlock(i,p);var d=i.splice(0,l);n.sigBytes-=u}return new o.init(d,u)},clone:function(){var e=r.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0}),p=(i.Hasher=u.extend({cfg:r.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){u.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){e&&this._append(e);var t=this._doFinalize();return t},blockSize:16,_createHelper:function(e){return function(t,n){return new e.init(n).finalize(t)}},_createHmacHelper:function(e){return function(t,n){return new p.HMAC.init(e,n).finalize(t)}}}),n.algo={});return n}(Math);CryptoJS.lib.Cipher||function(e){var t=CryptoJS,n=t.lib,i=n.Base,r=n.WordArray,o=n.BufferedBlockAlgorithm,a=t.enc,s=(a.Utf8,a.Base64),c=t.algo,l=c.EvpKDF,u=n.Cipher=o.extend({cfg:i.extend(),createEncryptor:function(e,t){return this.create(this._ENC_XFORM_MODE,e,t)},createDecryptor:function(e,t){return this.create(this._DEC_XFORM_MODE,e,t)},init:function(e,t,n){this.cfg=this.cfg.extend(n),this._xformMode=e,this._key=t,this.reset()},reset:function(){o.reset.call(this),this._doReset()},process:function(e){return this._append(e),this._process()},finalize:function(e){e&&this._append(e);var t=this._doFinalize();return t},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function e(e){return"string"==typeof e?$:_}return function(t){return{encrypt:function(n,i,r){return e(i).encrypt(t,n,i,r)},decrypt:function(n,i,r){return e(i).decrypt(t,n,i,r)}}}}()}),p=(n.StreamCipher=u.extend({_doFinalize:function(){var e=this._process(!0);return e},blockSize:1}),t.mode={}),d=n.BlockCipherMode=i.extend({createEncryptor:function(e,t){return this.Encryptor.create(e,t)},createDecryptor:function(e,t){return this.Decryptor.create(e,t)},init:function(e,t){this._cipher=e,this._iv=t}}),f=p.CBC=function(){function t(t,n,i){var r=this._iv;if(r){var o=r;this._iv=e}else var o=this._prevBlock;for(var a=0;i>a;a++)t[n+a]^=o[a]}var n=d.extend();return n.Encryptor=n.extend({processBlock:function(e,n){var i=this._cipher,r=i.blockSize;t.call(this,e,n,r),i.encryptBlock(e,n),this._prevBlock=e.slice(n,n+r)}}),n.Decryptor=n.extend({processBlock:function(e,n){var i=this._cipher,r=i.blockSize,o=e.slice(n,n+r);i.decryptBlock(e,n),t.call(this,e,n,r),this._prevBlock=o}}),n}(),h=(p.IGE=function(){function t(e,t,n,i){for(var r=0;i>r;r++)e[n+r]^=t[r]}var n=d.extend();return n.Encryptor=n.extend({processBlock:function(n,i){var r=this._cipher,o=r.blockSize;this._ivp===e&&(this._ivp=this._iv.slice(0,o),this._iv2p=this._iv.slice(o,o+o));var a=n.slice(i,i+o);t(n,this._ivp,i,o),r.encryptBlock(n,i),t(n,this._iv2p,i,o),this._ivp=n.slice(i,i+o),this._iv2p=a}}),n.Decryptor=n.extend({processBlock:function(n,i){var r=this._cipher,o=r.blockSize;this._ivp===e&&(this._ivp=this._iv.slice(0,o),this._iv2p=this._iv.slice(o,2*o));var a=n.slice(i,i+o);t(n,this._iv2p,i,o),r.decryptBlock(n,i),t(n,this._ivp,i,o),this._ivp=a,this._iv2p=n.slice(i,i+o)}}),n}(),t.pad={}),g=h.Pkcs7={pad:function(e,t){for(var n=4*t,i=n-e.sigBytes%n,o=i<<24|i<<16|i<<8|i,a=[],s=0;i>s;s+=4)a.push(o);var c=r.create(a,i);e.concat(c)},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},m=(h.NoPadding={pad:function(){},unpad:function(){}},n.BlockCipher=u.extend({cfg:u.cfg.extend({mode:f,padding:g}),reset:function(){u.reset.call(this);var e=this.cfg,t=e.iv,n=e.mode;if(this._xformMode==this._ENC_XFORM_MODE)var i=n.createEncryptor;else{var i=n.createDecryptor;this._minBufferSize=1}this._mode=i.call(n,this,t&&t.words)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){e.pad(this._data,this.blockSize);var t=this._process(!0)}else{var t=this._process(!0);e.unpad(t)}return t},blockSize:4}),n.CipherParams=i.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}})),y=t.format={},v=y.OpenSSL={stringify:function(e){var t=e.ciphertext,n=e.salt;if(n)var i=r.create([1398893684,1701076831]).concat(n).concat(t);else var i=t;return i.toString(s)},parse:function(e){var t=s.parse(e),n=t.words;if(1398893684==n[0]&&1701076831==n[1]){var i=r.create(n.slice(2,4));n.splice(0,4),t.sigBytes-=16}return m.create({ciphertext:t,salt:i})}},_=n.SerializableCipher=i.extend({cfg:i.extend({format:v}),encrypt:function(e,t,n,i){i=this.cfg.extend(i);var r=e.createEncryptor(n,i),o=r.finalize(t),a=r.cfg;return m.create({ciphertext:o,key:n,iv:a.iv,algorithm:e,mode:a.mode,padding:a.padding,blockSize:e.blockSize,formatter:i.format})},decrypt:function(e,t,n,i){i=this.cfg.extend(i),t=this._parse(t,i.format);var r=e.createDecryptor(n,i).finalize(t.ciphertext);return r},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}}),b=t.kdf={},w=b.OpenSSL={execute:function(e,t,n,i){i||(i=r.random(8));var o=l.create({keySize:t+n}).compute(e,i),a=r.create(o.words.slice(t),4*n);return o.sigBytes=4*t,m.create({key:o,iv:a,salt:i})}},$=n.PasswordBasedCipher=_.extend({cfg:_.cfg.extend({kdf:w}),encrypt:function(e,t,n,i){i=this.cfg.extend(i);var r=i.kdf.execute(n,e.keySize,e.ivSize);i.iv=r.iv;var o=_.encrypt.call(this,e,t,r.key,i);return o.mixIn(r),o},decrypt:function(e,t,n,i){i=this.cfg.extend(i),t=this._parse(t,i.format);var r=i.kdf.execute(n,e.keySize,e.ivSize,t.salt);i.iv=r.iv;var o=_.decrypt.call(this,e,t,r.key,i);return o}})}(),function(){var e=CryptoJS,t=e.lib,n=t.BlockCipher,i=e.algo,r=[],o=[],a=[],s=[],c=[],l=[],u=[],p=[],d=[],f=[];!function(){for(var e=[],t=0;256>t;t++)e[t]=128>t?t<<1:t<<1^283;for(var n=0,i=0,t=0;256>t;t++){var h=i^i<<1^i<<2^i<<3^i<<4;h=h>>>8^255&h^99,r[n]=h,o[h]=n;var g=e[n],m=e[g],y=e[m],v=257*e[h]^16843008*h;a[n]=v<<24|v>>>8,s[n]=v<<16|v>>>16,c[n]=v<<8|v>>>24,l[n]=v;var v=16843009*y^65537*m^257*g^16843008*n;u[h]=v<<24|v>>>8,p[h]=v<<16|v>>>16,d[h]=v<<8|v>>>24,f[h]=v,n?(n=g^e[e[e[y^g]]],i^=e[e[i]]):n=i=1}}();var h=[0,1,2,4,8,16,32,64,128,27,54],g=i.AES=n.extend({_doReset:function(){for(var e=this._key,t=e.words,n=e.sigBytes/4,i=this._nRounds=n+6,o=4*(i+1),a=this._keySchedule=[],s=0;o>s;s++)if(n>s)a[s]=t[s];else{var c=a[s-1];s%n?n>6&&s%n==4&&(c=r[c>>>24]<<24|r[c>>>16&255]<<16|r[c>>>8&255]<<8|r[255&c]):(c=c<<8|c>>>24,c=r[c>>>24]<<24|r[c>>>16&255]<<16|r[c>>>8&255]<<8|r[255&c],c^=h[s/n|0]<<24),a[s]=a[s-n]^c}for(var l=this._invKeySchedule=[],g=0;o>g;g++){var s=o-g;if(g%4)var c=a[s];else var c=a[s-4];l[g]=4>g||4>=s?c:u[r[c>>>24]]^p[r[c>>>16&255]]^d[r[c>>>8&255]]^f[r[255&c]]}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,a,s,c,l,r)},decryptBlock:function(e,t){var n=e[t+1];e[t+1]=e[t+3],e[t+3]=n,this._doCryptBlock(e,t,this._invKeySchedule,u,p,d,f,o);var n=e[t+1];e[t+1]=e[t+3],e[t+3]=n},_doCryptBlock:function(e,t,n,i,r,o,a,s){for(var c=this._nRounds,l=e[t]^n[0],u=e[t+1]^n[1],p=e[t+2]^n[2],d=e[t+3]^n[3],f=4,h=1;c>h;h++){var g=i[l>>>24]^r[u>>>16&255]^o[p>>>8&255]^a[255&d]^n[f++],m=i[u>>>24]^r[p>>>16&255]^o[d>>>8&255]^a[255&l]^n[f++],y=i[p>>>24]^r[d>>>16&255]^o[l>>>8&255]^a[255&u]^n[f++],v=i[d>>>24]^r[l>>>16&255]^o[u>>>8&255]^a[255&p]^n[f++];l=g,u=m,p=y,d=v}var g=(s[l>>>24]<<24|s[u>>>16&255]<<16|s[p>>>8&255]<<8|s[255&d])^n[f++],m=(s[u>>>24]<<24|s[p>>>16&255]<<16|s[d>>>8&255]<<8|s[255&l])^n[f++],y=(s[p>>>24]<<24|s[d>>>16&255]<<16|s[l>>>8&255]<<8|s[255&u])^n[f++],v=(s[d>>>24]<<24|s[l>>>16&255]<<16|s[u>>>8&255]<<8|s[255&p])^n[f++];e[t]=g,e[t+1]=m,e[t+2]=y,e[t+3]=v},keySize:8});e.AES=n._createHelper(g)}();var sha1;!function(e){function t(e){for(var t,n="",i=7;i>=0;--i)t=e>>>(i<<2)&15,n+=t.toString(16);return n}function n(e){for(var t,n=[],i=3;i>=0;--i)t=e>>8*i&255,n.push(t);return n}function i(e,t){return e<<t|e>>>32-t}function r(e){e=e.replace(/[\u0080-\u07ff]/g,function(e){var t=e.charCodeAt(0);return String.fromCharCode(192|t>>6,128|63&t)}),e=e.replace(/[\u0080-\uffff]/g,function(e){var t=e.charCodeAt(0);return String.fromCharCode(224|t>>12,128|t>>6&63,128|63&t)});for(var t=e.length,n=new Uint8Array(t),i=0;t>i;++i)n[i]=e.charCodeAt(i);return n.buffer}function o(e){for(var t=e.length,n=new Uint8Array(t),i=0;t>i;++i)n[i]=e[i];return n.buffer}function a(e,a){var s;s=e instanceof ArrayBuffer?e:"[object Array]"==Object.prototype.toString.apply(e)?o(e):r(String(e));var u,p,d=1732584193,f=4023233417,h=2562383102,g=271733878,m=3285377520,y=s.byteLength,v=y<<3,_=v+65,b=Math.ceil(_/512)<<9,w=b>>>3,$=w>>>2,S=new l($),C=S.bytes,k=new Uint32Array(80),M=new Uint8Array(s);for(u=0;y>u;++u)C[u]=M[u];for(C[y]=128,S.set($-2,Math.floor(v/c)),S.set($-1,4294967295&v),u=0;$>u;u+=16){for(p=0;16>p;++p)k[p]=S.get(u+p);for(;80>p;++p)k[p]=i(k[p-3]^k[p-8]^k[p-14]^k[p-16],1);var x,T,E,A=d,D=f,I=h,P=g,N=m;for(p=0;80>p;++p)20>p?(x=D&I|~D&P,T=1518500249):40>p?(x=D^I^P,T=1859775393):60>p?(x=D&I^D&P^I&P,T=2400959708):(x=D^I^P,T=3395469782),E=i(A,5)+x+N+T+k[p]&4294967295,N=P,P=I,I=i(D,30),D=A,A=E;d=d+A&4294967295,f=f+D&4294967295,h=h+I&4294967295,g=g+P&4294967295,m=m+N&4294967295}return a?n(d).concat(n(f),n(h),n(g),n(m)):t(d)+t(f)+t(h)+t(g)+t(m)}var s=Math.pow(2,24),c=Math.pow(2,32),l=function(){function e(e){this.bytes=new Uint8Array(e<<2)
}return e.prototype.get=function(e){return e<<=2,this.bytes[e]*s+(this.bytes[e+1]<<16|this.bytes[e+2]<<8|this.bytes[e+3])},e.prototype.set=function(e,t){var n=Math.floor(t/s),i=t-n*s;e<<=2,this.bytes[e]=n,this.bytes[e+1]=i>>16,this.bytes[e+2]=i>>8&255,this.bytes[e+3]=255&i},e}();e.hash=a}(sha1||(sha1={})),function(){"use strict";function e(e){throw e}function t(e,t){var n=e.split("."),i=p;!(n[0]in i)&&i.execScript&&i.execScript("var "+n[0]);for(var r;n.length&&(r=n.shift());)n.length||t===u?i=i[r]?i[r]:i[r]={}:i[r]=t}function n(e,t,n){var i,r="number"==typeof t?t:t=0,o="number"==typeof n?n:e.length;for(i=-1,r=7&o;r--;++t)i=i>>>8^y[255&(i^e[t])];for(r=o>>3;r--;t+=8)i=i>>>8^y[255&(i^e[t])],i=i>>>8^y[255&(i^e[t+1])],i=i>>>8^y[255&(i^e[t+2])],i=i>>>8^y[255&(i^e[t+3])],i=i>>>8^y[255&(i^e[t+4])],i=i>>>8^y[255&(i^e[t+5])],i=i>>>8^y[255&(i^e[t+6])],i=i>>>8^y[255&(i^e[t+7])];return(4294967295^i)>>>0}function i(){}function r(e){var t,n,i,r,o,a,s,c,l,u=e.length,p=0,f=Number.POSITIVE_INFINITY;for(c=0;u>c;++c)e[c]>p&&(p=e[c]),e[c]<f&&(f=e[c]);for(t=1<<p,n=new(d?Uint32Array:Array)(t),i=1,r=0,o=2;p>=i;){for(c=0;u>c;++c)if(e[c]===i){for(a=0,s=r,l=0;i>l;++l)a=a<<1|1&s,s>>=1;for(l=a;t>l;l+=o)n[l]=i<<16|c;++r}++i,r<<=1,o<<=1}return[n,p,f]}function o(t,n){switch(this.i=[],this.j=32768,this.d=this.f=this.c=this.n=0,this.input=d?new Uint8Array(t):t,this.o=!1,this.k=$,this.w=!1,(n||!(n={}))&&(n.index&&(this.c=n.index),n.bufferSize&&(this.j=n.bufferSize),n.bufferType&&(this.k=n.bufferType),n.resize&&(this.w=n.resize)),this.k){case w:this.a=32768,this.b=new(d?Uint8Array:Array)(32768+this.j+258);break;case $:this.a=0,this.b=new(d?Uint8Array:Array)(this.j),this.e=this.D,this.q=this.A,this.l=this.C;break;default:e(Error("invalid inflate mode"))}}function a(t,n){for(var i,r=t.f,o=t.d,a=t.input,s=t.c;n>o;)i=a[s++],i===u&&e(Error("input buffer is broken")),r|=i<<o,o+=8;return i=r&(1<<n)-1,t.f=r>>>n,t.d=o-n,t.c=s,i}function s(e,t){for(var n,i,r,o=e.f,a=e.d,s=e.input,c=e.c,l=t[0],p=t[1];p>a&&(n=s[c++],n!==u);)o|=n<<a,a+=8;return i=l[o&(1<<p)-1],r=i>>>16,e.f=o>>r,e.d=a-r,e.c=c,65535&i}function c(e){function t(e,t,n){var i,r,o,c;for(c=0;e>c;)switch(i=s(this,t)){case 16:for(o=3+a(this,2);o--;)n[c++]=r;break;case 17:for(o=3+a(this,3);o--;)n[c++]=0;r=0;break;case 18:for(o=11+a(this,7);o--;)n[c++]=0;r=0;break;default:r=n[c++]=i}return n}var n,i,o,c,l=a(e,5)+257,u=a(e,5)+1,p=a(e,4)+4,f=new(d?Uint8Array:Array)(M.length);for(c=0;p>c;++c)f[M[c]]=a(e,3);n=r(f),i=new(d?Uint8Array:Array)(l),o=new(d?Uint8Array:Array)(u),e.l(r(t.call(e,l,n,i)),r(t.call(e,u,n,o)))}function l(e){this.input=e,this.c=0,this.m=[],this.s=!1}var u=void 0,p=this,d="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array;new(d?Uint8Array:Array)(256);var f;for(f=0;256>f;++f)for(var h=f,g=7,h=h>>>1;h;h>>>=1)--g;var m=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117],y=d?new Uint32Array(m):m;i.prototype.getName=function(){return this.name},i.prototype.getData=function(){return this.data},i.prototype.G=function(){return this.H},t("Zlib.GunzipMember",i),t("Zlib.GunzipMember.prototype.getName",i.prototype.getName),t("Zlib.GunzipMember.prototype.getData",i.prototype.getData),t("Zlib.GunzipMember.prototype.getMtime",i.prototype.G);var v,_=[];for(v=0;288>v;v++)switch(!0){case 143>=v:_.push([v+48,8]);break;case 255>=v:_.push([v-144+400,9]);break;case 279>=v:_.push([v-256+0,7]);break;case 287>=v:_.push([v-280+192,8]);break;default:e("invalid literal: "+v)}var b=function(){function t(t){switch(!0){case 3===t:return[257,t-3,0];case 4===t:return[258,t-4,0];case 5===t:return[259,t-5,0];case 6===t:return[260,t-6,0];case 7===t:return[261,t-7,0];case 8===t:return[262,t-8,0];case 9===t:return[263,t-9,0];case 10===t:return[264,t-10,0];case 12>=t:return[265,t-11,1];case 14>=t:return[266,t-13,1];case 16>=t:return[267,t-15,1];case 18>=t:return[268,t-17,1];case 22>=t:return[269,t-19,2];case 26>=t:return[270,t-23,2];case 30>=t:return[271,t-27,2];case 34>=t:return[272,t-31,2];case 42>=t:return[273,t-35,3];case 50>=t:return[274,t-43,3];case 58>=t:return[275,t-51,3];case 66>=t:return[276,t-59,3];case 82>=t:return[277,t-67,4];case 98>=t:return[278,t-83,4];case 114>=t:return[279,t-99,4];case 130>=t:return[280,t-115,4];case 162>=t:return[281,t-131,5];case 194>=t:return[282,t-163,5];case 226>=t:return[283,t-195,5];case 257>=t:return[284,t-227,5];case 258===t:return[285,t-258,0];default:e("invalid length: "+t)}}var n,i,r=[];for(n=3;258>=n;n++)i=t(n),r[n]=i[2]<<24|i[1]<<16|i[0];return r}();d&&new Uint32Array(b);var w=0,$=1;o.prototype.g=function(){for(;!this.o;){var t=a(this,3);switch(1&t&&(this.o=!0),t>>>=1){case 0:var n=this.input,i=this.c,r=this.b,o=this.a,s=u,l=u,p=u,f=r.length,h=u;switch(this.d=this.f=0,s=n[i++],s===u&&e(Error("invalid uncompressed block header: LEN (first byte)")),l=s,s=n[i++],s===u&&e(Error("invalid uncompressed block header: LEN (second byte)")),l|=s<<8,s=n[i++],s===u&&e(Error("invalid uncompressed block header: NLEN (first byte)")),p=s,s=n[i++],s===u&&e(Error("invalid uncompressed block header: NLEN (second byte)")),p|=s<<8,l===~p&&e(Error("invalid uncompressed block header: length verify")),i+l>n.length&&e(Error("input buffer is broken")),this.k){case w:for(;o+l>r.length;){if(h=f-o,l-=h,d)r.set(n.subarray(i,i+h),o),o+=h,i+=h;else for(;h--;)r[o++]=n[i++];this.a=o,r=this.e(),o=this.a}break;case $:for(;o+l>r.length;)r=this.e({t:2});break;default:e(Error("invalid inflate mode"))}if(d)r.set(n.subarray(i,i+l),o),o+=l,i+=l;else for(;l--;)r[o++]=n[i++];this.c=i,this.a=o,this.b=r;break;case 1:this.l(O,R);break;case 2:c(this);break;default:e(Error("unknown BTYPE: "+t))}}return this.q()};var S,C,k=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],M=d?new Uint16Array(k):k,x=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,258,258],T=d?new Uint16Array(x):x,E=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0],A=d?new Uint8Array(E):E,D=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],I=d?new Uint16Array(D):D,P=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],N=d?new Uint8Array(P):P,L=new(d?Uint8Array:Array)(288);for(S=0,C=L.length;C>S;++S)L[S]=143>=S?8:255>=S?9:279>=S?7:8;var B,F,O=r(L),U=new(d?Uint8Array:Array)(30);for(B=0,F=U.length;F>B;++B)U[B]=5;var R=r(U);o.prototype.l=function(e,t){var n=this.b,i=this.a;this.r=e;for(var r,o,c,l,u=n.length-258;256!==(r=s(this,e));)if(256>r)i>=u&&(this.a=i,n=this.e(),i=this.a),n[i++]=r;else for(o=r-257,l=T[o],0<A[o]&&(l+=a(this,A[o])),r=s(this,t),c=I[r],0<N[r]&&(c+=a(this,N[r])),i>=u&&(this.a=i,n=this.e(),i=this.a);l--;)n[i]=n[i++-c];for(;8<=this.d;)this.d-=8,this.c--;this.a=i},o.prototype.C=function(e,t){var n=this.b,i=this.a;this.r=e;for(var r,o,c,l,u=n.length;256!==(r=s(this,e));)if(256>r)i>=u&&(n=this.e(),u=n.length),n[i++]=r;else for(o=r-257,l=T[o],0<A[o]&&(l+=a(this,A[o])),r=s(this,t),c=I[r],0<N[r]&&(c+=a(this,N[r])),i+l>u&&(n=this.e(),u=n.length);l--;)n[i]=n[i++-c];for(;8<=this.d;)this.d-=8,this.c--;this.a=i},o.prototype.e=function(){var e,t,n=new(d?Uint8Array:Array)(this.a-32768),i=this.a-32768,r=this.b;if(d)n.set(r.subarray(32768,n.length));else for(e=0,t=n.length;t>e;++e)n[e]=r[e+32768];if(this.i.push(n),this.n+=n.length,d)r.set(r.subarray(i,i+32768));else for(e=0;32768>e;++e)r[e]=r[i+e];return this.a=32768,r},o.prototype.D=function(e){var t,n,i,r,o=this.input.length/this.c+1|0,a=this.input,s=this.b;return e&&("number"==typeof e.t&&(o=e.t),"number"==typeof e.z&&(o+=e.z)),2>o?(n=(a.length-this.c)/this.r[2],r=258*(n/2)|0,i=r<s.length?s.length+r:s.length<<1):i=s.length*o,d?(t=new Uint8Array(i),t.set(s)):t=s,this.b=t},o.prototype.q=function(){var e,t,n,i,r,o=0,a=this.b,s=this.i,c=new(d?Uint8Array:Array)(this.n+(this.a-32768));if(0===s.length)return d?this.b.subarray(32768,this.a):this.b.slice(32768,this.a);for(t=0,n=s.length;n>t;++t)for(e=s[t],i=0,r=e.length;r>i;++i)c[o++]=e[i];for(t=32768,n=this.a;n>t;++t)c[o++]=a[t];return this.i=[],this.buffer=c},o.prototype.A=function(){var e,t=this.a;return d?this.w?(e=new Uint8Array(t),e.set(this.b.subarray(0,t))):e=this.b.subarray(0,t):(this.b.length>t&&(this.b.length=t),e=this.b),this.buffer=e},l.prototype.F=function(){return this.s||this.g(),this.m.slice()},l.prototype.g=function(){for(var t=this.input.length;this.c<t;){var r=new i,a=u,s=u,c=u,l=u,p=u,f=u,h=u,g=u,m=u,y=this.input,v=this.c;switch(r.u=y[v++],r.v=y[v++],(31!==r.u||139!==r.v)&&e(Error("invalid file signature:"+r.u+","+r.v)),r.p=y[v++],r.p){case 8:break;default:e(Error("unknown compression method: "+r.p))}if(r.h=y[v++],g=y[v++]|y[v++]<<8|y[v++]<<16|y[v++]<<24,r.H=new Date(1e3*g),r.N=y[v++],r.M=y[v++],0<(4&r.h)&&(r.I=y[v++]|y[v++]<<8,v+=r.I),0<(8&r.h)){for(h=[],f=0;0<(p=y[v++]);)h[f++]=String.fromCharCode(p);r.name=h.join("")}if(0<(16&r.h)){for(h=[],f=0;0<(p=y[v++]);)h[f++]=String.fromCharCode(p);r.J=h.join("")}0<(2&r.h)&&(r.B=65535&n(y,0,v),r.B!==(y[v++]|y[v++]<<8)&&e(Error("invalid header crc16"))),a=y[y.length-4]|y[y.length-3]<<8|y[y.length-2]<<16|y[y.length-1]<<24,y.length-v-4-4<512*a&&(l=a),s=new o(y,{index:v,bufferSize:l}),r.data=c=s.g(),v=s.c,r.K=m=(y[v++]|y[v++]<<8|y[v++]<<16|y[v++]<<24)>>>0,n(c,u,u)!==m&&e(Error("invalid CRC-32 checksum: 0x"+n(c,u,u).toString(16)+" / 0x"+m.toString(16))),r.L=a=(y[v++]|y[v++]<<8|y[v++]<<16|y[v++]<<24)>>>0,(4294967295&c.length)!==a&&e(Error("invalid input size: "+(4294967295&c.length)+" / "+a)),this.m.push(r),this.c=v}this.s=!0;var _,b,w,$=this.m,S=0,C=0;for(_=0,b=$.length;b>_;++_)C+=$[_].data.length;if(d)for(w=new Uint8Array(C),_=0;b>_;++_)w.set($[_].data,S),S+=$[_].data.length;else{for(w=[],_=0;b>_;++_)w[_]=$[_].data;w=Array.prototype.concat.apply([],w)}return w},t("Zlib.Gunzip",l),t("Zlib.Gunzip.prototype.decompress",l.prototype.g),t("Zlib.Gunzip.prototype.getMembers",l.prototype.F)}.call(this),this.goog={provide:function(){},math:{}},goog.provide("goog.math.Long"),goog.math.Long=function(e,t){this.low_=0|e,this.high_=0|t},goog.math.Long.IntCache_={},goog.math.Long.fromInt=function(e){if(e>=-128&&128>e){var t=goog.math.Long.IntCache_[e];if(t)return t}var n=new goog.math.Long(0|e,0>e?-1:0);return e>=-128&&128>e&&(goog.math.Long.IntCache_[e]=n),n},goog.math.Long.fromNumber=function(e){return isNaN(e)||!isFinite(e)?goog.math.Long.ZERO:e<=-goog.math.Long.TWO_PWR_63_DBL_?goog.math.Long.MIN_VALUE:e+1>=goog.math.Long.TWO_PWR_63_DBL_?goog.math.Long.MAX_VALUE:0>e?goog.math.Long.fromNumber(-e).negate():new goog.math.Long(e%goog.math.Long.TWO_PWR_32_DBL_|0,e/goog.math.Long.TWO_PWR_32_DBL_|0)},goog.math.Long.fromBits=function(e,t){return new goog.math.Long(e,t)},goog.math.Long.fromString=function(e,t){if(0==e.length)throw Error("number format error: empty string");var n=t||10;if(2>n||n>36)throw Error("radix out of range: "+n);if("-"==e.charAt(0))return goog.math.Long.fromString(e.substring(1),n).negate();if(e.indexOf("-")>=0)throw Error('number format error: interior "-" character: '+e);for(var i=goog.math.Long.fromNumber(Math.pow(n,8)),r=goog.math.Long.ZERO,o=0;o<e.length;o+=8){var a=Math.min(8,e.length-o),s=parseInt(e.substring(o,o+a),n);if(8>a){var c=goog.math.Long.fromNumber(Math.pow(n,a));r=r.multiply(c).add(goog.math.Long.fromNumber(s))}else r=r.multiply(i),r=r.add(goog.math.Long.fromNumber(s))}return r},goog.math.Long.TWO_PWR_16_DBL_=65536,goog.math.Long.TWO_PWR_24_DBL_=1<<24,goog.math.Long.TWO_PWR_32_DBL_=goog.math.Long.TWO_PWR_16_DBL_*goog.math.Long.TWO_PWR_16_DBL_,goog.math.Long.TWO_PWR_31_DBL_=goog.math.Long.TWO_PWR_32_DBL_/2,goog.math.Long.TWO_PWR_48_DBL_=goog.math.Long.TWO_PWR_32_DBL_*goog.math.Long.TWO_PWR_16_DBL_,goog.math.Long.TWO_PWR_64_DBL_=goog.math.Long.TWO_PWR_32_DBL_*goog.math.Long.TWO_PWR_32_DBL_,goog.math.Long.TWO_PWR_63_DBL_=goog.math.Long.TWO_PWR_64_DBL_/2,goog.math.Long.ZERO=goog.math.Long.fromInt(0),goog.math.Long.ONE=goog.math.Long.fromInt(1),goog.math.Long.NEG_ONE=goog.math.Long.fromInt(-1),goog.math.Long.MAX_VALUE=goog.math.Long.fromBits(-1,2147483647),goog.math.Long.MIN_VALUE=goog.math.Long.fromBits(0,-2147483648),goog.math.Long.TWO_PWR_24_=goog.math.Long.fromInt(1<<24),goog.math.Long.prototype.toInt=function(){return this.low_},goog.math.Long.prototype.toNumber=function(){return this.high_*goog.math.Long.TWO_PWR_32_DBL_+this.getLowBitsUnsigned()},goog.math.Long.prototype.toString=function(e){var t=e||10;if(2>t||t>36)throw Error("radix out of range: "+t);if(this.isZero())return"0";if(this.isNegative()){if(this.equals(goog.math.Long.MIN_VALUE)){var n=goog.math.Long.fromNumber(t),i=this.div(n),r=i.multiply(n).subtract(this);return i.toString(t)+r.toInt().toString(t)}return"-"+this.negate().toString(t)}for(var o=goog.math.Long.fromNumber(Math.pow(t,6)),r=this,a="";;){var s=r.div(o),c=r.subtract(s.multiply(o)).toInt(),l=c.toString(t);if(r=s,r.isZero())return l+a;for(;l.length<6;)l="0"+l;a=""+l+a}},goog.math.Long.prototype.getHighBits=function(){return this.high_},goog.math.Long.prototype.getLowBits=function(){return this.low_},goog.math.Long.prototype.getLowBitsUnsigned=function(){return this.low_>=0?this.low_:goog.math.Long.TWO_PWR_32_DBL_+this.low_},goog.math.Long.prototype.getNumBitsAbs=function(){if(this.isNegative())return this.equals(goog.math.Long.MIN_VALUE)?64:this.negate().getNumBitsAbs();for(var e=0!=this.high_?this.high_:this.low_,t=31;t>0&&0==(e&1<<t);t--);return 0!=this.high_?t+33:t+1},goog.math.Long.prototype.isZero=function(){return 0==this.high_&&0==this.low_},goog.math.Long.prototype.isNegative=function(){return this.high_<0},goog.math.Long.prototype.isOdd=function(){return 1==(1&this.low_)},goog.math.Long.prototype.equals=function(e){return this.high_==e.high_&&this.low_==e.low_},goog.math.Long.prototype.notEquals=function(e){return this.high_!=e.high_||this.low_!=e.low_},goog.math.Long.prototype.lessThan=function(e){return this.compare(e)<0},goog.math.Long.prototype.lessThanOrEqual=function(e){return this.compare(e)<=0},goog.math.Long.prototype.greaterThan=function(e){return this.compare(e)>0},goog.math.Long.prototype.greaterThanOrEqual=function(e){return this.compare(e)>=0},goog.math.Long.prototype.compare=function(e){if(this.equals(e))return 0;var t=this.isNegative(),n=e.isNegative();return t&&!n?-1:!t&&n?1:this.subtract(e).isNegative()?-1:1},goog.math.Long.prototype.negate=function(){return this.equals(goog.math.Long.MIN_VALUE)?goog.math.Long.MIN_VALUE:this.not().add(goog.math.Long.ONE)},goog.math.Long.prototype.add=function(e){var t=this.high_>>>16,n=65535&this.high_,i=this.low_>>>16,r=65535&this.low_,o=e.high_>>>16,a=65535&e.high_,s=e.low_>>>16,c=65535&e.low_,l=0,u=0,p=0,d=0;return d+=r+c,p+=d>>>16,d&=65535,p+=i+s,u+=p>>>16,p&=65535,u+=n+a,l+=u>>>16,u&=65535,l+=t+o,l&=65535,goog.math.Long.fromBits(p<<16|d,l<<16|u)},goog.math.Long.prototype.subtract=function(e){return this.add(e.negate())},goog.math.Long.prototype.multiply=function(e){if(this.isZero())return goog.math.Long.ZERO;if(e.isZero())return goog.math.Long.ZERO;if(this.equals(goog.math.Long.MIN_VALUE))return e.isOdd()?goog.math.Long.MIN_VALUE:goog.math.Long.ZERO;if(e.equals(goog.math.Long.MIN_VALUE))return this.isOdd()?goog.math.Long.MIN_VALUE:goog.math.Long.ZERO;if(this.isNegative())return e.isNegative()?this.negate().multiply(e.negate()):this.negate().multiply(e).negate();if(e.isNegative())return this.multiply(e.negate()).negate();if(this.lessThan(goog.math.Long.TWO_PWR_24_)&&e.lessThan(goog.math.Long.TWO_PWR_24_))return goog.math.Long.fromNumber(this.toNumber()*e.toNumber());var t=this.high_>>>16,n=65535&this.high_,i=this.low_>>>16,r=65535&this.low_,o=e.high_>>>16,a=65535&e.high_,s=e.low_>>>16,c=65535&e.low_,l=0,u=0,p=0,d=0;return d+=r*c,p+=d>>>16,d&=65535,p+=i*c,u+=p>>>16,p&=65535,p+=r*s,u+=p>>>16,p&=65535,u+=n*c,l+=u>>>16,u&=65535,u+=i*s,l+=u>>>16,u&=65535,u+=r*a,l+=u>>>16,u&=65535,l+=t*c+n*s+i*a+r*o,l&=65535,goog.math.Long.fromBits(p<<16|d,l<<16|u)},goog.math.Long.prototype.div=function(e){if(e.isZero())throw Error("division by zero");if(this.isZero())return goog.math.Long.ZERO;if(this.equals(goog.math.Long.MIN_VALUE)){if(e.equals(goog.math.Long.ONE)||e.equals(goog.math.Long.NEG_ONE))return goog.math.Long.MIN_VALUE;if(e.equals(goog.math.Long.MIN_VALUE))return goog.math.Long.ONE;var t=this.shiftRight(1),n=t.div(e).shiftLeft(1);if(n.equals(goog.math.Long.ZERO))return e.isNegative()?goog.math.Long.ONE:goog.math.Long.NEG_ONE;var i=this.subtract(e.multiply(n)),r=n.add(i.div(e));return r}if(e.equals(goog.math.Long.MIN_VALUE))return goog.math.Long.ZERO;if(this.isNegative())return e.isNegative()?this.negate().div(e.negate()):this.negate().div(e).negate();if(e.isNegative())return this.div(e.negate()).negate();for(var o=goog.math.Long.ZERO,i=this;i.greaterThanOrEqual(e);){for(var n=Math.max(1,Math.floor(i.toNumber()/e.toNumber())),a=Math.ceil(Math.log(n)/Math.LN2),s=48>=a?1:Math.pow(2,a-48),c=goog.math.Long.fromNumber(n),l=c.multiply(e);l.isNegative()||l.greaterThan(i);)n-=s,c=goog.math.Long.fromNumber(n),l=c.multiply(e);c.isZero()&&(c=goog.math.Long.ONE),o=o.add(c),i=i.subtract(l)}return o},goog.math.Long.prototype.modulo=function(e){return this.subtract(this.div(e).multiply(e))},goog.math.Long.prototype.not=function(){return goog.math.Long.fromBits(~this.low_,~this.high_)},goog.math.Long.prototype.and=function(e){return goog.math.Long.fromBits(this.low_&e.low_,this.high_&e.high_)},goog.math.Long.prototype.or=function(e){return goog.math.Long.fromBits(this.low_|e.low_,this.high_|e.high_)},goog.math.Long.prototype.xor=function(e){return goog.math.Long.fromBits(this.low_^e.low_,this.high_^e.high_)},goog.math.Long.prototype.shiftLeft=function(e){if(e&=63,0==e)return this;var t=this.low_;if(32>e){var n=this.high_;return goog.math.Long.fromBits(t<<e,n<<e|t>>>32-e)}return goog.math.Long.fromBits(0,t<<e-32)},goog.math.Long.prototype.shiftRight=function(e){if(e&=63,0==e)return this;var t=this.high_;if(32>e){var n=this.low_;return goog.math.Long.fromBits(n>>>e|t<<32-e,t>>e)}return goog.math.Long.fromBits(t>>e-32,t>=0?0:-1)},goog.math.Long.prototype.shiftRightUnsigned=function(e){if(e&=63,0==e)return this;var t=this.high_;if(32>e){var n=this.low_;return goog.math.Long.fromBits(n>>>e|t<<32-e,t>>>e)}return 32==e?goog.math.Long.fromBits(t,0):goog.math.Long.fromBits(t>>>e-32,0)};var _logTimer=(new Date).getTime();TLSerialization.prototype.createBuffer=function(){this.buffer=new ArrayBuffer(this.maxLength),this.intView=new Int32Array(this.buffer),this.byteView=new Uint8Array(this.buffer)},TLSerialization.prototype.getArray=function(){var e=new ArrayBuffer(this.offset),t=new Int32Array(e);return t.set(this.intView.subarray(0,this.offset/4)),t},TLSerialization.prototype.getBuffer=function(){return this.getArray().buffer},TLSerialization.prototype.getBytes=function(){for(var e=[],t=0;t<this.offset;t++)e.push(this.byteView[t]);return e},TLSerialization.prototype.checkLength=function(e){if(!(this.offset+e<this.maxLength)){console.trace("Increase buffer",this.offset,e,this.maxLength),this.maxLength=4*Math.ceil(Math.max(2*this.maxLength,this.offset+e+16)/4);var t=this.buffer,n=new Int32Array(t);this.createBuffer(),new Int32Array(this.buffer).set(n)}},TLSerialization.prototype.writeInt=function(e,t){this.debug&&console.log(">>>",e.toString(16),e,t),this.checkLength(4),this.intView[this.offset/4]=e,this.offset+=4},TLSerialization.prototype.storeInt=function(e,t){this.writeInt(e,(t||"")+":int")},TLSerialization.prototype.storeBool=function(e,t){e?this.writeInt(2574415285,(t||"")+":bool"):this.writeInt(3162085175,(t||"")+":bool")},TLSerialization.prototype.storeLongP=function(e,t,n){this.writeInt(t,(n||"")+":long[low]"),this.writeInt(e,(n||"")+":long[high]")},TLSerialization.prototype.storeLong=function(e,t){if(angular.isArray(e))return 2==e.length?this.storeLongP(e[0],e[1],t):this.storeIntBytes(e,64,t);var n=bigStringInt(e).divideAndRemainder(bigint(4294967296));this.writeInt(intToUint(n[1].intValue()),(t||"")+":long[low]"),this.writeInt(intToUint(n[0].intValue()),(t||"")+":long[high]")},TLSerialization.prototype.storeDouble=function(e){var t=new ArrayBuffer(8),n=new Int32Array(t),i=new Float64Array(t);i[0]=e,this.writeInt(n[0],(field||"")+":double[low]"),this.writeInt(n[1],(field||"")+":double[high]")},TLSerialization.prototype.storeString=function(e,t){this.debug&&console.log(">>>",e,(t||"")+":string");var n=unescape(encodeURIComponent(e));this.checkLength(n.length+8);var i=n.length;253>=i?this.byteView[this.offset++]=i:(this.byteView[this.offset++]=254,this.byteView[this.offset++]=255&i,this.byteView[this.offset++]=(65280&i)>>8,this.byteView[this.offset++]=(16711680&i)>>16);for(var r=0;i>r;r++)this.byteView[this.offset++]=n.charCodeAt(r);for(;this.offset%4;)this.byteView[this.offset++]=0},TLSerialization.prototype.storeBytes=function(e,t){this.debug&&console.log(">>>",bytesToHex(e),(t||"")+":bytes"),this.checkLength(e.length+8);var n=e.length;253>=n?this.byteView[this.offset++]=n:(this.byteView[this.offset++]=254,this.byteView[this.offset++]=255&n,this.byteView[this.offset++]=(65280&n)>>8,this.byteView[this.offset++]=(16711680&n)>>16);for(var i=0;n>i;i++)this.byteView[this.offset++]=e[i];for(;this.offset%4;)this.byteView[this.offset++]=0},TLSerialization.prototype.storeIntBytes=function(e,t,n){var i=e.length;if(t%32||8*i!=t)throw new Error("Invalid bits: "+t+", "+e.length);this.debug&&console.log(">>>",bytesToHex(e),(n||"")+":int"+t),this.checkLength(i);for(var r=0;i>r;r++)this.byteView[this.offset++]=e[r]},TLSerialization.prototype.storeRawBytes=function(e,t){var n=e.length;this.debug&&console.log(">>>",bytesToHex(e),t||""),this.checkLength(n);for(var i=0;n>i;i++)this.byteView[this.offset++]=e[i]},TLSerialization.prototype.storeMethod=function(e,t){var n,i=this.mtproto?Config.Schema.MTProto:Config.Schema.API,r=!1;for(n=0;n<i.methods.length;n++)if(i.methods[n].method==e){r=i.methods[n];break}if(!r)throw new Error("No method "+e+" found");this.storeInt(intToUint(r.id),e+"[id]");var o=this;return angular.forEach(r.params,function(n){o.storeObject(t[n.name],n.type,e+"["+n.name+"]")}),r.type},TLSerialization.prototype.storeObject=function(e,t,n){switch(t){case"int":return this.storeInt(e,n);case"long":return this.storeLong(e,n);case"int128":return this.storeIntBytes(e,128,n);case"int256":return this.storeIntBytes(e,256,n);case"int512":return this.storeIntBytes(e,512,n);case"string":return this.storeString(e,n);case"bytes":return this.storeBytes(e,n);case"double":return this.storeDouble(e,n);case"Bool":return this.storeBool(e,n)}if(angular.isArray(e)){if("Vector"==t.substr(0,6))this.writeInt(481674261,n+"[id]");else if("vector"!=t.substr(0,6))throw new Error("Invalid vector type "+t);var i=t.substr(7,t.length-8);this.writeInt(e.length,n+"[count]");for(var r=0;r<e.length;r++)this.storeObject(e[r],i,n+"["+r+"]");return!0}if("vector"==t.substr(0,6).toLowerCase())throw new Error("Invalid vector object");if(!angular.isObject(e))throw new Error("Invalid object for type "+t);var r,o=this.mtproto?Config.Schema.MTProto:Config.Schema.API,a=e._,s=!1,c=!1;for((s="%"==t.charAt(0))&&(t=t.substr(1)),r=0;r<o.constructors.length;r++)if(o.constructors[r].predicate==a){c=o.constructors[r];break}if(!c)throw new Error("No predicate "+a+" found");a==t&&(s=!0),s||this.writeInt(intToUint(c.id),n+"["+a+"][id]");var l=this;return angular.forEach(c.params,function(t){l.storeObject(e[t.name],t.type,n+"["+a+"]["+t.name+"]")}),c.type},TLDeserialization.prototype.readInt=function(e){if(this.offset>=4*this.intView.length)throw new Error("Nothing to fetch: "+e);var t=this.intView[this.offset/4];return this.debug&&console.log("<<<",t.toString(16),t,e),this.offset+=4,t},TLDeserialization.prototype.fetchInt=function(e){return this.readInt((e||"")+":int")},TLDeserialization.prototype.fetchDouble=function(e){var t=new ArrayBuffer(8),n=new Int32Array(t),i=new Float64Array(t);return n[0]=this.readInt((e||"")+":double[low]"),n[1]=this.readInt((e||"")+":double[high]"),i[0]},TLDeserialization.prototype.fetchLong=function(e){var t=this.readInt((e||"")+":long[low]"),n=this.readInt((e||"")+":long[high]"),i=bigint(n).shiftLeft(32).add(bigint(t)).toString();return i},TLDeserialization.prototype.fetchBool=function(e){var t=this.readInt((e||"")+":bool");return 2574415285==t?!0:3162085175==t?!1:(this.offset-=4,this.fetchObject("Object",e))},TLDeserialization.prototype.fetchString=function(e){var t=this.byteView[this.offset++];if(254==t)var t=this.byteView[this.offset++]|this.byteView[this.offset++]<<8|this.byteView[this.offset++]<<16;for(var n="",i=0;t>i;i++)n+=String.fromCharCode(this.byteView[this.offset++]);for(;this.offset%4;)this.offset++;try{var r=decodeURIComponent(escape(n))}catch(o){var r=n}return this.debug&&console.log("<<<",r,(e||"")+":string"),r},TLDeserialization.prototype.fetchBytes=function(e){var t=this.byteView[this.offset++];if(254==t)var t=this.byteView[this.offset++]|this.byteView[this.offset++]<<8|this.byteView[this.offset++]<<16;for(var n=[],i=0;t>i;i++)n.push(this.byteView[this.offset++]);for(;this.offset%4;)this.offset++;return this.debug&&console.log("<<<",bytesToHex(n),(e||"")+":bytes"),n},TLDeserialization.prototype.fetchIntBytes=function(e,t){if(e%32)throw new Error("Invalid bits: "+e);for(var n=e/8,i=[],r=0;n>r;r++)i.push(this.byteView[this.offset++]);return this.debug&&console.log("<<<",bytesToHex(i),(t||"")+":int"+e),i},TLDeserialization.prototype.fetchRawBytes=function(e,t){e===!1&&(e=this.readInt((t||"")+"_length"));for(var n=[],i=0;e>i;i++)n.push(this.byteView[this.offset++]);return this.debug&&console.log("<<<",bytesToHex(n),t||""),n},TLDeserialization.prototype.fetchObject=function(e,t){switch(e){case"int":return this.fetchInt(t);case"long":return this.fetchLong(t);case"int128":return this.fetchIntBytes(128,t);case"int256":return this.fetchIntBytes(256,t);case"int512":return this.fetchIntBytes(512,t);case"string":return this.fetchString(t);case"bytes":return this.fetchBytes(t);case"double":return this.fetchDouble(t);case"Bool":return this.fetchBool(t)}if(t=t||e||"Object","Vector"==e.substr(0,6)||"vector"==e.substr(0,6)){if("V"==e.charAt(0)){var n=this.readInt(t+"[id]");if(481674261!=n)throw new Error("Invalid vector constructor "+n)}var i=this.readInt(t+"[count]"),r=[];if(i>0)for(var o=e.substr(7,e.length-8),a=0;i>a;a++)r.push(this.fetchObject(o,t+"["+a+"]"));return r}var s=this.mtproto?Config.Schema.MTProto:Config.Schema.API,c=!1,l=!1;if("%"==e.charAt(0)){var u=e.substr(1);for(a=0;a<s.constructors.length;a++)if(s.constructors[a].type==u){l=s.constructors[a];break}if(!l)throw new Error("Constructor not found for type: "+e)}else if(e.charAt(0)>=97&&e.charAt(0)<=122){for(a=0;a<s.constructors.length;a++)if(s.constructors[a].predicate==e){l=s.constructors[a];break}if(!l)throw new Error("Constructor not found for predicate: "+e)}else{var n=this.readInt(t+"[id]"),p=uintToInt(n);if(812830625==p){var d=this.fetchBytes(t+"[packed_string]"),f=gzipUncompress(d),h=bytesToArrayBuffer(f),g=new TLDeserialization(h);return g.fetchObject(e,t)}for(a=0;a<s.constructors.length;a++)if(s.constructors[a].id==p){l=s.constructors[a];break}var m=!1;if(!l&&this.mtproto){var y=Config.Schema.API;for(a=0;a<y.constructors.length;a++)if(y.constructors[a].id==p){l=y.constructors[a],delete this.mtproto,m=!0;break}}if(!l)throw new Error("Constructor not found: "+n)}c=l.predicate;var r={_:c},v=(this.mtproto?"mt_":"")+c,_=this;return this.override[v]?this.override[v].apply(this,[r,t+"["+c+"]"]):angular.forEach(l.params,function(e){r[e.name]=_.fetchObject(e.type,t+"["+c+"]["+e.name+"]")}),m&&(this.mtproto=!0),r},TLDeserialization.prototype.getOffset=function(){return this.offset},TLDeserialization.prototype.fetchEnd=function(){if(this.offset!=this.byteView.length)throw new Error("Fetch end with non-empty buffer");return!0},angular.module("izhukov.utils",[]).provider("Storage",function(){var e="",t={},n=!!(window.chrome&&chrome.storage&&chrome.storage.local),i=!n&&!!window.localStorage;this.setPrefix=function(t){e=t},this.$get=["$q",function(r){function o(){for(var o=Array.prototype.slice.call(arguments),a=[],s=1==o.length,c=!0,l=0;l<o.length;l++)o[l]=e+o[l];if(angular.forEach(o,function(e){if(void 0!==t[e])a.push(t[e]);else if(i){var r=localStorage.getItem(e);r=void 0===r||null===r?!1:JSON.parse(r),a.push(t[e]=r)}else n?c=!1:a.push(t[e]=!1)}),c)return r.when(s?a[0]:a);var u=r.defer();return chrome.storage.local.get(o,function(e){a=[],angular.forEach(o,function(n){var i=e[n];i=void 0===i||null===i?!1:JSON.parse(i),a.push(t[n]=i)}),u.resolve(s?a[0]:a)}),u.promise}function a(o){var a={};if(angular.forEach(o,function(n,i){a[e+i]=JSON.stringify(n),t[e+i]=n}),i)return angular.forEach(a,function(e,t){localStorage.setItem(t,e)}),r.when();if(!n)return r.when();var s=r.defer();return chrome.storage.local.set(a,function(){s.resolve()}),s.promise}function s(){for(var o=Array.prototype.slice.call(arguments),a=0;a<o.length;a++)o[a]=e+o[a];if(angular.forEach(o,function(e){delete t[e]}),i)return angular.forEach(o,function(e){localStorage.removeItem(e)}),r.when();if(!n)return r.when();var s=r.defer();return chrome.storage.local.remove(o,function(){s.resolve()}),s.promise}return{get:o,set:a,remove:s}}]}).service("FileManager",["$window","$timeout","$q",function(e,t,n){function i(e,t){return a(t).then(function(t){return r(t,e).then(function(){return t},function(e){return n.reject(e)})})}function r(e,t){var i=n.defer();return e.onwriteend=function(){i.resolve()},e.onerror=function(e){i.reject(e)
},t.file?t.file(function(t){e.write(t)},function(e){i.reject(e)}):e.write(t instanceof Blob?t:new Blob([bytesToArrayBuffer(t)])),i.promise}function o(t,i,r){if(!e.chrome||!chrome.fileSystem||!chrome.fileSystem.chooseEntry)return n.reject();var o=n.defer();return chrome.fileSystem.chooseEntry({type:"saveFile",suggestedName:t,accepts:[{mimeTypes:[r],extensions:[i]}]},function(e){o.resolve(e)}),o.promise}function a(e){var t=n.defer();return e.createWriter(function(e){t.resolve(e)},function(e){t.reject(e)}),t.promise}function s(e,n){var i=[],r={write:function(e){i.push(e),t(function(){r.onwriteend&&r.onwriteend()})},truncate:function(){i=[]},finalize:function(){var t;try{t=new Blob(i,{type:e})}catch(r){var o=new BlobBuilder;angular.forEach(i,function(e){o.append(e)}),t=o.getBlob(e)}return n&&n(t),t}};return r}function c(e,t){return void 0!==e.toURL?e.toURL(t):e instanceof Blob?URL.createObjectURL(e):"data:"+t+";base64,"+bytesToBase64(e)}function l(e,n,i){var r=$("<a>Download</a>").css({position:"absolute",top:1,left:1}).attr("href",e).attr("target","_blank").attr("download",i).appendTo("body");r[0].dataset.downloadurl=[n,i,e].join(":"),r[0].click(),t(function(){r.remove()},100)}return e.URL=e.URL||e.webkitURL,e.BlobBuilder=e.BlobBuilder||e.WebKitBlobBuilder||e.MozBlobBuilder,{copy:i,write:r,getFileWriter:a,getFakeFileWriter:s,chooseSave:o,getUrl:c,download:l}}]).service("IdbFileStorage",["$q","$window","FileManager",function(e,t,n){function i(){return d}function r(){if(c)return c;try{var t=indexedDB.open(l,p),n=e.defer(),i=function(e){e.createObjectStore(u)}}catch(r){return d=!1,e.reject(r)}return t.onsuccess=function(){db=t.result,db.onerror=function(e){d=!1,console.error("Error creating/accessing IndexedDB database",e),n.reject(e)},db.setVersion&&db.version!=p?db.setVersion(p).onsuccess=function(){i(db),n.resolve(db)}:n.resolve(db)},t.onerror=function(e){d=!1,console.error("Error creating/accessing IndexedDB database",e),n.reject(e)},t.onupgradeneeded=function(e){i(e.target.result)},c=n.promise}function o(t,n){return r().then(function(i){try{var r=e.defer(),o=i.transaction([u],IDBTransaction.READ_WRITE||"readwrite").objectStore(u),a=o.put(n,t)}catch(s){return d=!1,e.reject(s)}return a.onsuccess=function(){r.resolve(n)},a.onerror=function(e){r.reject(e)},r.promise})}function a(t){return r().then(function(n){var i=e.defer(),r=n.transaction([u],IDBTransaction.READ||"readonly").objectStore(u),o=r.get(t);return o.onsuccess=function(e){void 0===e.target.result?i.reject():i.resolve(e.target.result)},o.onerror=function(e){i.reject(e)},i.promise})}function s(t,i){var r=n.getFakeFileWriter(i,function(e){o(t,e)});return e.when(r)}t.indexedDB=t.indexedDB||t.webkitIndexedDB||t.mozIndexedDB||t.OIndexedDB||t.msIndexedDB,t.IDBTransaction=t.IDBTransaction||t.webkitIDBTransaction||t.OIDBTransaction||t.msIDBTransaction;var c,l="cachedFiles",u="files",p=1,d=void 0!==t.indexedDB&&void 0!==t.IDBTransaction;return r(),{isAvailable:i,saveFile:o,getFile:a,getFileWriter:s}}]).service("TmpfsFileStorage",["$q","$window","FileManager",function(e,t,n){function i(){if(c)return c;if(!t.requestFileSystem)return c=e.reject({type:"FS_BROWSER_UNSUPPORTED",description:"requestFileSystem not present"});var n=e.defer();return t.requestFileSystem(t.TEMPORARY,5242880,function(e){cachedFs=e,n.resolve()},function(e){l=!1,n.reject(e)}),c=n.promise}function r(){return l}function o(t,n){return n=n||1,i().then(function(){var i=e.defer();return cachedFs.root.getFile(t,{create:!1},function(e){e.file(function(t){t.size>=n?i.resolve(e):i.reject(new Error("FILE_NOT_FOUND"))},function(e){console.log(dT(),"error",e),i.reject(e)})},function(){i.reject(new Error("FILE_NOT_FOUND"))}),i.promise})}function a(e,t){return s(e).then(function(e){return n.write(e,t).then(function(){return e.finalize()})})}function s(t){return i().then(function(){var i=e.defer();return cachedFs.root.getFile(t,{create:!0},function(e){n.getFileWriter(e).then(function(t){t.finalize=function(){return e},i.resolve(t)},function(e){i.reject(e)})},function(e){i.reject(e)}),i.promise})}t.requestFileSystem=t.requestFileSystem||t.webkitRequestFileSystem;var c,l=void 0!==t.requestFileSystem;return i(),{isAvailable:r,saveFile:a,getFile:o,getFileWriter:s}}]).service("MemoryFileStorage",["$q","FileManager",function(e,t){function n(){return!0}function i(t){return a[t]?e.when(a[t]):e.reject(new Error("FILE_NOT_FOUND"))}function r(t,n){return e.when(a[t]=n)}function o(n,i){var o=t.getFakeFileWriter(i,function(e){r(n,e)});return e.when(o)}var a={};return{isAvailable:n,saveFile:r,getFile:i,getFileWriter:o}}]),angular.module("izhukov.mtproto",["izhukov.utils"]).factory("MtpDcConfigurator",function(){function e(e){if(void 0===n[e]){var i,r,o=!1;for(i=0;i<t.length;i++)r=t[i],r.id==e&&(o=r.host+":"+r.port);n[e]=o}return n[e]}var t=Config.Modes.test?[{id:1,host:"173.240.5.253",port:80},{id:2,host:"149.154.167.40",port:80},{id:3,host:"174.140.142.5",port:80}]:[{id:1,host:"173.240.5.1",port:80},{id:2,host:"149.154.167.50",port:80},{id:3,host:"174.140.142.6",port:80},{id:4,host:"31.210.235.12",port:80},{id:5,host:"116.51.22.2",port:80}],n={};return{chooseServer:e}}).factory("MtpRsaKeysManager",function(){function e(){if(!r){for(var e=0;e<n.length;e++){var t=n[e],o=new TLSerialization;o.storeBytes(bytesFromHex(t.modulus),"n"),o.storeBytes(bytesFromHex(t.exponent),"e");var a=o.getBuffer(),s=sha1Hash(a).slice(-8);s.reverse();var c=new BigInteger(s).toString(16);i[c]={modulus:t.modulus,exponent:t.exponent}}r=!0}}function t(t){e();var n,r,o;for(o=0;o<t.length;o++)if(n=bigStringInt(t[o]).toString(16),r=i[n])return angular.extend({fingerprint:t[o]},r);return!1}var n=[{modulus:"c150023e2f70db7985ded064759cfecf0af328e69a41daf4d6f01b538135a6f91f8f8b2a0ec9ba9720ce352efcf6c5680ffc424bd634864902de0b4bd6d49f4e580230e3ae97d95c8b19442b3c0a10d8f5633fecedd6926a7f6dab0ddb7d457f9ea81b8465fcd6fffeed114011df91c059caedaf97625f6c96ecc74725556934ef781d866b34f011fce4d835a090196e9a5f0e4449af7eb697ddb9076494ca5f81104a305b6dd27665722c46b60e5df680fb16b210607ef217652e60236c255f6a28315f4083a96791d7214bf64c1df4fd0db1944fb26a2a57031b32eee64ad15a8ba68885cde74a5bfc920f6abf59ba5c75506373e7130f9042da922179251f",exponent:"010001"}],i={},r=!1;return{prepare:e,select:t}}).service("MtpSecureRandom",function(){return new SecureRandom}).factory("MtpMessageIdGenerator",["Storage",function(e){function t(){var e=tsNow(),t=Math.floor(e/1e3)+r,n=e%1e3,o=nextRandomInt(65535),a=[t,n<<21|o<<3|4];return(i[0]>a[0]||i[0]==a[0]&&i[1]>=a[1])&&(a=[i[0],i[1]+4]),i=a,longFromInts(a[0],a[1])}function n(t,n){var o=t-Math.floor((n||tsNow())/1e3),a=Math.abs(r-o)>10;return e.set({server_time_offset:o}),i=[0,0],r=o,console.log("Apply server time",t,n,o,a),a}var i=[0,0],r=0;return e.get("server_time_offset").then(function(e){e&&(r=e)}),{generateID:t,applyServerTime:n}}]).factory("MtpAuthorizer",["MtpDcConfigurator","MtpRsaKeysManager","MtpSecureRandom","MtpMessageIdGenerator","$http","$q","$timeout",function(e,t,n,i,r,o,a){function s(t,n){var a=n.byteLength,s=new Int32Array(n),c=new TLSerialization;c.storeLongP(0,0,"auth_key_id"),c.storeLong(i.generateID(),"msg_id"),c.storeInt(a,"request_length");var l=c.getBuffer(),u=new Int32Array(l),p=l.byteLength,d=new ArrayBuffer(p+a),f=new Int32Array(d);return f.set(u),f.set(s,u.length),delete r.defaults.headers.post["Content-Type"],delete r.defaults.headers.common.Accept,"ArrayBufferView"in window||(f=f.buffer),r.post("http://"+e.chooseServer(t)+"/apiw1",f,{responseType:"arraybuffer",transformRequest:null,transformResponse:function(e){var t=new TLDeserialization(e,{mtproto:!0});try{{t.fetchLong("auth_key_id"),t.fetchLong("msg_id"),t.fetchInt("msg_len")}}catch(n){return o.reject({code:406,type:"NETWORK_BAD_RESPONSE",problem:n.message,stack:n.stack})}return rng_seed_time(),t}})["catch"](function(e){return e.message||e.type||(e={code:406,type:"NETWORK_BAD_REQUEST"}),o.reject(e)})}function c(e){var n=e.deferred,i=new TLSerialization({mtproto:!0});i.storeMethod("req_pq",{nonce:e.nonce}),console.log(dT(),"Send req_pq",bytesToHex(e.nonce)),s(e.dcID,i.getBuffer()).then(function(i){var r=i.data,o=r.fetchObject("ResPQ");if("resPQ"!=o._)throw new Error("resPQ response invalid: "+o._);if(!bytesCmp(e.nonce,o.nonce))throw new Error("resPQ nonce mismatch");if(e.serverNonce=o.server_nonce,e.pq=o.pq,e.fingerprints=o.server_public_key_fingerprints,console.log(dT(),"Got ResPQ",bytesToHex(e.serverNonce),bytesToHex(e.pq),e.fingerprints),e.publicKey=t.select(e.fingerprints),!e.publicKey)throw new Error("No public key found");if(console.log(dT(),"PQ factorization start"),window.Worker){var a=new Worker("js/lib/pq_worker.js");a.onmessage=function(t){e.p=t.data[0],e.q=t.data[1],console.log(dT(),"PQ factorization done"),l(e)},a.onerror=function(e){console.log("Worker error",e,e.stack),n.reject(e)},a.postMessage(e.pq)}else{var s=pqPrimeFactorization(e.pq);e.p=s[0],e.q=s[1],console.log(dT(),"PQ factorization done"),l(e)}},function(e){console.log(dT(),"req_pq error",e.message),n.reject(e)}),a(function(){t.prepare()})}function l(e){var t=e.deferred;e.newNonce=new Array(32),n.nextBytes(e.newNonce);var i=new TLSerialization({mtproto:!0});i.storeObject({_:"p_q_inner_data",pq:e.pq,p:e.p,q:e.q,nonce:e.nonce,server_nonce:e.serverNonce,new_nonce:e.newNonce},"P_Q_inner_data","DECRYPTED_DATA");var r=sha1Hash(i.getBuffer()).concat(i.getBytes()),o=new TLSerialization({mtproto:!0});o.storeMethod("req_DH_params",{nonce:e.nonce,server_nonce:e.serverNonce,p:e.p,q:e.q,public_key_fingerprint:e.publicKey.fingerprint,encrypted_data:rsaEncrypt(e.publicKey,r)}),console.log(dT(),"Send req_DH_params"),s(e.dcID,o.getBuffer()).then(function(n){var i=n.data,r=i.fetchObject("Server_DH_Params","RESPONSE");if("server_DH_params_fail"!=r._&&"server_DH_params_ok"!=r._)return t.reject(new Error("Server_DH_Params response invalid: "+r._)),!1;if(!bytesCmp(e.nonce,r.nonce))return t.reject(new Error("Server_DH_Params nonce mismatch")),!1;if(!bytesCmp(e.serverNonce,r.server_nonce))return t.reject(new Error("Server_DH_Params server_nonce mismatch")),!1;if("server_DH_params_fail"==r._){var o=sha1Hash(e.newNonce).slice(-16);return bytesCmp(o,r.new_nonce_hash)?(t.reject(new Error("server_DH_params_fail")),!1):(t.reject(new Error("server_DH_params_fail new_nonce_hash mismatch")),!1)}try{u(e,r.encrypted_answer)}catch(a){return t.reject(a),!1}p(e)},function(e){t.reject(e)})}function u(e,t){e.localTime=tsNow(),e.tmpAesKey=sha1Hash(e.newNonce.concat(e.serverNonce)).concat(sha1Hash(e.serverNonce.concat(e.newNonce)).slice(0,12)),e.tmpAesIv=sha1Hash(e.serverNonce.concat(e.newNonce)).slice(12).concat(sha1Hash([].concat(e.newNonce,e.newNonce)),e.newNonce.slice(0,4));var n=aesDecrypt(t,e.tmpAesKey,e.tmpAesIv),r=n.slice(0,20),o=n.slice(20),a=bytesToArrayBuffer(o),s=new TLDeserialization(a,{mtproto:!0}),c=s.fetchObject("Server_DH_inner_data");if("server_DH_inner_data"!=c._)throw new Error("server_DH_inner_data response invalid: "+constructor);if(!bytesCmp(e.nonce,c.nonce))throw new Error("server_DH_inner_data nonce mismatch");if(!bytesCmp(e.serverNonce,c.server_nonce))throw new Error("server_DH_inner_data serverNonce mismatch");console.log(dT(),"Done decrypting answer"),e.g=c.g,e.dhPrime=c.dh_prime,e.gA=c.g_a,e.serverTime=c.server_time,e.retry=0;var l=s.getOffset();if(!bytesCmp(r,sha1Hash(o.slice(0,l))))throw new Error("server_DH_inner_data SHA1-hash mismatch");i.applyServerTime(e.serverTime,e.localTime)}function p(e){var t=e.deferred;e.b=new Array(256),n.nextBytes(e.b);var i=new BigInteger(e.b),r=new BigInteger(e.dhPrime),o=bytesFromBigInt(bigint(e.g).modPow(i,r)),a=new TLSerialization({mtproto:!0});a.storeObject({_:"client_DH_inner_data",nonce:e.nonce,server_nonce:e.serverNonce,retry_id:[0,e.retry++],g_b:o},"Client_DH_Inner_Data");var c=sha1Hash(a.getBuffer()).concat(a.getBytes()),l=aesEncrypt(c,e.tmpAesKey,e.tmpAesIv),u=new TLSerialization({mtproto:!0});u.storeMethod("set_client_DH_params",{nonce:e.nonce,server_nonce:e.serverNonce,encrypted_data:l}),console.log(dT(),"Send set_client_DH_params"),s(e.dcID,u.getBuffer()).then(function(n){var i=n.data,r=i.fetchObject("Set_client_DH_params_answer");if("dh_gen_ok"!=r._&&"dh_gen_retry"!=r._&&"dh_gen_fail"!=r._)return t.reject(new Error("Set_client_DH_params_answer response invalid: "+r._)),!1;if(!bytesCmp(e.nonce,r.nonce))return t.reject(new Error("Set_client_DH_params_answer nonce mismatch")),!1;if(!bytesCmp(e.serverNonce,r.server_nonce))return t.reject(new Error("Set_client_DH_params_answer server_nonce mismatch")),!1;var o=new BigInteger(e.b),a=new BigInteger(e.dhPrime),s=bytesFromBigInt(new BigInteger(e.gA).modPow(o,a)),c=sha1Hash(s),l=c.slice(0,8),u=c.slice(-8);switch(console.log(dT(),"Got Set_client_DH_params_answer",r._),r._){case"dh_gen_ok":var d=sha1Hash(e.newNonce.concat([1],l)).slice(-16);if(!bytesCmp(d,r.new_nonce_hash1))return t.reject(new Error("Set_client_DH_params_answer new_nonce_hash1 mismatch")),!1;var f=bytesXor(e.newNonce.slice(0,8),e.serverNonce.slice(0,8));e.authKeyID=u,e.authKey=s,e.serverSalt=f,t.resolve(e);break;case"dh_gen_retry":var h=sha1Hash(e.newNonce.concat([2],l)).slice(-16);return bytesCmp(h,r.new_nonce_hash2)?p(e):(t.reject(new Error("Set_client_DH_params_answer new_nonce_hash2 mismatch")),!1);case"dh_gen_fail":var g=sha1Hash(e.newNonce.concat([3],l)).slice(-16);return bytesCmp(g,r.new_nonce_hash3)?(t.reject(new Error("Set_client_DH_params_answer fail")),!1):(t.reject(new Error("Set_client_DH_params_answer new_nonce_hash3 mismatch")),!1)}},function(e){t.reject(e)})}function d(t){if(void 0!==f[t])return f[t];for(var n=[],i=0;16>i;i++)n.push(nextRandomInt(255));if(!e.chooseServer(t))return o.reject(new Error("No server found for dc "+t));var r={dcID:t,nonce:n,deferred:o.defer()};return a(function(){c(r)}),f[t]=r.deferred.promise}var f={};return{auth:d}}]).factory("MtpAesService",["$q",function(e){return{encrypt:function(t,n,i){return e.when(aesEncrypt(t,n,i))},decrypt:function(t,n,i){return e.when(aesDecrypt(t,n,i))}}}]).factory("MtpSha1Service",["$q",function(e){return{hash:function(t){var n=e.defer();return setTimeout(function(){n.resolve(sha1Hash(t))},0),n.promise}}}]).factory("MtpNetworkerFactory",["MtpDcConfigurator","MtpMessageIdGenerator","MtpSecureRandom","MtpSha1Service","MtpAesService","Storage","$http","$q","$timeout","$interval","$rootScope",function(e,t,n,i,r,o,a,s,c,l,u){function p(e,t,n,i){i=i||{},this.dcID=e,this.iii=f++,this.authKey=t,this.authKeyID=sha1Hash(t).slice(-8),this.serverSalt=n,this.upload=i.fileUpload||i.fileDownload||!1,this.updateSession(),this.currentRequests=0,this.checkConnectionPeriod=0,this.sentMessages={},this.serverMessages=[],this.clientMessages=[],this.pendingMessages={},this.pendingAcks=[],this.pendingResends=[],this.connectionInited=!1,this.pendingTimeouts=[],this.longPollInt=l(this.checkLongPoll.bind(this),1e4),this.checkLongPoll(),h||(h=!0,u.offline=!0,u.offlineConnecting=!0)}var d,f=0,h=!1;return u.retryOnline=function(){$(document.body).trigger("online")},p.prototype.updateSession=function(){console.log(dT(),"Update session"),this.seqNo=0,this.sessionID=new Array(8),n.nextBytes(this.sessionID)},p.prototype.updateSentMessage=function(e){var n=this.sentMessages[e];if(!n)return!1;var i=this;if(n.container){var r=[];angular.forEach(n.inner,function(e){var t=i.updateSentMessage(e);t&&r.push(t.msg_id)}),n.inner=r}return n.msg_id=t.generateID(),n.seq_no=this.generateSeqNo(n.notContentRelated||n.container),this.sentMessages[n.msg_id]=n,delete i.sentMessages[e],n},p.prototype.generateSeqNo=function(e){var t=2*this.seqNo;return e||(t++,this.seqNo++),t},p.prototype.wrapMtpCall=function(e,n,i){var r=new TLSerialization({mtproto:!0});r.storeMethod(e,n);var o=t.generateID(),a=this.generateSeqNo(),s={msg_id:o,seq_no:a,body:r.getBytes()};return Config.Modes.debug&&console.log(dT(),"MT call",e,n,o,a),this.pushMessage(s,i)},p.prototype.wrapMtpMessage=function(e,n){n=n||{};var i=new TLSerialization({mtproto:!0});i.storeObject(e,"Object");var r=t.generateID(),o=this.generateSeqNo(n.notContentRelated),a={msg_id:r,seq_no:o,body:i.getBytes()};return Config.Modes.debug&&console.log(dT(),"MT message",e,r,o),this.pushMessage(a,n)},p.prototype.wrapApiCall=function(e,n,i){var r=new TLSerialization(i);this.connectionInited||(r.storeInt(3024194404,"invokeWithLayer15"),r.storeInt(1769565673,"initConnection"),r.storeInt(Config.App.id,"api_id"),r.storeString(navigator.userAgent||"Unknown UserAgent","device_model"),r.storeString(navigator.platform||"Unknown Platform","system_version"),r.storeString(Config.App.version,"app_version"),r.storeString(navigator.language||"en","lang_code")),i.afterMessageID&&(r.storeInt(3416209197,"invokeAfterMsg"),r.storeLong(i.afterMessageID,"msg_id")),i.resultType=r.storeMethod(e,n);var o=t.generateID(),a=this.generateSeqNo(),s={msg_id:o,seq_no:a,body:r.getBytes(),isAPI:!0};return Config.Modes.debug?console.log(dT(),"Api call",e,n,o,a,i):console.log(dT(),"Api call",e),this.pushMessage(s,i)},p.prototype.checkLongPoll=function(){var e=this.cleanupSent();if(this.longPollPending&&tsNow()<this.longPollPending||this.offline)return!1;var t=this;o.get("dc").then(function(n){(!e||n==t.dcID&&!t.upload)&&t.sendLongPoll()})},p.prototype.sendLongPoll=function(){var e=25e3,t=this;this.longPollPending=tsNow()+e,this.wrapMtpCall("http_wait",{max_delay:0,wait_after:0,max_wait:e},{noResponse:!0,longPoll:!0}).then(function(){delete t.longPollPending,c(t.checkLongPoll.bind(t),0)},function(){console.log("Long-poll failed")})},p.prototype.pushMessage=function(e,t){var n=s.defer();return this.sentMessages[e.msg_id]=angular.extend(e,t||{},{deferred:n}),this.pendingMessages[e.msg_id]=0,t&&t.noShedule||this.sheduleRequest(),angular.isObject(t)&&(t.messageID=e.msg_id),n.promise},p.prototype.pushResend=function(e,t){var n=t?tsNow()+t:0,i=this.sentMessages[e];if(i.container)for(var r=0;r<i.inner.length;r++)this.pendingMessages[i.inner[r]]=n;else this.pendingMessages[e]=n;this.sheduleRequest(t)},p.prototype.getMsgKeyIv=function(e,t){var n=this.authKey,r=t?0:8,o={sha1a:i.hash(e.concat(n.slice(r,r+32))),sha1b:i.hash(n.slice(32+r,48+r).concat(e,n.slice(48+r,64+r))),sha1c:i.hash(n.slice(64+r,96+r).concat(e)),sha1d:i.hash(e.concat(n.slice(96+r,128+r)))};return s.all(o).then(function(e){var t=e.sha1a.slice(0,8).concat(e.sha1b.slice(8,20),e.sha1c.slice(4,16)),n=e.sha1a.slice(8,20).concat(e.sha1b.slice(0,8),e.sha1c.slice(16,20),e.sha1d.slice(0,8));return[t,n]})},p.prototype.checkConnection=function(e){u.offlineConnecting=!0,console.log(dT(),"Check connection",e),c.cancel(this.checkConnectionPromise);var n=new TLSerialization({mtproto:!0}),i=[nextRandomInt(4294967295),nextRandomInt(4294967295)];n.storeMethod("ping",{ping_id:i});var r={msg_id:t.generateID(),seq_no:this.generateSeqNo(!0),body:n.getBytes()},o=this;this.sendEncryptedRequest(r).then(function(){delete u.offlineConnecting,o.toggleOffline(!1)},function(){console.log(dT(),"Delay ",1e3*o.checkConnectionPeriod),o.checkConnectionPromise=c(o.checkConnection.bind(o),parseInt(1e3*o.checkConnectionPeriod)),o.checkConnectionPeriod=Math.min(60,1.5*o.checkConnectionPeriod),c(function(){delete u.offlineConnecting},1e3)})},p.prototype.toggleOffline=function(e){return void 0!==this.offline&&this.offline==e?!1:(this.offline=e,u.offline=e,u.offlineConnecting=!1,void(this.offline?(c.cancel(this.nextReqPromise),delete this.nextReq,this.checkConnectionPeriod<1.5&&(this.checkConnectionPeriod=0),this.checkConnectionPromise=c(this.checkConnection.bind(this),parseInt(1e3*this.checkConnectionPeriod)),this.checkConnectionPeriod=Math.min(60,1.5*(1+this.checkConnectionPeriod)),this.onOnlineCb=this.checkConnection.bind(this),$(document.body).on("online",this.onOnlineCb)):(delete this.longPollPending,this.checkLongPoll(),this.sheduleRequest(),this.onOnlineCb&&$(document.body).off("online",this.onOnlineCb),c.cancel(this.checkConnectionPromise))))},p.prototype.performSheduledRequest=function(){if(this.offline)return console.log(dT(),"Cancel sheduled"),!1;if(delete this.nextReq,this.pendingAcks.length){for(var e=[],n=0;n<this.pendingAcks.length;n++)e.push(this.pendingAcks[n]);this.wrapMtpMessage({_:"msgs_ack",msg_ids:e},{notContentRelated:!0,noShedule:!0})}if(this.pendingResends.length){for(var i=[],r={noShedule:!0,notContentRelated:!0},n=0;n<this.pendingResends.length;n++)i.push(this.pendingResends[n]);this.wrapMtpMessage({_:"msg_resend_req",msg_ids:i},r),this.lastResendReq={req_msg_id:r.messageID,resend_msg_ids:i}}var o,a=[],s=0,c=tsNow(),l=!1,u=!1,p=this;if(angular.forEach(this.pendingMessages,function(e,t){(!e||e>=c)&&((o=p.sentMessages[t])&&(a.push(o),s+=o.body.length+32,o.isAPI?l=!0:o.longPoll&&(u=!0)),delete p.pendingMessages[t])}),l&&!u){var d=new TLSerialization({mtproto:!0});d.storeMethod("http_wait",{max_delay:0,wait_after:0,max_wait:1e3}),a.push({msg_id:t.generateID(),seq_no:this.generateSeqNo(),body:d.getBytes()})}if(a.length){var f=[];if(a.length>1){var h=new TLSerialization({mtproto:!0,startMaxLength:s+64});h.storeInt(1945237724,"CONTAINER[id]"),h.storeInt(a.length,"CONTAINER[count]");for(var g=[],n=0;n<a.length;n++)h.storeLong(a[n].msg_id,"CONTAINER["+n+"][msg_id]"),g.push(a[n].msg_id),h.storeInt(a[n].seq_no,"CONTAINER["+n+"][seq_no]"),h.storeInt(a[n].body.length,"CONTAINER["+n+"][bytes]"),h.storeRawBytes(a[n].body,"CONTAINER["+n+"][body]"),a[n].noResponse&&f.push(a[n].msg_id);var m={msg_id:t.generateID(),seq_no:this.generateSeqNo(!0),container:!0,inner:g};o=angular.extend({body:h.getBytes()},m),this.sentMessages[o.msg_id]=m,Config.Modes.debug&&console.log(dT(),"Container",g,o.msg_id,o.seq_no)}else o.noResponse&&f.push(o.msg_id),this.sentMessages[o.msg_id]=o;this.pendingAcks=[];var p=this;this.sendEncryptedRequest(o).then(function(e){p.toggleOffline(!1),p.parseResponse(e.data).then(function(e){Config.Modes.debug&&console.log(dT(),"Server response",p.dcID,e),p.processMessage(e.response,e.messageID,e.sessionID),angular.forEach(f,function(e){if(p.sentMessages[e]){var t=p.sentMessages[e].deferred;delete p.sentMessages[e],t.resolve()}}),p.checkLongPoll(),this.checkConnectionPeriod=Math.max(1.1,Math.sqrt(this.checkConnectionPeriod))})},function(e){console.log("Encrypted request failed",e),o.container?(angular.forEach(o.inner,function(e){p.pendingMessages[e]=0}),delete p.sentMessages[o.msg_id]):p.pendingMessages[o.msg_id]=0,angular.forEach(f,function(e){if(p.sentMessages[e]){var t=p.sentMessages[e].deferred;delete p.sentMessages[e],delete p.pendingMessages[e],t.reject()}}),p.toggleOffline(!0)})}},p.prototype.getEncryptedMessage=function(e){var t=this;return i.hash(e).then(function(n){var i=n.slice(-16);return t.getMsgKeyIv(i,!0).then(function(t){return r.encrypt(e,t[0],t[1]).then(function(e){return{bytes:e,msgKey:i}})})})},p.prototype.getDecryptedMessage=function(e,t){return this.getMsgKeyIv(e,!1).then(function(e){return r.decrypt(t,e[0],e[1])})},p.prototype.sendEncryptedRequest=function(t){var n=this,i=new TLSerialization({startMaxLength:t.body.length+64});return i.storeIntBytes(this.serverSalt,64,"salt"),i.storeIntBytes(this.sessionID,64,"session_id"),i.storeLong(t.msg_id,"message_id"),i.storeInt(t.seq_no,"seq_no"),i.storeInt(t.body.length,"message_data_length"),i.storeRawBytes(t.body,"message_data"),this.getEncryptedMessage(i.getBytes()).then(function(t){var i=new TLSerialization({startMaxLength:t.bytes.length+256});i.storeIntBytes(n.authKeyID,64,"auth_key_id"),i.storeIntBytes(t.msgKey,128,"msg_key"),i.storeRawBytes(t.bytes,"encrypted_data"),delete a.defaults.headers.post["Content-Type"],delete a.defaults.headers.common.Accept;var r=i.getArray();return"ArrayBufferView"in window||(r=r.buffer),a.post("http://"+e.chooseServer(n.dcID)+"/apiw1",r,{responseType:"arraybuffer",transformRequest:null})["catch"](function(e){return e.message||e.type||(e={code:406,type:"NETWORK_BAD_REQUEST"}),s.reject(e)})})},p.prototype.parseResponse=function(e){var t=this,n=new TLDeserialization(e),r=n.fetchIntBytes(64,"auth_key_id");if(!bytesCmp(r,this.authKeyID))throw new Error("Invalid server auth_key_id: "+bytesToHex(r));var o=n.fetchIntBytes(128,"msg_key"),a=e.byteLength-n.getOffset(),s=n.fetchRawBytes(a,"encrypted_data");return this.getDecryptedMessage(o,s).then(function(e){var n=bytesToArrayBuffer(e),r=new TLDeserialization(n,{mtproto:!0}),a=(r.fetchIntBytes(64,"salt"),r.fetchIntBytes(64,"session_id")),s=r.fetchLong("message_id"),c=r.fetchInt("seq_no"),l=r.fetchRawBytes(!1,"message_data"),u=r.getOffset();return i.hash(e.slice(0,u)).then(function(e){if(!bytesCmp(o,e.slice(-16)))throw new Error("server msgKey mismatch");var n=bytesToArrayBuffer(l),i={mtproto:!0,override:{mt_message:function(e,t){e.msg_id=this.fetchLong(t+"[msg_id]"),e.seqno=this.fetchInt(t+"[seqno]"),e.bytes=this.fetchInt(t+"[bytes]");var n=this.getOffset();try{e.body=this.fetchObject("Object",t+"[body]")}catch(i){console.error(dT(),"parse error",i.message,i.stack),e.body={_:"parse_error",error:i}}this.offset!=n+e.bytes&&(console.warn(dT(),"set offset",this.offset,n,e.bytes),console.log(dT(),e),this.offset=n+e.bytes)},mt_rpc_result:function(e,n){e.req_msg_id=this.fetchLong(n+"[req_msg_id]");var i=t.sentMessages[e.req_msg_id],r=i&&i.resultType||"Object";e.result=this.fetchObject(r,n+"[result]")}}},r=new TLDeserialization(n,i),u=r.fetchObject("","INPUT");return{response:u,messageID:s,sessionID:a,seqNo:c}})})},p.prototype.applyServerSalt=function(e){var t=longToBytes(e),n={};return n["dc"+this.dcID+"_server_salt"]=bytesToHex(t),o.set(n),this.serverSalt=t,!0},p.prototype.sheduleRequest=function(e){this.offline&&this.checkConnection("forced shedule");var t=tsNow()+e;return e&&this.nextReq&&this.nextReq<=t?!1:(c.cancel(this.nextReqPromise),this.nextReqPromise=c(this.performSheduledRequest.bind(this),e||0),void(this.nextReq=t))},p.prototype.onSessionCreate=function(e){console.log(dT(),"New session created",bytesToHex(e))},p.prototype.ackMessage=function(e){this.pendingAcks.push(e),this.sheduleRequest(3e4)},p.prototype.reqResendMessage=function(e){console.log(dT(),"Req resend",e),this.pendingResends.push(e),this.sheduleRequest(100)},p.prototype.cleanupSent=function(){var e=this,t=!1;return angular.forEach(this.sentMessages,function(n,i){if(n.notContentRelated&&void 0===e.pendingMessages[i])delete e.sentMessages[i];else if(n.container){for(var r=0;r<n.inner.length;r++)if(void 0!==e.sentMessages[n.inner[r]])return void(t=!0);delete e.sentMessages[i]}else t=!0}),!t},p.prototype.processMessageAck=function(e){var t=this.sentMessages[e];return t&&!t.acked?(delete t.body,t.acked=!0,!0):!1},p.prototype.processError=function(e){var t=(e.error_message||"").match(/^([A-Z_0-9]+\b)(: (.+))?/)||[];return e.error_code=uintToInt(e.error_code),{code:!e.error_code||e.error_code<=0?500:e.error_code,type:t[1]||"UNKNOWN",description:t[3]||"CODE#"+e.error_code+" "+e.error_message,originalError:e}},p.prototype.processMessage=function(e,n,i){switch(e._){case"msg_container":for(var r=e.messages.length,o=0;r>o;o++)this.processMessage(e.messages[o],n,i);break;case"bad_server_salt":console.log(dT(),"Bad server salt",e);var a=this.sentMessages[e.bad_msg_id];if(!a||a.seq_no!=e.bad_msg_seqno)throw console.log(e.bad_msg_id,e.bad_msg_seqno),new Error("Bad server salt for invalid message");this.applyServerSalt(e.new_server_salt),this.pushResend(e.bad_msg_id),this.ackMessage(n);break;case"bad_msg_notification":console.log(dT(),"Bad msg notification",e);var a=this.sentMessages[e.bad_msg_id];if(!a||a.seq_no!=e.bad_msg_seqno)throw console.log(e.bad_msg_id,e.bad_msg_seqno),new Error("Bad msg notification for invalid message");if(16==e.error_code||17==e.error_code){t.applyServerTime(bigStringInt(n).shiftRight(32).toString(10))&&this.updateSession();var s=this.updateSentMessage(e.bad_msg_id);this.pushResend(s.msg_id),this.ackMessage(n)}break;case"message":this.serverMessages.push(e.msg_id),this.processMessage(e.body,e.msg_id,i);break;case"new_session_created":this.ackMessage(n),this.processMessageAck(e.first_msg_id),this.applyServerSalt(e.server_salt),this.onSessionCreate(i,n);break;case"msgs_ack":for(var o=0;o<e.msg_ids.length;o++)this.processMessageAck(e.msg_ids[o]);break;case"msg_detailed_info":if(!this.sentMessages[e.msg_id]){this.ackMessage(e.answer_msg_id);break}case"msg_new_detailed_info":this.reqResendMessage(e.answer_msg_id);break;case"msgs_state_info":if(this.ackMessage(e.answer_msg_id),this.lastResendReq&&this.lastResendReq.req_msg_id==e.req_msg_id&&this.pendingResends.length){var o,c,l;for(o=0;o<this.lastResendReq.resend_msg_ids.length;o++)c=this.lastResendReq.resend_msg_ids[o],l=this.pendingResends.indexOf(c),-1!=l&&this.pendingResends.splice(l,1)}break;case"rpc_result":this.ackMessage(n);var u=e.req_msg_id,a=this.sentMessages[u];if(this.processMessageAck(u),a){var p=a.deferred;if("rpc_error"==e.result._){var f=this.processError(e.result);console.log(dT(),"Rpc error",f),p&&p.reject(f)}else p&&(Config.Modes.debug?console.log(dT(),"Rpc response",e.result):console.log(dT(),"Rpc response",e.result._),a.deferred.resolve(e.result)),a.isAPI&&(this.connectionInited=!0);delete this.sentMessages[u]}break;default:this.ackMessage(n),d&&d(e)}},{getNetworker:function(e,t,n,i){return new p(e,t,n,i)},setUpdatesProcessor:function(e){d=e}}}]),angular.module("izhukov.mtproto.wrapper",["izhukov.utils","izhukov.mtproto"]).factory("MtpApiManager",["Storage","MtpAuthorizer","MtpNetworkerFactory","ErrorService","$q",function(e,t,n,i,r){function o(t,n){e.set({dc:t,user_auth:angular.extend({dcID:t},n)}),h=t}function a(){return c("auth.logOut").then(function(){e.remove("dc","user_auth"),h=!1},function(t){e.remove("dc","user_auth"),t&&401!=t.code&&e.remove("dc"+h+"_auth_key"),h=!1,t.handled=!0})}function s(i,o){o=o||{};var a=o.fileUpload||o.fileDownload?d:p;if(!i)throw new Exception("get Networker without dcID");if(void 0!==a[i])return r.when(a[i]);var s="dc"+i+"_auth_key",c="dc"+i+"_server_salt";return e.get(s,c).then(function(l){if(void 0!==a[i])return a[i];var u=l[0],p=l[1];if(u&&512==u.length){var d=bytesFromHex(u),f=bytesFromHex(p);return a[i]=n.getNetworker(i,d,f,o)}return o.createNetworker?t.auth(i).then(function(t){var r={};return r[s]=bytesToHex(t.authKey),r[c]=bytesToHex(t.serverSalt),e.set(r),a[i]=n.getNetworker(i,t.authKey,t.serverSalt,o)},function(e){return console.log("Get networker error",e,e.stack),r.reject(e)}):r.reject({type:"AUTH_KEY_EMPTY",code:401})})}function c(t,n,o){o=o||{};var a,l,u=r.defer(),p=function(e){e?angular.isObject(e)||(e={message:e}):e={type:"ERROR_EMPTY"},u.reject(e),o.noErrorBox||(e.input=t,e.stack=e.stack||(new Error).stack,setTimeout(function(){e.handled||(i.show({error:e}),e.handled=!0)},100))};l=(a=o.dcID)?s(a,o):e.get("dc").then(function(e){return s(a=e||1,o)});var d,g=!1;if(l.then(function(i){return(d=i).wrapApiCall(t,n,o).then(function(e){u.resolve(e)},function(l){if(console.error(dT(),"Error",l.code,l.type,h,a),401==l.code&&h==a)e.remove("dc","user_auth");else if(401==l.code&&h&&a!=h){if(void 0===f[a]){var g=r.defer();c("auth.exportAuthorization",{dc_id:a},{noErrorBox:!0}).then(function(e){c("auth.importAuthorization",{id:e.id,bytes:e.bytes},{dcID:a,noErrorBox:!0}).then(function(){g.resolve()},function(e){g.reject(e)})},function(e){g.reject(e)}),f[a]=g.promise}f[a].then(function(){(d=i).wrapApiCall(t,n,o).then(function(e){u.resolve(e)},function(e){p(e)})},function(e){p(e)})}else if(303==l.code){var m=l.type.match(/^(PHONE_MIGRATE_|NETWORK_MIGRATE_)(\d+)/)[2];m!=a&&(o.dcID?o.dcID=m:e.set({dc:h=m}),s(m,o).then(function(e){e.wrapApiCall(t,n,o).then(function(e){u.resolve(e)},function(e){p(e)})}))}else p(l)})},function(e){p(e)}),!(g=g||(new Error).stack))try{window.unexistingFunction()}catch(m){g=m.stack||""}return u.promise}function l(){return e.get("user_auth").then(function(e){return e.id||0})}function u(){return h||!1}var p={},d={},f={},h=!1;return e.get("dc").then(function(e){e&&(h=e)}),{getBaseDcID:u,getUserID:l,invokeApi:c,setUserAuth:o,logOut:a}}]).factory("MtpApiFileManager",["MtpApiManager","$q","FileManager","IdbFileStorage","TmpfsFileStorage","MemoryFileStorage",function(e,t,n,i,r,o){function a(e,n,i){void 0===_[e]&&(_[e]=[],b[e]=0);var r=_[e],o=t.defer();
return r.push({cb:n,deferred:o,activeDelta:i}),s(e),o.promise}function s(e){var t=_[e];if(b[e]>=w||!t||!t.length)return!1;var n=t.shift(),i=n.activeDelta||1;b[e]+=i;$++;n.cb().then(function(t){b[e]-=i,s(e),n.deferred.resolve(t)},function(t){b[e]-=i,s(e),n.deferred.reject(t)})}function c(e){switch(e._){case"inputVideoFileLocation":return"video"+e.id+".mp4";case"inputDocumentFileLocation":return"doc"+e.id;case"inputAudioFileLocation":return"audio"+e.id}return e.volume_id||console.trace("Empty location",e),e.volume_id+"_"+e.local_id+"_"+e.secret+".jpg"}function l(e){if(!e)return!1;var t=c(e);return v[t]||!1}function u(){return r.isAvailable()?r:i.isAvailable()?i:o}function p(e,t){var i=c(e),r="image/jpeg";return m[i]||(m[i]=u().saveFile(i,t).then(function(e){return v[i]=n.getUrl(e,r)})),m[i]}function d(t){var i=c(t),r="image/jpeg",o=m[i]||y[i];if(o)return o;var s=u();return y[i]=s.getFile(i).then(function(e){return v[i]=n.getUrl(e,r)},function(){var o=a(t.dc_id,function(){return e.invokeApi("upload.getFile",{location:angular.extend({},t,{_:"inputFileLocation"}),offset:0,limit:0},{dcID:t.dc_id,fileDownload:!0,createNetworker:!0})});return s.getFileWriter(i,r).then(function(e){return o.then(function(t){return n.write(e,t.bytes).then(function(){return v[i]=n.getUrl(e.finalize(),r)})})})})}function f(i,r,o,s){s=s||{};var l=c(r),p=s.toFileEntry||null,d=m[l]||y[l],f=u();if(d)return p?d.then(function(){return f.getFile(l).then(function(e){return n.copy(e,p)})}):d;var h,g=t.defer(),_=!1,b=!1,w=s.mime||"image/jpeg",$=function(e){g.reject(e),$=angular.noop,h&&h.truncate(0)};return f.getFile(l).then(function(e){p?n.copy(e,p).then(function(){g.resolve()},$):g.resolve(v[l]=n.getUrl(e,w))},function(){var s=p?n.getFileWriter(p):f.getFileWriter(l,w);s.then(function(s){h=s;for(var c,u=524288,d=t.when(),f=0;o>f;f+=u)c=t.defer(),function(c,d,f,h){return a(i,function(){return _?t.when():e.invokeApi("upload.getFile",{location:r,offset:d,limit:u},{dcID:i,fileDownload:!0,createNetworker:!0})},6).then(function(e){h.then(function(){return _?t.when():n.write(s,e.bytes).then(function(){f.resolve()},$).then(function(){c?(b=!0,p?g.resolve():g.resolve(v[l]=n.getUrl(s.finalize(),w))):g.notify({done:d+u,total:o})})})})}(f+u>=o,f,c,d),d=c.promise})}),g.promise.cancel=function(){_||b||(_=!0,delete y[l],$({type:"DOWNLOAD_CANCELED"}))},p||(y[l]=g.promise),g.promise}function h(n){var i=n.size,r=i>102400?524288:32768,o=i>=10485760,a=Math.ceil(i/r),s=!1,c=!1,l=0;if(a>1500)return t.reject({type:"FILE_TOO_BIG"});var u,p=[nextRandomInt(4294967295),nextRandomInt(4294967295)],d=t.defer(),f=function(e){d.reject(e),f=angular.noop},h=0,m={_:o?"inputFileBig":"inputFile",id:p,parts:a,name:n.name,md5_checksum:""},y=t.when();for(u=0;i>u;u+=r)!function(u,h){y=y.then(function(){var y=t.defer(),v=new FileReader,_=n.slice(u,u+r);return v.onloadend=function(t){if(!s&&t.target.readyState==FileReader.DONE){var n=g=g.then(function(){return e.invokeApi(o?"upload.saveBigFilePart":"upload.saveFilePart",{file_id:p,file_part:h,file_total_parts:a,bytes:bytesFromArrayBuffer(t.target.result)},{startMaxLength:r+256,fileUpload:!0})},f);n.then(function(){l++,y.resolve(),l>=a?(d.resolve(m),c=!0):(console.log(dT(),"Progress",l*r/i),d.notify({done:l*r,total:i}))},f)}},v.readAsArrayBuffer(_),y.promise})}(u,h++);return d.promise.cancel=function(){console.log("cancel upload",s,c),s||c||(s=!0,f({type:"UPLOAD_CANCELED"}))},d.promise}var g=t.when(),m={},y={},v={},_={},b={},w=5,$=0;return{getCachedFile:l,downloadFile:f,downloadSmallFile:d,saveSmallFile:p,uploadFile:h}}]),angular.module("myApp",["ngRoute","ngAnimate","ngSanitize","ngTouch","ui.bootstrap","pasvaz.bindonce","izhukov.utils","izhukov.mtproto","izhukov.mtproto.wrapper","myApp.filters","myApp.services","myApp.templates","myApp.directives","myApp.controllers"]).config(["$locationProvider","$routeProvider","$compileProvider","StorageProvider",function(e,t,n,i){var r,o,a,s,c,l,u,p={},d={};for(o=0;o<Config.EmojiCategories.length;o++)for(u=Config.EmojiCategorySpritesheetDimens[o][1],r=0;r<Config.EmojiCategories[o].length;r++)s=Config.Emoji[Config.EmojiCategories[o][r]],a=s[1][0],c=Math.floor(r/u),l=r%u,p[":"+a+":"]=[o,c,l,":"+a+":"],d[a]=s[0];$.emojiarea.spritesheetPath="img/emojisprite_!.png",$.emojiarea.spritesheetDimens=Config.EmojiCategorySpritesheetDimens,$.emojiarea.iconSize=20,$.emojiarea.icons=p,$.emojiarea.reverseIcons=d,n.imgSrcSanitizationWhitelist(/^\s*(https?|ftp|file|blob|filesystem|chrome-extension|app):|data:image\//),n.aHrefSanitizationWhitelist(/^\s*(https?|ftp|file|mailto|blob|filesystem|chrome-extension|app):|data:image\//),Config.Modes.test&&i.setPrefix("t_"),t.when("/",{templateUrl:"partials/welcome.html",controller:"AppWelcomeController"}),t.when("/login",{templateUrl:"partials/login.html",controller:"AppLoginController"}),t.when("/im",{templateUrl:"partials/im.html",controller:"AppIMController",reloadOnSearch:!1}),t.otherwise({redirectTo:"/"})}]),function(){var e=[Config.Navigator.osX?"osx":"non_osx",Config.Navigator.retina?"is_2x":"is_1x"];Config.Modes.ios_standalone&&e.push("ios_standalone"),$(document.body).addClass(e.join(" "))}(),angular.module("myApp.services",[]).service("AppUsersManager",["$rootScope","$modal","$modalStack","$filter","$q","MtpApiFileManager","MtpApiManager","RichTextProcessor","SearchIndexManager","ErrorService",function(e,t,n,i,r,o,a,s,c){function l(){return M?M:M=a.invokeApi("contacts.getContacts",{hash:""}).then(function(e){var t,n;x=[],d(e.users);for(var n=0;n<e.contacts.length;n++)t=e.contacts[n].user_id,x.push(t),c.indexObject(t,u(t),A);return x})}function u(e){var t=T[e];return t?(t.first_name||"")+" "+(t.last_name||"")+" "+(t.phone||""):!1}function p(e){return l().then(function(t){if(angular.isString(e)&&e.length){for(var n=c.search(e,A),i=[],r=0;r<t.length;r++)n[t[r]]&&i.push(t[r]);t=i}return t})}function d(e){angular.forEach(e,f)}function f(e){angular.isObject(e)&&(e.phone&&(e.rPhone=i("phoneNumber")(e.phone)),e.first_name?(e.rFirstName=s.wrapRichText(e.first_name,{noLinks:!0,noLinebreaks:!0}),e.rFullName=s.wrapRichText(e.first_name+" "+(e.last_name||""),{noLinks:!0,noLinebreaks:!0})):(e.rFirstName=s.wrapRichText(e.last_name,{noLinks:!0,noLinebreaks:!0})||e.rPhone||"DELETED",e.rFullName=s.wrapRichText(e.last_name,{noLinks:!0,noLinebreaks:!0})||e.rPhone||"DELETED"),e.sortName=c.cleanSearchText(e.first_name+" "+(e.last_name||"")),e.sortStatus=e.status&&(e.status.expires||e.status.was_online)||0,void 0===T[e.id]?T[e.id]=e:safeReplaceObject(T[e.id],e),void 0!==E[e.id]&&safeReplaceObject(E[e.id],e&&e.photo&&e.photo.photo_small||{empty:!0}))}function h(e){return angular.isObject(e)?e:T[e]||{id:e,deleted:!0}}function g(e){return angular.isObject(T[e])}function m(e,t){var n=h(e);if(333e3==e)return{placeholder:"img/placeholders/DialogListAvatarSystem@2x.png"};void 0===E[e]&&(E[e]=n&&n.photo&&n.photo.photo_small||{empty:!0});var i=Math.abs(e)%8+1;return{num:i,placeholder:"img/placeholders/"+t+"Avatar"+i+"@2x.png",location:E[e]}}function y(e){var t=h(e);return"u"+e+(t.access_hash?"_"+t.access_hash:"")}function v(e){var t=h(e);return"userSelf"==t._?{_:"inputUserSelf"}:{_:"inputUserForeign",user_id:e,access_hash:t.access_hash||0}}function _(e){var t=h(e);return t}function b(n){var i=e.$new();i.userID=n;t.open({templateUrl:"partials/user_modal.html",controller:"UserModalController",scope:i,windowClass:"user_modal_window page_modal"})}function w(e,t,n){return a.invokeApi("contacts.importContacts",{contacts:[{_:"inputPhoneContact",client_id:"1",phone:e,first_name:t,last_name:n}],replace:!1}).then(function(e){d(e.users);var t=!1;return angular.forEach(e.imported,function(e){C(t=e.user_id,!0)}),t?1:0})}function $(e){var t,n,i=[];for(t=0;t<e.length;t++)for(n=0;n<e[t].phones.length;n++)i.push({_:"inputPhoneContact",client_id:(t<<16|n).toString(10),phone:e[t].phones[n],first_name:e[t].first_name,last_name:e[t].last_name});return a.invokeApi("contacts.importContacts",{contacts:i,replace:!1}).then(function(e){d(e.users);var t=[];return angular.forEach(e.imported,function(e){C(e.user_id,!0),t.push(e.user_id)}),t})}function S(e){var t=[];return angular.forEach(e,function(e){t.push({_:"inputUserContact",user_id:e})}),a.invokeApi("contacts.deleteContacts",{id:t}).then(function(){angular.forEach(e,function(e){C(e,!1)})})}function C(e,t){if(angular.isArray(x)){var n=i=x.indexOf(e),i=-1!=n;t!=i&&(t?(x.push(e),c.indexObject(e,u(e),A)):x.splice(n,1))}}function k(){return t.open({templateUrl:"partials/import_contact_modal.html",controller:"ImportContactModalController",windowClass:"import_contact_modal_window"}).result.then(function(e){return e?e:r.reject()})}var M,x,T={},E={},A=c.createIndex();return e.openUser=b,e.$on("apiUpdate",function(t,n){switch(n._){case"updateUserStatus":var i=n.user_id,r=T[i];r&&(r.status=n.status,r.sortStatus=n.status&&(n.status.expires||n.status.was_online)||0,e.$broadcast("user_update",i));break;case"updateUserPhoto":var i=n.user_id;T[i]&&(safeReplaceObject(T[i].photo,n.photo),void 0!==E[i]&&safeReplaceObject(E[i],n.photo&&n.photo.photo_small||{empty:!0}),e.$broadcast("user_update",i));break;case"updateContactLink":C(n.user_id,"contacts.myLinkContact"==n.my_link._)}}),{getContacts:p,saveApiUsers:d,saveApiUser:f,getUser:h,getUserInput:v,getUserPhoto:m,getUserString:y,getUserSearchText:u,hasUser:g,importContact:w,importContacts:$,deleteContacts:S,wrapForFull:_,openUser:b,openImportContact:k}}]).service("PhonebookContactsService",["$q","$modal","$sce",function(e,t,n){function i(){return window.navigator&&window.navigator.mozContacts&&window.navigator.mozContacts.getAll}function r(){return t.open({templateUrl:"partials/phonebook_modal.html",controller:"PhonebookModalController",windowClass:"phonebook_modal_window"})}function o(){if(a)return a;var t=e.defer(),i=[],r=window.navigator.mozContacts.getAll({}),o=0;return r.onsuccess=function(){if(this.result){var e={id:o,first_name:(this.result.givenName||[]).join(" "),last_name:(this.result.familyName||[]).join(" "),phones:[]};if(void 0!==this.result.tel)for(var r=0;r<this.result.tel.length;r++)e.phones.push(this.result.tel[r].value);e.photo=this.result.photo?URL.createObjectURL(this.result.photo[0]):"img/placeholders/UserAvatar"+(Math.abs(o)%8+1)+"@2x.png",e.photo=n.trustAsResourceUrl(e.photo),o++,i.push(e)}return!this.result||o>=1e3?void t.resolve(i):void this.continue()},r.onerror=function(e){console.log("phonebook error",e,e.type,e.message),t.reject(e)},a=t.promise}var a;return{isAvailable:i,openPhonebookImport:r,getPhonebookContacts:o}}]).service("AppChatsManager",["$rootScope","$modal","MtpApiFileManager","MtpApiManager","AppUsersManager","RichTextProcessor",function(e,t,n,i,r,o){function a(e){angular.forEach(e,s)}function s(e){angular.isObject(e)&&(e.rTitle=o.wrapRichText(e.title,{noLinks:!0,noLinebreaks:!0})||"DELETED",void 0===h[e.id]?h[e.id]=e:safeReplaceObject(h[e.id],e),void 0!==g[e.id]&&safeReplaceObject(g[e.id],e&&e.photo&&e.photo.photo_small||{empty:!0}))}function c(e){return h[e]||{id:e,deleted:!0}}function l(e){return angular.isObject(h[e])}function u(e,t){var n=c(e);return void 0===g[e]&&(g[e]=n&&n.photo&&n.photo.photo_small||{empty:!0}),{placeholder:"img/placeholders/"+t+"Avatar"+(Math.abs(e)%4+1)+"@2x.png",location:g[e]}}function p(e){c(e);return"g"+e}function d(e,t){var n=angular.copy(t),o=c(e);return n.participants&&"chatParticipants"==n.participants._&&i.getUserID().then(function(e){angular.forEach(n.participants.participants,function(t){t.user=r.getUser(t.user_id),t.userPhoto=r.getUserPhoto(t.user_id,"User"),t.inviter=r.getUser(t.inviter_id),t.canKick=e!=t.user_id&&(e==n.participants.admin_id||e==t.inviter_id)})}),n.thumb={placeholder:"img/placeholders/GroupAvatar"+(Math.abs(e)%4+1)+"@2x.png",location:o&&o.photo&&o.photo.photo_small,width:120,height:120,size:0},n.peerString=p(e),n.chat=o,n}function f(n){var i=e.$new();i.chatID=n;t.open({templateUrl:"partials/chat_modal.html",controller:"ChatModalController",windowClass:"chat_modal_window page_modal",scope:i})}var h={},g={};return e.openChat=f,{saveApiChats:a,saveApiChat:s,getChat:c,getChatPhoto:u,getChatString:p,hasChat:l,wrapForFull:d,openChat:f}}]).service("AppPeersManager",["AppUsersManager","AppChatsManager",function(e,t){return{getInputPeer:function(e){var t="u"==e.charAt(0),n=e.substr(1).split("_");return t?{_:"inputPeerForeign",user_id:n[0],access_hash:n[1]}:{_:"inputPeerChat",chat_id:n[0]}},getInputPeerByID:function(t){return t>0?{_:"inputPeerForeign",user_id:t,access_hash:e.getUser(t).access_hash||0}:0>t?{_:"inputPeerChat",chat_id:-t}:void 0},getPeerSearchText:function(n){var i;if(n>0)i=e.getUserSearchText(n);else if(0>n){var r=t.getChat(-n);i=r.title||""}return i},getOutputPeer:function(e){return e>0?{_:"peerUser",user_id:e}:{_:"peerChat",chat_id:-e}},getPeerID:function(e){if(angular.isObject(e))return e.user_id?e.user_id:-e.chat_id;var t="u"==e.charAt(0),n=e.substr(1).split("_");return t?n[0]:-n[0]||0},getPeer:function(n){return n>0?e.getUser(n):t.getChat(-n)},getPeerPhoto:function(n,i,r){return n>0?e.getUserPhoto(n,i):t.getChatPhoto(-n,r)}}}]).service("SearchIndexManager",function(){function e(){return{shortIndexes:{},fullTexts:{}}}function t(e){e=e.replace(r," ").replace(o,"").toLowerCase();for(var t in a)a.hasOwnProperty(t)&&(e=e.replace(a[t],t));return e}function n(e,n,i){if(void 0!==i.fullTexts[e])return!1;if(n=t(n),!n.length)return!1;var r=i.shortIndexes;i.fullTexts[e]=n,angular.forEach(n.split(" "),function(t){var n,i,o=Math.min(t.length,3);for(i=1;o>=i;i++)n=t.substr(0,i),void 0===r[n]?r[n]=[e]:r[n].push(e)})}function i(e,n){var i=n.shortIndexes,r=n.fullTexts;e=t(e);var o,a,s,c,l,u=e.split(" "),p=!1;for(a=0;a<u.length;a++){if(o=i[u[a].substr(0,3)],!o){p=[];break}(p===!1||p.length>o.length)&&(p=o)}for(o={},s=0;s<p.length;s++){for(l=!0,c=r[p[s]],a=0;a<u.length;a++)if(-1==c.indexOf(u[a])){l=!1;break}l&&(o[p[s]]=!0)}return o}var r=/[`~!@#$%^&*()\-_=+\[\]\\|{}'";:\/?.>,<\s]+/g,o=/^\s+|\s$/g,a={a:/[åáâäà]/g,e:/[éêëè]/g,i:/[íîïì]/g,o:/[óôöò]/g,u:/[úûüù]/g,c:/ç/g,ss:/ß/g};return{createIndex:e,indexObject:n,cleanSearchText:t,search:i}}).service("AppMessagesManager",["$q","$rootScope","$location","$filter","ApiUpdatesManager","AppUsersManager","AppChatsManager","AppPeersManager","AppPhotosManager","AppVideoManager","AppDocsManager","AppAudioManager","MtpApiManager","MtpApiFileManager","RichTextProcessor","NotificationsManager","SearchIndexManager",function(e,t,n,i,r,o,a,s,c,l,u,p,d,f,h,g,m){function y(t,n,i){var r=H;if(angular.isString(t)&&t.length){if(!i||Z.query!==t){Z.query=t;var c=m.search(t,X);Z.dialogs=[],angular.forEach(H.dialogs,function(e){c[e.peerID]&&Z.dialogs.push(e)}),Z.count=Z.dialogs.length}r=Z}else Z.query=!1;var l=0;if(n>0)for(l=0;l<r.dialogs.length&&!(n>r.dialogs[l].top_message);l++);return null!==r.count&&r.dialogs.length==r.count||r.dialogs.length>=l+(i||1)?e.when({count:r.count,dialogs:r.dialogs.slice(l,l+(i||20))}):(i=i||20,d.invokeApi("messages.getDialogs",{offset:l,limit:i,max_id:n||0}).then(function(e){if(o.saveApiUsers(e.users),a.saveApiChats(e.chats),x(e.messages),n>0)for(l=0;l<r.dialogs.length&&!(n>r.dialogs[l].top_message);l++);return r.count=e.count||e.dialogs.length,r.dialogs.splice(l,r.dialogs.length-l),angular.forEach(e.dialogs,function(e){var t=s.getPeerID(e.peer),n=s.getPeerSearchText(t);m.indexObject(t,n,X),r.dialogs.push({peerID:t,top_message:e.top_message,unread_count:e.unread_count}),void 0===j[t]&&(j[t]={count:null,history:[e.top_message],pending:[]}),g.savePeerSettings(t,e.notify_settings)}),{count:r.count,dialogs:r.dialogs.slice(l,l+i)}}))}function v(e,t,n,i){return d.invokeApi("messages.getHistory",{peer:e,offset:i||0,limit:n||0,max_id:t||0}).then(function(e){return o.saveApiUsers(e.users),a.saveApiChats(e.chats),x(e.messages),e})}function _(e,t,n,i){return v(e,t,n).then(function(r){i.count=r.count||r.messages.length;var o=0;if(t>0)for(o=0;o<i.history.length&&!(t>i.history[o]);o++);return i.history.splice(o,i.history.length-o),angular.forEach(r.messages,function(e){i.history.push(e.id)}),n-=r.messages.length,n>0&&i.history.length<i.count?(t=i.history[i.history.length-1],_(e,t,n,i)):!0})}function b(t,n,i,r){var o=s.getPeerID(t),a=j[o],c=0,l=!1,u=!1,p=!1,d=[];if(void 0===a?a=j[o]={count:null,history:[],pending:[]}:!n&&a.pending.length&&(d=a.pending.slice()),i||n){if(n>0)for(l=!0,c=0;c<a.history.length;c++)if(n>a.history[c]){l=!1;break}}else{var f=F(o);if(f&&f[0]&&f[0].unread_count>1){var h=f[0].unread_count;(p=h>50)?(i=10,u=6,c=h-u):(i=Math.max(10,h+2),u=h)}}return!l&&(null!==a.count&&a.history.length==a.count||a.history.length>=c+(i||1))?(r?(r=Math.min(c,r),c=Math.max(0,c-r),i+=r):i=i||(c?20:5),e.when({count:a.count,history:d.concat(a.history.slice(c,c+i)),unreadOffset:u,unreadSkip:p})):(r||i||(i=20),l&&(c=0),r||p||n&&-1==a.history.indexOf(n)?(r&&(c=-r,i+=r),v(t,n,i,c).then(function(e){a.count=e.count||e.messages.length;var t=[];return angular.forEach(e.messages,function(e){t.push(e.id)}),{count:a.count,history:d.concat(t),unreadOffset:u,unreadSkip:p}})):_(t,n,i,a).then(function(){if(c=0,n>0)for(c=0;c<a.history.length&&!(n>a.history[c]);c++);return{count:a.count,history:d.concat(a.history.slice(c,c+i)),unreadOffset:u,unreadSkip:p}}))}function w(t,n,i,r,c){var l=[],u=!n,p=s.getPeerID(t),f={peer:p,filter:i},h=u&&angular.equals(Y,f);if(u&&!h&&(Y=f,Q=[]),!r&&!n){var g=j[p];if(void 0!==g&&g.history.length){var m,y,v={},_=c||20;switch(i._){case"inputMessagesFilterPhotos":v.messageMediaPhoto=!0;break;case"inputMessagesFilterVideo":v.messageMediaVideo=!0;break;case"inputMessagesFilterPhotoVideo":v.messageMediaPhoto=!0,v.messageMediaVideo=!0;break;case"inputMessagesFilterDocument":v.messageMediaDocument=!0;break;case"inputMessagesFilterAudio":v.messageMediaAudio=!0}for(m=0;m<g.history.length&&(y=U[g.history[m]],!(y.media&&v[y.media._]&&(l.push(y.id),l.length>=_)));m++);}if(l.length<_&&Q.length&&h)for(var b=l.length?l[l.length-1]:4294967295,m=0;m<Q.length&&!(Q[m]<b&&(l.push(Q[m]),l.length>=_));m++);}return l.length||1e3==c?(u&&(Q=listMergeSorted(Q,l)),e.when({count:null,history:l})):d.invokeApi("messages.search",{peer:t,q:n||"",filter:i||{_:"inputMessagesFilterEmpty"},min_date:0,max_date:0,limit:c||20,max_id:r||0}).then(function(e){o.saveApiUsers(e.users),a.saveApiChats(e.chats),x(e.messages);var t=e.count||e.messages.length;return l=[],angular.forEach(e.messages,function(e){l.push(e.id)}),u&&(Q=listMergeSorted(Q,l)),{count:t,history:l}})}function $(e){return U[e]||{deleted:!0}}function S(e){return d.invokeApi("messages.deleteMessages",{id:e}).then(function(e){return r.processUpdateMessage({_:"updateShort",update:{_:"updateDeleteMessages",messages:e}}),e})}function C(t,n,i){return r.processUpdateMessage({_:"updates",seq:n.seq,updates:[]})?n.offset?d.invokeApi(i,{peer:t,offset:n.offset,max_id:0}).then(function(e){return C(t,e,i)}):e.when():!1}function k(e){var n=s.getPeerID(e),i=j[n],r=F(n);if(!r[0]||!r[0].unread_count){if(!i||!i.history.length)return!1;var o,a,c=!1;for(l=i.history.length;l>=0;l--)if(o=i.history[l],a=U[o],a&&!a.out&&a.unread){c=!0;break}if(!c)return!1}if(i.readPromise)return i.readPromise;if(i.readPromise=d.invokeApi("messages.readHistory",{peer:e,offset:0,max_id:0}).then(function(t){return C(e,t,"messages.readHistory")}).then(function(){r[0]&&(r[0].unread_count=0,t.$broadcast("dialog_unread",{peerID:n,count:0}))})["finally"](function(){delete i.readPromise}),i&&i.history.length){var o,a,l,n,r;for(l=0;l<i.history.length;l++)o=i.history[l],a=U[o],a&&!a.out&&(a.unread=!1,R[o]&&(R[o].unread=!1),q[o]&&(q[o].unread=!1))}return i.readPromise}function M(e){{var n=s.getPeerID(e);j[n]}return d.invokeApi("messages.deleteHistory",{peer:e,offset:0}).then(function(t){return C(e,t,"messages.deleteHistory")}).then(function(){var e=F(n);e[0]&&H.dialogs.splice(e[1],1),delete j[n],t.$broadcast("dialog_flush",{peerID:n})})}function x(e){angular.forEach(e,function(e){U[e.id]=e,e.media&&"messageMediaPhoto"==e.media._&&c.savePhoto(e.media.photo),e.media&&"messageMediaVideo"==e.media._&&l.saveVideo(e.media.video),e.media&&"messageMediaDocument"==e.media._&&u.saveDoc(e.media.document),e.media&&"messageMediaAudio"==e.media._&&p.saveAudio(e.media.audio),e.action&&"messageActionChatEditPhoto"==e.action._&&c.savePhoto(e.action.photo)})}function T(e,n){var i,o=K--,a=[nextRandomInt(4294967295),nextRandomInt(4294967295)],c=bigint(a[0]).shiftLeft(32).add(bigint(a[1])).toString(),l=j[e],u=s.getInputPeerByID(e);void 0===l&&(l=j[e]={count:null,history:[],pending:[]}),d.getUserID().then(function(p){i={_:"message",id:o,from_id:p,to_id:s.getOutputPeer(e),out:!0,unread:!0,date:tsNow()/1e3,message:n,media:{_:"messageMediaEmpty"},random_id:c,pending:!0};var f=function(e){var t=R[o];e?(i.error=!0,t&&(t.error=!0)):(delete i.error,t&&delete t.error)};i.send=function(){f(!1);var t={};W[e]&&(t.afterMessageID=W[e].messageID),d.invokeApi("messages.sendMessage",{peer:u,message:n,random_id:a},t).then(function(e){i.date=e.date,i.id=e.id,r.processUpdateMessage({_:"updates",users:[],chats:[],seq:e.seq,updates:[{_:"updateMessageID",random_id:c,id:e.id},{_:"updateNewMessage",message:i,pts:e.pts}]})},function(){f(!0)})["finally"](function(){W[e]===t&&delete W[e]}),W[e]=t},x([i]),l.pending.unshift(o),t.$broadcast("history_append",{peerID:e,messageID:o,my:!0}),i.send()}),V[c]=[e,o]}function E(n,i,o){o=o||{};var a,c,l=K--,u=[nextRandomInt(4294967295),nextRandomInt(4294967295)],p=bigint(u[0]).shiftLeft(32).add(bigint(u[1])).toString(),h=j[n],g=s.getInputPeerByID(n);o.isMedia?["image/jpeg","image/png","image/bmp"].indexOf(i.type)>=0?(a="photo",c="photo."+i.type.split("/")[1]):"video/"==i.type.substr(0,6)?(a="video",c="video.mp4"):"audio/"==i.type.substr(0,6)?(a="audio",c="audio."+i.type.split("/")[1]||"mp3"):(a="document",c="document."+i.type.split("/")[1]):(a="document",c="document."+i.type.split("/")[1]),i.name||(i.name=c),void 0===h&&(h=j[n]={count:null,history:[],pending:[]}),d.getUserID().then(function(o){var c={_:"messageMediaPending",type:a,file_name:i.name,size:i.size,progress:{percent:1,total:i.size}},m={_:"message",id:l,from_id:o,to_id:s.getOutputPeer(n),out:!0,unread:!0,date:tsNow()/1e3,message:"",media:c,random_id:p,pending:!0},y=function(e){var t=R[l];e?(m.error=!0,t&&(t.error=!0)):(delete m.error,t&&delete t.error)};m.send=function(){var o=e.defer();G.then(function(){var e=!1,s=f.uploadFile(i);s.then(function(t){e=!0;var n;switch(a){case"photo":n={_:"inputMediaUploadedPhoto",file:t};break;case"video":n={_:"inputMediaUploadedVideo",file:t,duration:0,w:0,h:0,mime_type:i.type};break;case"audio":n={_:"inputMediaUploadedAudio",file:t,duration:0,mime_type:i.type};break;case"document":default:n={_:"inputMediaUploadedDocument",file:t,file_name:i.name,mime_type:i.type}}d.invokeApi("messages.sendMedia",{peer:g,media:n,random_id:u}).then(function(e){m.date=e.message.date,m.id=e.message.id,m.media=e.message.media,r.processUpdateMessage({_:"updates",users:e.users,chats:e.chats,seq:e.seq,updates:[{_:"updateMessageID",random_id:p,id:e.message.id},{_:"updateNewMessage",message:m,pts:e.pts}]})},function(){y(!0)})},function(){y(!0)},function(e){c.progress.done=e.done,c.progress.percent=Math.max(1,Math.floor(100*e.done/e.total)),t.$broadcast("history_update",{peerID:n})}),c.progress.cancel=function(){e||(o.resolve(),s.cancel(),I(p))},s["finally"](function(){o.resolve()})}),G=o.promise},x([m]),h.pending.unshift(l),t.$broadcast("history_append",{peerID:n,messageID:l,my:!0}),m.send()}),V[p]=[n,l]}function A(e,n){var i=K--,o=[nextRandomInt(4294967295),nextRandomInt(4294967295)],a=bigint(o[0]).shiftLeft(32).add(bigint(o[1])).toString(),l=j[e],u=s.getInputPeerByID(e);void 0===l&&(l=j[e]={count:null,history:[],pending:[]}),d.getUserID().then(function(p){var f;switch(n._){case"inputMediaContact":f=angular.extend({},n,{_:"messageMediaContact"});break;case"inputMediaPhoto":f={photo:c.getPhoto(n.id.id)}}var h={_:"message",id:i,from_id:p,to_id:s.getOutputPeer(e),out:!0,unread:!0,date:tsNow()/1e3,message:"",media:f,random_id:a,pending:!0},g=function(e){var t=R[i];e?(h.error=!0,t&&(t.error=!0)):(delete h.error,t&&delete t.error)};h.send=function(){d.invokeApi("messages.sendMedia",{peer:u,media:n,random_id:o}).then(function(e){h.date=e.message.date,h.id=e.message.id,h.media=e.message.media,r.processUpdateMessage({_:"updates",users:e.users,chats:e.chats,seq:e.seq,updates:[{_:"updateMessageID",random_id:a,id:e.message.id},{_:"updateNewMessage",message:h,pts:e.pts}]})},function(){g(!0)})},x([h]),l.pending.unshift(i),t.$broadcast("history_append",{peerID:e,messageID:i,my:!0}),h.send()}),V[a]=[e,i]}function D(e,t){return t=t.sort(),d.invokeApi("messages.forwardMessages",{peer:s.getInputPeerByID(e),id:t}).then(function(e){var t=[];angular.forEach(e.messages,function(n){t.push({_:"updateNewMessage",message:n,pts:e.pts})}),r.processUpdateMessage({_:"updates",users:e.users,chats:e.chats,seq:e.seq,updates:t})})}function I(e){var t=V[e];if(console.log("pending",e,t),t){var n,i=t[0],o=t[1],a=j[i];for(r.processUpdateMessage({_:"updateShort",update:{_:"updateDeleteMessages",messages:[o]}}),n=0;n<a.pending.length;n++)if(a.pending[n]==o){a.pending.splice(n,1);break}return delete R[o],delete U[o],!0}return!1}function P(e,t){var n=V[e];if(n){var i,r=n[0],o=n[1],a=j[r],s=!1,c=!1;for(i=0;i<a.pending.length;i++)if(a.pending[i]==o){a.pending.splice(i,1);break}return(s=U[o])&&(delete s.pending,delete s.error,delete s.random_id,delete s.send),(c=R[o])&&(R[t.id]=angular.extend(c,B(t.id)),delete c.pending,delete c.error,delete c.random_id,delete c.send),delete R[o],delete U[o],s}return!1}function N(e){var t=e.to_id&&s.getPeerID(e.to_id)||0;return 0>t?t:e.out?t:e.from_id}function L(e,t){if(void 0!==q[e])return q[e];var n=angular.copy(U[e])||{id:e};return n.fromUser=o.getUser(n.from_id),(n.chatID=n.to_id.chat_id)?(n.peerID=-n.chatID,n.peerData=a.getChat(n.chatID),n.peerString=a.getChatString(n.chatID)):(n.peerID=n.out?n.to_id.user_id:n.from_id,n.peerData=o.getUser(n.peerID),n.peerString=o.getUserString(n.peerID)),n.peerPhoto=s.getPeerPhoto(n.peerID,"User","Group"),n.unreadCount=t,"messageService"==n._&&n.action.user_id&&(n.action.user=o.getUser(n.action.user_id)),n.message&&n.message.length&&(n.richMessage=h.wrapRichText(n.message.substr(0,64),{noLinks:!0,noLinebreaks:!0})),n.dateText=i("dateOrTime")(n.date),q[e]=n}function B(e){if(void 0!==R[e])return R[e];var t=angular.copy(U[e])||{id:e};if(t.media&&void 0!==t.media.progress&&(t.media.progress=U[e].media.progress),t.fromUser=o.getUser(t.from_id),t.fromPhoto=o.getUserPhoto(t.from_id,"User"),"messageForwarded"==t._&&(t.fwdUser=o.getUser(t.fwd_from_id),t.fwdPhoto=o.getUserPhoto(t.fwd_from_id,"User")),t.media){switch(t.media._){case"messageMediaPhoto":t.media.photo=c.wrapForHistory(t.media.photo.id);break;case"messageMediaVideo":t.media.video=l.wrapForHistory(t.media.video.id);break;case"messageMediaDocument":t.media.document=u.wrapForHistory(t.media.document.id);break;case"messageMediaAudio":t.media.audio=p.wrapForHistory(t.media.audio.id);break;case"messageMediaContact":t.media.rFullName=h.wrapRichText(t.media.first_name+" "+(t.media.last_name||""),{noLinks:!0,noLinebreaks:!0})}t.media.user_id&&(t.media.user=o.getUser(t.media.user_id),t.media.userPhoto=o.getUserPhoto(t.media.user_id,"User"))}else if(t.action){switch(t.action._){case"messageActionChatEditPhoto":t.action.photo=c.wrapForHistory(t.action.photo.id);break;case"messageActionChatCreate":case"messageActionChatEditTitle":t.action.rTitle=h.wrapRichText(t.action.title,{noLinks:!0,noLinebreaks:!0})||"DELETED"}t.action.user_id&&(t.action.user=o.getUser(t.action.user_id),t.action.userPhoto=o.getUserPhoto(t.action.user_id,"User"))}return t.message&&t.message.length&&(t.richMessage=h.wrapRichText(t.message)),R[e]=t}function F(e){for(var t=0;t<H.dialogs.length;t++)if(H.dialogs[t].peerID==e)return[H.dialogs[t],t];return[]}function O(e){var n,i,r=N(e),s=o.getUser(e.from_id),c=o.getUserPhoto(e.from_id,"User"),l={},u=!1;if(e.message)u=e.message;else if(e.media&&"messageMediaEmpty"!=e.media._)switch(e.media._){case"messageMediaPhoto":u="Photo";break;case"messageMediaVideo":u="Video";break;case"messageMediaDocument":u="Document";break;case"messageMediaGeo":u="Location";break;case"messageMediaContact":u="Contact";break;default:u="Attachment"}else if("messageService"==e._)switch(e.action._){case"messageActionChatCreate":u="created the group";break;case"messageActionChatEditTitle":u="changed group name";break;case"messageActionChatEditPhoto":u="changed group photo";break;case"messageActionChatDeletePhoto":u="removed group photo";break;case"messageActionChatAddUser":u="invited user";break;case"messageActionChatDeleteUser":u="kicked user"}r>0?(l.title=(s.first_name||"")+(s.first_name&&s.last_name?" ":"")+(s.last_name||""),i=c,n=o.getUserString(r)):(l.title=(s.first_name||s.last_name||"Somebody")+" @ "+(a.getChat(-r).title||"Unknown chat"),i=a.getChatPhoto(-r,"Group"),n=a.getChatString(-r)),l.onclick=function(){t.$broadcast("history_focus",{peerString:n})},l.message=u,l.image=i.placeholder,l.key="msg"+e.id,l.tag=n,i.location&&!i.location.empty?f.downloadSmallFile(i.location,i.size).then(function(t){l.image=t,e.unread&&g.notify(l)}):g.notify(l)}var U={},R={},q={},j={},H={count:null,dialogs:[]},V={},z={},W={},G=e.when(),K=-1,X=m.createIndex(),Z={query:!1},Y={},Q=[];return g.start(),t.$on("apiUpdate",function(e,n){switch(n._){case"updateMessageID":z[n.id]=n.random_id;break;case"updateNewMessage":var i=n.message,r=N(i),o=j[r];if(void 0!==o){{j[r].history[0]}if(-1!=j[r].history.indexOf(i.id))return!1;o.history.unshift(i.id),o.history.sort(function(e,t){return t-e})}else o=j[r]={count:null,history:[i.id],pending:[]};x([i]),null!==o.count&&o.count++;var a,c=z[i.id];c&&((a=P(c,i))&&t.$broadcast("history_update",{peerID:r}),delete z[i.id]),a||t.$broadcast("history_append",{peerID:r,messageID:i.id});var l,u=F(r);u.length?(l=u[0],H.dialogs.splice(u[1],1)):l={peerID:r,unread_count:0,top_message:!1},!i.out&&i.unread&&l.unread_count++,l.top_message=i.id,m.indexObject(r,s.getPeerSearchText(r),X),H.dialogs.unshift(l),t.$broadcast("dialogs_update",l),t.idle.isIDLE&&!i.out&&i.unread&&g.getPeerMuted(r).then(function(e){i.unread&&!e&&O(i)});break;case"updateReadMessages":var p,i,d,r,u,l,f={};for(d=0;d<n.messages.length;d++)p=n.messages[d],i=U[p],i&&i.unread&&(i.unread=!1,R[p]&&(R[p].unread=!1),q[p]&&(q[p].unread=!1),r=N(i),i.out||(u=F(r),u&&(f[r]=--u[0].unread_count),g.cancel("msg"+p)));angular.forEach(f,function(e,n){t.$broadcast("dialog_unread",{peerID:n,count:e})});break;case"updateDeleteMessages":var p,i,d,r,u,l,h,f={},y={};for(d=0;d<n.messages.length;d++)p=n.messages[d],i=U[p],i&&(r=N(i),h=y[r]||(y[r]={count:0,unread:0,msgs:{}}),!i.out&&i.unread&&(h.unread++,g.cancel("msg"+p)),h.count++,h.msgs[p]=!0,R[p]&&(R[p].DELETED=!0,delete R[p]),q[p]&&(q[p].DELETED=!0,delete q[p]),i.DELETED=!0,delete U[p]);angular.forEach(y,function(e,n){var i=F(n);i&&e.unread&&(i[0].unread_count-=e.unread,t.$broadcast("dialog_unread",{peerID:n,count:i[0].unread_count}));var r=j[n];if(void 0!==r){for(var o=[],a=[],s=0;s<r.history.length;s++)e.msgs[r.history[s]]||o.push(r.history[s]);r.history=o;for(var s=0;s<r.pending.length;s++)e.msgs[r.pending[s]]||a.push(r.pending[s]);r.pending=a,t.$broadcast("history_delete",{peerID:n,msgs:e.msgs})}})}}),{getDialogs:y,getHistory:b,getSearch:w,getMessage:$,readHistory:k,flushHistory:M,deleteMessages:S,saveMessages:x,sendText:T,sendFile:E,sendOther:A,forwardMessages:D,getMessagePeer:N,wrapForDialog:L,wrapForHistory:B}}]).service("AppPhotosManager",["$modal","$window","$timeout","$rootScope","MtpApiManager","MtpApiFileManager","AppUsersManager","FileManager",function(e,t,n,i,r,o,a,s){function c(e){y[e.id]=e,angular.forEach(e.sizes,function(e){"photoCachedSize"==e._&&(o.saveSmallFile(e.location,e.bytes),e.size=e.bytes.length,delete e.bytes,e._="photoSize")})}function l(e,t,n){var i={_:"photoSizeEmpty"},r=16777215;return angular.forEach(e.sizes,function(e){var o=Math.abs(e.w*e.h-t*n);r>o&&(i=e,r=o)}),i}function u(e,t,n){return r.invokeApi("photos.getUserPhotos",{user_id:e,offset:0,limit:n||20,max_id:t||0}).then(function(e){a.saveApiUsers(e.users);
for(var t=[],n=0;n<e.photos.length;n++)c(e.photos[n]),t.push(e.photos[n].id);return{count:e.count||e.photos.length,photos:t}})}function p(e){if(y[e]){var n=y[e],i=$(window).width()-36,r=$(t).height()-150,a=l(n,i,r);a&&!a.preloaded&&(a.preloaded=!0,a.size?o.downloadFile(a.location.dc_id,{_:"inputFileLocation",volume_id:a.location.volume_id,local_id:a.location.local_id,secret:a.location.secret},a.size):o.downloadSmallFile(a.location))}}function d(e){return y[e]||{_:"photoEmpty"}}function f(e){var t=angular.copy(y[e])||{_:"photoEmpty"},n=260,i=260,r=l(t,n,i),o={placeholder:"img/placeholders/PhotoThumbConversation.gif",width:n,height:i};return r&&"photoSizeEmpty"!=r._?(r.w>r.h?o.height=parseInt(r.h*n/r.w):o.width=parseInt(r.w*i/r.h),o.location=r.location,o.size=r.size):(o.width=100,o.height=100),t.thumb=o,t}function h(e){var n=f(e),i=$(window).width()-(Config.Navigator.mobile?20:36),r=$(t).height()-150,o=l(n,i,r),s={placeholder:"img/placeholders/PhotoThumbModal.gif"};return i>800&&(i-=200),s.width=i,s.height=r,o&&"photoSizeEmpty"!=o._&&(o.w/o.h>i/r?s.height=parseInt(o.h*i/o.w):(s.width=parseInt(o.w*r/o.h),s.width>i&&(s.height=parseInt(s.height*i/s.width),s.width=i)),!Config.Navigator.mobile&&s.width>=o.w&&s.height>=o.h&&(s.width=o.w,s.height=o.h),s.modalWidth=Math.max(s.width,Math.min(400,i)),s.location=o.location,s.size=o.size),n.full=s,n.fromUser=a.getUser(n.user_id),n}function g(t,n){if(!t||"0"===t)return!1;var r=i.$new(!0);r.photoID=t,0>n?r.userID=-n:r.messageID=n;e.open({templateUrl:"partials/photo_modal.html",controller:r.userID?"UserpicModalController":"PhotoModalController",scope:r,windowClass:"photo_modal_window"})}function m(e){var n=y[e],i="jpg",r="image/jpeg",a="photo"+e+"."+i,c=$(window).width()-36,u=$(t).height()-150,p=l(n,c,u),d={_:"inputFileLocation",volume_id:p.location.volume_id,local_id:p.location.local_id,secret:p.location.secret};s.chooseSave(a,i,r).then(function(e){o.downloadFile(p.location.dc_id,d,p.size,{mime:r,toFileEntry:e}).then(function(){console.log("file save done")},function(e){console.log("photo download failed",e)})},function(){o.downloadFile(p.location.dc_id,d,p.size,{mime:r}).then(function(e){s.download(e,r,a)},function(e){console.log("photo download failed",e)})})}var y={};return i.preloadPhoto=p,i.openPhoto=g,{savePhoto:c,preloadPhoto:p,getUserPhotos:u,getPhoto:d,wrapForHistory:f,wrapForFull:h,openPhoto:g,downloadPhoto:m}}]).service("AppVideoManager",["$rootScope","$modal","$window","$timeout","MtpApiFileManager","AppUsersManager","FileManager",function(e,t,n,i,r,o,a){function s(e){d[e.id]=e,e.thumb&&"photoCachedSize"==e.thumb._&&(r.saveSmallFile(e.thumb.location,e.thumb.bytes),e.thumb.size=e.thumb.bytes.length,delete e.thumb.bytes,e.thumb._="photoSize")}function c(e){if(void 0!==f[e])return f[e];var t=angular.copy(d[e]),n=200,i=200,r=t.thumb,o={placeholder:"img/placeholders/VideoThumbConversation.gif",width:n,height:i};return r&&"photoSizeEmpty"!=r._&&(r.w>r.h?o.height=parseInt(r.h*n/r.w):o.width=parseInt(r.w*i/r.h),o.location=r.location,o.size=r.size),t.thumb=o,f[e]=t}function l(e){var t=c(e),i=Math.min($(window).width()-60,542),r=$(n).height()-150,a={placeholder:"img/placeholders/VideoThumbModal.gif",width:i,height:r};return t.w&&t.h?t.w>t.h?a.height=parseInt(t.h*i/t.w):(a.width=parseInt(t.w*r/t.h),a.width>i&&(a.height=parseInt(a.height*i/a.width),a.width=i)):a.height=a.width=Math.min(i,r),t.full=a,t.fullThumb=angular.copy(t.thumb),t.fullThumb.width=a.width,t.fullThumb.height=a.height,t.fromUser=o.getUser(t.user_id),t}function u(n,i){var r=e.$new(!0);r.videoID=n,r.messageID=i;t.open({templateUrl:"partials/video_modal.html",controller:"VideoModalController",scope:r,windowClass:"video_modal_window"})}function p(t,n,i){function o(t){console.log("dl progress",t),c.progress.done=t.done,c.progress.percent=Math.max(1,Math.floor(100*t.done/t.total)),e.$broadcast("history_update")}var s=d[t],c=f[t]||s||{},l={_:"inputVideoFileLocation",id:t,access_hash:n||s.access_hash};c.progress={enabled:!0,percent:1,total:s.size};var u="mp4",p="video/mpeg4",h="video"+t+"."+u;a.chooseSave(h,u,p).then(function(e){var t=r.downloadFile(s.dc_id,l,s.size,{mime:p,toFileEntry:e});t.then(function(){delete c.progress,console.log("file save done")},function(e){console.log("video download failed",e),c.progress.enabled=!1},o),c.progress.cancel=t.cancel},function(){var e=r.downloadFile(s.dc_id,l,s.size,{mime:p});e.then(function(e){return delete c.progress,i?void window.open(e,"_blank"):void a.download(e,p,h)},function(e){console.log("video download failed",e),c.progress.enabled=!1},o),c.progress.cancel=e.cancel})}var d={},f={};return e.openVideo=u,e.downloadVideo=p,{saveVideo:s,wrapForHistory:c,wrapForFull:l,openVideo:u}}]).service("AppDocsManager",["$rootScope","$modal","$window","$timeout","MtpApiFileManager","FileManager",function(e,t,n,i,r,o){function a(e){l[e.id]=e,e.thumb&&"photoCachedSize"==e.thumb._&&(r.saveSmallFile(e.thumb.location,e.thumb.bytes),e.thumb.size=e.thumb.bytes.length,delete e.thumb.bytes,e.thumb._="photoSize")}function s(e){if(void 0!==u[e])return u[e];var t=angular.copy(l[e]),n="image/gif"==t.mime_type,i=n?260:100,r=n?260:100,o=t.thumb,a={width:i,height:r};return o&&"photoSizeEmpty"!=o._?(o.w>o.h?a.height=parseInt(o.h*i/o.w):a.width=parseInt(o.w*r/o.h),a.location=o.location,a.size=o.size):a=!1,t.thumb=a,t.canDownload=!(window.chrome&&chrome.fileSystem&&chrome.fileSystem.chooseEntry),t.withPreview=t.canDownload&&t.mime_type.match(/^(image\/|application\/pdf)/)?1:0,n&&(t.isSpecial="gif"),u[e]=t}function c(t,n){function i(t){console.log("dl progress",t),s.progress.done=t.done,s.progress.percent=Math.max(1,Math.floor(100*t.done/t.total)),e.$broadcast("history_update")}var a=l[t],s=u[t]||a||{},c={_:"inputDocumentFileLocation",id:t,access_hash:a.access_hash};s.progress={enabled:!0,percent:1,total:a.size};var p=(a.file_name.split(".",2)||[])[1]||"";o.chooseSave(a.file_name,p,a.mime_type).then(function(e){var t=r.downloadFile(a.dc_id,c,a.size,{mime:a.mime_type,toFileEntry:e});t.then(function(){delete s.progress,console.log("file save done")},function(e){console.log("document download failed",e),s.progress.enabled=!1},i),s.progress.cancel=t.cancel},function(){var e=r.downloadFile(a.dc_id,c,a.size,{mime:a.mime_type});e.then(function(e){switch(delete s.progress,s.url=e,n){case 1:window.open(e,"_blank");break;default:o.download(e,a.mime_type,a.file_name)}},function(e){console.log("document download failed",e),s.progress.enabled=!1},i),s.progress.cancel=e.cancel})}var l={},u={};return e.downloadDoc=c,{saveDoc:a,wrapForHistory:s,downloadDoc:c}}]).service("AppAudioManager",["$rootScope","$modal","$window","$timeout","$sce","MtpApiFileManager",function(e,t,n,i,r,o){function a(e){l[e.id]=e}function s(e){if(void 0!==u[e])return u[e];var t=angular.copy(l[e]);return u[e]=t}function c(t,n){function a(t){console.log("dl progress",t),c.progress.done=t.done,c.progress.percent=Math.max(1,Math.floor(100*t.done/t.total)),e.$broadcast("history_update")}var s=l[t],c=u[t]||s||{},p={_:"inputAudioFileLocation",id:t,access_hash:n||s.access_hash};c.progress={enabled:!0,percent:1,total:s.size};var d=o.downloadFile(s.dc_id,p,s.size,{mime:"audio/ogg"});d.then(function(t){delete c.progress,c.url=r.trustAsResourceUrl(t),c.autoplay=!0,i(function(){console.log("disable autoplay"),delete c.autoplay,e.$broadcast("history_update")},1e3)},function(e){console.log("audio download failed",e),c.progress.enabled=!1},a),c.progress.cancel=d.cancel}var l={},u={};return e.openAudio=c,{saveAudio:a,wrapForHistory:s,openAudio:c}}]).service("ExternalResourcesManager",["$q","$http",function(e,t){function n(e){return void 0!==i[e]?i[e]:i[e]=t.get(e,{responseType:"blob",transformRequest:null}).then(function(e){return window.URL=window.URL||window.webkitURL,window.URL.createObjectURL(e.data)})}var i={};return{downloadImage:n}}]).service("ApiUpdatesManager",["$rootScope","MtpNetworkerFactory","AppUsersManager","AppChatsManager","AppPeersManager","MtpApiManager",function(e,t,n,i,r,o){function a(){var e=g.seq+1,t=m[e];t&&(console.log(dT(),"pop pending update",e,t),c(t)&&delete m[e])}function s(){f||l()}function c(e){if(e.seq){if(!p(e.seq,e.seq_start))return m[e.seq_start||e.seq]=e,!1;e.date&&(g.date=e.date)}switch(e._){case"updatesTooLong":s();break;case"updateShort":u(e.update);break;case"updateShortMessage":if(!n.hasUser(e.from_id)){console.log("User not found",e.from_id,"getDiff"),s();break}u({_:"updateNewMessage",message:{_:"message",id:e.id,from_id:e.from_id,to_id:r.getOutputPeer(o.getUserID()),out:!1,unread:!0,date:e.date,message:e.message,media:{_:"messageMediaEmpty"}},pts:e.pts});break;case"updateShortChatMessage":if(!n.hasUser(e.from_id)||!i.hasChat(e.chat_id)){console.log("User or chat not found",e.from_id,e.chat_id,"getDiff"),s();break}u({_:"updateNewMessage",message:{_:"message",id:e.id,from_id:e.from_id,to_id:r.getOutputPeer(-e.chat_id),out:!1,unread:!0,date:e.date,message:e.message,media:{_:"messageMediaEmpty"}},pts:e.pts});break;case"updatesCombined":case"updates":n.saveApiUsers(e.users),i.saveApiChats(e.chats);for(var t,c,l,t=0;t<e.updates.length;t++)switch(c=e.updates[t],c._){case"updateNewMessage":if(l=c.message,l.from_id&&!n.hasUser(l.from_id))return console.log("User not found",l.from_id,"getDiff"),s(),!1;if(l.to_id.chat_id&&!i.hasChat(l.to_id.chat_id))return console.log("Chat not found",l.to_id.chat_id,"getDiff"),s(),!1}angular.forEach(e.updates,function(e){u(e)});break;default:console.warn(dT(),"Unknown update message",e)}return a(),h&&g.seq>=h.seqAwaiting&&(console.log(dT(),"cancel pending getDiff",h.seqAwaiting),clearTimeout(h.timeout),h=!1),!0}function l(){f=!0,h&&(clearTimeout(h.timeout),h=!1),o.invokeApi("updates.getDifference",{pts:g.pts,date:g.date,qts:0}).then(function(e){if("updates.differenceEmpty"==e._)return console.log(dT(),"apply empty diff",e.seq),g.date=e.date,g.seq=e.seq,f=!1,a(),!1;n.saveApiUsers(e.users),i.saveApiChats(e.chats),angular.forEach(e.other_updates,function(e){u(e)}),angular.forEach(e.new_messages,function(e){u({_:"updateNewMessage",message:e,pts:g.pts})});var t=e.intermediate_state||e.state;g.seq=t.seq,g.pts=t.pts,g.date=t.date,console.log(dT(),"apply diff",g.seq,g.pts),"updates.differenceSlice"==e._?l(!0):f=!1})}function u(t){t.pts&&(g.pts=t.pts),e.$broadcast("apiUpdate",t)}function p(e,t){return(t=t||e)?f?(console.log(dT(),"Seq decline",t),!1):t!=g.seq+1?(t>g.seq&&(console.warn(dT(),"Seq hole",t,h&&h.seqAwaiting),h||(h={seqAwaiting:t,timeout:setTimeout(function(){l()},5e3)})),!1):(g.seq=e,!0):!0}function d(){t.setUpdatesProcessor(c),o.invokeApi("updates.getState").then(function(e){g.seq=e.seq,g.pts=e.pts,g.date=e.date,f=!1})}var f=!0,h=!1,g={},m={};return{processUpdateMessage:c,attach:d}}]).service("RichTextProcessor",["$sce","$sanitize",function(e,t){function n(e){return e.replace(/&/g,"&amp;").replace(/([^\#-~| |!])/g,function(e){return"&#"+e.charCodeAt(0)+";"}).replace(/</g,"&lt;").replace(/>/g,"&gt;")}function i(e){for(var t,n,i,r,o=0;o<Config.EmojiCategories.length;o++)if(r=Config.EmojiCategorySpritesheetDimens[o][1],t=Config.EmojiCategories[o].indexOf(e),t>-1)return n=Math.floor(t/r),i=t%r,{category:o,row:n,column:i};return console.error("emoji not found in spritesheet",e),null}function r(r,a){if(!r||!r.length)return"";a=a||{},r=r.replace(/\ufe0f/g,"",r);for(var d,f,h,g=r,m=[],y=!1;d=g.match(u);)m.push(n(g.substr(0,d.index))),d[1]?a.noLinks?m.push(n(d[0])):d[3]?m.push('<a href="',n("mailto:"+d[3]+d[4]),'" target="_blank">',n(d[3]+d[4]),"</a>"):m.push('<a href="',n(d[2]+"://"+d[4]),'" target="_blank">',n(d[2]+"://"+d[4]),"</a>"):d[5]?m.push(a.noLinebreaks?" ":"<br/>"):d[6]?(o=s[d[6]])&&(h=i(o))?(f=n(c[o][1][0]),y=!0,m.push('<span class="emoji emoji-',h.category,"-",l*h.column,"-",l*h.row,'" ','title="',f,'">',":",f,":</span>")):m.push(n(d[6])):d[8]&&(a.noLinks?m.push(d[7],n(d[8])):m.push(d[7],'<a href="#/im?q=',encodeURIComponent(d[8]),'">',n(d[8]),"</a>")),g=g.substr(d.index+d[0].length);if(m.push(n(g)),r=t(m.join("")),y&&(r=r.replace(/<span class="emoji emoji-(\d)-(\d+)-(\d+)"(.+?)<\/span>/g,'<span class="emoji emoji-spritesheet-$1" style="background-position: -$2px -$3px;" $4</span>')),!a.noLinks){var v=r.match(p),_=v&&v[1];if(_){var b=Config.Modes.chrome_packed?"webview":"iframe";r=r+'<div class="im_message_iframe_video"><'+b+' type="text/html" frameborder="0" src="http://www.youtube.com/embed/'+_+'?autoplay=0&amp;controls=2"></'+b+"></div>"}}return e.trustAs("html",r)}var o,a=[],s={},c=Config.Emoji,l=18;for(o in c)a.push(c[o][0]),s[c[o][0]]=o;var u=new RegExp("((?:(ftp|https?)://|(?:mailto:)?([A-Za-z0-9._%+-]+@))(\\S*\\.\\S*[^\\s.;,(){}<>\"']))|(\\n)|("+a.join("|")+")|(^|\\s)(#[A-Za-z0-9_.]{4,20})","i"),p=/(?:https?:\/\/)?(?:www\.)?youtu(?:|.be|be.com|.b)(?:\/v\/|\/watch\\?v=|e\/|\/watch(?:.+)v=)(.{11})(?:\&[^\s]*)?/;return{wrapRichText:r}}]).service("IdleManager",["$rootScope","$window","$timeout",function(e,t,n){function i(){a||(a=!0,$(t).on("blur focus keydown mousedown touchstart",r))}function r(i){"mousemove"==i.type&&$(t).off("mousemove",r);var a="blur"==i.type||"timeout"==i.type?!0:!1;n.cancel(o),a||(o=n(function(){r({type:"timeout"})},3e4)),e.idle.isIDLE!=a&&(e.$apply(function(){e.idle.isIDLE=a}),a&&"timeout"==i.type&&$(t).on("mousemove",r))}e.idle={isIDLE:!1};var o,a=!1;return{start:i}}]).service("StatusManager",["$timeout","$rootScope","MtpApiManager","IdleManager",function(e,t,n){function i(){c||(c=!0,t.$watch("idle.isIDLE",o),t.$watch("offline",o))}function r(e){var i=tsNow();if(!(e&&!s||!e&&5e4>i-s||t.offline))return s=e?0:i,n.invokeApi("account.updateStatus",{offline:e},{noErrorBox:!0})}function o(){a&&e.cancel(a),t.idle.isIDLE?a=e(function(){r(!0)},5e3):(r(!1),a=e(o,6e4))}var a,s=0,c=!1;return{start:i}}]).service("NotificationsManager",["$rootScope","$window","$timeout","$interval","$q","MtpApiManager","AppPeersManager","IdleManager","Storage",function(e,t,n,i,r,o,a,s,c){function l(e){return void 0!==k[e]?k[e]:k[e]=o.invokeApi("account.getNotifySettings",{peer:{_:"inputNotifyPeer",peer:a.getInputPeerByID(e)}})}function u(e,t){k[e]=r.when(t)}function p(e,t){u(e,t);var n=angular.copy(t);return n._="inputPeerNotifySettings",o.invokeApi("account.updateNotifySettings",{peer:{_:"inputNotifyPeer",peer:a.getInputPeerByID(e)},settings:n})}function d(e){return l(e).then(function(e){return"peerNotifySettings"==e._&&1e3*e.mute_until>tsNow()})}function f(){if(!b)return!1;"granted"!==Notification.permission&&"denied"!==Notification.permission&&$(t).on("click",h);try{$(t).on("beforeunload",v)}catch(e){}}function h(){Notification.requestPermission(),$(t).off("click",h)}function g(t){return e.idle.isIDLE?(C++,b&&"granted"===Notification.permission?(c.get("notify_nosound","notify_volume").then(function(e){(!e[0]&&e[1]===!1||e[1]>0)&&m(e[1]||.5)}),void c.get("notify_nodesktop").then(function(e){if(!e){var n=++S,i=t.key||"k"+n,r=new Notification(t.title,{icon:t.image||"",body:t.message||"",tag:t.tag||""});r.onclick=function(){r.close(),window.chrome&&chrome.app&&chrome.app.window&&chrome.app.window.current().focus(),window.focus(),v(),t.onclick&&t.onclick()},r.onclose=function(){delete w[i],v()},w[i]=r}})):!1):!1}function m(e){var t="img/sound_a.wav",n=$("#notify_sound").html('<audio autoplay="autoplay"><source src="'+t+'" type="audio/mpeg" /><embed hidden="true" autostart="true" loop="false" volume="'+100*e+'" src="'+t+'" /></audio>');n.find("audio")[0].volume=e}function y(e){var t=w[e];if(t)try{t.close&&t.close()}catch(n){}}function v(){angular.forEach(w,function(e){try{e.close&&e.close()}catch(t){}}),w={}}var _,b="Notification"in window,w={},S=0,C=0,k={},M=$('link[rel="icon"]'),x=$('<link rel="icon" href="favicon_unread.ico" type="image/x-icon" />'),T=document.title;return e.$watch("idle.isIDLE",function(e){i.cancel(_),e?(T=document.title,_=i(function(){var e=tsNow();!C||e%2e3>1e3?(document.title=T,$('link[rel="icon"]').replaceWith(M)):(document.title=C>1?C+" notifications":"1 notification",$('link[rel="icon"]').replaceWith(x))},1e3)):(C=0,document.title=T,$('link[rel="icon"]').replaceWith(M),v())}),e.$on("apiUpdate",function(e,t){switch(t._){case"updateNotifySettings":if("notifyPeer"==t.peer._){var n=a.getPeerID(t.peer.peer);u(n,t.notify_settings)}}}),{start:f,notify:g,cancel:y,clear:v,getPeerSettings:l,getPeerMuted:d,savePeerSettings:u,updatePeerSettings:p,testSound:m}}]).service("ErrorService",["$rootScope","$modal","$window",function(e,t,n){function i(n,i){if(a>=2)return console.log("Skip error box, too many open",a,n,i),!1;i=i||{};var r=e.$new();angular.extend(r,n),a++;var o=t.open({templateUrl:"partials/error_modal.html",scope:r,windowClass:i.windowClass||"error_modal_window"});return o.result["finally"](function(){a--}),o}function r(e,t){return i({title:e,description:t})}function o(n,i){i=i||{};var r=e.$new();angular.extend(r,n);var o=t.open({templateUrl:"partials/confirm_modal.html",scope:r,windowClass:i.windowClass||"confirm_modal_window"});return o.result}var a=0;return n.safeConfirm=function(e,t){"string"==typeof e&&(e={message:e}),o(e).then(function(e){t(e||!0)},function(){t(!1)})},{show:i,alert:r,confirm:o}}]).service("PeersSelectService",["$rootScope","$modal",function(e,t){function n(n){var i=e.$new();return n&&angular.extend(i,n),t.open({templateUrl:"partials/peer_select.html",controller:"PeerSelectController",scope:i,windowClass:"peer_select_window"}).result}return{selectPeer:n}}]).service("ContactsSelectService",["$rootScope","$modal",function(e,t){function n(n,i){i=i||{};var r=e.$new();return r.multiSelect=n,angular.extend(r,i),t.open({templateUrl:"partials/contacts_modal.html",controller:"ContactsModalController",scope:r,windowClass:"contacts_modal_window"}).result}return{selectContacts:function(e){return n(!0,e)},selectContact:function(e){return n(!1,e)}}}]).service("ChangelogNotifyService",["Storage","$rootScope","$http","$modal",function(e,t,n,i){function r(e,t){"string"!=typeof e&&(e=""),"string"!=typeof t&&(t=""),e=e.replace(/^\s+|\s+$/g,"").split("."),t=t.replace(/^\s+|\s+$/g,"").split(".");var n,i=Math.max(e.length,t.length);for(n=0;i>n;n++)if(e[n]!=t[n])return e[n]>t[n]?1:-1;return 0}function o(){e.get("last_version").then(function(t){t!=Config.App.version&&(t&&a(t),e.set({last_version:Config.App.version}))})}function a(e){var n=t.$new();n.lastVersion=e,n.canShowVersion=function(t){return n.lastVersion===!1||void 0===n.lastVersion?!0:r(t,e)>=0},i.open({templateUrl:"partials/changelog_modal.html",scope:n,windowClass:"changelog_modal_window page_modal"})}return{checkUpdate:o,showChangelog:a}}]),angular.module("myApp.controllers",[]).controller("AppWelcomeController",["$scope","$location","MtpApiManager","ErrorService","ChangelogNotifyService",function(e,t,n,i,r){n.getUserID().then(function(n){n?t.url("/im"):e.showWelcome=!0}),r.checkUpdate()}]).controller("AppLoginController",["$scope","$location","$timeout","$modal","$modalStack","MtpApiManager","ErrorService","ChangelogNotifyService",function(e,t,n,i,r,o,a,s){function c(){var t,n,i,r=((e.credentials.phone_country||"")+(e.credentials.phone_number||"")).replace(/\D+/g,""),o=0,a=!1;if(r.length)for(t=0;t<Config.CountryCodes.length;t++)for(n=1;n<Config.CountryCodes[t].length;n++)i=Config.CountryCodes[t][n].replace(/\D+/g,""),i.length>=o&&!r.indexOf(i)&&(o=i.length,a=Config.CountryCodes[t][0]);e.credentials.phone_full=r,e.credentials.phone_country_name=a||"Unknown"}function l(e){o.setUserAuth(p.dcID,{expires:e.expires,id:e.user.id}),n.cancel(d),t.url("/im")}function u(){n.cancel(d),--e.callPending.remaining?d=n(u,1e3):(e.callPending.success=!1,o.invokeApi("auth.sendCall",{phone_number:e.credentials.phone_full,phone_code_hash:e.credentials.phone_code_hash},p).then(function(){e.callPending.success=!0}))}r.dismissAll(),o.getUserID().then(function(e){return e?void t.url("/im"):void 0});var p={dcID:1,createNetworker:!0};e.credentials={phone_country:"+1",phone_country_name:"USA",phone_number:"",phone_full:""},e.progress={},e.callPending={},e.selectCountry=function(){var t=i.open({templateUrl:"partials/country_select_modal.html",controller:"CountrySelectModalController",windowClass:"countries_modal_window"});t.result.then(function(t){e.credentials.phone_country=t,e.$broadcast("country_selected")})},e.$watch("credentials.phone_country",c),e.$watch("credentials.phone_number",c);var d;e.sendCode=function(){n.cancel(d),a.confirm({type:"LOGIN_PHONE_CORRECT",country_code:e.credentials.phone_country,phone_number:e.credentials.phone_number}).then(function(){e.progress.enabled=!0,o.invokeApi("auth.sendCode",{phone_number:e.credentials.phone_full,sms_type:0,api_id:Config.App.id,api_hash:Config.App.hash},p).then(function(t){e.progress.enabled=!1,e.credentials.phone_code_hash=t.phone_code_hash,e.credentials.phone_occupied=t.phone_registered,e.error={},e.callPending.remaining=t.send_call_timeout||60,u()},function(t){switch(e.progress.enabled=!1,console.log("sendCode error",t),t.type){case"NETWORK_BAD_REQUEST":"https:"==location.protocol&&(a.confirm({type:"HTTPS_MIXED_FAIL"}).then(function(){location=location.toString().replace(/^https:/,"http:")}),t.handled=!0);break;case"PHONE_NUMBER_INVALID":e.error={field:"phone"},t.handled=!0}})})},e.editPhone=function(){n.cancel(d),delete e.credentials.phone_code_hash,delete e.credentials.phone_unoccupied,delete e.credentials.phone_code_valid,delete e.callPending.remaining,delete e.callPending.success},e.logIn=function(t){var n="auth.signIn",i={phone_number:e.credentials.phone_full,phone_code_hash:e.credentials.phone_code_hash,phone_code:e.credentials.phone_code};t&&(n="auth.signUp",angular.extend(i,{first_name:e.credentials.first_name,last_name:e.credentials.last_name})),e.progress.enabled=!0,o.invokeApi(n,i,p).then(l,function(t){if(e.progress.enabled=!1,400==t.code&&"PHONE_NUMBER_UNOCCUPIED"==t.type)return t.handled=!0,e.credentials.phone_code_valid=!0,void(e.credentials.phone_unoccupied=!0);if(400==t.code&&"PHONE_NUMBER_OCCUPIED"==t.type)return t.handled=!0,e.logIn(!1);switch(t.type){case"FIRSTNAME_INVALID":e.error={field:"first_name"},t.handled=!0;break;case"LASTNAME_INVALID":e.error={field:"last_name"},t.handled=!0;break;case"PHONE_CODE_INVALID":e.error={field:"phone_code"},delete e.credentials.phone_code_valid,t.handled=!0}})},s.checkUpdate()}]).controller("AppIMController",["$scope","$location","$routeParams","$modal","$rootScope","$modalStack","MtpApiManager","AppUsersManager","ContactsSelectService","ChangelogNotifyService","ErrorService",function(e,t,n,i,r,o,a,s,c,l,u){function p(){if(n.q){if(n.q!==d&&(e.search.query=d=n.q,e.search.messages=!0,void 0!==e.curDialog))return!1}else d=!1;e.curDialog={peer:n.p||!1,messageID:n.m||!1}}e.$on("$routeUpdate",p),e.$on("history_focus",function(n,i){o.dismissAll(),i.peerString==e.curDialog.peer&&i.messageID==e.curDialog.messageID?e.$broadcast("ui_history_focus"):t.url("/im?p="+i.peerString+(i.messageID?"&m="+i.messageID:""))}),e.isLoggedIn=!0,e.isEmpty={},e.search={},e.historyFilter={mediaType:!1},e.historyPeer={},e.openSettings=function(){i.open({templateUrl:"partials/settings_modal.html",controller:"SettingsModalController",windowClass:"settings_modal_window page_modal"})},e.openContacts=function(){c.selectContact().then(function(t){e.dialogSelect(s.getUserString(t))})},e.openGroup=function(){c.selectContacts().then(function(t){if(1==t.length)e.dialogSelect(s.getUserString(t[0]));else if(t.length>1){var n=r.$new();n.userIDs=t,i.open({templateUrl:"partials/chat_create_modal.html",controller:"ChatCreateModalController",scope:n,windowClass:"contacts_modal_window"})}})},e.importContact=function(){s.openImportContact().then(function(t){t&&e.$broadcast("contact_imported")})},e.dialogSelect=function(e,t){var n={peerString:e};t&&(n.messageID=t),r.$broadcast("history_focus",n)},e.logOut=function(){u.confirm({type:"LOGOUT"}).then(function(){a.logOut().then(function(){location.hash="/login",location.reload()})})},e.showPeerInfo=function(){e.curDialog.peerID>0?r.openUser(e.curDialog.peerID):e.curDialog.peerID<0&&r.openChat(-e.curDialog.peerID)},e.toggleEdit=function(){e.$broadcast("history_edit_toggle")},e.returnToRecent=function(){e.$broadcast("history_return_recent")},e.toggleMedia=function(t){e.$broadcast("history_media_toggle",t)},e.toggleSearch=function(){e.$broadcast("dialogs_search_toggle")},p();var d=!1;l.checkUpdate()}]).controller("AppImDialogsController",["$scope","$location","$q","$timeout","$routeParams","MtpApiManager","AppUsersManager","AppChatsManager","AppMessagesManager","AppPeersManager","PhonebookContactsService","ErrorService",function(e,t,n,i,r,o,a,s,c,l,u,p){function d(r){var a,s=e.search.messages&&e.search.query.length>0,l=++_;return i.cancel($),s?($=r?n.when():i(angular.noop,500),a=$.then(function(){return c.getSearch({_:"inputPeerEmpty"},e.search.query,{_:"inputMessagesFilterEmpty"},y)})):a=c.getDialogs(e.search.query,y),a.then(function(e){if(l!=_)return n.reject();if(s){var t=[];angular.forEach(e.history,function(e){var n=c.getMessage(e),i=c.getMessagePeer(n);t.push({peerID:i,top_message:e,unread_count:0})}),e={count:e.count,dialogs:t}}return e},function(e){return"NETWORK_BAD_REQUEST"==e.type&&"https:"==location.protocol&&(p.confirm({type:"HTTPS_MIXED_FAIL"}).then(function(){location=location.toString().replace(/^https:/,"http:")}),e.handled=!0),401==e.code&&(o.logOut()["finally"](function(){t.url("/login")}),e.handled=!0),n.reject()})}function f(t){m=0,y=0,v=!1,b={},g=!1,d(t).then(function(t){e.dialogs=[],e.contacts=[],t.dialogs.length&&(m+=t.dialogs.length,y=t.dialogs[t.dialogs.length-1].top_message,v=null===t.count||m<t.count,angular.forEach(t.dialogs,function(t){b[t.peerID]=!0,e.dialogs.push(c.wrapForDialog(t.top_message,t.unread_count))}),delete e.isEmpty.dialogs),e.$broadcast("ui_dialogs_change"),e.search.query?h():(c.getDialogs("",y,100),t.dialogs.length||(e.isEmpty.dialogs=!0))})}function h(){if(!g||v&&m){if(!(v||e.search.messages||!e.search.query&&e.dialogs.length)){g=!0;var t=++_;return a.getContacts(e.search.query).then(function(n){t==_&&(e.contacts=[],angular.forEach(n,function(t){void 0===b[t]&&e.contacts.push({userID:t,user:a.getUser(t),userPhoto:a.getUserPhoto(t,"User"),peerString:a.getUserString(t)})}),n.length?delete e.isEmpty.contacts:e.search.query||(e.isEmpty.contacts=!0))}),void e.$broadcast("ui_dialogs_append")}d().then(function(t){t.dialogs.length&&(m+=t.dialogs.length,y=t.dialogs[t.dialogs.length-1].top_message,v=null===t.count||m<t.count,angular.forEach(t.dialogs,function(t){b[t.peerID]=!0,e.dialogs.push(c.wrapForDialog(t.top_message,t.unread_count))}),e.$broadcast("ui_dialogs_append"))})}}e.dialogs=[],e.contacts=[],e.contactsLoaded=!1,void 0===e.search&&(e.search={}),void 0===e.isEmpty&&(e.isEmpty={}),e.phonebookAvailable=u.isAvailable();var g,m=0,y=0,v=!1,_=0,b={};o.invokeApi("account.updateStatus",{offline:!1}),e.$on("dialogs_need_more",function(){h()}),e.$on("dialog_unread",function(t,n){angular.forEach(e.dialogs,function(e){e.peerID==n.peerID&&(e.unreadCount=n.count)})}),e.$on("dialogs_update",function(t,n){if(void 0!==e.search.query&&e.search.query.length)return!1;var i=!1;angular.forEach(e.dialogs,function(e,t){e.peerID==n.peerID&&(i=t)});var r=c.wrapForDialog(n.top_message,n.unread_count);if(i!==!1){var o=e.dialogs.splice(i,1);safeReplaceObject(o,r),m++}e.dialogs.unshift(r)}),e.$on("dialog_flush",function(t,n){for(var i=0;i<e.dialogs.length;i++)if(e.dialogs[i].peerID==n.peerID){e.dialogs.splice(i,1);break}}),e.$on("contact_imported",function(){g&&f()});var w=!1;e.$watchCollection("search",function(){e.search.messages!=w?(w=e.search.messages,e.dialogs=[],f(!0)):f(),!r.q||e.search.messages&&e.search.query==r.q||i(function(){t.url("/im"+(e.curDialog.peer?"?p="+e.curDialog.peer+(e.curDialog.messageID?"&m="+e.curDialog.messageID:""):""))})}),Config.Navigator.mobile&&e.$watch("curDialog.peer",function(){e.$broadcast("ui_dialogs_update")}),e.importPhonebook=function(){u.openPhonebookImport().result.then(function(e){g&&e.length&&f()})},e.searchClear=function(){e.search.query="",e.search.messages=!1,e.$broadcast("search_clear")},e.$on("ui_dialogs_search_clear",e.searchClear);var $;e.importPhonebook=function(){u.openPhonebookImport().result.then(function(e){g&&e.length&&f()})}}]).controller("AppImHistoryController",["$scope","$location","$timeout","$rootScope","MtpApiManager","AppUsersManager","AppChatsManager","AppMessagesManager","AppPeersManager","ApiUpdatesManager","PeersSelectService","IdleManager","StatusManager","ErrorService",function(e,t,n,i,r,o,a,s,c,l,u,p,d,f){function h(t,n){var i=t.peer||e.curDialog.peer||"";return D=c.getPeerID(i),D==e.curDialog.peerID&&n.messageID==t.messageID?!1:(e.curDialog.peerID=D,e.curDialog.inputPeer=c.getInputPeer(i),e.historyFilter.mediaType=!1,C(!0),void(n.peer&&n.peer==t.peer&&t.messageID?y():D?(g(!0),b()):w()))}function g(t){var n=c.getPeer(D);return!n||n.deleted?(safeReplaceObject(e.state,{loaded:!1}),!1):(e.history=[],safeReplaceObject(e.historyPeer,{id:D,data:n,photo:c.getPeerPhoto(D,"User","Group")}),r.getUserID().then(function(t){e.ownPhoto=o.getUserPhoto(t,"User")}),void(t&&(e.typing={},e.$broadcast("ui_peer_change"),e.$broadcast("ui_history_change"),safeReplaceObject(e.state,{loaded:!0}))))}function m(t){var n,i,r,o=0,a=e.history.length;for(t>0?a=t:0>t&&(o=a+t),n=o;a>n;n++){if(i=e.history[n],r&&i.from_id==r.from_id&&!r.fwd_from_id==!i.fwd_from_id&&!r.action&&!i.action&&i.date<r.date+900){var s=i.message&&i.message.length<70&&-1==i.message.indexOf("\n");i.grouped=i.fwd_from_id&&i.fwd_from_id==r.fwd_from_id?s?4:3:!i.fwd_from_id&&s?1:2}else(r||!n)&&delete i.grouped;r=i}}function y(){var t,n=!1;for(t=0;t<e.history.length;t++)if(e.curDialog.messageID==e.history[t].id){n=!0;break}n?(e.historyUnread={},e.historyFocus=e.curDialog.messageID,e.$broadcast("ui_history_change_scroll")):b()}function v(){if(P){var t=O,n=++R,i=0,r=20;s.getHistory(e.curDialog.inputPeer,L,i,r).then(function(i){if(t==O&&n==R){var o,a;for(o=i.history.length-1;o>=0;o--)a=i.history[o],a>L&&e.history.push(s.wrapForHistory(a));i.history.length?(L=i.history.length>=r?i.history[0]:0,m(-r),e.$broadcast("ui_history_append")):L=0,e.skippedHistory=P=L>0}})}}function _(){if(I){var t=O,n=U,i=e.historyFilter.mediaType&&{_:F[e.historyFilter.mediaType]},r=i?s.getSearch(e.curDialog.inputPeer,"",i,N):s.getHistory(e.curDialog.inputPeer,N);r.then(function(i){t==O&&n==U&&(angular.forEach(i.history,function(t){e.history.unshift(s.wrapForHistory(t))}),I=null===i.count||i.history.length&&e.history.length<i.count,i.history.length&&(N=i.history[i.history.length-1],m(i.history.length+1),e.$broadcast("ui_history_prepend")))})}}function b(t){e.missedCount=0,I=!1,e.skippedHistory=P=!1,N=0,L=0;var n=0,i=0;e.curDialog.messageID?(N=parseInt(e.curDialog.messageID),n=5,i=5):t&&(n=10);var r=++O,o=e.historyFilter.mediaType&&{_:F[e.historyFilter.mediaType]},a=o?s.getSearch(e.curDialog.inputPeer,"",o,N):s.getHistory(e.curDialog.inputPeer,N,n,i);e.state.mayBeHasMore=!0,a.then(function(t){r==O&&(L=t.unreadSkip||N&&t.history.indexOf(N)>=i-1?t.history[0]:0,N=t.history[t.history.length-1],e.skippedHistory=P=L>0,I=null===t.count||t.history.length&&t.history.length<t.count,g(),safeReplaceObject(e.state,{loaded:!0}),e.history=[],angular.forEach(t.history,function(t){var n=s.wrapForHistory(t);e.skippedHistory&&delete n.unread,e.history.push(n)}),e.history.reverse(),m(),t.unreadOffset?e.historyUnreadAfter=t.history[t.unreadOffset-1]:delete e.historyUnreadAfter,e.historyFocus=e.curDialog.messageID||0,e.$broadcast("ui_history_change"),s.readHistory(e.curDialog.inputPeer))},function(){safeReplaceObject(e.state,{error:!0})})}function w(){safeReplaceObject(e.state,{notSelected:!0}),e.history=[],I=!1,e.$broadcast("ui_history_change")}function S(t,n){var i=n.target,r=n.shiftKey;if(r&&e.$broadcast("ui_selection_clear"),!e.selectActions&&!$(i).hasClass("icon-select-tick")&&!$(i).hasClass("im_content_message_select_area"))return!1;if(e.selectedMsgs[t])B=!1,delete e.selectedMsgs[t],e.selectedCount--,e.selectedCount||(e.selectActions=!1,e.$broadcast("ui_panel_update"));else{if(r){if(B!=t){var o,a,s,c=B>t;for(o=0;o<e.history.length;o++)if(e.history[o].id==B){a=o;
break}for(o=a;e.history[o]&&(s=e.history[o].id)!=t;)e.selectedMsgs[s]||(e.selectedMsgs[s]=!0,e.selectedCount++),o+=c?-1:1}}else B=t;e.selectedMsgs[t]=!0,e.selectedCount++,e.selectActions||(e.selectActions=!0,e.$broadcast("ui_panel_update"))}}function C(t){e.selectedMsgs={},e.selectedCount=0,e.selectActions=!1,B=!1,t||e.$broadcast("ui_panel_update")}function k(){f.confirm({type:"HISTORY_FLUSH"}).then(function(){s.flushHistory(e.curDialog.inputPeer).then(function(){C()})})}function M(){if(e.selectedCount>0){var t=[];angular.forEach(e.selectedMsgs,function(e,n){t.push(n)}),s.deleteMessages(t).then(function(){C()})}}function x(){if(e.selectedCount>0){var t=[];angular.forEach(e.selectedMsgs,function(e,n){t.push(n)}),u.selectPeer({confirm_type:"FORWARD_PEER"}).then(function(e){var n=c.getPeerID(e);s.forwardMessages(n,t).then(function(){C(),i.$broadcast("history_focus",{peerString:e})})})}}function T(){e.selectActions?C():(e.selectActions=!0,e.$broadcast("ui_panel_update"))}function E(t){e.historyFilter.mediaType=t||!1,e.history=[],b()}function A(){e.historyFilter.mediaType?E():e.curDialog.messageID?i.$broadcast("history_focus",{peerString:e.curDialog.peer}):b(!0)}e.$watch("curDialog",h),l.attach(),p.start(),d.start(),e.history=[],e.skippedHistory=!1,e.selectedMsgs={},e.selectedCount=0,e.selectActions=!1,e.missedCount=0,e.typing={},e.state={},e.toggleMessage=S,e.selectedDelete=M,e.selectedForward=x,e.selectedCancel=C,e.selectedFlush=k,e.toggleEdit=T,e.toggleMedia=E,e.returnToRecent=A,e.$on("history_edit_toggle",T),e.$on("history_media_toggle",function(e,t){E(t)}),e.$on("history_return_recent",A);var D,I=!1,P=!1,N=0,L=0,B=!1,F={photos:"inputMessagesFilterPhotos",video:"inputMessagesFilterVideo",documents:"inputMessagesFilterDocument",audio:"inputMessagesFilterAudio"},O=0,U=0,R=0,q={};e.$on("history_update",angular.noop),e.$on("history_append",function(t,r){if(r.peerID==e.curDialog.peerID){if(e.historyFilter.mediaType||e.skippedHistory)return void(r.my?A():e.missedCount++);e.history.push(s.wrapForHistory(r.messageID)),m(-3),e.typing={},e.$broadcast("ui_history_append_new",{my:r.my}),r.my&&delete e.historyUnreadAfter,i.idle.isIDLE||n(function(){s.readHistory(e.curDialog.inputPeer)})}}),e.$on("history_delete",function(t,n){if(n.peerID==e.curDialog.peerID){for(var i=[],r=0;r<e.history.length;r++)n.msgs[e.history[r].id]||i.push(e.history[r]);e.history=i,m()}}),e.$on("dialog_flush",function(t,n){n.peerID==e.curDialog.peerID&&(e.history=[])}),e.$on("history_focus",function(){e.historyFilter.mediaType&&E()}),e.$on("apiUpdate",function(t,i){switch(i._){case"updateUserTyping":i.user_id==e.curDialog.peerID&&o.hasUser(i.user_id)&&(e.typing={user:o.getUser(i.user_id)},n.cancel(q[i.user_id]),q[i.user_id]=n(function(){e.typing={}},6e3));break;case"updateChatUserTyping":-i.chat_id==e.curDialog.peerID&&o.hasUser(i.user_id)&&(e.typing={user:o.getUser(i.user_id)},n.cancel(q[i.user_id]),q[i.user_id]=n(function(){e.typing={}},6e3))}}),e.$on("history_need_less",v),e.$on("history_need_more",_),i.$watch("idle.isIDLE",function(t){t||!e.curDialog||!e.curDialog.peerID||e.historyFilter.mediaType||e.skippedHistory||s.readHistory(e.curDialog.inputPeer)})}]).controller("AppImPanelController",["$scope",function(e){e.$on("user_update",angular.noop)}]).controller("AppImSendController",["$scope","$timeout","MtpApiManager","Storage","AppPeersManager","AppMessagesManager","ApiUpdatesManager","MtpApiFileManager",function(e,t,n,i,r,o){function a(n){return e.$broadcast("ui_message_before_send"),t(function(){var t=e.draftMessage.text;if(!angular.isString(t)||!t.length)return!1;t=t.replace(/:([a-z0-9\-\+\*_]+?):/gi,function(e,t){var n=$.emojiarea.reverseIcons[t];return void 0!==n?n:e});var n=0;do!function(e,t,n){setTimeout(function(){o.sendText(e,t)},n)}(e.curDialog.peerID,t.substr(0,4096),n),t=t.substr(4096),n+=100;while(t.length);s(),e.$broadcast("ui_message_send")}),cancelEvent(n)}function s(t){t?i.get("draft"+e.curDialog.peerID).then(function(t){e.draftMessage.text=t||"",e.$broadcast("ui_peer_draft")}):(e.draftMessage.text="",e.$broadcast("ui_peer_draft"))}function c(t){if(t&&t.length){e.historyFilter.mediaType||e.skippedHistory||o.readHistory(e.curDialog.inputPeer);var n={};n["draft"+e.curDialog.peerID]=t,i.set(n)}else i.remove("draft"+e.curDialog.peerID)}function l(){n.invokeApi("messages.setTyping",{peer:e.curDialog.inputPeer,typing:!0})}function u(t){if(angular.isArray(t)&&t.length)for(var n=0;n<t.length;n++)o.sendFile(e.curDialog.peerID,t[n],{isMedia:e.draftMessage.isMedia}),e.$broadcast("ui_message_send")}e.$watch("curDialog.peer",s),e.$on("user_update",angular.noop),e.$on("ui_typing",l),e.draftMessage={text:""},e.$watch("draftMessage.text",c),e.$watch("draftMessage.files",u),e.sendMessage=a}]).controller("PhotoModalController",["$q","$scope","$rootScope","$modalInstance","AppPhotosManager","AppMessagesManager","AppPeersManager","PeersSelectService","ErrorService",function(e,t,n,i,r,o,a,s,c){function l(n){var i=m.indexOf(t.messageID),a=i>=0?i+n:0,s=++_,c=a>=m.length?u():e.when();c.then(function(){s==_&&(t.messageID=m[a],t.photoID=o.getMessage(t.messageID).media.photo.id,t.photo=r.wrapForFull(t.photoID),p())})}function u(){return b?b:b=o.getSearch(f,h,g,y).then(function(e){e.history.length?(y=e.history[e.history.length-1],m=m.concat(e.history),v=m.length<e.count):v=!1,p(),b=!1})}function p(){var e=m.indexOf(t.messageID);t.nav.hasNext=e>0,t.nav.hasPrev=v||e<m.length-1,t.canForward=t.canDelete=t.messageID>0}if(t.photo=r.wrapForFull(t.photoID),t.nav={},t.download=function(){r.downloadPhoto(t.photoID)},(!t.messageID||Config.Navigator.mobile)&&(t.nav.next=function(){i.close()}),t.messageID){if(t.forward=function(){var e=t.messageID;s.selectPeer({confirm_type:"FORWARD_PEER"}).then(function(t){var i=a.getPeerID(t);o.forwardMessages(i,[e]).then(function(){n.$broadcast("history_focus",{peerString:t})})})},Config.Navigator.mobile)return void(t.canForward=!0);t.delete=function(){var e=t.messageID;c.confirm({type:"MESSAGE_DELETE"}).then(function(){o.deleteMessages([e])})};var d=o.getMessagePeer(o.getMessage(t.messageID)),f=a.getInputPeerByID(d),h="",g={_:"inputMessagesFilterPhotos"},m=[t.messageID],y=t.messageID,v=!0;p(),o.getSearch(f,h,g,0,1e3).then(function(e){e.history.indexOf(t.messageID)>=0&&(m=e.history,y=m[m.length-1],p())});var _=0,b=!1;t.nav.next=function(){return t.nav.hasNext?void l(-1):!1},t.nav.prev=function(){return t.nav.hasPrev?void l(1):!1},t.$on("history_delete",function(e,n){if(console.log(dT(),"delete",n),n.peerID==d){if(n.msgs[t.messageID])if(t.nav.hasNext)t.nav.next();else{if(!t.nav.hasPrev)return i.dismiss();t.nav.prev()}for(var r=[],o=0;o<m.length;o++)n.msgs[m[o]]||r.push(m[o]);m=r}})}}]).controller("UserpicModalController",["$q","$scope","$rootScope","$modalInstance","AppPhotosManager","AppUsersManager","AppPeersManager","AppMessagesManager","PeersSelectService","ErrorService",function(e,t,n,i,r,o,a,s,c,l){function u(n){var i=h.indexOf(t.photoID),o=i>=0?i+n:0,a=++y,s=o>=h.length?p():e.when();s.then(function(){a==y&&(t.photoID=h[o],t.photo=r.wrapForFull(t.photoID),d())})}function p(){return v?v:v=r.getUserPhotos(f,g).then(function(e){g=e.photos[e.photos.length-1],h=h.concat(e.photos),m=h.length<e.count,d(),v=!1},function(){v=!1})}function d(){var e=h.indexOf(t.photoID);t.nav.hasNext=e>0,t.nav.hasPrev=m||e<h.length-1}t.photo=r.wrapForFull(t.photoID),t.nav={},t.canForward=!0;var f=o.getUserInput(t.userID),h=[t.photoID],g=t.photoID,m=!0;d(),r.getUserPhotos(f,0,1e3).then(function(e){e.photos.indexOf(t.photoID)>=0&&(h=e.photos,g=h[h.length-1],m=h.length<e.count,d())});var y=0,v=!1;t.nav.next=function(){return t.nav.hasNext?void u(-1):!1},t.nav.prev=function(){return t.nav.hasPrev?void u(1):!1},t.forward=function(){t.photoID;c.selectPeer({confirm_type:"FORWARD_PEER"}).then(function(e){var i=a.getPeerID(e);s.sendOther(i,{_:"inputMediaPhoto",id:{_:"inputPhoto",id:t.photoID,access_hash:t.photo.access_hash}}),n.$broadcast("history_focus",{peerString:e})})},t.delete=function(){var e=t.photoID;l.confirm({type:"MESSAGE_DELETE"}).then(function(){s.deleteMessages([e])})},t.download=function(){r.downloadPhoto(t.photoID)}}]).controller("VideoModalController",["$scope","$rootScope","$modalInstance","PeersSelectService","AppMessagesManager","AppVideoManager","AppPeersManager","ErrorService",function(e,t,n,i,r,o,a,s){e.video=o.wrapForFull(e.videoID),e.progress={enabled:!1},e.player={},e.forward=function(){var n=e.messageID;i.selectPeer({confirm_type:"FORWARD_PEER"}).then(function(e){var i=a.getPeerID(e);r.forwardMessages(i,[n]).then(function(){t.$broadcast("history_focus",{peerString:e})})})},e.delete=function(){var t=e.messageID;s.confirm({type:"MESSAGE_DELETE"}).then(function(){r.deleteMessages([t])})},e.$on("history_delete",function(t,i){i.msgs[e.messageID]&&n.dismiss()})}]).controller("UserModalController",["$scope","$location","$rootScope","$modal","AppUsersManager","MtpApiManager","NotificationsManager","AppPhotosManager","AppMessagesManager","AppPeersManager","PeersSelectService","ErrorService",function(e,t,n,i,r,o,a,s,c,l,u,p){var d=r.getUserString(e.userID);e.user=r.getUser(e.userID),e.userPhoto=r.getUserPhoto(e.userID,"User"),e.settings={notifications:!0},o.invokeApi("users.getFullUser",{id:r.getUserInput(e.userID)}).then(function(t){r.saveApiUser(t.user),s.savePhoto(t.profile_photo),"photoEmpty"!=t.profile_photo._&&(e.userPhoto.id=t.profile_photo.id),a.savePeerSettings(e.userID,t.notify_settings),a.getPeerMuted(e.userID).then(function(t){e.settings.notifications=!t,e.$watch("settings.notifications",function(t,n){return t===n?!1:void a.getPeerSettings(e.userID).then(function(n){n.mute_until=t?0:2e9,a.updatePeerSettings(e.userID,n)})})})}),e.goToHistory=function(){n.$broadcast("history_focus",{peerString:d})},e.flushHistory=function(){p.confirm({type:"HISTORY_FLUSH"}).then(function(){c.flushHistory(l.getInputPeerByID(e.userID)).then(function(){e.goToHistory()})})},e.importContact=function(t){var o=n.$new();o.importContact={phone:e.user.phone,first_name:e.user.first_name,last_name:e.user.last_name},i.open({templateUrl:t?"partials/edit_contact_modal.html":"partials/import_contact_modal.html",controller:"ImportContactModalController",windowClass:"import_contact_modal_window page_modal",scope:o}).result.then(function(t){e.userID==t&&(e.user=r.getUser(e.userID),console.log(e.user))})},e.deleteContact=function(){r.deleteContacts([e.userID]).then(function(){e.user=r.getUser(e.userID),console.log(e.user)})},e.shareContact=function(){u.selectPeer({confirm_type:"SHARE_CONTACT_PEER"}).then(function(t){var i=l.getPeerID(t);c.sendOther(i,{_:"inputMediaContact",phone_number:e.user.phone,first_name:e.user.first_name,last_name:e.user.last_name,user_id:e.user.id}),n.$broadcast("history_focus",{peerString:t})})}}]).controller("ChatModalController",["$scope","$timeout","$rootScope","$modal","AppUsersManager","AppChatsManager","MtpApiManager","MtpApiFileManager","NotificationsManager","AppMessagesManager","AppPeersManager","ApiUpdatesManager","ContactsSelectService","ErrorService",function(e,t,n,i,r,o,a,s,c,l,u,p,d,f){function h(t){p.processUpdateMessage({_:"updates",users:t.users,chats:t.chats,seq:t.seq,updates:[{_:"updateNewMessage",message:t.message,pts:t.pts}]}),n.$broadcast("history_focus",{peerString:e.chatFull.peerString})}function g(t){t&&t.type&&0===t.type.indexOf("image")&&(e.photo.updating=!0,s.uploadFile(t).then(function(t){return a.invokeApi("messages.editChatPhoto",{chat_id:e.chatID,photo:{_:"inputChatUploadedPhoto",file:t,crop:{_:"inputPhotoCropAuto"}}}).then(function(e){h(e)})})["finally"](function(){e.photo.updating=!1}))}e.chatFull=o.wrapForFull(e.chatID,{}),a.invokeApi("messages.getFullChat",{chat_id:e.chatID}).then(function(t){o.saveApiChats(t.chats),r.saveApiUsers(t.users),e.chatFull=o.wrapForFull(e.chatID,t.full_chat),e.$broadcast("ui_height")}),e.settings={notifications:!0},c.getPeerMuted(-e.chatID).then(function(t){e.settings.notifications=!t,e.$watch("settings.notifications",function(t,n){return t===n?!1:void c.getPeerSettings(-e.chatID).then(function(n){n.mute_until=t?0:2e9,c.updatePeerSettings(-e.chatID,n)})})}),e.leaveGroup=function(){a.invokeApi("messages.deleteChatUser",{chat_id:e.chatID,user_id:{_:"inputUserSelf"}}).then(h)},e.returnToGroup=function(){a.invokeApi("messages.addChatUser",{chat_id:e.chatID,user_id:{_:"inputUserSelf"}}).then(h)},e.inviteToGroup=function(){var t=[];angular.forEach(e.chatFull.participants.participants,function(e){t.push(e.user_id)}),d.selectContacts({disabled:t}).then(function(t){angular.forEach(t,function(t){a.invokeApi("messages.addChatUser",{chat_id:e.chatID,user_id:{_:"inputUserContact",user_id:t},fwd_limit:100}).then(function(e){p.processUpdateMessage({_:"updates",seq:e.seq,users:e.users,chats:e.chats,updates:[{_:"updateNewMessage",message:e.message,pts:e.pts}]})})}),n.$broadcast("history_focus",{peerString:e.chatFull.peerString})})},e.kickFromGroup=function(t){var n=r.getUser(t);console.log({_:"inputUserForeign",user_id:t,access_hash:n.access_hash||"0"},n),a.invokeApi("messages.deleteChatUser",{chat_id:e.chatID,user_id:{_:"inputUserForeign",user_id:t,access_hash:n.access_hash||"0"}}).then(h)},e.flushHistory=function(){f.confirm({type:"HISTORY_FLUSH"}).then(function(){l.flushHistory(u.getInputPeerByID(-e.chatID)).then(function(){n.$broadcast("history_focus",{peerString:e.chatFull.peerString})})})},e.photo={},e.$watch("photo.file",g),e.deletePhoto=function(){e.photo.updating=!0,a.invokeApi("messages.editChatPhoto",{chat_id:e.chatID,photo:{_:"inputChatPhotoEmpty"}}).then(function(e){h(e)})["finally"](function(){e.photo.updating=!1})},e.editTitle=function(){var t=n.$new();t.chatID=e.chatID,i.open({templateUrl:"partials/chat_edit_modal.html",controller:"ChatEditModalController",scope:t,windowClass:"contacts_modal_window"})}}]).controller("SettingsModalController",["$rootScope","$scope","$timeout","$modal","AppUsersManager","AppChatsManager","AppPhotosManager","MtpApiManager","Storage","NotificationsManager","MtpApiFileManager","ApiUpdatesManager","ChangelogNotifyService","ErrorService",function(e,t,n,i,r,o,a,s,c,l,u,p,d,f){function h(e){e&&e.type&&0===e.type.indexOf("image")&&(t.photo.updating=!0,u.uploadFile(e).then(function(e){s.invokeApi("photos.uploadProfilePhoto",{file:e,caption:"",geo_point:{_:"inputGeoPointEmpty"},crop:{_:"inputPhotoCropAuto"}}).then(function(e){r.saveApiUsers(e.users),s.getUserID().then(function(e){p.processUpdateMessage({_:"updateShort",update:{_:"updateUserPhoto",user_id:e,date:tsNow(!0),photo:r.getUser(e).photo,previous:!0}}),t.photo=r.getUserPhoto(e,"User")})})})["finally"](function(){delete t.updating}))}t.profile={},t.photo={},t.version=Config.App.version,s.getUserID().then(function(e){t.profile=r.getUser(e),t.photo=r.getUserPhoto(e,"User")}),s.invokeApi("users.getFullUser",{id:{_:"inputUserSelf"}}).then(function(e){r.saveApiUser(e.user),a.savePhoto(e.profile_photo),"photoEmpty"!=e.profile_photo._&&(t.photo.id=e.profile_photo.id)}),t.notify={},t.send={},t.$watch("photo.file",h),t.deletePhoto=function(){t.photo.updating=!0,s.invokeApi("photos.updateProfilePhoto",{id:{_:"inputPhotoEmpty"},crop:{_:"inputPhotoCropAuto"}}).then(function(e){s.getUserID().then(function(n){p.processUpdateMessage({_:"updateShort",update:{_:"updateUserPhoto",user_id:n,date:tsNow(!0),photo:e,previous:!0}}),t.photo=r.getUserPhoto(n,"User")})})["finally"](function(){delete t.photo.updating})},t.editProfile=function(){i.open({templateUrl:"partials/profile_edit_modal.html",controller:"ProfileEditModalController",windowClass:"profile_edit_modal_window page_modal"})},t.terminateSessions=function(){f.confirm({type:"TERMINATE_SESSIONS"}).then(function(){s.invokeApi("auth.resetAuthorizations",{})})},c.get("notify_nodesktop","notify_nosound","send_ctrlenter","notify_volume").then(function(i){t.notify.desktop=!i[0],t.send.enter=i[2]?"":"1",t.notify.volume=i[1]?0:i[3]!==!1?i[3]>0&&Math.ceil(10*i[3])||0:5,t.notify.volumeOf4=function(){return 1+Math.ceil((t.notify.volume-1)/3.3)},t.toggleSound=function(){t.notify.volume=t.notify.volume?0:5};var r;t.$watch("notify.volume",function(e,t){if(e!==t){var i=e/10;c.set({notify_volume:i}),c.remove("notify_nosound"),l.clear(),r&&n.cancel(r),r=n(function(){l.testSound(i)},500)}}),t.toggleDesktop=function(){t.notify.desktop=!t.notify.desktop,t.notify.desktop?c.remove("notify_nodesktop"):c.set({notify_nodesktop:!0})},t.toggleCtrlEnter=function(n){t.send.enter=n,t.send.enter?c.remove("send_ctrlenter"):c.set({send_ctrlenter:!0}),e.$broadcast("settings_changed")}}),t.openChangelog=function(){d.showChangelog(!1)}}]).controller("ProfileEditModalController",["$rootScope","$scope","$timeout","$modal","$modalInstance","AppUsersManager","AppChatsManager","MtpApiManager","Storage","NotificationsManager","MtpApiFileManager","ApiUpdatesManager",function(e,t,n,i,r,o,a,s){t.profile={},t.error={},s.getUserID().then(function(e){t.profile=o.getUser(e)}),t.updateProfile=function(){t.profile.updating=!0,s.invokeApi("account.updateProfile",{first_name:t.profile.first_name||"",last_name:t.profile.last_name||""}).then(function(e){t.error={},o.saveApiUser(e),r.close()},function(e){switch(e.type){case"FIRSTNAME_INVALID":t.error={field:"first_name"},e.handled=!0;break;case"LASTNAME_INVALID":t.error={field:"last_name"},e.handled=!0;break;case"NAME_NOT_MODIFIED":e.handled=!0,r.close()}})["finally"](function(){delete t.profile.updating})}}]).controller("ContactsModalController",["$scope","$modal","$modalInstance","AppUsersManager","ErrorService",function(e,t,n,i){function r(t){i.getContacts(t).then(function(t){e.contacts=[],e.slice.limit=20,angular.forEach(t,function(t){var n={userID:t,user:i.getUser(t),userPhoto:i.getUserPhoto(t,"User")};e.contacts.push(n)}),e.$broadcast("contacts_change")})}if(e.contacts=[],e.search={},e.slice={limit:20,limitDelta:20},e.selectedContacts={},e.disabledContacts={},e.selectedCount=0,e.disabled)for(var o=0;o<e.disabled.length;o++)e.disabledContacts[e.disabled[o]]=!0;if(e.selected)for(var o=0;o<e.selected.length;o++)e.selectedContacts[e.selected[o]]||(e.selectedContacts[e.selected[o]]=!0,e.selectedCount++);e.$watch("search.query",r),e.contactSelect=function(t){return e.disabledContacts[t]?!1:e.multiSelect?void(e.selectedContacts[t]?(delete e.selectedContacts[t],e.selectedCount--):(e.selectedContacts[t]=!0,e.selectedCount++)):n.close(t)},e.submitSelected=function(){if(e.selectedCount>0){var t=[];return angular.forEach(e.selectedContacts,function(e,n){t.push(n)}),n.close(t)}},e.importContact=function(){i.openImportContact().then(function(){r(e.search&&e.search.query||"")})}}]).controller("PeerSelectController",["$scope","$modalInstance","$q","AppPeersManager","ErrorService",function(e,t,n,i,r){e.dialogSelect=function(o){var a;if(e.confirm_type){var s=i.getPeerID(o),c=i.getPeer(s);a=r.confirm({type:e.confirm_type,peer_id:s,peer_data:c})}else a=n.when();a.then(function(){t.close(o)})}}]).controller("ChatCreateModalController",["$scope","$modalInstance","$rootScope","MtpApiManager","AppUsersManager","AppChatsManager","ApiUpdatesManager",function(e,t,n,i,r,o,a){e.group={name:""},e.createGroup=function(){if(e.group.name){e.group.creating=!0;var t=[];return angular.forEach(e.userIDs,function(e){t.push({_:"inputUserContact",user_id:e})}),i.invokeApi("messages.createChat",{title:e.group.name,users:t}).then(function(e){a.processUpdateMessage({_:"updates",seq:e.seq,users:e.users,chats:e.chats,updates:[{_:"updateNewMessage",message:e.message,pts:e.pts}]});var t=o.getChatString(e.message.to_id.chat_id);n.$broadcast("history_focus",{peerString:t})})["finally"](function(){delete e.group.creating})}}}]).controller("ChatEditModalController",["$scope","$modalInstance","$rootScope","MtpApiManager","AppUsersManager","AppChatsManager","ApiUpdatesManager",function(e,t,n,i,r,o,a){var s=o.getChat(e.chatID);e.group={name:s.title},e.updateGroup=function(){return e.group.name?e.group.name==s.title?t.close():(e.group.updating=!0,i.invokeApi("messages.editChatTitle",{chat_id:e.chatID,title:e.group.name}).then(function(t){a.processUpdateMessage({_:"updates",seq:t.seq,users:t.users,chats:t.chats,updates:[{_:"updateNewMessage",message:t.message,pts:t.pts}]});var i=o.getChatString(e.chatID);n.$broadcast("history_focus",{peerString:i})})["finally"](function(){delete e.group.updating})):void 0}}]).controller("ImportContactModalController",["$scope","$modalInstance","$rootScope","AppUsersManager","ErrorService","PhonebookContactsService",function(e,t,n,i,r,o){void 0===e.importContact&&(e.importContact={}),e.phonebookAvailable=o.isAvailable(),e.doImport=function(){e.importContact&&e.importContact.phone&&(e.progress={enabled:!0},i.importContact(e.importContact.phone,e.importContact.first_name||"",e.importContact.last_name||"").then(function(e){e||r.show({error:{code:404,type:"USER_NOT_USING_TELEGRAM"}}),t.close(e)})["finally"](function(){delete e.progress.enabled}))},e.importPhonebook=function(){o.openPhonebookImport().result.then(function(e){e?t.close(e[0]):t.dismiss()})}}]).controller("CountrySelectModalController",["$scope","$modalInstance","$rootScope","SearchIndexManager",function(e,t,n,i){e.search={},e.slice={limit:20,limitDelta:20};for(var r=i.createIndex(),o=0;o<Config.CountryCodes.length;o++)i.indexObject(o,Config.CountryCodes[o].join(" "),r);e.$watch("search.query",function(t){var n=!1,o={};angular.isString(t)&&t.length&&(n=!0,o=i.search(t,r)),e.countries=[],e.slice.limit=20;for(var a,s=0;s<Config.CountryCodes.length;s++)if(!n||o[s])for(a=1;a<Config.CountryCodes[s].length;a++)e.countries.push({name:Config.CountryCodes[s][0],code:Config.CountryCodes[s][a]})})}]).controller("PhonebookModalController",["$scope","$modalInstance","$rootScope","AppUsersManager","PhonebookContactsService","SearchIndexManager","ErrorService",function(e,t,n,i,r,o,a){function s(){var t=!1,n={};if(angular.isString(e.search.query)&&e.search.query.length){t=!0,n=o.search(e.search.query,c),e.contacts=[];for(var i=0;i<e.phonebook.length;i++)(!t||n[i])&&e.contacts.push(e.phonebook[i])}else e.contacts=e.phonebook;e.slice.limit=20}e.search={},e.phonebook=[],e.selectedContacts={},e.selectedCount=0,e.slice={limit:20,limitDelta:20},e.progress={enabled:!1},e.multiSelect=!0;var c=o.createIndex(),l=!1;r.getPhonebookContacts().then(function(t){for(var n=0;n<t.length;n++)o.indexObject(n,t[n].first_name+" "+t[n].last_name+" "+t[n].phones.join(" "),c);e.phonebook=t,e.toggleSelection(!0),l=!0,s()}),e.$watch("search.query",function(){l&&s()}),e.contactSelect=function(n){return e.multiSelect?void(e.selectedContacts[n]?(delete e.selectedContacts[n],e.selectedCount--):(e.selectedContacts[n]=!0,e.selectedCount++)):t.close(e.phonebook[n])},e.toggleSelection=function(t){if(!e.selectedCount||t){e.selectedCount=e.phonebook.length;for(var n=0;n<e.phonebook.length;n++)e.selectedContacts[n]=!0}else e.selectedCount=0,e.selectedContacts={}},e.submitSelected=function(){e.selectedCount<=0&&t.dismiss();var n=[];angular.forEach(e.selectedContacts,function(t,i){n.push(e.phonebook[i])}),a.confirm({type:"CONTACTS_IMPORT_PERFORM"}).then(function(){e.progress.enabled=!0,i.importContacts(n).then(function(e){e.length||a.show({error:{code:404,type:"USERS_NOT_USING_TELEGRAM"}}),t.close(e)})["finally"](function(){e.progress.enabled=!1})})}}]),angular.module("myApp.filters",[]).filter("userName",[function(){return function(e){return e&&(e.first_name||e.last_name)?e.first_name+" "+e.last_name:"DELETED"}}]).filter("userFirstName",[function(){return function(e){return e&&(e.first_name||e.last_name)?e.first_name||e.last_name:"DELETED"}}]).filter("userStatus",["$filter",function(e){return function(t){return t&&t.status&&"userStatusEmpty"!=t.status._?"userStatusOnline"==t.status._?"online":"last seen "+e("relativeTime")(t.status.was_online):"offline"}}]).filter("chatTitle",[function(){return function(e){return e&&e.title?e.title:"DELETED"}}]).filter("dateOrTime",["$filter",function(e){var t={};return function(n){if(t[n])return t[n];var i=1e3*n,r=Math.abs(tsNow()-i),o="HH:mm";return r>5184e5?o="shortDate":r>432e5&&(o="EEE"),t[n]=e("date")(i,o)}}]).filter("duration",[function(){return function(e){var t=e%60,n=Math.floor((e-t)/60);return 10>t&&(t="0"+t),n+":"+t}}]).filter("phoneNumber",[function(){return function(e){var t=" ";return e=(e||"").replace(/\D/g,""),"7"==e.charAt(0)&&11==e.length?"+"+e.charAt(0)+t+"("+e.substr(1,3)+")"+t+e.substr(4,3)+"-"+e.substr(7,2)+"-"+e.substr(9,2):"+"+e}}]).filter("formatSize",[function(){return function(e){return e?1024>e?e+" b":1048576>e?Math.round(e/1024*10)/10+" Kb":Math.round(e/1048576*100)/100+" Mb":"0"}}]).filter("formatSizeProgress",["$filter",function(e){return function(t){var n=e("formatSize")(t.done),i=n.split(" "),r=e("formatSize")(t.total),o=r.split(" ");return o[1]===i[1]?i[0]+" of "+o[0]+" "+(i[1]||""):n+" of "+r}}]).filter("nl2br",[function(){return function(e){return e.replace(/\n/g,"<br/>")}}]).filter("richText",["$filter",function(e){return function(t){return e("linky")(t,"_blank").replace(/\n|&#10;/g,"<br/>")}}]).filter("relativeTime",["$filter",function(e){return function(t){var n=1e3*t,i=Math.abs(tsNow()-n);return 6e4>i?"just now":3e6>i?Math.ceil(i/6e4)+" minutes ago":1e7>i?Math.ceil(i/36e5)+" hours ago":e("dateOrTime")(t)}}]),angular.module("myApp.templates",[]).run(["$templateCache",function(e){e.put("partials/changelog_modal.html",'<div class="changelog_modal_wrap" my-modal-position>\n\n <a class="modal-close-button" ng-click="$close()"><i></i></a>\n\n <div class="modal-body">\n\n <div class="changelog_card_wrap" ng-switch="lastVersion === false">\n <div ng-switch-when="true">\n <div class="changelog_card"></div>\n <h2 class="changelog_header">Recent updates in <strong>Telegram Web</strong></h2>\n </div>\n <div ng-switch-default>\n <div class="changelog_card"></div>\n <h2 class="changelog_header"><strong>Telegram Web</strong> has been updated!</h2>\n </div>\n </div>\n\n <div class="changelog_versions_wrap">\n\n <div class="modal_section changelog_version_wrap">\n <h3 class="modal_section_header changelog_version_title">\n <span class="pull-right">current version</span>\n Version 0.1.9\n </h3>\n <div class="modal_section_body changelog_version_changes">\n <ul class="list-unstyled changelog_version_changes_list">\n <li>Improvements of performance</li>\n <li>Bugfixes</li>\n </ul>\n </div>\n </div>\n\n <div class="modal_section changelog_version_wrap" ng-show="canShowVersion(\'0.1.8\')">\n <h3 class="modal_section_header changelog_version_title">\n Version 0.1.8\n </h3>\n <div class="modal_section_body changelog_version_changes">\n <ul class="list-unstyled changelog_version_changes_list">\n <li>Improved mobile layout</li>\n <li>Bugfixes</li>\n </ul>\n </div>\n </div>\n\n <div class="modal_section changelog_version_wrap" ng-show="canShowVersion(\'0.1.7\')">\n <h3 class="modal_section_header changelog_version_title">\n Version 0.1.7\n </h3>\n <div class="modal_section_body changelog_version_changes">\n <ul class="list-unstyled changelog_version_changes_list">\n <li>Improved mobile layout</li>\n <li>Added file cache for Firefox and Android</li>\n <li>New design for forwarded messages</li>\n <li>Hash-tags support</li>\n <li>Messaging bugfixes</li>\n </ul>\n </div>\n </div>\n\n <div class="modal_section changelog_version_wrap" ng-show="canShowVersion(\'0.1.6\')">\n <h3 class="modal_section_header changelog_version_title">\n Version 0.1.6\n </h3>\n <div class="modal_section_body changelog_version_changes">\n <ul class="list-unstyled changelog_version_changes_list">\n <li>Added search of messages</li>\n <li>Improved performance of chats with lots of unread messages</li>\n <li>Bugfixes</li>\n </ul>\n </div>\n </div>\n\n <div class="modal_section changelog_version_wrap" ng-show="canShowVersion(\'0.1.5\')">\n <h3 class="modal_section_header changelog_version_title">\n Version 0.1.5\n </h3>\n <div class="modal_section_body changelog_version_changes">\n <ul class="list-unstyled changelog_version_changes_list">\n <li>Added registration</li>\n <li>Improved experience for newly registered users</li>\n </ul>\n </div>\n </div>\n\n <div class="modal_section changelog_version_wrap" ng-show="canShowVersion(\'0.1.4\')">\n <h3 class="modal_section_header changelog_version_title">\n Version 0.1.4\n </h3>\n <div class="modal_section_body changelog_version_changes">\n <ul class="list-unstyled changelog_version_changes_list">\n <li>Browse userpic history (click on the photo in user info)</li>\n <li>New <a href="https://github.com/zhukov/webogram" target="_blank" title="Source code on GitHub">GitHub</a>, <a href="https://twitter.com/telegram_web" target="_blank" title="Follow us on Twitter!">Twitter</a> buttons in Settings</li>\n <li>Updated keyboard shortcuts:</li>\n <ul>\n <li><strong>Alt+Home</strong> - switch to first (most recent) conversation</li>\n <li>Removed <strong>Alt+1, 2, 3..</strong> shortcuts due to conflicts in different browsers</li>\n </ul>\n </ul>\n </div>\n </div>\n\n <div class="modal_section changelog_version_wrap" ng-show="canShowVersion(\'0.1.3\')">\n <h3 class="modal_section_header changelog_version_title">\n Version 0.1.3\n </h3>\n <div class="modal_section_body changelog_version_changes">\n <ul class="list-unstyled changelog_version_changes_list">\n <li>Added version history to welcome screen</li>\n <li>Added keyboard shortcuts:</li>\n <ul>\n <li><strong>Tab</strong> - set focus to message field</li>\n <li><strong>Esc</strong> or <strong>Shift+Tab</strong> - set focus to search field</li>\n <li><strong>Up/Down</strong> (while in search field) - move between conversations</li>\n <li><strong>Enter</strong> (while in search field) - open selected or first conversation</li>\n <li><strong>Alt+Up/Down</strong> - move to previous/next conversation</li>\n </ul>\n <li>Improved grouping for messages</li>\n <li>Fixed video modal positioning bug</li>\n <li>Fixed focusing issues on mobile</li>\n </ul>\n </div>\n </div>\n\n </div>\n\n </div>\n\n</div>'),e.put("partials/chat_create_modal.html",'<div class="contacts_modal_wrap" my-modal-position>\n\n <a class="modal-close-button" ng-click="$dismiss()"><i></i></a>\n\n <div class="modal-body">\n\n <form class="modal_simple_form" ng-submit="createGroup()">\n\n <h4>Create Group</h4>\n\n <div class="form-group">\n <input class="form-control input-sm" my-focused type="text" placeholder="Group name" ng-model="group.name"/>\n </div>\n\n </form>\n\n </div>\n\n <div class="modal-footer">\n <a class="btn btn-link" ng-click="$dismiss()">Cancel</a>\n <button class="btn btn-primary" ng-class="{disabled: group.creating}" ng-click="createGroup()" ng-bind="group.creating ? \'Creating...\' : \'Create Group\'" ng-disabled="group.creating"></button>\n </div>\n\n</div>'),e.put("partials/chat_edit_modal.html",'<div class="contacts_modal_wrap" my-modal-position>\n\n <a class="modal-close-button" ng-click="$dismiss()"><i></i></a>\n\n <div class="modal-body">\n\n <form class="modal_simple_form" ng-submit="updateGroup()">\n\n <h4>Edit Group</h4>\n\n <div class="form-group">\n <input class="form-control input-sm" my-focused type="text" placeholder="Group name" ng-model="group.name"/>\n </div>\n\n </form>\n\n </div>\n\n <div class="modal-footer">\n <a class="btn btn-link" ng-click="$dismiss()">Cancel</a>\n <button class="btn btn-primary" ng-class="{disabled: group.updating}" ng-click="updateGroup()" ng-bind="group.updating ? \'Saving...\' : \'Save\'" ng-disabled="group.updating"></button>\n </div>\n\n</div>'),e.put("partials/chat_modal.html",'<div class="chat_modal_wrap" my-modal-position>\n\n <a class="modal-close-button" ng-click="$close()"><i></i></a>\n\n <div class="modal-body">\n\n <div class="user_modal_photo_profile_wrap">\n\n <div class="user_modal_image_wrap pull-left">\n <img\n class="user_modal_image"\n my-load-thumb\n thumb="chatFull.thumb"\n />\n </div>\n\n <div class="chat_modal_info_wrap clearfix">\n <h4 class="chat_modal_header" ng-bind-html="chatFull.chat.rTitle"></h4>\n <p class="chat_modal_members_count" ng-if="chatFull.chat.participants_count > 0">\n <ng-pluralize count="chatFull.chat.participants_count"\n when="{\'0\': \'No members\', \'one\': \'1 member\', \'other\': \'{} members\'}">\n </ng-pluralize>\n </p>\n\n <div class="chat_modal_actions_wrap clearfix">\n\n <button ng-if="!chatFull.chat.left &amp;&amp; chatFull.participants.participants.length" class="btn btn-primary chat_modal_invite_btn" ng-click="inviteToGroup()">Add member</button>\n <button ng-if="chatFull.chat._ != \'chatForbidden\' &amp;&amp; chatFull.chat.left" class="btn btn-primary chat_modal_main_btn" ng-click="returnToGroup()">Return to group</button>\n <button ng-if="chatFull.chat._ == \'chatForbidden\'" class="btn btn-danger chat_modal_delete_btn" ng-click="flushHistory()">Delete chat</button>\n\n <span ng-if="chatFull.chat._ != \'chatForbidden\' &amp;&amp; !chatFull.chat.left &amp;&amp; !photo.updating" class="btn btn-primary chat_modal_main_btn" >\n <input my-file-upload type="file" multiple="false" class="im_attach_input" size="120" multiple="false" accept="image/x-png, image/png, image/gif, image/jpeg" />\n Update photo\n </span>\n <span ng-if="photo.updating" class="btn btn-primary chat_modal_main_btn disabled" disabled>\n Updating<span my-loading-dots></span>\n </span>\n\n\n <div class="dropdown chat_modal_other_btn" ng-if="chatFull.chat._ != \'chatForbidden\' &amp;&amp; !chatFull.chat.left">\n <button class="btn btn-link dropdown-toggle">More<i class="icon icon-caret"></i></button>\n <ul class="dropdown-menu">\n <li ng-if="chatFull.thumb.location">\n <a ng-click="deletePhoto()">Delete photo</a>\n </li>\n <li>\n <a ng-click="editTitle()">Edit group</a>\n </li>\n <li>\n <a ng-click="leaveGroup()">Leave group</a>\n </li>\n <li>\n <a ng-click="flushHistory()">Delete chat</a>\n </li>\n </ul>\n </div>\n\n </div>\n\n </div>\n </div>\n\n <div class="modal_section">\n <h3 class="modal_section_header">Settings</h3>\n <div class="modal_section_body">\n\n <div class="tg_form_group">\n <a class="tg_checkbox" ng-click="settings.notifications = !settings.notifications" ng-class="settings.notifications ? \'tg_checkbox_on\' : \'\'">\n <span class="icon icon-checkbox-outer"><i class="icon-checkbox-inner"></i></span>\n <span class="tg_checkbox_label">Notifications</span>\n </a>\n </div>\n </div>\n </div>\n\n <div class="modal_section">\n <h3 class="modal_section_header">Members</h3>\n <div class="modal_section_body">\n\n <div class="chat_modal_members_list">\n\n <div class="chat_modal_participant_wrap clearfix" ng-repeat="participant in chatFull.participants.participants | orderBy:\'-user.sortStatus\'">\n <a ng-if="participant.canKick" ng-click="kickFromGroup(participant.user_id)" class="chat_modal_participant_kick pull-right">Kick</a>\n <a ng-click="openUser(participant.user_id)" class="chat_modal_participant_photo pull-left">\n <img\n class="chat_modal_participant_photo"\n my-load-thumb\n thumb="participant.userPhoto"\n />\n <i class="icon status_online" ng-show="participant.user.status._ == \'userStatusOnline\'"></i>\n </a>\n <div class="chat_modal_participant_name">\n <a ng-click="openUser(participant.user.id)" ng-bind-html="participant.user.rFullName"></a>\n </div>\n <div class="chat_modal_participant_status">{{participant.user | userStatus}}</div>\n </div>\n\n </div>\n\n <div class="chat_modal_members_forbidden" ng-if="chatFull.chat._ == \'chatForbidden\' || chatFull.chat.left">\n Group members list is unavailable.\n </div>\n\n </div>\n </div>\n\n </div>\n\n</div>'),e.put("partials/confirm_modal.html",'<div class="confirm_modal_wrap" my-modal-position>\n\n <a class="modal-close-button" ng-click="$dismiss()"><i></i></a>\n\n <div class="modal-body">\n\n <div class="confirm_modal_description" ng-switch="type">\n <span ng-switch-when="LOGOUT">Are you sure you want to log out?</span>\n <span ng-switch-when="WEBOGRAM_UPDATED_RELOAD">A new version of Webogram has been downloaded. Launch it?</span>\n <span ng-switch-when="HISTORY_FLUSH">Are you sure? This can not be undone!</span>\n <span ng-switch-when="TERMINATE_SESSIONS">Are you sure you want to log out all devices except for the current one?</span>\n <span ng-switch-when="HTTPS_MIXED_FAIL">\n Your browser <a href="http://mzl.la/13jCUSU" target="_blank">does not support</a> mixed content which is neccessary for MTProto support on https. <a href="https://github.com/zhukov/webogram/issues/237" target="_blank">Learn more &raquo;</a><br/><br/>\n Would you like use http-version instead?\n </span>\n\n <span ng-switch-when="FILES_CLIPBOARD_PASTE">\n <ng-pluralize count="files.length"\n when="{\'one\': \'Are you sure to send file from clipboard?\', \'other\': \'Are you sure to send {} files from clipboard?\'}">\n </ng-pluralize>\n </span>\n <span ng-switch-when="FILE_CLIPBOARD_PASTE">Are you sure to send file(s) from clipboard?</span>\n <span ng-switch-when="MESSAGE_DELETE">Are you sure you want to delete the message?</span>\n <span ng-switch-when="CONTACTS_IMPORT_PERFORM">Telegram will now sync your contacts in order to find your friends.</span>\n <div ng-switch-when="LOGIN_PHONE_CORRECT">\n Is this phone number correct?\n <div class="confirm_phone_number"> <span ng-bind="country_code"></span> <span ng-bind="phone_number"></span> </div>\n </div>\n <span ng-switch-when="FORWARD_PEER">Forward to <strong ng-switch="peer_id > 0">\n <span ng-switch-when="true" ng-bind-html="peer_data.rFullName"></span>\n <span ng-switch-default ng-bind-html="peer_data.rTitle"></span>\n </strong>?</span>\n <span ng-switch-when="SHARE_CONTACT_PEER">Send to <strong ng-switch="peer_id > 0">\n <span ng-switch-when="true" ng-bind-html="peer_data.rFullName"></span>\n <span ng-switch-default ng-bind-html="peer_data.rTitle"></span>\n </strong>?</span>\n <span ng-switch-default ng-bind="message || \'Are you sure?\'"></span>\n </div>\n\n </div>\n\n <div class="modal-footer">\n <a class="btn btn-link" ng-click="$dismiss()" ng-switch="type">\n <span ng-switch-default>Cancel</span>\n </a>\n <button type="button" class="btn btn-primary" ng-switch="type" ng-click="$close()" my-focused>\n <span ng-switch-when="LOGOUT">Log Out</span>\n <span ng-switch-when="HISTORY_FLUSH">Delete Chat</span>\n <span ng-switch-when="FILES_CLIPBOARD_PASTE">Send</span>\n <span ng-switch-when="FILE_CLIPBOARD_PASTE">Send</span>\n <span ng-switch-when="MESSAGE_DELETE">Delete</span>\n <span ng-switch-when="FORWARD_PEER">Forward message</span>\n <span ng-switch-when="PHOTO_SHARE_PEER">Forward photo</span>\n <span ng-switch-when="VIDEO_SHARE_PEER">Forward video</span>\n <span ng-switch-when="SHARE_CONTACT_PEER">Send contact</span>\n <span ng-switch-default>OK</span>\n </button>\n </div>\n\n</div>'),e.put("partials/contacts_modal.html",'<div class="contacts_modal_wrap" my-modal-position>\n\n <a class="modal-close-button visible-xs" ng-click="$dismiss()"><i></i></a>\n\n <div class="modal-body">\n\n <h4 class="modal_simple_header visible-xs">Contacts</h4>\n\n <div class="contacts_modal_search">\n <input class="form-control contacts_modal_search_field" my-focused type="search" placeholder="Search" ng-model="search.query"/>\n <a class="contacts_modal_search_clear" ng-click="search.query = \'\'" ng-show="search.query.length"></a>\n </div>\n\n\n <div my-contacts-list class="contacts_modal_col">\n\n <div class="contacts_wrap nano" my-infinite-scroller>\n <div class="contacts_scrollable_wrap nano-content">\n\n <ul class="contacts_modal_members_list nav nav-pills nav-stacked">\n\n <li class="contacts_modal_contact_wrap clearfix" ng-repeat="contact in contacts | orderBy:\'user.sortName\' | limitTo: slice.limit track by contact.userID" ng-class="{active: selectedContacts[contact.userID], disabled: disabledContacts[contact.userID]}">\n <a class="contacts_modal_contact" ng-click="contactSelect(contact.userID)">\n\n <i ng-if="multiSelect" class="icon icon-contact-tick"></i>\n\n <div class="contacts_modal_contact_photo pull-left">\n <img\n class="contacts_modal_contact_photo"\n my-load-thumb\n thumb="contact.userPhoto"\n />\n <i class="icon status_online" ng-show="contact.user.status._ == \'userStatusOnline\'"></i>\n </div>\n\n <div class="contacts_modal_contact_name" ng-bind-html="contact.user.rFullName"></div>\n <div class="contacts_modal_contact_status">{{contact.user | userStatus}}</div>\n\n </a>\n </li>\n\n </ul>\n\n </div>\n </div>\n\n </div>\n\n </div>\n\n <div class="modal-footer contacts_modal_panel" ng-switch="multiSelect">\n <button ng-switch-when="true" class="btn btn-success btn-block" ng-class="{disabled: !selectedCount}" ng-disabled="!selectedCount" ng-click="submitSelected()" type="submit">\n Next »\n </button>\n <div ng-switch-default>\n <a class="btn btn-link pull-left" ng-click="importContact()">Add contact</a>\n <button type="button" class="btn btn-primary" ng-click="$dismiss()">Done</button>\n </div>\n </div>\n\n</div>'),e.put("partials/country_select_modal.html",'<div class="countries_modal_wrap" my-modal-position>\n\n <div class="modal-body">\n\n <h4 class="modal_simple_header">Country</h4>\n\n <div class="countries_modal_search">\n <input class="form-control countries_modal_search_field" my-focused type="search" placeholder="Search" ng-model="search.query"/>\n <a class="countries_modal_search_clear" ng-click="search.query = \'\'" ng-show="search.query.length"></a>\n </div>\n\n <div class="countries_modal_col" my-countries-list>\n\n <div class="countries_wrap nano" my-infinite-scroller>\n <div class="countries_scrollable_wrap nano-content">\n\n <ul class="countries_modal_members_list nav nav-pills nav-stacked">\n\n <li class="countries_modal_country_wrap clearfix" ng-repeat="country in countries | limitTo : slice.limit track by $index">\n <a class="countries_modal_country" ng-click="$close(country.code)">\n <span class="countries_modal_country_code pull-right" ng-bind="country.code"></span>\n <span class="countries_modal_country_name" ng-bind="country.name"></span>\n </a>\n </li>\n\n </ul>\n\n </div>\n </div>\n\n </div>\n\n </div>\n\n <div class="modal-footer">\n <a class="btn btn-link" ng-click="$dismiss()">Cancel</a>\n <button type="button" class="btn btn-primary" ng-click="$dismiss()">Done</button>\n </div>\n\n</div>'),e.put("partials/dialog.html",'<a class="im_dialog" ng-click="dialogSelect(dialogMessage.peerString, search.messages &amp;&amp; dialogMessage.id)">\n\n <div class="im_dialog_meta pull-right text-right">\n <div class="im_dialog_date" ng-bind="dialogMessage.dateText"></div>\n <span\n class="im_dialog_badge badge"\n ng-show="dialogMessage.unreadCount > 0 &amp;&amp; !dialogMessage.out"\n ng-bind="dialogMessage.unreadCount"\n ></span>\n <i\n class="im_dialog_unread"\n ng-show="dialogMessage.out &amp;&amp; dialogMessage.unread"\n ></i>\n </div>\n\n <div class="im_dialog_photo pull-left">\n <img\n class="im_dialog_photo"\n my-load-thumb\n thumb="dialogMessage.peerPhoto"\n />\n </div>\n\n <div class="im_dialog_message_wrap">\n\n <div class="im_dialog_peer" ng-switch="dialogMessage.peerID > 0">\n <span class="im_dialog_user" ng-switch-when="true" ng-bind-html="dialogMessage.peerData.rFullName"></span>\n <span class="im_dialog_chat" ng-switch-default>\n <span ng-bind-html="dialogMessage.peerData.rTitle"></span>\n </span>\n </div>\n\n <div class="im_dialog_message">\n <span class="im_dialog_chat_from_wrap">\n <span\n class="im_dialog_chat_from"\n ng-if="!dialogMessage.out &amp;&amp; dialogMessage.chatID"\n ng-bind-html="dialogMessage.fromUser.rFirstName"\n ></span><span\n class="im_dialog_chat_from"\n ng-if="dialogMessage.out"\n >You</span>{{((dialogMessage.out || dialogMessage.peerID &lt; 0) &amp;&amp; (dialogMessage.message.length || dialogMessage.media &amp;&amp; dialogMessage.media._ != \'messageMediaEmpty\')) ? \':\' : \'\'}}\n </span>\n\n <span class="im_dialog_message_media" ng-if="dialogMessage.media &amp;&amp; dialogMessage.media._ != \'messageMediaEmpty\'" ng-switch="dialogMessage.media._">\n <span ng-switch-when="messageMediaPhoto">Photo</span>\n <span ng-switch-when="messageMediaVideo">Video</span>\n <span ng-switch-when="messageMediaDocument">Document</span>\n <span ng-switch-when="messageMediaAudio">Audio</span>\n <span ng-switch-when="messageMediaGeo">Location</span>\n <span ng-switch-when="messageMediaContact">Contact</span>\n </span>\n\n <span class="im_dialog_message_service" ng-if="dialogMessage._ == \'messageService\'" ng-switch="dialogMessage.action._">\n <span ng-switch-when="messageActionChatCreate">created the group</span>\n <span ng-switch-when="messageActionChatEditTitle">changed group name</span>\n <span ng-switch-when="messageActionChatEditPhoto">changed group photo</span>\n <span ng-switch-when="messageActionChatDeletePhoto">removed group photo</span>\n\n <span ng-switch-when="messageActionChatAddUser" ng-switch="dialogMessage.from_id == dialogMessage.action.user_id">\n <span ng-switch-when="true">\n returned to group\n </span>\n <span ng-switch-default>\n invited <span ng-bind-html="dialogMessage.action.user.rFullName"></span>\n </span>\n </span>\n\n <span ng-switch-when="messageActionChatDeleteUser" ng-switch="dialogMessage.from_id == dialogMessage.action.user_id">\n <span ng-switch-when="true">\n left group\n </span>\n <span ng-switch-default>\n kicked <span ng-bind-html="dialogMessage.action.user.rFullName"></span>\n </span>\n </span>\n </span>\n\n <span class="im_dialog_message_text" ng-if="dialogMessage.message.length" ng-bind-html="dialogMessage.richMessage"></span>\n </div>\n\n </div>\n</a>\n'),e.put("partials/edit_contact_modal.html",'<div class="import_modal_wrap" my-modal-position>\n\n <a class="modal-close-button" ng-click="$dismiss()"><i></i></a>\n\n <div class="modal-body">\n\n <form class="modal_simple_form" ng-submit="doImport()">\n\n <h4>Edit contact</h4>\n\n <div class="form-group">\n <span class="form-control uneditable-input disabled" disabled ng-bind="importContact.phone | phoneNumber"></span>\n </div>\n <div class="form-group">\n <input class="form-control input-sm" my-focused type="text" placeholder="First name" ng-model="importContact.first_name"/>\n </div>\n <div class="form-group">\n <input class="form-control input-sm" type="text" placeholder="Last name" ng-model="importContact.last_name"/>\n </div>\n\n </form>\n\n </div>\n\n <div class="modal-footer">\n <a class="btn btn-link" ng-click="$dismiss()">Cancel</a>\n <button class="btn btn-primary" ng-class="{disabled: progress.enabled}" ng-click="doImport()" ng-bind="progress.enabled ? \'Saving...\' : \'Save\'" ng-disabled="progress.enabled"></button>\n </div>\n\n</div>'),e.put("partials/error_modal.html",'<div class="error_modal_wrap" my-modal-position>\n\n <a class="modal-close-button" ng-click="$close()"><i></i></a>\n\n <div class="modal-body">\n\n <h4 ng-if="error" class="modal_simple_header" ng-switch="error.type">\n <span ng-switch-when="ACCOUNT_REQUIRED">No account</span>\n <span ng-switch-default ng-switch="error.code">\n <span ng-switch-when="400">Error</span>\n <span ng-switch-when="401">Unauthorized</span>\n <span ng-switch-when="403">Access denied</span>\n <span ng-switch-when="404">Not found</span>\n <span ng-switch-when="406">Network error</span>\n <span ng-switch-when="420">Too fast</span>\n <span ng-switch-default>Server error</span>\n </span>\n </h4>\n <h4 ng-if="!error" class="modal_simple_header" ng-bind="title || \'Alert\'"></h4>\n\n <div ng-if="error" class="error_modal_description" ng-switch="error.type">\n <span ng-switch-when="NETWORK_BAD_REQUEST">\n Please check your internet connection.\n </span>\n <span ng-switch-when="NETWORK_BAD_RESPONSE">\n Please check your internet connection.\n </span>\n <span ng-switch-when="FIRSTNAME_INVALID">\n The first name you entered is invalid.\n </span>\n <span ng-switch-when="LASTNAME_INVALID">\n The last name you entered is invalid.\n </span>\n <span ng-switch-when="PHONE_NUMBER_INVALID">\n The phone number you entered is invalid.\n </span>\n <span ng-switch-when="USERS_TOO_MUCH">\n You have selected too much users.\n </span>\n <span ng-switch-when="PHOTO_INVALID_DIMENSIONS">\n The photo dimensions are invalid, please select another file.\n </span>\n <span ng-switch-when="PHOTO_CROP_SIZE_SMALL">\n The photo you provided is too small.\n </span>\n <span ng-switch-when="ACCOUNT_REQUIRED">\n Sorry, there is no <strong>Telegram</strong> account for {{phone | phoneNumber}}<br/><br/>\n Please <strong>sign up</strong> using our mobile apps for <a href="https://telegram.org/" target="_blank">iOS</a> or <a href="https://telegram.org/" target="_blank">Android</a>.\n </span>\n <span ng-switch-when="USER_NOT_USING_TELEGRAM">\n Sorry, there is no <strong>Telegram</strong> account with the phone number you provided.\n </span>\n <span ng-switch-when="USERS_NOT_USING_TELEGRAM">\n Sorry, there are no <strong>Telegram</strong> accounts with the phone numbers you provided.\n </span>\n\n\n <div ng-switch-default ng-switch="error.code">\n <span ng-switch-when="400">One of the params is missing or invalid.</span>\n <span ng-switch-when="401">This action requires authorization access. Please <a href="#/login">log in</a>.</span>\n <span ng-switch-when="403">You are not allowed for this action.</span>\n <span ng-switch-when="404">The page was not found.</span>\n <span ng-switch-when="420">You are performing too many actions. Please try again later.</span>\n <span ng-switch-default>Internal server error occured. Please try again later.</span>\n </div>\n\n </div>\n\n <div ng-if="error" class="error_modal_details" ng-switch="error.detailsShown">\n <textarea ng-switch-when="true" rows="3" onclick="this.select()">Method: {{error.input || \'N/A\'}}\nResult: {{error.originalError ? error.originalError : (error.stack ? (error.name || \'\') + \' \' + (error.description || error.message) : error)}}\nStack: {{error.stack}}</textarea>\n <div ng-switch-default>\n <a href="" ng-click="error.detailsShown = true">Technical details here</a>\n </div>\n </div>\n\n <div ng-if="!error" class="error_modal_description" ng-bind="description"></div>\n\n </div>\n\n</div>'),e.put("partials/full_gif.html",'<a class="img_gif_with_progress_wrap" ng-click="toggle()">\n\n <div class="img_gif_image_wrap" ng-switch="document.url &amp;&amp; isActive">\n\n <img ng-switch-when="true" class="img_gif_image" ng-src="{{document.url}}" />\n <img ng-switch-default class="img_gif_thumb" my-load-thumb thumb="document.thumb" />\n\n </div>\n\n <div ng-show="!isActive" ng-switch="document.progress.enabled">\n\n <div ng-switch-when="true" class="img_gif_progress_wrap">\n <div class="img_gif_progress progress tg_progress">\n <div class="progress-bar progress-bar-success" ng-style="{width: document.progress.percent + \'%\'}"></div>\n </div>\n </div>\n\n <div ng-switch-default class="img_gif_info_wrap">\n <div class="img_gif_label pull-left">GIF</div>\n <div ng-if="!document.url" class="img_gif_size pull-right" bo-bind="document.size | formatSize"></div>\n </div>\n\n </div>\n\n</a>'),e.put("partials/full_photo.html",'<div class="img_fullsize_with_progress_wrap">\n <div class="img_fullsize_progress_overlay" ng-show="progress.enabled">\n <div class="img_fullsize_progress_wrap">\n <div class="img_fullsize_progress progress tg_progress" ng-show="progress.percent > 0">\n <div class="progress-bar progress-bar-success" ng-style="{width: progress.percent + \'%\'}">\n </div>\n </div>\n </div>\n </div>\n <div class="photo_full_wrap">\n <a class="photo_modal_image">\n <img class="photo_modal_image"/>\n </a>\n </div>\n <div class="photo_modal_error_wrap" ng-if="error">\n <div class="photo_modal_error" ng-if="error.html" ng-bind-html="error.html"></div>\n <div class="photo_modal_error" ng-if="error.text" ng-bind="error.text"></div>\n </div>\n</div>'),e.put("partials/full_video.html",'<div class="img_fullsize_with_progress_wrap" ng-style="{width: video.full.width + \'px\', height: video.full.height + \'px\'}">\n <div class="img_fullsize_progress_overlay" ng-show="progress.enabled">\n <div class="img_fullsize_progress_wrap" ng-style="{width: video.full.width + \'px\', height: video.full.height + \'px\'}">\n <div class="img_fullsize_progress progress tg_progress">\n <div class="progress-bar progress-bar-success" style="width: {{progress.percent}}%"></div>\n </div>\n </div>\n </div>\n <div class="img_fullsize_wrap" ng-if="!player.src">\n <img\n class="img_fullsize"\n my-load-thumb\n thumb="video.fullThumb"\n />\n </div>\n <div class="video_full_player" ng-if="player.src">\n <embed ng-src="{{player.src}}" width="{{video.full.width}}" height="{{video.full.height}}" autoplay="true" CONTROLLER="TRUE" SHOWCONTROLS="TRUE" controller="true" loop="false" pluginspace="http://www.apple.com/quicktime/" ng-if="player.quicktime"/>\n <video width="{{video.full.width}}" height="{{video.full.height}}" controls autoplay ng-if="!player.quicktime">\n <source ng-src="{{player.src}}" type="video/mp4">\n </video>\n </div>\n <div class="video_full_error_wrap" ng-if="error">\n <div class="video_full_error" ng-if="error.html" ng-bind-html="error.html"></div>\n <div class="video_full_error" ng-if="error.text" ng-bind="error.text"></div>\n </div>\n</div>'),e.put("partials/head.html",'<div class="tg_page_head">\n <div class="navbar navbar-static-top navbar-inverse" role="navigation" ng-class="{navbar_peer_not_selected: !curDialog.peer, navbar_offline: offline}">\n <div class="container">\n\n <a class="navbar-peer-wrap" ng-click="showPeerInfo()">\n <img\n my-load-thumb\n thumb="historyPeer.photo"\n />\n </a>\n\n <div class="navbar-toggle-wrap dropdown">\n <a class="dropdown-toggle navbar-toggle">\n <span class="icon-bar"></span>\n <span class="icon-bar"></span>\n <span class="icon-bar"></span>\n </a>\n <ul ng-if="!curDialog.peer &amp;&amp; isLoggedIn" class="dropdown-menu">\n <li><a ng-click="openGroup()">New Group</a></li>\n <li><a ng-click="importContact()">New Contact</a></li>\n <li><a ng-click="openContacts()">Contacts</a></li>\n <li><a ng-click="openSettings()">Settings</a></li>\n <li><a ng-click="logOut()">Log Out</a></li>\n </ul>\n <ul ng-if="curDialog.peer &amp;&amp; isLoggedIn" class="dropdown-menu">\n <li><a ng-click="showPeerInfo()" ng-switch="historyPeer.id > 0">\n <span ng-switch-when="true">Profile</span>\n <span ng-switch-default>Group info</span>\n </a></li>\n <li><a ng-click="toggleEdit()">Edit chat</a></li>\n <li ng-if="!historyFilter.mediaType" class="divider"></li>\n <li ng-if="!historyFilter.mediaType" class="dropdown-header">Media</li>\n <li ng-if="!historyFilter.mediaType"><a ng-click="toggleMedia(\'photos\')">Photos</a></li>\n <li ng-if="!historyFilter.mediaType"><a ng-click="toggleMedia(\'video\')">Videos</a></li>\n <li ng-if="!historyFilter.mediaType"><a ng-click="toggleMedia(\'documents\')">Documents</a></li>\n <li ng-if="!historyFilter.mediaType"><a ng-click="toggleMedia(\'audio\')">Voice messages</a></li>\n </ul>\n <ul ng-if="!isLoggedIn" class="dropdown-menu">\n <li><a href="https://github.com/zhukov/webogram" target="_blank">About</a></li>\n </ul>\n </div>\n\n <a ng-if="isLoggedIn" class="navbar-search-wrap" ng-click="toggleSearch()">\n <i class="icon-search"></i>\n </a>\n\n <div class="im_head_attach">\n <input type="file" class="im_media_attach_input" size="28" multiple="true" accept="image/*, video/*, audio/*" title="Send media"/>\n <i class="icon icon-paperclip"></i>\n </div>\n\n <div class="navbar-header">\n\n <a class="navbar-brand" href="{{isLoggedIn ? \'#/im\' : \'#/\'}}"><span class="tg_head_logo"></span><span class="tg_head_logo_text"></span></a>\n <div ng-show="curDialog.peer" ng-switch="curDialog.peer &amp;&amp; historyFilter.mediaType.length > 0">\n <ul ng-switch-when="true" class="nav navbar-nav navbar-quick-nav">\n <li>\n <a ng-click="toggleMedia()" class="navbar-quick-media-back" ng-switch="historyFilter.mediaType">\n <i class="icon icon-back"></i>\n <h4 ng-switch-when="photos">Photos</h4>\n <h4 ng-switch-when="video">Videos</h4>\n <h4 ng-switch-when="documents">Documents</h4>\n <h4 ng-switch-when="audio">Voice messages</h4>\n </a>\n </li>\n </ul>\n <ul ng-switch-default class="nav navbar-nav navbar-quick-nav" ng-switch="historyPeer.id > 0">\n <li ng-switch-when="true">\n <a href="#/im" class="navbar-quick-profile-back">\n <i class="icon icon-back"></i>\n <h4 ng-bind-html="historyPeer.data.rFullName"></h4>\n <small ng-bind="historyPeer.data | userStatus"></small>\n </a>\n </li>\n <li ng-switch-default>\n <a href="#/im" class="navbar-quick-group-back">\n <i class="icon icon-back"></i>\n <h4 ng-bind-html="historyPeer.data.rTitle"></h4>\n <small>\n <ng-pluralize count="historyPeer.data.participants_count"\n when="{\'0\': \'No members\', \'one\': \'1 member\', \'other\': \'{} members\'}">\n </ng-pluralize>\n </small>\n </a>\n </li>\n </ul>\n </div>\n </div>\n\n <div class="navbar-menu" ng-switch="offline">\n\n <ul ng-switch-when="true" class="nav navbar-nav navbar-offline">\n <li ng-show="!offlineConnecting"><span class="navbar-offline-text">Waiting for network<span my-loading-dots></span></span></li>\n <li ng-show="!offlineConnecting"><a href="" ng-click="retryOnline()">Retry</a></li>\n <li ng-show="offlineConnecting"><span class="navbar-offline-text">Connecting<span my-loading-dots></span></span></li>\n </ul>\n\n <ul ng-switch-default class="nav navbar-nav navbar-right">\n <li ng-if="isLoggedIn &amp;&amp; !isEmpty.contacts"><a href="" ng-click="openContacts()">Contacts</a></li>\n <li ng-if="isLoggedIn"><a href="" ng-click="openSettings()">Settings</a></li>\n <li ng-if="isLoggedIn"><a href="" ng-click="logOut()">Log Out</a></li>\n <li ng-if="!isLoggedIn"><a href="https://github.com/zhukov/webogram" target="_blank">About</a></li>\n </ul>\n\n </div>\n\n </div>\n </div>\n</div>\n'),e.put("partials/im.html",'<div my-head></div>\n\n<div class="im_page_wrap" ng-class="{im_page_peer_not_selected: !curDialog.peer}">\n\n <div class="im_page_split clearfix">\n\n <div class="im_dialogs_col_wrap" ng-controller="AppImDialogsController" my-dialogs has-tabs="{{search.query.length > 0}}">\n <div class="im_dialogs_panel">\n <div class="dropdown im_dialogs_panel_dropdown pull-right">\n <a class="dropdown-toggle">\n <span class="icon-bar"></span>\n <span class="icon-bar"></span>\n <span class="icon-bar"></span>\n </a>\n <ul class="dropdown-menu">\n <li><a ng-click="openGroup()">New Group</a></li>\n <li><a ng-click="importContact()">New Contact</a></li>\n <li><a ng-click="openContacts()">Contacts</a></li>\n <li><a ng-click="openSettings()">Settings</a></li>\n </ul>\n </div>\n <div class="im_dialogs_search">\n <input class="form-control im_dialogs_search_field" type="search" placeholder="Search" ng-model="search.query"/>\n <a class="im_dialogs_search_clear" ng-click="searchClear()" ng-show="search.query.length"></a>\n </div>\n\n <div class="im_dialogs_tabs_wrap">\n <div class="im_dialogs_tabs clearfix">\n <a href="" class="im_dialogs_tab" ng-class="{active: !search.messages}" ng-click="search.messages = false">Conversations</a>\n <a href="" class="im_dialogs_tab" ng-class="{active: search.messages}" ng-click="search.messages = true">Messages</a>\n </div>\n </div>\n </div>\n\n <div my-dialogs-list class="im_dialogs_col">\n <div class="im_dialogs_wrap nano">\n <div class="im_dialogs_scrollable_wrap nano-content">\n\n <div class="im_dialogs_empty_wrap" ng-if="isEmpty.contacts">\n <h3 class="im_dialogs_empty_header">No contacts yet</h3>\n <p class="im_dialogs_empty_lead">Get started by adding a contact to chat with</p>\n <button type="button" class="btn btn-primary btn-sm" ng-click="importContact()">Add contact</button>\n <button ng-if="phonebookAvailable" type="button" class="btn btn-primary btn-sm im_dialogs_import_phonebook" ng-click="importPhonebook()">Import phonebook</button>\n </div>\n\n <div ng-switch="search.messages">\n <ul ng-switch-when="true" class="nav nav-pills nav-stacked">\n <li class="im_dialog_wrap" my-dialog dialog-message="dialogMessage" ng-repeat="dialogMessage in dialogs track by dialogMessage.id" ng-class="{active: curDialog.peerID == dialogMessage.peerID &amp;&amp; curDialog.messageID == dialogMessage.id}"></li>\n </ul>\n <ul ng-switch-default class="nav nav-pills nav-stacked">\n <li class="im_dialog_wrap" my-dialog dialog-message="dialogMessage" ng-repeat="dialogMessage in dialogs track by dialogMessage.peerID" ng-class="{active: curDialog.peerID == dialogMessage.peerID}"></li>\n </ul>\n </div>\n\n <div class="im_dialogs_contacts_wrap" ng-show="contacts.length > 0">\n <h5>Contacts</h5>\n <ul class="nav nav-pills nav-stacked">\n <li class="im_dialog_wrap" ng-repeat="contact in contacts | orderBy:\'user.sortName\' track by contact.userID" ng-class="{active: curDialog.peerID == contact.userID}">\n <a class="im_dialog" ng-click="dialogSelect(contact.peerString)">\n <div class="im_dialog_photo pull-left">\n <img\n class="im_dialog_photo"\n my-load-thumb\n thumb="contact.userPhoto"\n />\n </div>\n <div class="im_dialog_message_wrap">\n <div class="im_dialog_peer">\n <span class="im_dialog_user" ng-bind-html="contact.user.rFullName"></span>\n </div>\n <div class="im_dialog_message">\n <span class="im_dialog_message_text" ng-bind="contact.user | userStatus"></span>\n </div>\n </div>\n </a>\n </li>\n </ul>\n </div>\n\n </div>\n </div>\n </div>\n </div>\n\n <div class="im_history_col_wrap" ng-controller="AppImHistoryController">\n <div ng-show="state.notSelected" ng-switch="isEmpty.contacts &amp;&amp; isEmpty.dialogs">\n <div ng-switch-when="true" class="im_history_no_dialogs_wrap">\n <h3 class="im_dialogs_empty_header">Get started</h3>\n <p class="im_dialogs_empty_lead">Welcome to Telegram Web. You can always set your profile photo and change your name in Settings.</p>\n <button type="button" class="btn btn-primary btn-sm" ng-click="openSettings()">Open Settings</button>\n </div>\n <div ng-switch-default class="im_history_not_selected" my-vertical-position="0.35" padding="true">\n Please select a chat to start messaging\n </div>\n </div>\n <div ng-show="!state.notSelected &amp;&amp; !state.loaded" class="im_history_not_selected" my-vertical-position="0.35" padding="true">\n Loading history<span my-loading-dots></span>\n </div>\n\n <div ng-show="state.loaded">\n <div my-history class="im_history_col">\n\n <div class="im_history_panel_wrap">\n\n <div class="im_history_panel clearfix" ng-controller="AppImPanelController">\n <div class="im_history_panel_title">\n\n <a class="im_history_panel_info_link pull-right" ng-click="showPeerInfo()">Info</a>\n <a class="im_history_panel_edit_link pull-right" ng-click="toggleEdit()">Edit</a>\n\n <div class="dropdown im_history_panel_media_dropdown pull-right">\n <a class="dropdown-toggle">Media<i class="icon icon-caret"></i></a>\n <ul class="dropdown-menu">\n <li><a ng-click="toggleMedia(\'photos\')">Photos</a></li>\n <li><a ng-click="toggleMedia(\'video\')">Videos</a></li>\n <li><a ng-click="toggleMedia(\'documents\')">Documents</a></li>\n <li><a ng-click="toggleMedia(\'audio\')">Voice messages</a></li>\n </ul>\n </div>\n <a ng-show="historyFilter.mediaType.length || skippedHistory" class="im_history_panel_return_link pull-right" ng-click="returnToRecent()" ng-switch="skippedHistory">\n <span ng-switch-when="true">Show recent messages</span>\n <span ng-switch-default>Show all messages</span>\n <strong class="im_history_panel_return_count" ng-show="missedCount > 0" ng-bind="\'+\' + missedCount"></strong>\n </a>\n\n <div ng-switch="historyFilter.mediaType">\n <h4 ng-switch-when="photos">Photos</h4>\n <h4 ng-switch-when="video">Videos</h4>\n <h4 ng-switch-when="documents">Documents</h4>\n <h4 ng-switch-when="audio">Voice messages</h4>\n\n <h4 ng-switch-default ng-switch="historyPeer.id > 0" ng-click="showPeerInfo()">\n <div ng-switch-when="true">\n <span ng-bind-html="historyPeer.data.rFullName"></span>\n <small class="im_peer_online" ng-bind="historyPeer.data | userStatus"></small>\n </div>\n <div ng-switch-default>\n <span ng-bind-html="historyPeer.data.rTitle"></span>\n <small class="im_chat_users">\n <ng-pluralize count="historyPeer.data.participants_count"\n when="{\'0\': \'No members\', \'one\': \'1 member\', \'other\': \'{} members\'}">\n </ng-pluralize>\n </small>\n </div>\n </h4>\n </div>\n\n </div>\n\n </div>\n\n </div>\n\n <div class="im_history_wrap nano">\n\n <div class="im_history_scrollable_wrap nano-content">\n\n <div class="im_history_scrollable">\n <div class="im_history" ng-class="{im_history_selectable: selectActions}">\n <div ng-if="!history.length" class="im_history_empty" ng-switch="state.mayBeHasMore" my-vertical-position="0.25" padding="true">\n <span ng-switch-when="true">Loading history<span my-loading-dots></span></span>\n <span ng-switch-default>No messages here yet...</span>\n </div>\n\n <div class="im_history_messages">\n <div class="im_history_message_wrap" my-message bindonce ng-repeat="historyMessage in history"></div>\n </div>\n </div>\n\n <div class="im_history_typing_wrap">\n <div class="im_history_typing" ng-show="typing.user &amp;&amp; !historyFilter.mediaType">\n <strong class="im_history_typing_author" ng-bind-html="typing.user.rFullName"></strong> is typing<span my-loading-dots></span>\n </div>\n </div>\n\n </div>\n\n </div>\n\n </div>\n\n <div class="im_bottom_panel_wrap">\n\n <div class="im_edit_panel_wrap clearfix" ng-show="selectActions">\n <div class="im_edit_panel_border"></div>\n <a class="im_edit_flush_link" ng-click="selectedFlush()" ng-switch="historyPeer.id > 0">\n <span ng-switch-when="true">Delete Chat</span>\n <span ng-switch-default>Clear History</span>\n </a>\n <a class="im_edit_cancel_link" ng-click="selectedCancel()">Cancel</a>\n <div class="im_edit_selected_actions">\n <a class="btn btn-primary im_edit_forward_btn" ng-click="selectedForward()">\n Forward <strong class="im_selected_count" ng-show="selectedCount > 0" ng-bind="selectedCount"></strong>\n </a><a class="btn btn-danger im_edit_delete_btn" ng-click="selectedDelete()">\n Delete <strong class="im_selected_count" ng-show="selectedCount > 0" ng-bind="selectedCount"></strong>\n </a>\n </div>\n </div>\n\n <div class="im_send_panel_wrap" ng-hide="selectActions">\n\n <div class="im_send_form_wrap1">\n\n <div class="im_send_form_wrap clearfix" ng-controller="AppImSendController">\n <div class="pull-right im_panel_peer_photo" ng-click="showPeerInfo()">\n <img\n class="im_panel_peer_photo"\n my-load-thumb\n thumb="historyPeer.photo"\n />\n <i class="icon im_panel_peer_online" ng-show="historyPeer.id > 0 &amp;&amp; historyPeer.data.status._ == \'userStatusOnline\'"></i>\n </div>\n <div class="pull-left im_panel_own_photo">\n <img\n class="im_panel_own_photo"\n my-load-thumb\n thumb="ownPhoto"\n />\n </div>\n <form my-send-form draft-message="draftMessage" class="im_send_form" ng-submit="sendMessage($event)">\n\n <div class="im_send_field_wrap">\n <div class="im_send_dropbox_wrap"> Drop photos here to send </div>\n <textarea ng-model="draftMessage.text" placeholder="Write a message..." class="form-control im_message_field"></textarea>\n </div>\n\n <div class="im_media_attach pull-right">\n <input type="file" class="im_media_attach_input" size="28" multiple="true" accept="image/*, video/*, audio/*" title="Send media"/>\n <i class="icon icon-camera"></i>\n </div>\n\n <div class="im_attach pull-right">\n <input type="file" class="im_attach_input" size="28" multiple="true" title="Send file" />\n <i class="icon icon-paperclip"></i>\n </div>\n\n <div class="im_emoji_btn pull-right" title="Insert emoticon">\n <i class="icon icon-emoji"></i>\n </div>\n\n <button type="submit" class="btn btn-success im_submit">Send</button>\n </form>\n </div>\n\n </div>\n\n </div>\n\n </div>\n\n </div>\n </div>\n\n </div>\n\n </div>\n\n\n</div>\n\n<div class="im_page_footer">\n <a class="im_page_footer_brand" target="_blank" href="https://github.com/zhukov/webogram">Telegram alpha</a> by izhukov &amp; toberg\n</div>\n\n<div id="notify_sound"></div>\n\n'),e.put("partials/import_contact_modal.html",'<div class="import_modal_wrap" my-modal-position>\n\n <a class="modal-close-button" ng-click="$dismiss()"><i></i></a>\n\n <div class="modal-body">\n\n <form class="modal_simple_form" ng-submit="doImport()">\n\n <h4>Add new contact</h4>\n\n <div class="form-group">\n <input class="form-control input-sm" my-focused type="text" placeholder="Phone number" ng-model="importContact.phone"/>\n </div>\n <div class="form-group">\n <input class="form-control input-sm" type="text" placeholder="First name" ng-model="importContact.first_name"/>\n </div>\n <div class="form-group">\n <input class="form-control input-sm" type="text" placeholder="Last name" ng-model="importContact.last_name"/>\n </div>\n\n </form>\n\n </div>\n\n <div class="modal-footer">\n <a class="btn btn-link pull-left" ng-if="phonebookAvailable" ng-click="importPhonebook()">Phonebook</a>\n <a class="btn btn-link" ng-click="$dismiss()">Cancel</a>\n <button class="btn btn-primary" ng-class="{disabled: progress.enabled}" ng-click="doImport()" ng-bind="progress.enabled ? \'Importing...\' : \'Save\'" ng-disabled="progress.enabled"></button>\n </div>\n\n</div>'),e.put("partials/login.html",'<div my-head></div>\n\n\n<div class="login_form_wrap" my-vertical-position="0.4">\n <div class="error" ng-if="error.message" ng-bind="error.message"></div>\n\n <form name="mySendCodeForm" ng-if="!credentials.phone_code_hash" ng-submit="sendCode()">\n <h3 class="login_form_head">Sign in</h3>\n <p class="login_form_lead">Please choose your country and enter your full phone number.</p>\n\n <div class="login_country_selector" ng-click="selectCountry()">\n <span ng-bind="credentials.phone_country_name"></span>\n <i class="icon icon-caret pull-right"></i>\n </div>\n\n <div class="form-group" ng-class="{\'has-error\': error.field == \'phone\'}">\n <label class="control-label" ng-if="error.field == \'phone\'">Incorrect phone number</label>\n <div class="clearfix">\n <input type="tel" autocomplete="off" class="form-control pull-left login_phone_country" my-focused name="phone_country" ng-model="credentials.phone_country">\n <input type="tel" autocomplete="off" class="form-control pull-left login_phone_number" my-focus-on="country_selected" name="phone_number" ng-model="credentials.phone_number" placeholder="Enter your phone" required>\n </div>\n </div>\n <button class="btn btn-primary btn-block" ng-class="{disabled: progress.enabled}" ng-disabled="progress.enabled" type="submit" ng-switch="progress.enabled">\n <span ng-switch-when="true">Generating keys<span my-loading-dots></span></span>\n <span ng-switch-default>Next</span>\n </button>\n <div class="login_form_messaging" ng-show="progress.enabled">Keys are only generated once. This can take a few minutes on slower devices, please be patient.</div>\n </form>\n\n <form name="myLoginForm" ng-if="credentials.phone_code_hash &amp;&amp; !credentials.phone_code_valid" ng-submit="logIn()">\n <h3 class="login_form_head"><span ng-bind="credentials.phone_country"></span> <span ng-bind="credentials.phone_number"></span></h3>\n <div class="login_edit_phone"><a ng-click="editPhone()">Edit phone number</a></div>\n <p class="login_form_lead">We have sent you a code via SMS.<br/>Please enter it below.</p>\n\n <p class="login_form_lead">\n <span ng-show="callPending.remaining > 0">Telegram will call you in {{callPending.remaining | duration}}</span>\n <span ng-show="!callPending.remaining &amp;&amp; !callPending.success">Telegram is calling you</span>\n <span ng-show="!callPending.remaining &amp;&amp; callPending.success">Telegram dialed your number</span>\n </p>\n\n <div class="form-group" ng-class="{\'has-error\': error.field == \'phone_code\'}">\n <label class="control-label" for="phone_code" ng-if="error.field == \'phone_code\'">Incorrect SMS code</label>\n <input type="number" my-focused maxlength="5" class="form-control" name="phone_code" ng-model="credentials.phone_code" placeholder="Enter your code" autocomplete="off" required>\n </div>\n\n <button class="btn btn-primary btn-block" type="submit" ng-class="{disabled: progress.enabled}" ng-disabled="progress.enabled" ng-switch="progress.enabled">\n <span ng-switch-when="true">Checking code<span my-loading-dots></span></span>\n <span ng-switch-default>Next</span>\n </button>\n </form>\n\n <form name="myFullNameForm" ng-if="credentials.phone_code_valid &amp;&amp; credentials.phone_unoccupied" ng-submit="logIn(true)">\n <h3 class="login_form_head">Your info</h3>\n <p class="login_form_lead">Please enter your full name to set up a Telegram account.</p>\n\n <div class="form-group login_first_name_wrap" ng-class="{\'has-error\': error.field == \'first_name\'}">\n <label class="control-label" for="first_name" ng-if="error.field == \'first_name\'">Incorrect first name</label>\n <input my-focused class="form-control" name="first_name" ng-model="credentials.first_name" placeholder="First name" autocomplete="off" required>\n </div>\n\n <div class="form-group" ng-class="{\'has-error\': error.field == \'last_name\'}">\n <label class="control-label" for="last_name" ng-if="error.field == \'last_name\'">Incorrect last name</label>\n <input class="form-control" name="last_name" ng-model="credentials.last_name" placeholder="Last name" autocomplete="off">\n </div>\n\n <button class="btn btn-primary btn-block" ng-class="{disabled: progress.enabled}" ng-disabled="progress.enabled" type="submit" ng-switch="progress.enabled">\n <span ng-switch-when="true">Signing up<span my-loading-dots></span></span>\n <span ng-switch-default>Sign up</span>\n </button>\n </form>\n\n</div>\n'),e.put("partials/message.html",'<div class="im_message_unread_split" bo-if="historyUnreadAfter == historyMessage.id" ng-show="historyUnreadAfter == historyMessage.id">\n Unread messages\n</div>\n\n<div class="im_message_outer_wrap" ng-class="[ selectedMsgs[historyMessage.id] &amp;&amp; \'im_message_selected\', historyMessage.grouped &amp;&amp; (\'im_message_grouped\' + historyMessage.grouped) , historyFocus == historyMessage.id &amp;&amp; \'im_message_focus\']" ng-click="toggleMessage(historyMessage.id, $event)">\n\n\n <div class="im_message_wrap clearfix" bindonce>\n\n <div class="im_service_message_wrap" bo-if="historyMessage._ == \'messageService\'">\n <div class="im_service_message">\n\n <a ng-click="openUser(historyMessage.from_id)" class="im_message_author" ng-bind-html="historyMessage.fromUser.rFullName"></a>\n\n <span class="im_message_service" bo-switch="historyMessage.action[\'_\']">\n <span bo-switch-when="messageActionChatCreate">\n created the group &laquo;<strong ng-bind-html="historyMessage.action.rTitle"></strong>&raquo;\n </span>\n <span bo-switch-when="messageActionChatEditTitle">\n changed group name to &laquo;<strong ng-bind-html="historyMessage.action.rTitle"></strong>&raquo;\n </span>\n <span bo-switch-when="messageActionChatEditPhoto">\n changed group photo\n </span>\n <span bo-switch-when="messageActionChatDeletePhoto">\n removed group photo\n </span>\n <span bo-switch-when="messageActionChatAddUser">\n <span bo-if="historyMessage.from_id != historyMessage.action.user_id">\n invited <a ng-click="openUser(historyMessage.action.user_id)" ng-bind-html="historyMessage.action.user.rFullName"></a>\n </span>\n <span bo-if="historyMessage.from_id == historyMessage.action.user_id">\n returned to group\n </span>\n </span>\n <span bo-switch-when="messageActionChatDeleteUser">\n <span bo-if="historyMessage.from_id != historyMessage.action.user_id">\n kicked <a ng-click="openUser(historyMessage.action.user_id)" ng-bind-html="historyMessage.action.user.rFullName"></a>\n </span>\n <span bo-if="historyMessage.from_id == historyMessage.action.user_id">\n left group\n </span>\n </span>\n\n <span bo-switch-default ng-bind="\'Unsupported action \' + historyMessage.action._"></span>\n </span>\n\n </div>\n\n <a bo-if="historyMessage.action._ == \'messageActionChatEditPhoto\'" class="im_service_message_photo_thumb" href="" ng-click="openPhoto(historyMessage.action.photo.id)">\n <img\n class="im_service_message_photo_thumb"\n my-load-thumb\n thumb="historyMessage.action.photo.thumb"\n />\n </a>\n\n </div>\n\n <div bindonce bo-if="historyMessage._ != \'messageService\'" class="im_content_message_wrap" ng-class="{im_message_unread: historyMessage.unread, im_message_out: historyMessage.out, im_message_error: historyMessage.error, im_message_pending: historyMessage.pending, im_message_fwd: historyMessage._ == \'messageForwarded\'}">\n <div class="im_content_message_select_area">\n <i class="icon icon-select-tick"></i>\n </div>\n\n <a class="im_message_error_btn" bo-if="historyMessage.pending || historyMessage.error" ng-click="historyMessage.send()">\n <i class="icon-message-status" tooltip="Try again"></i>\n </a>\n\n <i bo-if="historyMessage.unread || historyMessage.pending" class="icon-message-status" ng-class="{\'icon-message-status-unread\': historyMessage.unread, \'icon-message-status-pending\': historyMessage.pending}" ng-show="!historyMessage.error"></i>\n\n <a ng-click="openUser(historyMessage.from_id)" class="im_message_from_photo pull-left">\n <img\n class="im_message_from_photo"\n my-load-thumb\n thumb="historyMessage.fromPhoto"\n />\n </a>\n <div class="im_message_meta pull-right text-right">\n <i class="icon-message-status-tick"></i>\n <span class="im_message_date" bo-bind="historyMessage.date | dateOrTime"></span>\n </div>\n\n <div class="im_message_body">\n\n <a bo-if="historyMessage.to_id.chat_id > 0" class="im_message_author" bo-class="\'user_color_\' + historyMessage.fromPhoto.num" ng-click="openUser(historyMessage.from_id)" ng-bind-html="historyMessage.fromUser.rFullName"></a>\n <a bo-if="!historyMessage.to_id.chat_id" class="im_message_author" ng-click="openUser(historyMessage.from_id)" ng-bind-html="historyMessage.fromUser.rFirstName" ></a>\n\n\n <div bo-if="historyMessage._ == \'messageForwarded\'" class="im_message_fwd_from">\n <a ng-click="openUser(historyMessage.fwd_from_id)" class="im_message_fwd_photo pull-left">\n <img\n class="im_message_fwd_photo"\n my-load-thumb\n thumb="historyMessage.fwdPhoto"\n />\n </a>\n <div class="im_message_fwd_author_wrap">\n <a class="im_message_fwd_author" ng-click="openUser(historyMessage.fwd_from_id)" ng-bind-html="historyMessage.fwdUser.rFirstName"></a><span class="im_message_fwd_date" ng-bind="historyMessage.fwd_date | dateOrTime"></span>\n </div>\n </div>\n\n <div bo-if="historyMessage.media &amp;&amp; historyMessage.media._ != \'messageMediaEmpty\'" class="im_message_media" ng-switch="historyMessage.media._">\n\n <a ng-switch-when="messageMediaPhoto" class="im_message_photo_thumb" href="" ng-click="openPhoto(historyMessage.media.photo.id, historyMessage.id)" bo-style="{width: historyMessage.media.photo.thumb.width + \'px\'}" ng-mouseover="preloadPhoto(historyMessage.media.photo.id)">\n <img\n class="im_message_photo_thumb"\n my-load-thumb\n thumb="historyMessage.media.photo.thumb"\n />\n </a>\n\n <div ng-switch-when="messageMediaVideo" class="im_message_video im_message_document_thumbed">\n <a class="im_message_video_thumb" href="" ng-click="openVideo(historyMessage.media.video.id, historyMessage.id)" bo-style="{width: historyMessage.media.video.thumb.width + \'px\'}">\n <span class="im_message_video_duration" bo-bind="historyMessage.media.video.duration | duration"></span>\n <i class="icon icon-videoplay"></i>\n <img\n class="im_message_video_thumb"\n my-load-thumb\n thumb="historyMessage.media.video.thumb"\n />\n </a>\n\n <div class="im_message_document_info">\n <div class="im_message_document_name_wrap">\n <span class="im_message_document_name">Video</span>\n <span class="im_message_document_size" ng-if="!historyMessage.media.video.progress.enabled" bo-bind="historyMessage.media.video.size | formatSize"></span>\n <span class="im_message_document_size" ng-if="historyMessage.media.video.progress.enabled" ng-bind="historyMessage.media.video.progress | formatSizeProgress"></span>\n </div>\n <div class="im_message_document_actions" ng-if="!historyMessage.media.video.progress.enabled">\n <a href="" ng-click="downloadVideo(historyMessage.media.video.id)">Download</a>\n <a href="" ng-click="openVideo(historyMessage.media.video.id, historyMessage.id)">Play video</a>\n </div>\n <div class="clearfix cancelable_progress_wrap" ng-if="historyMessage.media.video.progress.enabled">\n <a class="im_message_media_progress_cancel pull-right" ng-click="historyMessage.media.video.progress.cancel()">Cancel</a>\n <div class="im_message_download_progress_wrap">\n <div class="progress tg_down_progress">\n <div class="progress-bar progress-bar-success" ng-style="{width: historyMessage.media.video.progress.percent + \'%\'}"></div>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n <div ng-switch-when="messageMediaDocument" bo-switch="historyMessage.media.document.isSpecial">\n\n <div bo-switch-when="gif" my-load-gif document="historyMessage.media.document"></div>\n\n <div bo-switch-default class="im_message_document" ng-class="{im_message_document_thumbed: !!historyMessage.media.document.thumb}">\n <a href="" ng-click="downloadDoc(historyMessage.media.document.id, historyMessage.media.document.withPreview)" ng-class="{im_message_document_link_disabled: historyMessage.media.document.progress.enabled}">\n <i class="icon icon-document" bo-if="!historyMessage.media.document.thumb"></i>\n <div class="im_message_document_thumb_wrap" bo-if="historyMessage.media.document.thumb">\n <img\n class="im_message_document_thumb"\n my-load-thumb\n thumb="historyMessage.media.document.thumb"\n />\n </div>\n </a>\n\n <div class="im_message_document_info">\n <div class="im_message_document_name_wrap">\n <span class="im_message_document_name" bo-bind="historyMessage.media.document.file_name"></span>\n <span class="im_message_document_size" ng-if="!historyMessage.media.document.progress.enabled" bo-bind="historyMessage.media.document.size | formatSize"></span>\n <span class="im_message_document_size" ng-if="historyMessage.media.document.progress.enabled" ng-bind="historyMessage.media.document.progress | formatSizeProgress"></span>\n </div>\n <div class="im_message_document_actions" ng-if="!historyMessage.media.document.progress.enabled">\n <a href="" ng-click="downloadDoc(historyMessage.media.document.id)">Download</a>\n <a href="" ng-click="downloadDoc(historyMessage.media.document.id, 1)" bo-if="historyMessage.media.document.withPreview">Open</a>\n </div>\n <div class="clearfix cancelable_progress_wrap" ng-if="historyMessage.media.document.progress.enabled">\n <a class="im_message_media_progress_cancel pull-right" ng-click="historyMessage.media.document.progress.cancel()">Cancel</a>\n <div class="im_message_download_progress_wrap">\n <div class="progress tg_down_progress">\n <div class="progress-bar progress-bar-success" ng-style="{width: historyMessage.media.document.progress.percent + \'%\'}"></div>\n </div>\n </div>\n </div>\n </div>\n\n </div>\n </div>\n\n\n <div ng-switch-when="messageMediaAudio" class="im_message_document">\n <a href="" ng-click="openAudio(historyMessage.media.audio.id)" ng-if="!historyMessage.media.audio.progress.enabled &amp;&amp; !historyMessage.media.audio.url">\n <i class="icon icon-audio"></i>\n </a>\n <i class="icon icon-audio" ng-if="historyMessage.media.audio.progress.enabled || historyMessage.media.audio.url"></i>\n\n <div class="im_message_audio_info">\n <div class="im_message_audio_name_wrap" ng-if="!historyMessage.media.audio.url">\n <span class="im_message_audio_name">\n Voice message\n </span>\n <span class="im_message_audio_duration" ng-if="!historyMessage.media.audio.progress.enabled" bo-bind="historyMessage.media.audio.duration | duration"></span>\n <span class="im_message_audio_size" ng-if="historyMessage.media.audio.progress.enabled" ng-bind="historyMessage.media.audio.progress | formatSizeProgress"></span>\n </div>\n <div class="im_message_audio_actions" ng-if="!historyMessage.media.audio.progress.enabled &amp;&amp; !historyMessage.media.audio.url">\n <a href="" ng-click="openAudio(historyMessage.media.audio.id)">Play</a>\n </div>\n <div class="clearfix cancelable_progress_wrap" ng-if="historyMessage.media.audio.progress.enabled">\n <a class="im_message_media_progress_cancel pull-right" ng-click="historyMessage.media.audio.progress.cancel()">Cancel</a>\n <div class="im_message_download_progress_wrap">\n <div class="progress tg_down_progress">\n <div class="progress-bar progress-bar-success" ng-style="{width: historyMessage.media.audio.progress.percent + \'%\'}"></div>\n </div>\n </div>\n </div>\n <div class="im_message_audio_player_wrap" ng-if="historyMessage.media.audio.url">\n <audio my-audio-autoplay audio="historyMessage.media.audio" controls="controls">\n <source bo-src="historyMessage.media.audio.url" type="audio/ogg" />\n <embed bo-src="historyMessage.media.audio.url" hidden="true" autostart="true" loop="false" />\n </audio>\n </div>\n </div>\n </div>\n\n <a ng-switch-when="messageMediaGeo" my-map-point point="historyMessage.media.geo" class="im_message_geopoint">\n <i class="icon icon-geo-point"></i>\n </a>\n\n <div ng-switch-when="messageMediaContact">\n <a bo-if="historyMessage.media.user" ng-click="openUser(historyMessage.media.user.id)" class="im_message_contact_photo pull-left">\n <img\n class="im_message_contact_photo"\n my-load-thumb\n thumb="historyMessage.media.userPhoto"\n />\n </a>\n <div class="im_message_contact_name" ng-switch="!!historyMessage.media.user">\n <a ng-switch-when="true" ng-click="openUser(historyMessage.media.user.id)" ng-bind-html="historyMessage.media.rFullName"></a>\n <span ng-switch-default ng-bind-html="historyMessage.media.rFullName"></span>\n </div>\n <div class="im_message_contact_phone" bo-bind="historyMessage.media.phone_number | phoneNumber"></div>\n </div>\n\n <div ng-switch-when="messageMediaPending" class="im_message_upload_file" bo-class="\'im_message_upload_\' + historyMessage.media.type">\n <i class="icon" bo-class="\'icon-\' + historyMessage.media.type"></i>\n <div class="im_message_document_info">\n <div class="im_message_document_name_wrap">\n <span class="im_message_document_name" bo-bind="historyMessage.media.file_name"></span>\n <span class="im_message_document_size" ng-if="historyMessage.media.progress" ng-bind="historyMessage.media.progress | formatSizeProgress"></span>\n </div>\n <div class="clearfix cancelable_progress_wrap">\n <a class="im_message_media_progress_cancel pull-right" ng-click="historyMessage.media.progress.cancel()">Cancel</a>\n <div class="im_message_download_progress_wrap">\n <div class="progress tg_down_progress">\n <div class="progress-bar progress-bar-success" role="progressbar" ng-style="{width: historyMessage.media.progress.percent + \'%\'}"></div>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n\n </div>\n\n <div class="im_message_text" bo-if="historyMessage.message.length" ng-bind-html="historyMessage.richMessage"></div>\n </div>\n\n </div>\n </div>\n\n</div>\n\n'),e.put("partials/peer_select.html",'<div class="peer_select_modal_wrap" my-modal-position>\n\n <a class="modal-close-button visible-xs" ng-click="$dismiss()"><i></i></a>\n\n <div class="modal-body">\n\n <h4 class="modal_simple_header visible-xs">Contacts</h4>\n\n <div class="im_dialogs_modal_col_wrap" ng-controller="AppImDialogsController" my-dialogs>\n <div class="im_dialogs_panel">\n <div class="im_dialogs_search">\n <input my-focused class="form-control im_dialogs_search_field" type="search" placeholder="Search" ng-model="search.query"/>\n <a class="im_dialogs_search_clear" ng-click="search.query = \'\'" ng-show="search.query.length"></a>\n </div>\n </div>\n <div my-dialogs-list modal="true" class="im_dialogs_modal_col">\n <div class="im_dialogs_wrap nano">\n <div class="im_dialogs_scrollable_wrap nano-content">\n <ul class="nav nav-pills nav-stacked">\n <li class="im_dialog_wrap" my-dialog dialog-message="dialogMessage" ng-repeat="dialogMessage in dialogs track by dialogMessage.peerID"></li>\n </ul>\n <div class="im_dialogs_contacts_wrap" ng-show="contacts.length > 0">\n <h5>Contacts</h5>\n <ul class="nav nav-pills nav-stacked">\n <li class="im_dialog_wrap" ng-repeat="contact in contacts | orderBy:\'user.sortName\' track by contact.userID" ng-class="{active: curDialog.peerID == contact.userID}">\n <a class="im_dialog" ng-click="dialogSelect(contact.peerString)">\n <div class="im_dialog_photo pull-left">\n <img\n class="im_dialog_photo"\n my-load-thumb\n thumb="contact.userPhoto"\n />\n </div>\n <div class="im_dialog_message_wrap">\n <div class="im_dialog_peer">\n <span class="im_dialog_user" ng-bind-html="contact.user.rFullName"></span>\n </div>\n <div class="im_dialog_message">\n <span class="im_dialog_message_text">{{contact.user | userStatus}}</span>\n </div>\n </div>\n </a>\n </li>\n </ul>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n </div>\n\n</div>'),e.put("partials/phonebook_modal.html",'<div class="contacts_modal_wrap" my-modal-position>\n\n <a class="modal-close-button visible-xs" ng-click="$dismiss()"><i></i></a>\n\n <div class="modal-body">\n\n <h4 class="modal_simple_header visible-xs">Phonebook</h4>\n\n <div class="contacts_modal_search">\n <input class="form-control contacts_modal_search_field" my-focused type="search" placeholder="Search" ng-model="search.query"/>\n <a class="contacts_modal_search_clear" ng-click="search.query = \'\'" ng-show="search.query.length"></a>\n </div>\n\n\n <div my-contacts-list class="contacts_modal_col">\n\n <div class="contacts_wrap nano" my-infinite-scroller>\n <div class="contacts_scrollable_wrap nano-content">\n\n <ul class="contacts_modal_members_list nav nav-pills nav-stacked">\n\n <li class="contacts_modal_contact_wrap clearfix" ng-repeat="contact in contacts | limitTo: slice.limit track by contact.id" ng-class="{active: selectedContacts[contact.id]}">\n <a class="contacts_modal_contact" ng-click="contactSelect(contact.id)">\n\n <i ng-if="multiSelect" class="icon icon-contact-tick"></i>\n\n <div class="contacts_modal_contact_photo pull-left">\n <img\n class="contacts_modal_contact_photo"\n ng-src="{{contact.photo}}"\n />\n </div>\n\n <div class="contacts_modal_contact_name">\n <span ng-bind="contact.first_name"></span>\n <span ng-bind="contact.last_name"></span>\n </div>\n <div class="contacts_modal_contact_status" ng-repeat="phone in contact.phones">\n <span ng-bind="phone | phoneNumber"></span>\n </div>\n\n </a>\n </li>\n\n </ul>\n\n </div>\n </div>\n\n </div>\n\n </div>\n\n <div class="modal-footer contacts_modal_panel" ng-show="multiSelect">\n <a class="btn btn-link pull-left" ng-click="toggleSelection()" ng-switch="selectedCount > 0">\n <span ng-switch-when="true">Deselect all</span>\n <span ng-switch-default>Select all</span>\n </a>\n <button class="btn btn-primary pull-right" ng-class="{disabled: !selectedCount || progress.enabled}" ng-disabled="!selectedCount || progress.enabled" ng-click="submitSelected()" type="submit" ng-switch="progress.enabled">\n <span ng-switch-when="true">Importing<span my-loading-dots></span></span>\n <span ng-switch-default>Import contacts</span>\n </button>\n </div>\n\n</div>'),e.put("partials/photo_modal.html",'<div my-modal-width="{{photo.full.modalWidth}}" class="media_modal_wrap photo_modal_wrap" my-modal-position animation="no" my-modal-nav next="nav.next()" prev="nav.prev()">\n\n <div class="modal-body">\n\n <div class="photo_modal_image_wrap" my-load-full-photo full-photo="photo.full" thumb-location="photo.thumb.location" ng-click="nav.next()"> </div>\n\n <div class="media_meta_wrap clearfix">\n <div class="media_modal_actions pull-right">\n <a href="" class="media_modal_action_link" ng-click="download()">Download</a>\n <a href="" class="media_modal_action_link" ng-if="canForward" ng-click="forward()">Forward</a>\n <a href="" class="media_modal_action_link" ng-if="canDelete" ng-click="delete()">Delete</a>\n </div>\n\n <p class="media_modal_info">\n <span class="media_modal_author" ng-bind-html="photo.fromUser.rFullName"></span>, {{photo.date | dateOrTime}}\n </p>\n </div>\n\n\n </div>\n\n</div>'),e.put("partials/profile_edit_modal.html",'<div class="profile_edit_modal_wrap" my-modal-position>\n\n <a class="modal-close-button" ng-click="$dismiss()"><i></i></a>\n\n <div class="modal-body">\n\n <form class="modal_simple_form" ng-submit="updateProfile()">\n\n <h4>Edit Profile</h4>\n\n <div class="form-group import_modal_field_wrap" ng-class="{\'has-error\': error.field == \'first_name\'}">\n <input class="form-control input-sm" my-focused type="text" placeholder="First name" ng-model="profile.first_name" name="first_name"/>\n </div>\n <div class="form-group import_modal_field_wrap" ng-class="{\'has-error\': error.field == \'last_name\'}">\n <input class="form-control input-sm" type="text" placeholder="Last name" ng-model="profile.last_name"/>\n </div>\n\n </form>\n\n </div>\n\n <div class="modal-footer">\n <a class="btn btn-link" ng-click="$dismiss()">Cancel</a>\n <button class="btn btn-primary" ng-class="{disabled: profile.updating}" ng-click="updateProfile()" ng-bind="profile.updating ? \'Saving...\' : \'Save\'" ng-disabled="profile.updating"></button>\n </div>\n\n</div>'),e.put("partials/settings_modal.html",'<div class="settings_modal_wrap modal_content_wrap" my-modal-position>\n\n <a class="modal-close-button" ng-click="$close()"><i></i></a>\n\n <div class="modal-body">\n\n <div class="user_modal_photo_profile_wrap">\n\n <a href="" ng-click="openPhoto(photo.id, -profile.id)" class="user_modal_image_wrap pull-left" ng-class="{disabled: !photo.id}">\n <img\n class="user_modal_image"\n my-load-thumb\n thumb="photo"\n />\n </a>\n\n <div class="user_modal_info_wrap clearfix">\n <h4 class="user_modal_header" ng-bind-html="profile.rFullName"></h4>\n <p class="user_modal_status" ng-bind="profile | userStatus"></p>\n\n <div class="user_modal_actions_wrap clearfix">\n <span class="btn btn-primary user_modal_main_btn" ng-if="!photo.updating">\n <input my-file-upload type="file" multiple="false" class="im_attach_input" size="120" multiple="false" accept="image/x-png, image/png, image/gif, image/jpeg" />\n Set profile photo\n </span>\n <span class="btn btn-primary user_modal_main_btn disabled" disabled ng-if="photo.updating">\n Updating<span my-loading-dots></span>\n </span>\n\n <div class="dropdown user_modal_other_btn">\n <button class="btn btn-link dropdown-toggle">More<i class="icon icon-caret"></i></button>\n <ul class="dropdown-menu">\n <li ng-if="photo.location">\n <a ng-click="deletePhoto()">Delete profile photo</a>\n </li>\n <li>\n <a ng-click="editProfile()">Edit profile</a>\n </li>\n <li>\n <a ng-click="terminateSessions()">Terminate all sessions</a>\n </li>\n </ul>\n </div>\n\n </div>\n </div>\n\n </div>\n\n <div class="modal_section" ng-if="profile.phone">\n <h3 class="modal_section_header">Phone</h3>\n <div class="modal_section_body">\n <p><span ng-bind="profile.phone | phoneNumber"></span></p>\n </div>\n </div>\n\n <div class="modal_section">\n <h3 class="modal_section_header">Settings</h3>\n <div class="modal_section_body">\n\n <div class="tg_form_group">\n <a class="tg_checkbox" ng-click="toggleDesktop()" ng-class="notify.desktop ? \'tg_checkbox_on\' : \'\'">\n <span class="icon icon-checkbox-outer"><i class="icon-checkbox-inner"></i></span>\n <span class="tg_checkbox_label">Desktop notifications</span>\n </a>\n\n <a class="tg_checkbox" ng-click="toggleSound()" ng-class="notify.volume ? \'tg_checkbox_on\' : \'\'">\n <span class="icon icon-checkbox-outer"><i class="icon-checkbox-inner"></i></span>\n <span class="tg_checkbox_label">Sound</span>\n </a>\n\n <div class="tg_range_wrap" ng-show="notify.volume > 0">\n <span class="icon icon-volume-outer" ng-class="\'icon-volume-outer\' + notify.volumeOf4()">\n <i class="icon-volume-inner icon-volume-inner1"></i>\n <i class="icon-volume-inner icon-volume-inner2"></i>\n <i class="icon-volume-inner icon-volume-inner3"></i>\n <i class="icon-volume-inner icon-volume-inner4"></i>\n </span>\n <input type="range" class="tg_range" ng-model="notify.volume" min="1" max="10">\n </div>\n </div>\n\n <div class="tg_form_group">\n <a class="tg_radio" ng-click="toggleCtrlEnter(1)" ng-class="send.enter == 1 ? \'tg_radio_on\' : \'\'">\n <i class="icon icon-radio"></i>\n <span>\n <strong>Enter</strong> - send message, <strong>Shift + Enter</strong> - new line\n </span>\n </a>\n\n <a class="tg_radio" ng-click="toggleCtrlEnter(0)" ng-class="send.enter == 0 ? \'tg_radio_on\' : \'\'">\n <i class="icon icon-radio"></i>\n <span>\n <strong>Ctrl + Enter</strong> - send message, <strong>Enter</strong> - new line\n </span>\n </a>\n </div>\n\n </div>\n </div>\n\n <div class="modal_section">\n <h3 class="modal_section_header">About</h3>\n <div class="modal_section_body settings_about_section_body">\n <div class="settings_external_services pull-right">\n <a href="https://github.com/zhukov/webogram" target="_blank" title="Source code on GitHub" class="settings_external_service"><i class="icon icon-github"></i></a>\n <a href="https://twitter.com/telegram_web" target="_blank" title="Follow us on Twitter!" class="settings_external_service"><i class="icon icon-twitter"></i></a>\n </div>\n <p>\n <a ng-click="openChangelog()">Recent updates (ver. <span ng-bind="version"></span>)</a>\n </p>\n </div>\n </div>\n\n </div>\n</div>\n'),e.put("partials/user_modal.html",'<div class="user_modal_wrap" my-modal-position>\n\n <a class="modal-close-button" ng-click="$close()"><i></i></a>\n\n <div class="modal-body">\n\n <div class="user_modal_photo_profile_wrap">\n\n <a href="" ng-click="openPhoto(userPhoto.id, -user.id)" class="user_modal_image_wrap pull-left" ng-class="{disabled: !userPhoto.id}">\n <img\n class="user_modal_image"\n my-load-thumb\n thumb="userPhoto"\n />\n </a>\n\n <div class="user_modal_info_wrap clearfix">\n <h4 class="user_modal_header" ng-bind="user | userName"></h4>\n <p class="user_modal_status" ng-if="user.status" ng-bind="user | userStatus"></p>\n\n <div class="user_modal_actions_wrap clearfix">\n <button class="btn btn-primary user_modal_main_btn" ng-click="goToHistory()">Send message</button>\n\n <div class="dropdown user_modal_other_btn">\n <button class="btn btn-link dropdown-toggle">More<i class="icon icon-caret"></i></button>\n <ul class="dropdown-menu">\n <li ng-if="user._ == \'userContact\'">\n <a ng-click="importContact(true)">Edit contact</a>\n </li>\n <li ng-if="user._ == \'userContact\'">\n <a ng-click="deleteContact()">Delete contact</a>\n </li>\n <li ng-if="user.phone.length > 0 &amp;&amp; user._ != \'userContact\'">\n <a ng-click="importContact()">Add to contacts</a>\n </li>\n <li ng-if="user.phone.length > 0">\n <a ng-click="shareContact()">Share contact</a>\n </li>\n <li>\n <a ng-click="flushHistory()">Delete chat</a>\n </li>\n </ul>\n </div>\n\n </div>\n </div>\n\n </div>\n\n <div class="modal_section" ng-if="user.phone">\n <h3 class="modal_section_header">Phone</h3>\n <div class="modal_section_body">\n <p><span ng-bind="user.phone | phoneNumber"></span></p>\n </div>\n </div>\n\n <div class="modal_section">\n <h3 class="modal_section_header">Settings</h3>\n <div class="modal_section_body">\n\n <div class="tg_form_group">\n <a class="tg_checkbox" ng-click="settings.notifications = !settings.notifications" ng-class="settings.notifications ? \'tg_checkbox_on\' : \'\'">\n <span class="icon icon-checkbox-outer"><i class="icon-checkbox-inner"></i></span>\n <span class="tg_checkbox_label">Notifications</span>\n </a>\n </div>\n </div>\n </div>\n\n </div>\n\n</div>'),e.put("partials/video_modal.html",'<div class="media_modal_wrap video_modal_wrap" my-modal-position>\n\n <div class="modal-body">\n\n <div class="video_modal_image_wrap" my-load-video video="video"></div>\n\n <div class="media_meta_wrap clearfix">\n <div class="media_modal_actions pull-right" ng-if="messageID">\n <a href="" class="media_modal_action_link" ng-click="forward()">Forward</a>\n <a href="" class="media_modal_action_link" ng-click="delete()">Delete</a>\n </div>\n\n <p class="media_modal_info">\n <span class="media_modal_author" ng-bind-html="video.fromUser.rFullName" ></span>, {{video.date | dateOrTime}}\n </p>\n </div>\n\n </div>\n\n</div>'),e.put("partials/welcome.html",'<div my-head></div>\n\n<div ng-if="showWelcome">\n\n <div class="welcome_form">\n <div class="welcome_logo"></div>\n\n <h3 class="welcome_header"><strong>Telegram</strong> Web</h3>\n\n <div class="welcome_text">\n <p>This is an unofficial web-client for the <strong>Telegram Messenger</strong>.</p>\n <p>It\'s still an <strong>alpha-version</strong> and may not be 200% reliable</p>\n </div>\n <div class="welcome_btn_wrap">\n <a href="#/login" class="btn btn-primary btn-block">Start Messaging</a>\n </div>\n </div>\n\n <div class="welcome_footer" my-custom-background="#f8f8f8">\n <div class="welcome_cards_wrap clearfix">\n\n <div class="container-fluid">\n <div class="row">\n <div class="col-md-4 col-sm-4">\n <div class="welcome_footer_card_wrap row">\n <div class="welcome_footer_card welcome_footer_card_messaging"></div>\n <h4>Fast messaging</h4>\n <div class="welcome_footer_card_lead">Send messages with rich emoji support right from your desktop or laptop computer</div>\n </div>\n </div>\n\n <div class="col-md-4 col-sm-4">\n <div class="welcome_footer_card_wrap">\n <div class="welcome_footer_card welcome_footer_card_filesharing"></div>\n <h4>Easy file sharing</h4>\n <div class="welcome_footer_card_lead">Share files of any type using drag-and-drop or the attachment icon</div>\n </div>\n </div>\n\n <div class="col-md-4 col-sm-4">\n <div class="welcome_footer_card_wrap">\n <div class="welcome_footer_card welcome_footer_card_powerful"></div>\n <h4>Powerful tools</h4>\n <div class="welcome_footer_card_lead">Browse shared media and files by type <br/> and set custom notifications</div>\n </div>\n </div>\n\n </div>\n </div>\n </div>\n\n </div>\n\n\n\n</div>\n')
}]),angular.module("myApp.directives",["myApp.filters"]).directive("myHead",function(){return{restrict:"AE",scope:!0,templateUrl:"partials/head.html"}}).directive("myDialog",function(){return{restrict:"AE",scope:!0,translude:!1,templateUrl:"partials/dialog.html"}}).directive("myMessage",function(){return{restrict:"AE",scope:!0,translude:!1,templateUrl:"partials/message.html"}}).directive("myDialogs",["$modalStack","$transition","$window","$timeout",function(e,t,n,i){function r(t,r,o){function a(t){if(!d&&e.getTop())return!0;if(36==t.keyCode&&!t.shiftKey&&!t.ctrlKey&&t.altKey){var n=$(c).find(".im_dialog_wrap a")[0];return n&&(n.click(),c.scrollTop=0,$(s).nanoScroller({flash:!0})),cancelEvent(t)}if(27==t.keyCode||9==t.keyCode&&t.shiftKey&&!t.ctrlKey&&!t.metaKey)return d||(l.focus(),l.value&&l.select()),cancelEvent(t);if(d&&13==t.keyCode){var n=$(c).find(".im_dialog_selected")[0]||$(c).find(".im_dialog_wrap a")[0];return n&&n.click(),cancelEvent(t)}if(38==t.keyCode||40==t.keyCode){var i=!t.shiftKey&&t.altKey;if(!i&&(!d||t.metaKey))return!0;var r,o=40==t.keyCode,n=!i&&$(c).find(".im_dialog_selected")[0]||$(c).find(".active a.im_dialog")[0],a=n&&n.parentNode;if(a){var r=n[o?"nextSibling":"previousSibling"];if(!r||!r.className||-1==r.className.indexOf("im_dialog_wrap")){var u=$(c).find(".im_dialog_wrap"),p=u.index(n.parentNode),f=p+(o?1:-1);r=u[f]}}else{var u=$(c).find(".im_dialog_wrap");r=o?u[0]:u[u.length-1]}if(i?r&&$(r).find("a")[0].click():(a&&r&&$(a).find("a").removeClass("im_dialog_selected"),r&&$(r).find("a").addClass("im_dialog_selected")),r){var h=r.offsetTop,g=r.offsetHeight,m=c.scrollTop,y=c.clientHeight;m>h?(c.scrollTop=h,$(s).nanoScroller({flash:!0})):h+g-y>m&&(c.scrollTop=h+g-y,$(s).nanoScroller({flash:!0}))}return cancelEvent(t)}}var s=$(".im_dialogs_wrap",r)[0],c=$(".im_dialogs_scrollable_wrap",r)[0],l=$(".im_dialogs_search_field",r)[0],u=$(".im_dialogs_panel",r)[0],p=$(".im_dialogs_tabs_wrap",r)[0],d=!1;$(l).on("focus blur",function(e){d="focus"==e.type,d||($(c).find(".im_dialog_selected").removeClass("im_dialog_selected"),l.value||t.$emit("ui_dialogs_search_clear"))}),t.$on("dialogs_search_toggle",function(){$(u).addClass("im_dialogs_panel_search"),t.$broadcast("ui_dialogs_search"),$(n).scrollTop(0),i(function(){l.focus()})}),t.$on("search_clear",function(){$(u).removeClass("im_dialogs_panel_search"),t.$broadcast("ui_dialogs_search")}),o.$observe("hasTabs",function(e){e="true"==e,$(p).toggle(e),t.$broadcast("ui_dialogs_tabs",e)}),$(document).on("keydown",a),t.$on("$destroy",function(){$(document).off("keydown",a)})}return{link:r}}]).directive("myDialogsList",["$window","$timeout",function(e,t){function n(n,i,r){function o(){return r.modal?($(i).css({height:$(e).height()-(Config.Navigator.mobile?100:200)}),void h()):(l&&l.offsetHeight||(l=$(".tg_page_head")[0]),p&&p.offsetHeight||(p=$(".im_page_footer")[0]),u&&u.offsetHeight||(u=$(".im_dialogs_panel")[0]),s&&s.offsetHeight||(s=$(".im_dialogs_col_wrap")[0]),$(i).css({height:$(e).height()-p.offsetHeight-(l?l.offsetHeight:44)-(u?u.offsetHeight:58)-parseInt($(s).css("paddingBottom")||0)}),void h())}var a=$(".im_dialogs_wrap",i)[0],s=$(".im_dialogs_col_wrap")[0],c=$(".im_dialogs_scrollable_wrap",i)[0],l=$(".tg_page_head")[0],u=$(".im_dialogs_panel")[0],p=$(".im_page_footer")[0],d=!1,f=!1;onContentLoaded(function(){$(a).nanoScroller({preventPageScrolling:!0,tabIndex:-1,iOSNativeScrolling:!0})});var h=function(){onContentLoaded(function(){$(a).nanoScroller()})};n.$on("ui_dialogs_prepend",h),n.$on("ui_dialogs_tabs",function(e,t){d=t,o()}),n.$on("ui_dialogs_search",o),n.$on("ui_dialogs_update",o),n.$on("ui_dialogs_append",function(){onContentLoaded(function(){h(),f=!1,t(function(){$(c).trigger("scroll")})})}),n.$on("ui_dialogs_change",function(){onContentLoaded(function(){h(),f=!1,t(function(){$(c).trigger("scroll")})})}),$(c).on("scroll",function(){i.is(":visible")&&!f&&c.scrollTop>=c.scrollHeight-c.clientHeight-300&&(n.$emit("dialogs_need_more"),f=!0)}),$(e).on("resize",o),o(),setTimeout(o,1e3)}return{link:n}}]).directive("myContactsList",["$window","$timeout",function(e){function t(t,n){function i(){$(n).css({height:$(e).height()-(o&&o.offsetHeight||0)-(r&&r.offsetHeight||0)-(Config.Navigator.mobile?100:200)}),$(a).nanoScroller()}var r=$(".contacts_modal_search")[0],o=$(".contacts_modal_panel")[0],a=$(".contacts_wrap",n)[0];onContentLoaded(function(){$(a).nanoScroller({preventPageScrolling:!0,tabIndex:-1,iOSNativeScrolling:!0}),i()}),$(e).on("resize",i),t.$on("contacts_change",function(){onContentLoaded(i)})}return{link:t}}]).directive("myCountriesList",["$window","$timeout",function(e){function t(t,n){function i(){$(n).css({height:$(e).height()-(o&&o.offsetHeight||0)-(r&&r.offsetHeight||0)-200}),$(a).nanoScroller()}var r=$(".countries_modal_search")[0],o=$(".countries_modal_panel")[0],a=$(".countries_wrap",n)[0];onContentLoaded(function(){$(a).nanoScroller({preventPageScrolling:!0,tabIndex:-1,iOSNativeScrolling:!0}),i()}),$(e).on("resize",i),t.$on("contacts_change",function(){onContentLoaded(i)})}return{link:t}}]).directive("myHistory",["$window","$timeout","$rootScope","$transition",function(e,t,n,i){function r(r,o){function a(){var e,n;(n=$(".im_message_focus",p)[0])?(p.scrollTop=Math.max(0,n.offsetTop-Math.floor(p.clientHeight/2)+26),T=!1):(e=$(".im_message_unread_split",p)[0])?(p.scrollTop=Math.max(0,e.offsetTop-52),T=!1):p.scrollTop=p.scrollHeight,S(),t(function(){$(p).trigger("scroll")})}function s(t){if(o.is(":visible")&&$(o[0].parentNode).is(":visible")){$(g).is(":visible")&&$(g).css({height:$(v).height()}),m&&m.offsetHeight||(m=$(".tg_page_head")[0]),y&&y.offsetHeight||(y=$(".im_page_footer")[0]);var n=$(e).height()-f.offsetHeight-h.offsetHeight-(m?m.offsetHeight:44)-y.offsetHeight;$(l).css({height:n}),c(),t!==!0&&(T&&onContentLoaded(function(){p.scrollTop=p.scrollHeight,S()}),S(100))}}function c(){$(u).css({marginTop:0});var e=p.offsetHeight-u.offsetHeight-20-49;u.offsetHeight>0&&e>0&&$(u).css({marginTop:e}),$(l).nanoScroller()}var l=$(".im_history_wrap",o)[0],u=$(".im_history_messages",o)[0],p=($(".im_history",o)[0],$(".im_history_scrollable_wrap",o)[0]),d=$(".im_history_scrollable",o)[0],f=$(".im_history_panel_wrap",o)[0],h=$(".im_bottom_panel_wrap",o)[0],g=$(".im_send_form_wrap",o)[0],m=$(".tg_page_head")[0],y=$(".im_page_footer")[0],v=$(".im_send_form",o)[0],_=!1,b=!1;onContentLoaded(function(){p.scrollTop=p.scrollHeight}),$(l).nanoScroller({preventPageScrolling:!0,tabIndex:-1,iOSNativeScrolling:!0});var w,S=function(e){t(function(){$(p).hasClass("im_history_to_bottom")||$(l).nanoScroller()},e||0)},C=!1,k=["transform","webkitTransform","MozTransform","msTransform","OTransform"];for(w=0;w<k.length;w++)if(k[w]in u.style){C=k[w];break}var M=C?!0:!1,x=!1;r.$on("ui_history_append_new",function(e,t){if(T||t.my){var r,o=M&&!n.idle.isIDLE&&u.clientHeight>0;o?r=p.scrollHeight:($(d).css({bottom:0}),$(p).addClass("im_history_to_bottom")),onContentLoaded(function(){if(o){x=!0,$(u).removeClass("im_history_appending"),p.scrollTop=p.scrollHeight,$(u).css(C,"translate(0px, "+(p.scrollHeight-r)+"px)"),$(l).nanoScroller();var e={};e[C]="translate(0px, 0px)",$(u).addClass("im_history_appending"),i($(u),e).then(function(){x=!1,$(u).removeClass("im_history_appending"),c()})}else $(p).removeClass("im_history_to_bottom"),$(d).css({bottom:""}),p.scrollTop=p.scrollHeight,c()})}}),r.$on("ui_history_change",function(){$(p).addClass("im_history_to_bottom"),$(d).css({bottom:0}),onContentLoaded(function(){$(p).removeClass("im_history_to_bottom"),$(d).css({bottom:""}),s(!0),_=!1,b=!1,a()})}),r.$on("ui_history_change_scroll",function(){onContentLoaded(a)}),r.$on("ui_history_focus",function(){T||(p.scrollTop=p.scrollHeight,S(),T=!0)}),r.$on("ui_history_prepend",function(){var e=p.scrollHeight,n=p.scrollTop,i=parseInt($(p).css("paddingRight")),o=p.clientHeight;$(p).addClass("im_history_to_bottom"),p.scrollHeight,$(d).css({bottom:-(e-n-o),marginLeft:-Math.ceil(i/2)});var a=function(){$(p).removeClass("im_history_to_bottom"),$(d).css({bottom:"",marginLeft:""}),p.scrollTop=n+p.scrollHeight-e,c(),_=!1,t(function(){p.scrollHeight!=e&&$(p).trigger("scroll")}),clearTimeout(s),l()},s=setTimeout(a,0),l=r.$on("$viewContentLoaded",a)}),r.$on("ui_history_append",function(){var e=p.scrollHeight;onContentLoaded(function(){T=!1,c(),b=!1,t(function(){p.scrollHeight!=e&&$(p).trigger("scroll")})})}),r.$on("ui_panel_update",function(){onContentLoaded(function(){s(),r.$broadcast("ui_message_send"),t(function(){$(p).trigger("scroll")})})}),r.$on("ui_selection_clear",function(){window.getSelection?window.getSelection().empty?window.getSelection().empty():window.getSelection().removeAllRanges&&window.getSelection().removeAllRanges():document.selection&&document.selection.empty()}),r.$on("ui_editor_resize",s),r.$on("ui_height",function(){onContentLoaded(s)});var T=!0;$(p).on("scroll",function(){!o.is(":visible")||$(p).hasClass("im_history_to_bottom")||x||(T=p.scrollTop>=p.scrollHeight-p.clientHeight,!_&&p.scrollTop<=300?(_=!0,r.$emit("history_need_more")):!b&&p.scrollTop>=p.scrollHeight-p.clientHeight-300&&(b=!0,r.$emit("history_need_less")))}),$(e).on("resize",s),s(),onContentLoaded(s)}return{link:r}}]).directive("mySendForm",["$timeout","$modalStack","Storage","ErrorService",function(e,t,n,i){function r(r,o){function a(){E=0,T=0}function s(){if(C){e.cancel(k);var t=$("<div>").text(r.draftMessage.text||"").html();t=t.replace(/\n/g,"<br/>"),$(C).html(t),l()}}function c(){C&&($(C).trigger("change"),l())}function l(){var e=C.offsetHeight;A!=e&&(A=e,r.$emit("ui_editor_resize"))}function u(e){return 9!=e.keyCode||e.shiftKey||e.ctrlKey||e.metaKey||t.getTop()?void 0:(w.focus(),cancelEvent(e))}function p(){onContentLoaded(function(){w.focus()})}function d(e){var t,n=e&&e.target;if(n&&(t=n.src)&&0===t.indexOf("data")){n.parentNode.removeChild(n),t=t.substr(5).split(";");for(var o=t[0],a=atob(t[1].split(",")[1]),s=new Uint8Array(a.length),c=0;c<a.length;c++)s[c]=a.charCodeAt(c);var l=new Blob([s],{type:o});i.confirm({type:"FILE_CLIPBOARD_PASTE"}).then(function(){r.draftMessage.files=[l],r.draftMessage.isMedia=!0})}}function f(e){var t,n=(e.originalEvent||e).clipboardData,o=n&&n.items||[],a=[];for(t=0;t<o.length;t++)"file"==o[t].kind&&a.push(o[t].getAsFile());a.length>0&&i.confirm({type:"FILES_CLIPBOARD_PASTE",files:a}).then(function(){r.draftMessage.files=a,r.draftMessage.isMedia=!0})}function h(e){var t=!1;return g&&1!=g||(g=checkDragEvent(e)?2:1,t=!0),2==g&&(m&&setTimeout(function(){clearTimeout(m),m=!1},0),"dragenter"==e.type||"dragover"==e.type?t&&$(_).css({height:$(w).height()+12,width:$(w).width()+12}).show():("drop"==e.type&&r.$apply(function(){r.draftMessage.files=Array.prototype.slice.call(e.originalEvent.dataTransfer.files),r.draftMessage.isMedia=!0}),m=setTimeout(function(){$(_).hide(),g=!1,m=!1},300))),cancelEvent(e)}var g,m,y=$("textarea",o)[0],v=$("input",o),_=$(".im_send_dropbox_wrap",o)[0],b=$(".im_emoji_btn",o)[0],w=y,S=($(y).emojiarea({button:b,norealTime:!0}),$(".emoji-menu",o)[0],$(".im_submit",o)[0]),C=$(".emoji-wysiwyg-editor",o)[0];if(C){w=C,$(C).addClass("form-control"),$(C).attr("placeholder",$(y).attr("placeholder"));var k;$(C).on("DOMNodeInserted",d).on("keyup",function(){l(),r.draftMessage.text=C.innerText,e.cancel(k),k=e(c,1e3)})}e(function(){v.add(".im_head_attach input").on("change",function(){var e=this;r.$apply(function(){r.draftMessage.files=Array.prototype.slice.call(e.files),r.draftMessage.isMedia=$(e).hasClass("im_media_attach_input"),setTimeout(function(){try{e.value=""}catch(t){}},1e3)})})},1e3);var M=!0,x=function(){n.get("send_ctrlenter").then(function(e){M=!e})};r.$on("settings_changed",x),x(),$(w).on("keydown",function(e){if(C&&l(),13==e.keyCode){var t=!1;if(M&&!e.shiftKey?t=!0:M||!e.ctrlKey&&!e.metaKey||(t=!0),t)return $(o).trigger("submit"),$(o).trigger("message_send"),a(),cancelEvent(e)}}),$(S).on("mousedown touchstart",function(e){return $(o).trigger("submit"),$(o).trigger("message_send"),a(),cancelEvent(e)});var T,E=0;$(w).on("keyup",function(){var e=tsNow(),t=w[C?"textContent":"value"].length;e-E>5e3&&t!=T&&(E=e,T=t,r.$emit("ui_typing"))});var A=C.offsetHeight;$(document).on("keydown",u),$("body").on("dragenter dragleave dragover drop",h),$(document).on("paste",f),Config.Navigator.touch||(r.$on("ui_peer_change",p),r.$on("ui_history_focus",p),r.$on("ui_history_change",p)),r.$on("ui_message_send",p),r.$on("ui_peer_draft",s),r.$on("ui_message_before_send",c),r.$on("$destroy",function(){$("body").off("dragenter dragleave dragover drop",h),$(document).off("paste",f),$(document).off("keydown",u),$(S).off("mousedown"),v.off("change"),C&&$(C).off("DOMNodeInserted keyup",d),$(w).off("keydown")}),Config.Navigator.touch||p()}return{link:r,scope:{draftMessage:"="}}}]).directive("myLoadThumb",["MtpApiFileManager",function(e){function t(t,n){var i=0,r=e.getCachedFile(t.thumb&&t.thumb.location&&!t.thumb.location.empty&&t.thumb.location);r&&n.attr("src",r),t.thumb&&t.thumb.width&&t.thumb.height&&(n.attr("width",t.thumb.width),n.attr("height",t.thumb.height));var o=(t.$watchCollection("thumb.location",function(r){t.thumb&&t.thumb.width&&t.thumb.height&&(n.attr("width",t.thumb.width),n.attr("height",t.thumb.height),t.$emit("ui_height"));var a=++i;if(!r||r.empty)return n.attr("src",t.thumb&&t.thumb.placeholder||"img/blank.gif"),void o();var s=e.getCachedFile(r);return s?(n.attr("src",s),void o()):(n.attr("src")||n.attr("src",t.thumb.placeholder||"img/blank.gif"),void e.downloadSmallFile(t.thumb.location).then(function(e){a==i&&(n.attr("src",e),o())},function(e){console.log("Download image failed",e,t.thumb.location,n[0]),a==i&&(n.attr("src",t.thumb.placeholder||"img/blank.gif"),o())}))}),angular.noop)}return{link:t,scope:{thumb:"="}}}]).directive("myLoadFullPhoto",["MtpApiFileManager",function(e){function t(t,n){var i=$("img",n)[0],r=$(".img_fullsize_with_progress_wrap",n).add(".img_fullsize_progress_wrap",n).add($(i)),o=function(){r.css({width:t.fullPhoto.width,height:t.fullPhoto.height}),t.$emit("ui_height")},a=0;t.$watchCollection("fullPhoto.location",function(){var n=e.getCachedFile(t.thumbLocation),r=++a;if(n?(i.src=n,o()):i.src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",t.fullPhoto.location){var s;if(t.fullPhoto.size){var c={_:"inputFileLocation",volume_id:t.fullPhoto.location.volume_id,local_id:t.fullPhoto.location.local_id,secret:t.fullPhoto.location.secret};s=e.downloadFile(t.fullPhoto.location.dc_id,c,t.fullPhoto.size)}else s=e.downloadSmallFile(t.fullPhoto.location);t.progress={enabled:!0,percent:0},s.then(function(e){r==a&&(t.progress.enabled=!1,i.src=e,o())},function(e){console.log("Download image failed",e,t.fullPhoto.location),t.progress.enabled=!1,t.error=e&&"FS_BROWSER_UNSUPPORTED"==e.type?{html:'Your browser doesn\'t support <a href="https://developer.mozilla.org/en-US/docs/Web/API/LocalFileSystem" target="_blank">LocalFileSystem</a> feature which is needed to display this image.<br/>Please, install <a href="http://google.com/chrome" target="_blank">Google Chrome</a> or use <a href="https://telegram.org/" target="_blank">mobile app</a> instead.'}:{text:"Download failed",error:e}},function(e){t.progress.percent=Math.max(1,Math.floor(100*e.done/e.total))})}}),o()}return{link:t,transclude:!0,templateUrl:"partials/full_photo.html",scope:{fullPhoto:"=",thumbLocation:"="}}}]).directive("myLoadVideo",["$sce","MtpApiFileManager",function(e,t){function n(n){n.progress={enabled:!0,percent:1},n.player={};var i,r={_:"inputVideoFileLocation",id:n.video.id,access_hash:n.video.access_hash},o=!1;if(navigator.plugins)for(i=0;i<navigator.plugins.length;i++)navigator.plugins[i].name.indexOf("QuickTime")>=0&&(o=!0);var a=t.downloadFile(n.video.dc_id,r,n.video.size,{mime:"video/mp4"});a.then(function(t){n.progress.enabled=!1,n.player.hasQuicktime=o,n.player.quicktime=!1,n.player.src=e.trustAsResourceUrl(t),n.$emit("ui_height")},function(e){console.log("Download video failed",e,n.video),n.progress.enabled=!1,n.player.src="",n.error=e&&"FS_BROWSER_UNSUPPORTED"==e.type?{html:'Your browser doesn\'t support <a href="https://developer.mozilla.org/en-US/docs/Web/API/LocalFileSystem" target="_blank">LocalFileSystem</a> feature which is needed to play this video.<br/>Please, install <a href="http://google.com/chrome" target="_blank">Google Chrome</a> or use <a href="https://telegram.org/" target="_blank">mobile app</a> instead.'}:{text:"Video download failed",error:e}},function(e){n.progress.percent=Math.max(1,Math.floor(100*e.done/e.total))}),n.$emit("ui_height"),n.$on("$destroy",function(){a.cancel()})}return{link:n,transclude:!0,templateUrl:"partials/full_video.html",scope:{video:"="}}}]).directive("myLoadGif",["MtpApiFileManager",function(e){function t(t){var n=!1,i={_:"inputDocumentFileLocation",id:t.document.id,access_hash:t.document.access_hash};t.isActive=!1,t.document.url=e.getCachedFile(i),t.toggle=function(){return t.document.url?(t.isActive=!t.isActive,void t.$emit("ui_height")):n?(n.cancel(),void(n=!1)):(t.document.progress={enabled:!0,percent:1,total:t.document.size},n=e.downloadFile(t.document.dc_id,i,t.document.size,null,{mime:t.document.mime_type}),void n.then(function(e){t.document.url=e,t.isActive=!0,delete t.document.progress,console.log("file save done"),t.$emit("ui_height")},function(){t.document.progress.enabled=!1},function(e){console.log("dl progress",e),t.document.progress.done=e.done,t.document.progress.percent=Math.max(1,Math.floor(100*e.done/e.total))}))}}return{link:t,templateUrl:"partials/full_gif.html",scope:{document:"="}}}]).directive("myMapPoint",["ExternalResourcesManager",function(e){function t(t,n){var i="AIzaSyC32ij28dCa0YzEV_HqbWfIwTZQql-RNS0",r="https://maps.googleapis.com/maps/api/staticmap?sensor=false&center="+t.point.lat+","+t.point["long"]+"&zoom=13&size=200x100&scale=2&key="+i;e.downloadImage(r).then(function(e){n.append('<img src="'+e+'" width="200" height="100"/>')}),n.attr("href","https://maps.google.com/?q="+t.point.lat+","+t.point["long"]),n.attr("target","_blank")}return{link:t,scope:{point:"="}}}]).directive("myLoadingDots",["$interval",function(){function e(e,n){n.html(t(n[0])?'<div class="loading_dots"><span></span><span></span><span></span></div>':"...")}function t(e){if(void 0===n&&(n=void 0!==e.style.animationName,n===!1)){var t,i="Webkit Moz O ms Khtml".split(" ");for(t=0;t<i.length;t++)if(void 0!==e.style[i[t]+"AnimationName"]){n=!0;break}}return n}return{link:e};var n}]).directive("myAudioAutoplay",function(){function e(e,t){e.$watch("audio.autoplay",function(e){e?(t.autoplay=!0,t[0].play()):t.autoplay=!1})}return{link:e,scope:{audio:"="}}}).directive("myFocused",function(){return{link:function(e,t){return Config.Navigator.touch?!1:void setTimeout(function(){t[0].focus()},100)}}}).directive("myFocusOn",function(){return{link:function(e,t,n){e.$on(n.myFocusOn,function(){return Config.Navigator.touch?!1:void onContentLoaded(function(){t[0].focus()})})}}}).directive("myFileUpload",function(){function e(e,t){t.on("change",function(){var t=this;e.$apply(function(){e.photo.file=t.files[0],setTimeout(function(){try{t.value=""}catch(e){}},1e3)})})}return{link:e}}).directive("myModalWidth",function(){function e(e,t,n){n.$observe("myModalWidth",function(e){$(t[0].parentNode.parentNode).css({width:parseInt(e)+(Config.Navigator.mobile?0:36)})})}return{link:e}}).directive("myModalNav",function(){function e(e,t,n){var i=function(t){var i=t.target;if(!i||"INPUT"!=i.tagName&&"TEXTAREA"!=i.tagName)switch(t.keyCode){case 39:case 32:case 34:case 40:e.$eval(n.next);break;case 37:case 33:case 38:e.$eval(n.prev)}};$(document).on("keydown",i),e.$on("$destroy",function(){$(document).off("keydown",i)})}return{link:e}}).directive("myCustomBackground",function(){function e(e,t,n){console.log(dT(),"bg",n.myCustomBackground),$("html").css({background:n.myCustomBackground}),e.$on("$destroy",function(){$("html").css({background:""})})}return{link:e}}).directive("myInfiniteScroller",function(){function e(e,t){var n=$(".nano-content",t)[0],i=!1;$(n).on("scroll",function(){t.is(":visible")&&!i&&n.scrollTop>=n.scrollHeight-n.clientHeight-300&&(i=!0,e.$apply(function(){e.slice.limit+=e.slice.limitDelta||20}),onContentLoaded(function(){i=!1,$(t).nanoScroller()}))})}return{link:e,scope:!0}}).directive("myModalPosition",["$window","$timeout",function(e,t){function n(n,i,r){var o=function(){if(!Config.Navigator.mobile||!$(i[0].parentNode.parentNode.parentNode).hasClass("page_modal")){var e=i[0].parentNode.offsetHeight,n=i[0].parentNode.parentNode.parentNode.offsetHeight;n>e?$(i[0].parentNode).css("marginTop",(n-e)/2):$(i[0].parentNode).css("marginTop",""),"no"!=r.animation&&t(function(){$(i[0].parentNode).addClass("modal-content-animated")},300)}};onContentLoaded(o),$(e).on("resize",o),n.$on("ui_height",function(){onContentLoaded(o)})}return{link:n}}]).directive("myVerticalPosition",["$window","$timeout",function(e){function t(t,n,i){var r="true"===i.padding,o=0,a=function(){var a=n[0].offsetHeight,s=a-(a&&r?2*o:0),c=$(e).height(),l=i.myVerticalPosition&&parseFloat(i.myVerticalPosition)||.5,u=c>s?parseInt((c-s)*l):"",p=r?{paddingTop:u,paddingBottom:u}:{marginTop:u,marginBottom:u};n.css(p),n.addClass("vertical-aligned"),o!==u&&t.$emit("ui_height"),o=u};onContentLoaded(a),$(e).on("resize",a),t.$on("ui_height",function(){onContentLoaded(a)})}return{link:t}}]);
//# sourceMappingURL=js/app.js.map