From 2f1e29ece66e4a34b78b5c04652c395ee1fec92b Mon Sep 17 00:00:00 2001 From: Igor Zhukov Date: Sat, 9 Dec 2017 00:42:36 +0400 Subject: [PATCH] Update 2017-12-08T20:42:19.943Z --- index.html | 2 +- js/app.js | 47 ++++++++++++++++++++--------------------- js/background.js | 2 +- js/lib/bin_utils.js | 2 +- js/lib/crypto_worker.js | 2 +- js/lib/polyfill.js | 35 +++++++++++++++++++++++++----- manifest.json | 2 +- manifest.webapp | 2 +- service_worker.js | 4 ++-- webogram.appcache | 2 +- 10 files changed, 62 insertions(+), 38 deletions(-) diff --git a/index.html b/index.html index cecafd4c..765afd48 100644 --- a/index.html +++ b/index.html @@ -1 +1 @@ -Telegram Web
\ No newline at end of file +Telegram Web
\ No newline at end of file diff --git a/js/app.js b/js/app.js index 1a228332..58696133 100644 --- a/js/app.js +++ b/js/app.js @@ -1,8 +1,8 @@ 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,a,r){for(;--r>=0;){var o=t*this[e++]+n[i]+a;a=Math.floor(o/67108864),n[i++]=67108863&o}return a}function am2(e,t,n,i,a,r){for(var o=32767&t,s=t>>15;--r>=0;){var l=32767&this[e],c=this[e++]>>15,d=s*l+c*o;l=o*l+((32767&d)<<15)+n[i]+(1073741823&a),a=(l>>>30)+(d>>>15)+s*c+(a>>>30),n[i++]=1073741823&l}return a}function am3(e,t,n,i,a,r){for(var o=16383&t,s=t>>14;--r>=0;){var l=16383&this[e],c=this[e++]>>14,d=s*l+c*o;l=o*l+((16383&d)<<14)+n[i]+a,a=(l>>28)+(d>>14)+s*c,n[i++]=268435455&l}return a}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=e<0?-1:0,e>0?this[0]=e:e<-1?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 a=e.length,r=!1,o=0;--a>=0;){var s=8==i?255&e[a]:intAt(e,a);s<0?"-"==e.charAt(a)&&(r=!0):(r=!1,0==o?this[this.t++]=s:o+i>this.DB?(this[this.t-1]|=(s&(1<>this.DB-o):this[this.t-1]|=s<=this.DB&&(o-=this.DB))}8==i&&0!=(128&e[0])&&n&&(this.s=-1,o>0&&(this[this.t-1]|=(1<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<0)for(s>s)>0&&(a=!0,r=int2char(n));o>=0;)s>(s+=this.DB-t)):(n=this[o]>>(s-=t)&i,s<=0&&(s+=this.DB,--o)),n>0&&(a=!0),a&&(r+=int2char(n));return a?r:"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=0;--n)t[n+o+1]=this[n]>>a|s,s=(this[n]&r)<=0;--n)t[n]=0;t[o]=s,t.t=this.t+o+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,a=this.DB-i,r=(1<>i;for(var o=n+1;o>i;i>0&&(t[this.t-n-1]|=(this.s&r)<>=this.DB;if(e.t>=this.DB;i+=this.s}else{for(i+=this.s;n>=this.DB;i-=e.s}t.s=i<0?-1:0,i<-1?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(),a=n.t;for(t.t=a+i.t;--a>=0;)t[a]=0;for(a=0;a=0;)e[n]=0;for(n=0;n=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 a=this.abs();if(a.t0?(i.lShiftTo(l,r),a.lShiftTo(l,n)):(i.copyTo(r),a.copyTo(n));var c=r.t,d=r[c-1];if(0!=d){var u=d*(1<1?r[c-2]>>this.F2:0),p=this.FV/u,f=(1<=0&&(n[n.t++]=1,n.subTo(_,n)),BigInteger.ONE.dlShiftTo(c,_),_.subTo(r,r);r.t=0;){var v=n[--h]==d?this.DM:Math.floor(n[h]*p+(n[h-1]+m)*f);if((n[h]+=r.am(0,v,n,g,0,c))0&&n.rShiftTo(l,n),o<0&&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<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>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||e<1)return BigInteger.ONE;var n=nbi(),i=nbi(),a=t.convert(this),r=nbits(e)-1;for(a.copyTo(n);--r>=0;)if(t.sqrTo(n,i),(e&1<0)t.mulTo(i,a,n);else{var o=n;n=i,i=o}return t.revert(n)}function bnModPowInt(e,t){var n;return n=e<256||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)<>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()||e<2||e>36)return"0";var t=this.chunkSize(e),n=Math.pow(e,t),i=nbv(n),a=nbi(),r=nbi(),o="";for(this.divRemTo(i,a,r);a.signum()>0;)o=(n+r.intValue()).toString(e).substr(1)+o,a.divRemTo(i,a,r);return r.intValue().toString(e)+o}function bnpFromRadix(e,t){this.fromInt(0),null==t&&(t=10);for(var n=this.chunkSize(t),i=Math.pow(t,n),a=!1,r=0,o=0,s=0;s=n&&(this.dMultiply(i),this.dAddOffset(o,0),r=0,o=0))}r>0&&(this.dMultiply(Math.pow(t,r)),this.dAddOffset(o,0)),a&&BigInteger.ZERO.subTo(this,this)}function bnpFromNumber(e,t,n){if("number"==typeof t)if(e<2)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,a=7&e;i.length=(e>>3)+1,t.nextBytes(i),a>0?i[0]&=(1<0)for(a>a)!=(this.s&this.DM)>>a&&(n[r++]=i|this.s<=0;)a<8?(i=(this[t]&(1<>(a+=this.DB-8)):(i=this[t]>>(a-=8)&255,a<=0&&(a+=this.DB,--t)),e&&0!=(128&i)&&(i|=-256),0==r&&(128&this.s)!=(128&i)&&++r,(r>0||i!=this.s)&&(n[r++]=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,a,r=Math.min(e.t,this.t);for(i=0;i>=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?0!=this.s:0!=(this[t]&1<>=this.DB;if(e.t>=this.DB;i+=this.s}else{for(i+=this.s;n>=this.DB;i+=e.s}t.s=i<0?-1:0,i>0?t[n++]=i:i<-1&&(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 a;for(a=n.t-this.t;i=0;)n[i]=0;for(i=Math.max(t-this.t,0);i2*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,a=e.bitLength(),r=nbv(1);if(a<=0)return r;n=a<18?1:a<48?3:a<144?4:a<768?5:6,i=a<8?new Classic(t):t.isEven()?new Barrett(t):new Montgomery(t);var o=new Array,s=3,l=n-1,c=(1<1){var d=nbi();for(i.sqrTo(o[1],d);s<=c;)o[s]=nbi(),i.mulTo(d,o[s-2],o[s]),s+=2}var u,p,f=e.t-1,m=!0,h=nbi();for(a=nbits(e[f])-1;f>=0;){for(a>=l?u=e[f]>>a-l&c:(u=(e[f]&(1<0&&(u|=e[f-1]>>this.DB+a-l)),s=n;0==(1&u);)u>>=1,--s;if((a-=s)<0&&(a+=this.DB,--f),m)o[u].copyTo(r),m=!1;else{for(;s>1;)i.sqrTo(r,h),i.sqrTo(h,r),s-=2;s>0?i.sqrTo(r,h):(p=r,r=h,h=p),i.mulTo(h,o[u],r)}for(;f>=0&&0==(e[f]&1<0&&(t.rShiftTo(r,t),n.rShiftTo(r,n));t.signum()>0;)(a=t.getLowestSetBit())>0&&t.rShiftTo(a,t),(a=n.getLowestSetBit())>0&&n.rShiftTo(a,n),t.compareTo(n)>=0?(t.subTo(n,t),t.rShiftTo(1,t)):(n.subTo(t,n),n.rShiftTo(1,n));return r>0&&n.lShiftTo(r,n),n}function bnpModInt(e){if(e<=0)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(),a=nbv(1),r=nbv(0),o=nbv(0),s=nbv(1);0!=n.signum();){for(;n.isEven();)n.rShiftTo(1,n),t?(a.isEven()&&r.isEven()||(a.addTo(this,a),r.subTo(e,r)),a.rShiftTo(1,a)):r.isEven()||r.subTo(e,r),r.rShiftTo(1,r);for(;i.isEven();)i.rShiftTo(1,i),t?(o.isEven()&&s.isEven()||(o.addTo(this,o),s.subTo(e,s)),o.rShiftTo(1,o)):s.isEven()||s.subTo(e,s),s.rShiftTo(1,s);n.compareTo(i)>=0?(n.subTo(i,n),t&&a.subTo(o,a),r.subTo(s,r)):(i.subTo(n,i),t&&o.subTo(a,o),s.subTo(r,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>1,e>lowprimes.length&&(e=lowprimes.length);for(var a=nbi(),r=0;r>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_pptr0;t--);for(n=0,i=e[t];i;i>>=1,n++);return n+=bpe*t}function expand(e,t){var n=int2bigInt(0,(e.length>t?e.length:t)*bpe,0);return copy_(n,e),n}function randTruePrime(e){var t=int2bigInt(0,e,0);return randTruePrime_(t,e),trim(t,1)}function randProbPrime(e){return e>=600?randProbPrimeRounds(e,2):e>=550?randProbPrimeRounds(e,4):e>=500?randProbPrimeRounds(e,5):e>=400?randProbPrimeRounds(e,6):e>=350?randProbPrimeRounds(e,7):e>=300?randProbPrimeRounds(e,9):e>=250?randProbPrimeRounds(e,12):e>=200?randProbPrimeRounds(e,15):e>=150?randProbPrimeRounds(e,18):e>=100?randProbPrimeRounds(e,27):randProbPrimeRounds(e,40)}function randProbPrimeRounds(e,t){var n,i,a,r;for(r=3e4,n=int2bigInt(0,e,0),0==primes.length&&(primes=findPrimes(3e4)),rpprb.length!=n.length&&(rpprb=dup(n));;){for(randBigInt_(n,e,0),n[0]|=1,a=0,i=0;it.length?e.length+1:t.length+1);return sub_(n,t),trim(n,1)}function add(e,t){var n=expand(e,e.length>t.length?e.length+1:t.length+1);return add_(n,t),trim(n,1)}function inverseMod(e,t){var n,i=expand(e,t.length);return n=inverseMod_(i,t),n?trim(i,1):null}function multMod(e,t,n){var i=expand(e,n.length);return multMod_(i,t,n),trim(i,1)}function randTruePrime_(e,t){var n,i,a,r,o,s,l,c,d,u,p;if(0==primes.length&&(primes=findPrimes(3e4)),0==pows.length)for(pows=new Array(512),o=0;o<512;o++)pows[o]=Math.pow(2,o/511-1);if(n=.1,i=20,recLimit=20,s_i2.length!=e.length&&(s_i2=dup(e),s_R=dup(e),s_n1=dup(e),s_r2=dup(e),s_d=dup(e),s_x1=dup(e),s_x2=dup(e),s_b=dup(e),s_n=dup(e),s_i=dup(e),s_rm=dup(e),s_q=dup(e),s_a=dup(e),s_aa=dup(e)),t<=recLimit){for(a=(1<<(t+2>>1))-1,copyInt_(e,0),r=1;r;)for(r=0,e[0]=1|1<2*i)for(s=1;t-t*s<=i;)s=pows[Math.floor(512*Math.random())];else s=.5;for(p=Math.floor(s*t)+1,randTruePrime_(s_q,p),copyInt_(s_i2,0),s_i2[Math.floor((t-2)/bpe)]|=1<<(t-2)%bpe,divide_(s_i2,s_q,s_i,s_rm),d=bitSize(s_i);;){for(;randBigInt_(s_R,d,0),!greater(s_i,s_R););for(addInt_(s_R,1),add_(s_R,s_i),copy_(s_n,s_q),mult_(s_n,s_R),multInt_(s_n,2),addInt_(s_n,1),copy_(s_r2,s_R),multInt_(s_r2,2),c=0,o=0;o0;o--);for(u=0,w=s_n[o];w;w>>=1,u++);for(u+=bpe*o;randBigInt_(s_a,u,0),!greater(s_n,s_a););if(addInt_(s_n,3),addInt_(s_a,2),copy_(s_b,s_a),copy_(s_n1,s_n),addInt_(s_n1,-1),powMod_(s_b,s_n1,s_n),addInt_(s_b,-1),isZero(s_b)&&(copy_(s_b,s_a),powMod_(s_b,s_r2,s_n),addInt_(s_b,-1),copy_(s_aa,s_n),copy_(s_d,s_b),GCD_(s_d,s_n),equalsInt(s_d,1)))return void copy_(e,s_aa)}}}function randBigInt(e,t){var n,i;return n=Math.floor((e-1)/bpe)+2,i=int2bigInt(0,0,n),randBigInt_(i,e,t),i}function randBigInt_(e,t,n){var i,a;for(i=0;i=0;i--);for(a=e[i],r=n[i],o=1,s=0,l=0,c=1;r+l&&r+c&&(d=Math.floor((a+o)/(r+l)),qp=Math.floor((a+s)/(r+c)),d==qp);)t=o-d*l,o=l,l=t,t=s-d*c,s=c,c=t,t=a-d*r,a=r,r=t;s?(copy_(T,e),linComb_(e,n,o,s),linComb_(n,T,c,l)):(mod_(e,n),copy_(T,e),copy_(e,n),copy_(n,T))}if(0!=n[0])for(t=modInt(e,n[0]),copyInt_(e,n[0]),n[0]=t;n[0];)e[0]%=n[0],t=e[0],e[0]=n[0],n[0]=t}function inverseMod_(e,t){var n=1+2*Math.max(e.length,t.length);if(!(1&e[0]||1&t[0]))return copyInt_(e,0),0;for(eg_u.length!=n&&(eg_u=new Array(n),eg_v=new Array(n),eg_A=new Array(n),eg_B=new Array(n),eg_C=new Array(n),eg_D=new Array(n)),copy_(eg_u,e),copy_(eg_v,t),copyInt_(eg_A,1),copyInt_(eg_B,0),copyInt_(eg_C,0),copyInt_(eg_D,1);;){for(;!(1&eg_u[0]);)halve_(eg_u),1&eg_A[0]||1&eg_B[0]?(add_(eg_A,t),halve_(eg_A),sub_(eg_B,e),halve_(eg_B)):(halve_(eg_A),halve_(eg_B));for(;!(1&eg_v[0]);)halve_(eg_v),1&eg_C[0]||1&eg_D[0]?(add_(eg_C,t),halve_(eg_C),sub_(eg_D,e),halve_(eg_D)):(halve_(eg_C),halve_(eg_D));if(greater(eg_v,eg_u)?(sub_(eg_v,eg_u),sub_(eg_C,eg_A),sub_(eg_D,eg_B)):(sub_(eg_u,eg_v),sub_(eg_A,eg_C),sub_(eg_B,eg_D)),equalsInt(eg_u,0)){for(;negative(eg_C);)add_(eg_C,t);return copy_(e,eg_C),equalsInt(eg_v,1)?1:(copyInt_(e,0),0)}}}function inverseModInt(e,t){for(var n=1,i=0;;){if(1==e)return n;if(0==e)return 0;if(i-=n*Math.floor(t/e),t%=e,1==t)return i;if(0==t)return 0;n-=i*Math.floor(e/t),e%=t}}function inverseModInt_(e,t){return inverseModInt(e,t)}function eGCD_(e,t,n,i,a){var r=0,o=Math.max(e.length,t.length);for(eg_u.length!=o&&(eg_u=new Array(o),eg_A=new Array(o),eg_B=new Array(o),eg_C=new Array(o),eg_D=new Array(o));!(1&e[0]||1&t[0]);)halve_(e),halve_(t),r++;for(copy_(eg_u,e),copy_(n,t),copyInt_(eg_A,1),copyInt_(eg_B,0),copyInt_(eg_C,0),copyInt_(eg_D,1);;){for(;!(1&eg_u[0]);)halve_(eg_u),1&eg_A[0]||1&eg_B[0]?(add_(eg_A,t),halve_(eg_A),sub_(eg_B,e),halve_(eg_B)):(halve_(eg_A),halve_(eg_B));for(;!(1&n[0]);)halve_(n),1&eg_C[0]||1&eg_D[0]?(add_(eg_C,t),halve_(eg_C),sub_(eg_D,e),halve_(eg_D)):(halve_(eg_C),halve_(eg_D));if(greater(n,eg_u)?(sub_(n,eg_u),sub_(eg_C,eg_A),sub_(eg_D,eg_B)):(sub_(eg_u,n),sub_(eg_A,eg_C),sub_(eg_B,eg_D)),equalsInt(eg_u,0)){for(;negative(eg_C);)add_(eg_C,t),sub_(eg_D,e);return multInt_(eg_D,-1),copy_(i,eg_C),copy_(a,eg_D),void leftShift_(n,r)}}}function negative(e){return e[e.length-1]>>bpe-1&1}function greaterShift(e,t,n){var i,a=e.length,r=t.length;for(k=a+n=0;i++)if(e[i]>0)return 1;for(i=a-1+n;i0)return 0;for(i=k-1;i>=n;i--){if(e[i-n]>t[i])return 1;if(e[i-n]=0;n--){if(e[n]>t[n])return 1;if(e[n]>=1;for(d=bpe-d,leftShift_(t,d),leftShift_(i,d),a=i.length;0==i[a-1]&&a>r;a--);for(copyInt_(n,0);!greaterShift(t,i,a-r);)subShift_(i,t,a-r),n[a-r]++;for(o=a-1;o>=r;o--){for(i[o]==t[r-1]?n[o-r]=mask:n[o-r]=Math.floor((i[o]*radix+i[o-1])/t[r-1]);l=(r>1?t[r-2]:0)*n[o-r],c=l>>bpe,l&=mask,s=c+n[o-r]*t[r-1],c=s>>bpe,s&=mask,c==i[o]?s==i[o-1]?l>(o>1?i[o-2]:0):s>i[o-1]:c>i[o];)n[o-r]--;linCombShift_(i,t,-n[o-r],o-r),negative(i)&&(addShift_(i,t,o-r),n[o-r]--)}rightShift_(t,d),rightShift_(i,d)}function carry_(e){var t,n,i,a;for(n=e.length,i=0,t=0;t>bpe),i+=a*radix),e[t]=i&mask,i=(i>>bpe)-a}function modInt(e,t){var n,i=0;for(n=e.length-1;n>=0;n--)i=(i*radix+e[n])%t;return i}function int2bigInt(e,t,n){var i;return i=Math.ceil(t/bpe)+1,i=n>i?n:i,buff=new Array(i),copyInt_(buff,e),buff}function str2bigInt(e,t,n){var i,a,r,o,s,l=e.length;if(t==-1){for(r=new Array(0);;){for(o=new Array(r.length+1),a=0;a=36&&(i-=26),!(i>=t||i<0));a++)multInt_(r,t),addInt_(r,i);for(l=r.length;l>0&&!r[l-1];l--);for(l=n>l+1?n:l+1,o=new Array(l),s=lt.length){for(;n0;n--)a+=e[n]+",";a+=e[0]}else for(;!isZero(s6);)i=divInt_(s6,t),a=digitsStr.substring(i,i+1)+a;return 0==a.length&&(a="0"),a}function dup(e){return buff=new Array(e.length),copy_(buff,e),buff}function copy_(e,t){var n,i=e.length>=bpe}function addInt_(e,t){var n,i,a,r;for(e[0]+=t,i=e.length,a=0,n=0;n>bpe),a+=r*radix),e[n]=a&mask,a=(a>>bpe)-r,!a)return}function rightShift_(e,t){var n,i=Math.floor(t/bpe);if(i){for(n=0;n>t);e[n]>>=t}function halve_(e){var t;for(t=0;t>1);e[t]=e[t]>>1|e[t]&radix>>1}function leftShift_(e,t){var n,i=Math.floor(t/bpe);if(i){for(n=e.length;n>=i;n--)e[n]=e[n-i];for(;n>=0;n--)e[n]=0;t%=bpe}if(t){for(n=e.length-1;n>0;n--)e[n]=mask&(e[n]<>bpe-t);e[n]=mask&e[n]<>bpe),a+=r*radix),e[n]=a&mask,a=(a>>bpe)-r}function divInt_(e,t){var n,i,a=0;for(n=e.length-1;n>=0;n--)i=a*radix+e[n],e[n]=Math.floor(i/t),a=i%t;return a}function linComb_(e,t,n,i){var a,r,o,s;for(o=e.length>=bpe;for(a=o;a>=bpe}function linCombShift_(e,t,n,i){var a,r,o,s;for(o=e.length>=bpe;for(a=o;r&&a>=bpe}function addShift_(e,t,n){var i,a,r,o;for(r=e.length>=bpe;for(i=r;a&&i>=bpe}function subShift_(e,t,n){var i,a,r,o;for(r=e.length>=bpe;for(i=r;a&&i>=bpe}function sub_(e,t){var n,i,a;for(a=e.length>=bpe;for(n=a;i&&n>=bpe}function add_(e,t){var n,i,a;for(a=e.length>=bpe;for(n=a;i&&n>=bpe}function mult_(e,t){var n;for(ss.length!=2*e.length&&(ss=new Array(2*e.length)),copyInt_(ss,0),n=0;n0&&!e[r-1];r--);for(o=r>t.length?2*r:2*t.length,s0.length!=o&&(s0=new Array(o)),copyInt_(s0,0),n=0;n>=bpe,i=n+1;i>=bpe;s0[n+r]=a}mod_(s0,t),copy_(e,s0)}function trim(e,t){var n,i;for(n=e.length;n>0&&!e[n-1];n--);return i=new Array(n+t),copy_(i,e),i}function powMod_(e,t,n){var i,a,r,o;if(s7.length!=n.length&&(s7=dup(n)),0!=(1&n[0])){for(copyInt_(s7,0),r=n.length;r>0&&!n[r-1];r--);for(o=radix-inverseModInt(modInt(n,radix),radix),s7[r]=1,multMod_(e,s7,n),s3.length!=e.length?s3=dup(e):copy_(s3,e),i=t.length-1;i>0&!t[i];i--);if(0==t[i])return void copyInt_(e,1);for(a=1<>=1);for(;;){if(!(a>>=1)){if(i--,i<0)return void mont_(e,one,n,o);a=1<0&&0==n[d-1];d--);for(;u>0&&0==t[u-1];u--);for(c=sa.length-1,a=0;a>bpe,l=e[a],r=1;r>=bpe,r++,o+=sa[r]+s*n[r]+l*t[r],sa[r-1]=o&mask,o>>=bpe,r++,o+=sa[r]+s*n[r]+l*t[r],sa[r-1]=o&mask,o>>=bpe,r++,o+=sa[r]+s*n[r]+l*t[r],sa[r-1]=o&mask,o>>=bpe,r++,o+=sa[r]+s*n[r]+l*t[r],sa[r-1]=o&mask,o>>=bpe,r++;for(;r>=bpe,r++;for(;r>=bpe,r++,o+=sa[r]+s*n[r],sa[r-1]=o&mask,o>>=bpe,r++,o+=sa[r]+s*n[r],sa[r-1]=o&mask,o>>=bpe,r++,o+=sa[r]+s*n[r],sa[r-1]=o&mask,o>>=bpe,r++,o+=sa[r]+s*n[r],sa[r-1]=o&mask,o>>=bpe,r++;for(;r>=bpe,r++;for(;r>=bpe,r++;sa[r-1]=o&mask}greater(n,sa)||sub_(sa,n),copy_(e,sa)}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)||(t||e.preventDefault(),!1)}function isInDOM(e,t){return!!e&&(t=t||document.body,e==t||isInDOM(e.parentNode,t))}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").css({position:"absolute",width:100,height:100,overflow:"scroll",top:-9999}).appendTo($(document.body)),t=e[0].offsetWidth-e[0].clientWidth;return e.remove(),t}function onCtrlEnter(e,t){$(e).on("keydown",function(e){if(13==e.keyCode&&(e.ctrlKey||e.metaKey))return t(),cancelEvent(e)})}function setFieldSelection(e,t,n){e=$(e)[0];try{if(e.focus(),void 0!==t&&t!==!1||(t=e.value.length),void 0!==n&&n!==!1||(n=t),e.createTextRange){var i=e.createTextRange();i.collapse(!0),i.moveEnd("character",n),i.moveStart("character",t),i.select()}else e.setSelectionRange&&e.setSelectionRange(t,n)}catch(a){}}function getFieldSelection(e){if(e.selectionStart)return e.selectionStart;if(!document.selection)return 0;var t="",n=document.selection.createRange(),i=n.text,a=n.duplicate(),r=0;try{a.moveToElementText(e)}catch(o){return 0}return n.text=i+t,r=a.text.indexOf(t),n.moveStart("character",-1),n.text="",r}function getRichValue(e){if(!e)return"";var t=[],n=[];getRichElementValue(e,t,n),n.length&&t.push(n.join(""));var i=t.join("\n");return i=i.replace(/\u00A0/g," ")}function getRichValueWithCaret(e){if(!e)return[];var t,n,i=[],a=[],r=!!window.getSelection&&window.getSelection();if(r&&r.rangeCount){var o=r.getRangeAt(0);o.startContainer&&o.startContainer==o.endContainer&&o.startOffset==o.endOffset&&(t=o.startContainer,n=o.startOffset)}getRichElementValue(e,i,a,t,n),a.length&&i.push(a.join(""));var s=i.join("\n"),l=s.indexOf("");return l!=-1&&(s=s.substr(0,l)+s.substr(l+1)),s=s.replace(/\u00A0/g," "),[s,l]}function getRichElementValue(e,t,n,i,a){if(3!=e.nodeType){if(1==e.nodeType){var r,o=i===e,s="DIV"==e.tagName||"P"==e.tagName;s&&n.length||"BR"==e.tagName?(t.push(n.join("")),n.splice(0,n.length)):"IMG"==e.tagName&&e.alt&&n.push(e.alt),o&&!a&&n.push("");for(var r=e.firstChild;r;)getRichElementValue(r,t,n,i,a),r=r.nextSibling;o&&a&&n.push(""),s&&n.length&&(t.push(n.join("")),n.splice(0,n.length))}}else if(i===e){var l=e.nodeValue;n.push(l.substr(0,a)+""+l.substr(a))}else n.push(e.nodeValue)}function setRichFocus(e,t,n){if(e.focus(),!t||t.parentNode!=e||t.nextSibling||n||(e.removeChild(t),t=null),window.getSelection&&document.createRange){var i=document.createRange();t?i.selectNode(t):i.selectNodeContents(e),n||i.collapse(!1);var a=window.getSelection();a.removeAllRanges(),a.addRange(i)}else if(void 0!==document.body.createTextRange){var r=document.body.createTextRange();r.moveToElementText(t||e),n||r.collapse(!1),r.select()}}function getSelectedText(){var e=(window.getSelection&&window.getSelection()||document.getSelection&&document.getSelection()||document.selection&&document.selection.createRange().text||"").toString().replace(/^\s+|\s+$/g,"");return e}function scrollToNode(e,t,n){var i=t.offsetTop-15,a=t.offsetHeight+30,r=e.scrollTop,o=e.clientHeight;r>i?(e.scrollTop=i,$(n).nanoScroller({flash:!0})):r/g,">")}function calcImageInBox(e,t,n,i,a){var r=n,o=i;return e/t>n/i?o=parseInt(t*n/e):(r=parseInt(e*i/t),r>n&&(o=parseInt(o*n/r),r=n)),a&&r>=e&&o>=t&&(r=e,o=t),{w:r,h:o}}function versionCompare(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;nt[n]?1:-1;return 0}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>>t&24),2!==t&&i-r!==1||(n+=String.fromCharCode(uint6ToBase64(a>>>18&63),uint6ToBase64(a>>>12&63),uint6ToBase64(a>>>6&63),uint6ToBase64(63&a)),a=0);return n.replace(/A(?=A$|$)/g,"=")}function uint6ToBase64(e){return e<26?e+65:e<52?e+71:e<62?e-4:62===e?43:63===e?47:65}function base64ToBlob(e,t){for(var n=1024,i=atob(e),a=i.length,r=Math.ceil(a/n),o=new Array(r),s=0;s>>2]|=e[t]<<24-t%4*8;return new CryptoJS.lib.WordArray.init(i,n)}function bytesFromWords(e){for(var t=e.words,n=e.sigBytes,i=[],a=0;a>>2]>>>24-a%4*8&255);return i}function bytesFromBigInt(e,t){var n=e.toByteArray();if(t&&n.lengtht);)n=n.slice(1);return n}function bytesFromLeemonBigInt(e,t){var n=bigInt2str(e,16);return bytesFromHex(n)}function bytesToArrayBuffer(e){return new Uint8Array(e).buffer}function convertToArrayBuffer(e){return e instanceof ArrayBuffer?e:void 0!==e.buffer&&e.buffer.byteLength==e.length*e.BYTES_PER_ELEMENT?e.buffer:bytesToArrayBuffer(e)}function convertToUint8Array(e){return void 0!==e.buffer?e:new Uint8Array(e)}function convertToByteArray(e){if(Array.isArray(e))return e;e=convertToUint8Array(e);for(var t=[],n=0,i=e.length;n2147483647&&(e-=4294967296),e}function sha1HashSync(e){this.rushaInstance=this.rushaInstance||new Rusha(1048576);var t=rushaInstance.rawDigest(e).buffer;return t}function sha1BytesSync(e){return bytesFromArrayBuffer(sha1HashSync(e))}function sha256HashSync(e){var t=CryptoJS.SHA256(bytesToWords(e)),n=bytesFromWords(t);return n}function rsaEncrypt(e,t){t=addPadding(t,255);var n=new BigInteger(e.modulus,16),i=new BigInteger(e.exponent,16),a=new BigInteger(t),r=a.modPowInt(i,n),o=bytesFromBigInt(r,256);return o}function addPadding(e,t,n){t=t||16;var i=e.byteLength||e.length,a=t-i%t;if(a>0&&a0&&(u=u.subtract(e))),c=c.add(c),c.compareTo(e)>0&&(c=c.subtract(e)),d=d.shiftRight(1);r=u.clone();var p=r.compareTo(o)<0?o.subtract(r):r.subtract(o);if(t=p.gcd(e),!t.equals(BigInteger.ONE))break;0==(l&l-1)&&(o=r.clone())}if(t.compareTo(BigInteger.ONE)>0)break}var f,m,h=e.divide(t);return t.compareTo(h)>0?(f=h,m=t):(f=t,m=h),[bytesFromBigInt(f),bytesFromBigInt(m),n]}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;i<3;i++){for(var a=goog.math.Long.fromInt((15&nextRandomInt(128))+17),r=goog.math.Long.fromInt(nextRandomInt(1e9)+1),o=r,s=1<0&&(u=u.subtract(e))),c=c.add(c),c.compare(e)>0&&(c=c.subtract(e)),d=d.shiftRight(1);r=u;var p=r.compare(o)<0?o.subtract(r):r.subtract(o);if(t=gcdLong(p,e),t.notEquals(goog.math.Long.ONE))break;0==(l&l-1)&&(o=r)}if(t.compare(goog.math.Long.ONE)>0)break}var f,m,h=e.div(t);return t.compare(h)>0?(f=h,m=t):(f=t,m=h),[bytesFromHex(f.toString(16)),bytesFromHex(m.toString(16)),n]}function pqPrimeLeemon(e){var t,n,i,a,r,o,s,l=64,c=Math.ceil(l/bpe)+1,d=0,u=new Array(c),p=new Array(c),f=new Array(c),r=new Array(c),m=new Array(c),h=new Array(c),g=new Array(c);for(t=0;t<3;t++){for(n=(15&nextRandomInt(128))+17,copyInt_(h,nextRandomInt(1e9)+1),copy_(g,h),a=1<').appendTo(document.body);var i=$("
").appendTo(this.autoCompleteWrapEl);t.dropdownDirective(i,function(e,t){n.autoCompleteEl=t,n.autoCompleteScope=e,n.setUpAutoComplete()}),this.isActive=!1,this.onTyping=t.onTyping,this.onMessageSubmit=t.onMessageSubmit,this.onDirectionKey=t.onDirectionKey,this.getSendOnEnter=t.getSendOnEnter,this.onFilePaste=t.onFilePaste,this.onCommandSend=t.onCommandSend,this.onInlineResultSend=t.onInlineResultSend,this.mentions=t.mentions,this.commands=t.commands,this.renderToggleCnt=0}function Scroller(e,t){t=t||{};t.classPrefix||"scroller";this.content=$(e),this.useNano=void 0!==t.nano?t.nano:!Config.Mobile,this.maxHeight=t.maxHeight,this.minHeight=t.minHeight,this.useNano?this.setUpNano():this.setUpNative(),this.updateHeight()}!function(e){"use strict";e.console=e.console||{};for(var t,n,i=e.console,a={},r=function(){},o="memory".split(","),s="assert,clear,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn".split(",");t=o.pop();)i[t]||(i[t]=a);for(;n=s.pop();)i[n]||(i[n]=r)}("undefined"==typeof window?this:window),Array.prototype.indexOf||(Array.prototype.indexOf=function(e,t){var n;if(null==this)throw new TypeError('"this" is null or not defined');var i=Object(this),a=i.length>>>0;if(0===a)return-1;var r=+t||0;if(Math.abs(r)===1/0&&(r=0),r>=a)return-1;for(n=Math.max(r>=0?r:a-Math.abs(r),0);n1)throw Error("Second argument not supported");if("object"!=typeof t)throw TypeError("Argument must be an object");e.prototype=t;var n={};return e.prototype=null,n}}()),Function.prototype.bind||(Function.prototype.bind=function(e){if("function"!=typeof this)throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");var t=Array.prototype.slice.call(arguments,1),n=this,i=function(){},a=function(){return n.apply(this instanceof i&&e?this:e,t.concat(Array.prototype.slice.call(arguments)))};return i.prototype=this.prototype,a.prototype=new i,a}),function(e){function t(t){i.push(t),e.postMessage(a,"*")}function n(t){if(t.source==e&&t.data==a&&(t.stopPropagation(),i.length>0)){var n=i.shift();n()}}var i=[],a="zero-timeout-message";e.addEventListener("message",n,!0);var r=e.setTimeout;e.setTimeout=function(e,n){return!n||n<=5?t(e):r(e,n)},e.setZeroTimeout=t}(this),!function(e,t){"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){function n(e){var t=e.length,n=ae.type(e);return"function"!==n&&!ae.isWindow(e)&&(!(1!==e.nodeType||!t)||("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e))}function i(e,t,n){if(ae.isFunction(t))return ae.grep(e,function(e,i){return!!t.call(e,i,e)!==n});if(t.nodeType)return ae.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(pe.test(t))return ae.filter(t,e,n);t=ae.filter(t,e)}return ae.grep(e,function(e){return ae.inArray(e,t)>=0!==n})}function a(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}function r(e){var t=be[e]={};return ae.each(e.match(ye)||[],function(e,n){t[n]=!0}),t}function o(){me.addEventListener?(me.removeEventListener("DOMContentLoaded",s,!1),e.removeEventListener("load",s,!1)):(me.detachEvent("onreadystatechange",s),e.detachEvent("onload",s))}function s(){(me.addEventListener||"load"===event.type||"complete"===me.readyState)&&(o(),ae.ready())}function l(e,t,n){if(void 0===n&&1===e.nodeType){var i="data-"+t.replace(Ae,"-$1").toLowerCase();if(n=e.getAttribute(i),"string"==typeof n){try{n="true"===n||"false"!==n&&("null"===n?null:+n+""===n?+n:Se.test(n)?ae.parseJSON(n):n)}catch(a){}ae.data(e,t,n)}else n=void 0}return n}function c(e){var t;for(t in e)if(("data"!==t||!ae.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}function d(e,t,n,i){if(ae.acceptData(e)){var a,r,o=ae.expando,s=e.nodeType,l=s?ae.cache:e,c=s?e[o]:e[o]&&o;if(c&&l[c]&&(i||l[c].data)||void 0!==n||"string"!=typeof t)return c||(c=s?e[o]=K.pop()||ae.guid++:o),l[c]||(l[c]=s?{}:{toJSON:ae.noop}),("object"==typeof t||"function"==typeof t)&&(i?l[c]=ae.extend(l[c],t):l[c].data=ae.extend(l[c].data,t)),r=l[c],i||(r.data||(r.data={}),r=r.data),void 0!==n&&(r[ae.camelCase(t)]=n),"string"==typeof t?(a=r[t],null==a&&(a=r[ae.camelCase(t)])):a=r,a}}function u(e,t,n){if(ae.acceptData(e)){var i,a,r=e.nodeType,o=r?ae.cache:e,s=r?e[ae.expando]:ae.expando;if(o[s]){if(t&&(i=n?o[s]:o[s].data)){ae.isArray(t)?t=t.concat(ae.map(t,ae.camelCase)):t in i?t=[t]:(t=ae.camelCase(t),t=t in i?[t]:t.split(" ")),a=t.length;for(;a--;)delete i[t[a]];if(n?!c(i):!ae.isEmptyObject(i))return}(n||(delete o[s].data,c(o[s])))&&(r?ae.cleanData([e],!0):ne.deleteExpando||o!=o.window?delete o[s]:o[s]=null)}}}function p(){return!0}function f(){return!1}function m(){try{return me.activeElement}catch(e){}}function h(e){var t=Ne.split("|"),n=e.createDocumentFragment();if(n.createElement)for(;t.length;)n.createElement(t.pop());return n}function g(e,t){var n,i,a=0,r=typeof e.getElementsByTagName!==Me?e.getElementsByTagName(t||"*"):typeof e.querySelectorAll!==Me?e.querySelectorAll(t||"*"):void 0;if(!r)for(r=[],n=e.childNodes||e;null!=(i=n[a]);a++)!t||ae.nodeName(i,t)?r.push(i):ae.merge(r,g(i,t));return void 0===t||t&&ae.nodeName(e,t)?ae.merge([e],r):r}function _(e){Ie.test(e.type)&&(e.defaultChecked=e.checked)}function v(e,t){return ae.nodeName(e,"table")&&ae.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function y(e){return e.type=(null!==ae.find.attr(e,"type"))+"/"+e.type,e}function b(e){var t=Ge.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function w(e,t){for(var n,i=0;null!=(n=e[i]);i++)ae._data(n,"globalEval",!t||ae._data(t[i],"globalEval"))}function k(e,t){if(1===t.nodeType&&ae.hasData(e)){var n,i,a,r=ae._data(e),o=ae._data(t,r),s=r.events;if(s){delete o.handle,o.events={};for(n in s)for(i=0,a=s[n].length;a>i;i++)ae.event.add(t,n,s[n][i])}o.data&&(o.data=ae.extend({},o.data))}}function M(e,t){var n,i,a;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!ne.noCloneEvent&&t[ae.expando]){a=ae._data(t);for(i in a.events)ae.removeEvent(t,i,a.handle);t.removeAttribute(ae.expando)}"script"===n&&t.text!==e.text?(y(t).text=e.text,b(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),ne.html5Clone&&e.innerHTML&&!ae.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&Ie.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 S(t,n){var i,a=ae(n.createElement(t)).appendTo(n.body),r=e.getDefaultComputedStyle&&(i=e.getDefaultComputedStyle(a[0]))?i.display:ae.css(a[0],"display");return a.detach(),r}function A(e){var t=me,n=Qe[e];return n||(n=S(e,t),"none"!==n&&n||(Ze=(Ze||ae("