UNPKG

aliyun-tablestore-nodejs-sdk

Version:
1 lines 454 kB
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){"use strict";(function(T){function y(c,a,d){var b=0,f=[],k=0,g,e,n,h,m,u,r,p=!1,q=!1,t=[],v=[],x,w=!1;d=d||{};g=d.encoding||"UTF8";x=d.numRounds||1;n=J(a,g);if(x!==parseInt(x,10)||1>x)throw Error("numRounds must a integer >= 1");if("SHA-1"===c)m=512,u=K,r=U,h=160;else if(u=function(a,d){return L(a,d,c)},r=function(a,d,b,f){var k,e;if("SHA-224"===c||"SHA-256"===c)k=(d+65>>>9<<4)+15,e=16;else if("SHA-384"===c||"SHA-512"===c)k=(d+129>>>10<<5)+31,e=32;else throw Error("Unexpected error in SHA-2 implementation");for(;a.length<=k;)a.push(0);a[d>>>5]|=128<<24-d%32;a[k]=d+b;b=a.length;for(d=0;d<b;d+=e)f=L(a.slice(d,d+e),f,c);if("SHA-224"===c)a=[f[0],f[1],f[2],f[3],f[4],f[5],f[6]];else if("SHA-256"===c)a=f;else if("SHA-384"===c)a=[f[0].a,f[0].b,f[1].a,f[1].b,f[2].a,f[2].b,f[3].a,f[3].b,f[4].a,f[4].b,f[5].a,f[5].b];else if("SHA-512"===c)a=[f[0].a,f[0].b,f[1].a,f[1].b,f[2].a,f[2].b,f[3].a,f[3].b,f[4].a,f[4].b,f[5].a,f[5].b,f[6].a,f[6].b,f[7].a,f[7].b];else throw Error("Unexpected error in SHA-2 implementation");return a},"SHA-224"===c)m=512,h=224;else if("SHA-256"===c)m=512,h=256;else if("SHA-384"===c)m=1024,h=384;else if("SHA-512"===c)m=1024,h=512;else throw Error("Chosen SHA variant is not supported");e=z(c);this.setHMACKey=function(a,d,f){var k;if(!0===q)throw Error("HMAC key already set");if(!0===p)throw Error("Cannot set HMAC key after finalizing hash");if(!0===w)throw Error("Cannot set HMAC key after calling update");g=(f||{}).encoding||"UTF8";d=J(d,g)(a);a=d.binLen;d=d.value;k=m>>>3;f=k/4-1;if(k<a/8){for(d=r(d,a,0,z(c));d.length<=f;)d.push(0);d[f]&=4294967040}else if(k>a/8){for(;d.length<=f;)d.push(0);d[f]&=4294967040}for(a=0;a<=f;a+=1)t[a]=d[a]^909522486,v[a]=d[a]^1549556828;e=u(t,e);b=m;q=!0};this.update=function(a){var c,d,g,h=0,p=m>>>5;c=n(a,f,k);a=c.binLen;d=c.value;c=a>>>5;for(g=0;g<c;g+=p)h+m<=a&&(e=u(d.slice(g,g+p),e),h+=m);b+=h;f=d.slice(h>>>5);k=a%m;w=!0};this.getHash=function(a,d){var g,m,n;if(!0===q)throw Error("Cannot call getHash after setting HMAC key");n=M(d);switch(a){case"HEX":g=function(a){return N(a,n)};break;case"B64":g=function(a){return O(a,n)};break;case"BYTES":g=P;break;default:throw Error("format must be HEX, B64, or BYTES")}if(!1===p)for(e=r(f,k,b,e),m=1;m<x;m+=1)e=r(e,h,0,z(c));p=!0;return g(e)};this.getHMAC=function(a,d){var g,n,t;if(!1===q)throw Error("Cannot call getHMAC without first setting HMAC key");t=M(d);switch(a){case"HEX":g=function(a){return N(a,t)};break;case"B64":g=function(a){return O(a,t)};break;case"BYTES":g=P;break;default:throw Error("outputFormat must be HEX, B64, or BYTES")}!1===p&&(n=r(f,k,b,e),e=u(v,z(c)),e=r(n,h,m,e));p=!0;return g(e)}}function b(c,a){this.a=c;this.b=a}function V(c,a,d){var b=c.length,f,k,e,l,n;a=a||[0];d=d||0;n=d>>>3;if(0!==b%2)throw Error("String of HEX type must be in byte increments");for(f=0;f<b;f+=2){k=parseInt(c.substr(f,2),16);if(isNaN(k))throw Error("String of HEX type contains invalid characters");l=(f>>>1)+n;for(e=l>>>2;a.length<=e;)a.push(0);a[e]|=k<<8*(3-l%4)}return{value:a,binLen:4*b+d}}function W(c,a,d){var b=[],f,k,e,l,b=a||[0];d=d||0;k=d>>>3;for(f=0;f<c.length;f+=1)a=c.charCodeAt(f),l=f+k,e=l>>>2,b.length<=e&&b.push(0),b[e]|=a<<8*(3-l%4);return{value:b,binLen:8*c.length+d}}function X(c,a,d){var b=[],f=0,e,g,l,n,h,m,b=a||[0];d=d||0;a=d>>>3;if(-1===c.search(/^[a-zA-Z0-9=+\/]+$/))throw Error("Invalid character in base-64 string");g=c.indexOf("=");c=c.replace(/\=/g,"");if(-1!==g&&g<c.length)throw Error("Invalid '=' found in base-64 string");for(g=0;g<c.length;g+=4){h=c.substr(g,4);for(l=n=0;l<h.length;l+=1)e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(h[l]),n|=e<<18-6*l;for(l=0;l<h.length-1;l+=1){m=f+a;for(e=m>>>2;b.length<=e;)b.push(0);b[e]|=(n>>>16-8*l&255)<<8*(3-m%4);f+=1}}return{value:b,binLen:8*f+d}}function N(c,a){var d="",b=4*c.length,f,e;for(f=0;f<b;f+=1)e=c[f>>>2]>>>8*(3-f%4),d+="0123456789abcdef".charAt(e>>>4&15)+"0123456789abcdef".charAt(e&15);return a.outputUpper?d.toUpperCase():d}function O(c,a){var d="",b=4*c.length,f,e,g;for(f=0;f<b;f+=3)for(g=f+1>>>2,e=c.length<=g?0:c[g],g=f+2>>>2,g=c.length<=g?0:c[g],g=(c[f>>>2]>>>8*(3-f%4)&255)<<16|(e>>>8*(3-(f+1)%4)&255)<<8|g>>>8*(3-(f+2)%4)&255,e=0;4>e;e+=1)8*f+6*e<=32*c.length?d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g>>>6*(3-e)&63):d+=a.b64Pad;return d}function P(c){var a="",d=4*c.length,b,f;for(b=0;b<d;b+=1)f=c[b>>>2]>>>8*(3-b%4)&255,a+=String.fromCharCode(f);return a}function M(c){var a={outputUpper:!1,b64Pad:"="};c=c||{};a.outputUpper=c.outputUpper||!1;!0===c.hasOwnProperty("b64Pad")&&(a.b64Pad=c.b64Pad);if("boolean"!==typeof a.outputUpper)throw Error("Invalid outputUpper formatting option");if("string"!==typeof a.b64Pad)throw Error("Invalid b64Pad formatting option");return a}function J(c,a){var d;switch(a){case"UTF8":case"UTF16BE":case"UTF16LE":break;default:throw Error("encoding must be UTF8, UTF16BE, or UTF16LE")}switch(c){case"HEX":d=V;break;case"TEXT":d=function(c,d,b){var e=[],l=[],n=0,h,m,u,r,p,e=d||[0];d=b||0;u=d>>>3;if("UTF8"===a)for(h=0;h<c.length;h+=1)for(b=c.charCodeAt(h),l=[],128>b?l.push(b):2048>b?(l.push(192|b>>>6),l.push(128|b&63)):55296>b||57344<=b?l.push(224|b>>>12,128|b>>>6&63,128|b&63):(h+=1,b=65536+((b&1023)<<10|c.charCodeAt(h)&1023),l.push(240|b>>>18,128|b>>>12&63,128|b>>>6&63,128|b&63)),m=0;m<l.length;m+=1){p=n+u;for(r=p>>>2;e.length<=r;)e.push(0);e[r]|=l[m]<<8*(3-p%4);n+=1}else if("UTF16BE"===a||"UTF16LE"===a)for(h=0;h<c.length;h+=1){b=c.charCodeAt(h);"UTF16LE"===a&&(m=b&255,b=m<<8|b>>>8);p=n+u;for(r=p>>>2;e.length<=r;)e.push(0);e[r]|=b<<8*(2-p%4);n+=2}return{value:e,binLen:8*n+d}};break;case"B64":d=X;break;case"BYTES":d=W;break;default:throw Error("format must be HEX, TEXT, B64, or BYTES")}return d}function w(c,a){return c<<a|c>>>32-a}function q(c,a){return c>>>a|c<<32-a}function v(c,a){var d=null,d=new b(c.a,c.b);return d=32>=a?new b(d.a>>>a|d.b<<32-a&4294967295,d.b>>>a|d.a<<32-a&4294967295):new b(d.b>>>a-32|d.a<<64-a&4294967295,d.a>>>a-32|d.b<<64-a&4294967295)}function Q(c,a){var d=null;return d=32>=a?new b(c.a>>>a,c.b>>>a|c.a<<32-a&4294967295):new b(0,c.a>>>a-32)}function Y(c,a,d){return c&a^~c&d}function Z(c,a,d){return new b(c.a&a.a^~c.a&d.a,c.b&a.b^~c.b&d.b)}function R(c,a,d){return c&a^c&d^a&d}function aa(c,a,d){return new b(c.a&a.a^c.a&d.a^a.a&d.a,c.b&a.b^c.b&d.b^a.b&d.b)}function ba(c){return q(c,2)^q(c,13)^q(c,22)}function ca(c){var a=v(c,28),d=v(c,34);c=v(c,39);return new b(a.a^d.a^c.a,a.b^d.b^c.b)}function da(c){return q(c,6)^q(c,11)^q(c,25)}function ea(c){var a=v(c,14),d=v(c,18);c=v(c,41);return new b(a.a^d.a^c.a,a.b^d.b^c.b)}function fa(c){return q(c,7)^q(c,18)^c>>>3}function ga(c){var a=v(c,1),d=v(c,8);c=Q(c,7);return new b(a.a^d.a^c.a,a.b^d.b^c.b)}function ha(c){return q(c,17)^q(c,19)^c>>>10}function ia(c){var a=v(c,19),d=v(c,61);c=Q(c,6);return new b(a.a^d.a^c.a,a.b^d.b^c.b)}function B(c,a){var d=(c&65535)+(a&65535);return((c>>>16)+(a>>>16)+(d>>>16)&65535)<<16|d&65535}function ja(c,a,d,b){var f=(c&65535)+(a&65535)+(d&65535)+(b&65535);return((c>>>16)+(a>>>16)+(d>>>16)+(b>>>16)+(f>>>16)&65535)<<16|f&65535}function C(c,a,d,b,f){var e=(c&65535)+(a&65535)+(d&65535)+(b&65535)+(f&65535);return((c>>>16)+(a>>>16)+(d>>>16)+(b>>>16)+(f>>>16)+(e>>>16)&65535)<<16|e&65535}function ka(c,a){var d,e,f;d=(c.b&65535)+(a.b&65535);e=(c.b>>>16)+(a.b>>>16)+(d>>>16);f=(e&65535)<<16|d&65535;d=(c.a&65535)+(a.a&65535)+(e>>>16);e=(c.a>>>16)+(a.a>>>16)+(d>>>16);return new b((e&65535)<<16|d&65535,f)}function la(c,a,d,e){var f,k,g;f=(c.b&65535)+(a.b&65535)+(d.b&65535)+(e.b&65535);k=(c.b>>>16)+(a.b>>>16)+(d.b>>>16)+(e.b>>>16)+(f>>>16);g=(k&65535)<<16|f&65535;f=(c.a&65535)+(a.a&65535)+(d.a&65535)+(e.a&65535)+(k>>>16);k=(c.a>>>16)+(a.a>>>16)+(d.a>>>16)+(e.a>>>16)+(f>>>16);return new b((k&65535)<<16|f&65535,g)}function ma(c,a,d,e,f){var k,g,l;k=(c.b&65535)+(a.b&65535)+(d.b&65535)+(e.b&65535)+(f.b&65535);g=(c.b>>>16)+(a.b>>>16)+(d.b>>>16)+(e.b>>>16)+(f.b>>>16)+(k>>>16);l=(g&65535)<<16|k&65535;k=(c.a&65535)+(a.a&65535)+(d.a&65535)+(e.a&65535)+(f.a&65535)+(g>>>16);g=(c.a>>>16)+(a.a>>>16)+(d.a>>>16)+(e.a>>>16)+(f.a>>>16)+(k>>>16);return new b((g&65535)<<16|k&65535,l)}function z(c){var a,d;if("SHA-1"===c)c=[1732584193,4023233417,2562383102,271733878,3285377520];else switch(a=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428],d=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],c){case"SHA-224":c=a;break;case"SHA-256":c=d;break;case"SHA-384":c=[new b(3418070365,a[0]),new b(1654270250,a[1]),new b(2438529370,a[2]),new b(355462360,a[3]),new b(1731405415,a[4]),new b(41048885895,a[5]),new b(3675008525,a[6]),new b(1203062813,a[7])];break;case"SHA-512":c=[new b(d[0],4089235720),new b(d[1],2227873595),new b(d[2],4271175723),new b(d[3],1595750129),new b(d[4],2917565137),new b(d[5],725511199),new b(d[6],4215389547),new b(d[7],327033209)];break;default:throw Error("Unknown SHA variant")}return c}function K(c,a){var d=[],b,e,k,g,l,n,h;b=a[0];e=a[1];k=a[2];g=a[3];l=a[4];for(h=0;80>h;h+=1)d[h]=16>h?c[h]:w(d[h-3]^d[h-8]^d[h-14]^d[h-16],1),n=20>h?C(w(b,5),e&k^~e&g,l,1518500249,d[h]):40>h?C(w(b,5),e^k^g,l,1859775393,d[h]):60>h?C(w(b,5),R(e,k,g),l,2400959708,d[h]):C(w(b,5),e^k^g,l,3395469782,d[h]),l=g,g=k,k=w(e,30),e=b,b=n;a[0]=B(b,a[0]);a[1]=B(e,a[1]);a[2]=B(k,a[2]);a[3]=B(g,a[3]);a[4]=B(l,a[4]);return a}function U(c,a,b,e){var f;for(f=(a+65>>>9<<4)+15;c.length<=f;)c.push(0);c[a>>>5]|=128<<24-a%32;c[f]=a+b;b=c.length;for(a=0;a<b;a+=16)e=K(c.slice(a,a+16),e);return e}function L(c,a,d){var q,f,k,g,l,n,h,m,u,r,p,v,t,w,x,y,z,D,E,F,G,H,A=[],I;if("SHA-224"===d||"SHA-256"===d)r=64,v=1,H=Number,t=B,w=ja,x=C,y=fa,z=ha,D=ba,E=da,G=R,F=Y,I=e;else if("SHA-384"===d||"SHA-512"===d)r=80,v=2,H=b,t=ka,w=la,x=ma,y=ga,z=ia,D=ca,E=ea,G=aa,F=Z,I=S;else throw Error("Unexpected error in SHA-2 implementation");d=a[0];q=a[1];f=a[2];k=a[3];g=a[4];l=a[5];n=a[6];h=a[7];for(p=0;p<r;p+=1)16>p?(u=p*v,m=c.length<=u?0:c[u],u=c.length<=u+1?0:c[u+1],A[p]=new H(m,u)):A[p]=w(z(A[p-2]),A[p-7],y(A[p-15]),A[p-16]),m=x(h,E(g),F(g,l,n),I[p],A[p]),u=t(D(d),G(d,q,f)),h=n,n=l,l=g,g=t(k,m),k=f,f=q,q=d,d=t(m,u);a[0]=t(d,a[0]);a[1]=t(q,a[1]);a[2]=t(f,a[2]);a[3]=t(k,a[3]);a[4]=t(g,a[4]);a[5]=t(l,a[5]);a[6]=t(n,a[6]);a[7]=t(h,a[7]);return a}var e,S;e=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];S=[new b(e[0],3609767458),new b(e[1],602891725),new b(e[2],3964484399),new b(e[3],2173295548),new b(e[4],4081628472),new b(e[5],3053834265),new b(e[6],2937671579),new b(e[7],3664609560),new b(e[8],2734883394),new b(e[9],1164996542),new b(e[10],1323610764),new b(e[11],3590304994),new b(e[12],4068182383),new b(e[13],991336113),new b(e[14],633803317),new b(e[15],3479774868),new b(e[16],2666613458),new b(e[17],944711139),new b(e[18],2341262773),new b(e[19],2007800933),new b(e[20],1495990901),new b(e[21],1856431235),new b(e[22],3175218132),new b(e[23],2198950837),new b(e[24],3999719339),new b(e[25],766784016),new b(e[26],2566594879),new b(e[27],3203337956),new b(e[28],1034457026),new b(e[29],2466948901),new b(e[30],3758326383),new b(e[31],168717936),new b(e[32],1188179964),new b(e[33],1546045734),new b(e[34],1522805485),new b(e[35],2643833823),new b(e[36],2343527390),new b(e[37],1014477480),new b(e[38],1206759142),new b(e[39],344077627),new b(e[40],1290863460),new b(e[41],3158454273),new b(e[42],3505952657),new b(e[43],106217008),new b(e[44],3606008344),new b(e[45],1432725776),new b(e[46],1467031594),new b(e[47],851169720),new b(e[48],3100823752),new b(e[49],1363258195),new b(e[50],3750685593),new b(e[51],3785050280),new b(e[52],3318307427),new b(e[53],3812723403),new b(e[54],2003034995),new b(e[55],3602036899),new b(e[56],1575990012),new b(e[57],1125592928),new b(e[58],2716904306),new b(e[59],442776044),new b(e[60],593698344),new b(e[61],3733110249),new b(e[62],2999351573),new b(e[63],3815920427),new b(3391569614,3928383900),new b(3515267271,566280711),new b(3940187606,3454069534),new b(4118630271,4000239992),new b(116418474,1914138554),new b(174292421,2731055270),new b(289380356,3203993006),new b(460393269,320620315),new b(685471733,587496836),new b(852142971,1086792851),new b(1017036298,365543100),new b(1126000580,2618297676),new b(1288033470,3409855158),new b(1501505948,4234509866),new b(1607167915,987167468),new b(1816402316,1246189591)];"function"===typeof define&&define.amd?define(function(){return y}):"undefined"!==typeof exports?"undefined"!==typeof module&&module.exports?module.exports=exports=y:exports=y:T.jsSHA=y})(this)},{}],2:[function(require,module,exports){(function(factory){if(typeof exports==="object"){module.exports=factory()}else if(typeof define==="function"&&define.amd){define(factory)}else{var glob;try{glob=window}catch(e){glob=self}glob.SparkMD5=factory()}})(function(undefined){"use strict";var add32=function(a,b){return a+b&4294967295},hex_chr=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function cmn(q,a,b,x,s,t){a=add32(add32(a,q),add32(x,t));return add32(a<<s|a>>>32-s,b)}function ff(a,b,c,d,x,s,t){return cmn(b&c|~b&d,a,b,x,s,t)}function gg(a,b,c,d,x,s,t){return cmn(b&d|c&~d,a,b,x,s,t)}function hh(a,b,c,d,x,s,t){return cmn(b^c^d,a,b,x,s,t)}function ii(a,b,c,d,x,s,t){return cmn(c^(b|~d),a,b,x,s,t)}function md5cycle(x,k){var a=x[0],b=x[1],c=x[2],d=x[3];a=ff(a,b,c,d,k[0],7,-680876936);d=ff(d,a,b,c,k[1],12,-389564586);c=ff(c,d,a,b,k[2],17,606105819);b=ff(b,c,d,a,k[3],22,-1044525330);a=ff(a,b,c,d,k[4],7,-176418897);d=ff(d,a,b,c,k[5],12,1200080426);c=ff(c,d,a,b,k[6],17,-1473231341);b=ff(b,c,d,a,k[7],22,-45705983);a=ff(a,b,c,d,k[8],7,1770035416);d=ff(d,a,b,c,k[9],12,-1958414417);c=ff(c,d,a,b,k[10],17,-42063);b=ff(b,c,d,a,k[11],22,-1990404162);a=ff(a,b,c,d,k[12],7,1804603682);d=ff(d,a,b,c,k[13],12,-40341101);c=ff(c,d,a,b,k[14],17,-1502002290);b=ff(b,c,d,a,k[15],22,1236535329);a=gg(a,b,c,d,k[1],5,-165796510);d=gg(d,a,b,c,k[6],9,-1069501632);c=gg(c,d,a,b,k[11],14,643717713);b=gg(b,c,d,a,k[0],20,-373897302);a=gg(a,b,c,d,k[5],5,-701558691);d=gg(d,a,b,c,k[10],9,38016083);c=gg(c,d,a,b,k[15],14,-660478335);b=gg(b,c,d,a,k[4],20,-405537848);a=gg(a,b,c,d,k[9],5,568446438);d=gg(d,a,b,c,k[14],9,-1019803690);c=gg(c,d,a,b,k[3],14,-187363961);b=gg(b,c,d,a,k[8],20,1163531501);a=gg(a,b,c,d,k[13],5,-1444681467);d=gg(d,a,b,c,k[2],9,-51403784);c=gg(c,d,a,b,k[7],14,1735328473);b=gg(b,c,d,a,k[12],20,-1926607734);a=hh(a,b,c,d,k[5],4,-378558);d=hh(d,a,b,c,k[8],11,-2022574463);c=hh(c,d,a,b,k[11],16,1839030562);b=hh(b,c,d,a,k[14],23,-35309556);a=hh(a,b,c,d,k[1],4,-1530992060);d=hh(d,a,b,c,k[4],11,1272893353);c=hh(c,d,a,b,k[7],16,-155497632);b=hh(b,c,d,a,k[10],23,-1094730640);a=hh(a,b,c,d,k[13],4,681279174);d=hh(d,a,b,c,k[0],11,-358537222);c=hh(c,d,a,b,k[3],16,-722521979);b=hh(b,c,d,a,k[6],23,76029189);a=hh(a,b,c,d,k[9],4,-640364487);d=hh(d,a,b,c,k[12],11,-421815835);c=hh(c,d,a,b,k[15],16,530742520);b=hh(b,c,d,a,k[2],23,-995338651);a=ii(a,b,c,d,k[0],6,-198630844);d=ii(d,a,b,c,k[7],10,1126891415);c=ii(c,d,a,b,k[14],15,-1416354905);b=ii(b,c,d,a,k[5],21,-57434055);a=ii(a,b,c,d,k[12],6,1700485571);d=ii(d,a,b,c,k[3],10,-1894986606);c=ii(c,d,a,b,k[10],15,-1051523);b=ii(b,c,d,a,k[1],21,-2054922799);a=ii(a,b,c,d,k[8],6,1873313359);d=ii(d,a,b,c,k[15],10,-30611744);c=ii(c,d,a,b,k[6],15,-1560198380);b=ii(b,c,d,a,k[13],21,1309151649);a=ii(a,b,c,d,k[4],6,-145523070);d=ii(d,a,b,c,k[11],10,-1120210379);c=ii(c,d,a,b,k[2],15,718787259);b=ii(b,c,d,a,k[9],21,-343485551);x[0]=add32(a,x[0]);x[1]=add32(b,x[1]);x[2]=add32(c,x[2]);x[3]=add32(d,x[3])}function md5blk(s){var md5blks=[],i;for(i=0;i<64;i+=4){md5blks[i>>2]=s.charCodeAt(i)+(s.charCodeAt(i+1)<<8)+(s.charCodeAt(i+2)<<16)+(s.charCodeAt(i+3)<<24)}return md5blks}function md5blk_array(a){var md5blks=[],i;for(i=0;i<64;i+=4){md5blks[i>>2]=a[i]+(a[i+1]<<8)+(a[i+2]<<16)+(a[i+3]<<24)}return md5blks}function md51(s){var n=s.length,state=[1732584193,-271733879,-1732584194,271733878],i,length,tail,tmp,lo,hi;for(i=64;i<=n;i+=64){md5cycle(state,md5blk(s.substring(i-64,i)))}s=s.substring(i-64);length=s.length;tail=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(i=0;i<length;i+=1){tail[i>>2]|=s.charCodeAt(i)<<(i%4<<3)}tail[i>>2]|=128<<(i%4<<3);if(i>55){md5cycle(state,tail);for(i=0;i<16;i+=1){tail[i]=0}}tmp=n*8;tmp=tmp.toString(16).match(/(.*?)(.{0,8})$/);lo=parseInt(tmp[2],16);hi=parseInt(tmp[1],16)||0;tail[14]=lo;tail[15]=hi;md5cycle(state,tail);return state}function md51_array(a){var n=a.length,state=[1732584193,-271733879,-1732584194,271733878],i,length,tail,tmp,lo,hi;for(i=64;i<=n;i+=64){md5cycle(state,md5blk_array(a.subarray(i-64,i)))}a=i-64<n?a.subarray(i-64):new Uint8Array(0);length=a.length;tail=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(i=0;i<length;i+=1){tail[i>>2]|=a[i]<<(i%4<<3)}tail[i>>2]|=128<<(i%4<<3);if(i>55){md5cycle(state,tail);for(i=0;i<16;i+=1){tail[i]=0}}tmp=n*8;tmp=tmp.toString(16).match(/(.*?)(.{0,8})$/);lo=parseInt(tmp[2],16);hi=parseInt(tmp[1],16)||0;tail[14]=lo;tail[15]=hi;md5cycle(state,tail);return state}function rhex(n){var s="",j;for(j=0;j<4;j+=1){s+=hex_chr[n>>j*8+4&15]+hex_chr[n>>j*8&15]}return s}function hex(x){var i;for(i=0;i<x.length;i+=1){x[i]=rhex(x[i])}return x.join("")}if(hex(md51("hello"))!=="5d41402abc4b2a76b9719d911017c592"){add32=function(x,y){var lsw=(x&65535)+(y&65535),msw=(x>>16)+(y>>16)+(lsw>>16);return msw<<16|lsw&65535}}if(typeof ArrayBuffer!=="undefined"&&!ArrayBuffer.prototype.slice){(function(){function clamp(val,length){val=val|0||0;if(val<0){return Math.max(val+length,0)}return Math.min(val,length)}ArrayBuffer.prototype.slice=function(from,to){var length=this.byteLength,begin=clamp(from,length),end=length,num,target,targetArray,sourceArray;if(to!==undefined){end=clamp(to,length)}if(begin>end){return new ArrayBuffer(0)}num=end-begin;target=new ArrayBuffer(num);targetArray=new Uint8Array(target);sourceArray=new Uint8Array(this,begin,num);targetArray.set(sourceArray);return target}})()}function toUtf8(str){if(/[\u0080-\uFFFF]/.test(str)){str=unescape(encodeURIComponent(str))}return str}function utf8Str2ArrayBuffer(str,returnUInt8Array){var length=str.length,buff=new ArrayBuffer(length),arr=new Uint8Array(buff),i;for(i=0;i<length;i++){arr[i]=str.charCodeAt(i)}return returnUInt8Array?arr:buff}function arrayBuffer2Utf8Str(buff){return String.fromCharCode.apply(null,new Uint8Array(buff))}function concatenateArrayBuffers(first,second,returnUInt8Array){var result=new Uint8Array(first.byteLength+second.byteLength);result.set(new Uint8Array(first));result.set(new Uint8Array(second),first.byteLength);return returnUInt8Array?result:result.buffer}function SparkMD5(){this.reset()}SparkMD5.prototype.append=function(str){this.appendBinary(toUtf8(str));return this};SparkMD5.prototype.appendBinary=function(contents){this._buff+=contents;this._length+=contents.length;var length=this._buff.length,i;for(i=64;i<=length;i+=64){md5cycle(this._hash,md5blk(this._buff.substring(i-64,i)))}this._buff=this._buff.substring(i-64);return this};SparkMD5.prototype.end=function(raw){var buff=this._buff,length=buff.length,i,tail=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],ret;for(i=0;i<length;i+=1){tail[i>>2]|=buff.charCodeAt(i)<<(i%4<<3)}this._finish(tail,length);ret=!!raw?this._hash:hex(this._hash);this.reset();return ret};SparkMD5.prototype.reset=function(){this._buff="";this._length=0;this._hash=[1732584193,-271733879,-1732584194,271733878];return this};SparkMD5.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash}};SparkMD5.prototype.setState=function(state){this._buff=state.buff;this._length=state.length;this._hash=state.hash;return this};SparkMD5.prototype.destroy=function(){delete this._hash;delete this._buff;delete this._length};SparkMD5.prototype._finish=function(tail,length){var i=length,tmp,lo,hi;tail[i>>2]|=128<<(i%4<<3);if(i>55){md5cycle(this._hash,tail);for(i=0;i<16;i+=1){tail[i]=0}}tmp=this._length*8;tmp=tmp.toString(16).match(/(.*?)(.{0,8})$/);lo=parseInt(tmp[2],16);hi=parseInt(tmp[1],16)||0;tail[14]=lo;tail[15]=hi;md5cycle(this._hash,tail)};SparkMD5.hash=function(str,raw){return SparkMD5.hashBinary(toUtf8(str),raw)};SparkMD5.hashBinary=function(content,raw){var hash=md51(content);return!!raw?hash:hex(hash)};SparkMD5.ArrayBuffer=function(){this.reset()};SparkMD5.ArrayBuffer.prototype.append=function(arr){var buff=concatenateArrayBuffers(this._buff.buffer,arr,true),length=buff.length,i;this._length+=arr.byteLength;for(i=64;i<=length;i+=64){md5cycle(this._hash,md5blk_array(buff.subarray(i-64,i)))}this._buff=i-64<length?new Uint8Array(buff.buffer.slice(i-64)):new Uint8Array(0);return this};SparkMD5.ArrayBuffer.prototype.end=function(raw){var buff=this._buff,length=buff.length,tail=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],i,ret;for(i=0;i<length;i+=1){tail[i>>2]|=buff[i]<<(i%4<<3)}this._finish(tail,length);ret=!!raw?this._hash:hex(this._hash);this.reset();return ret};SparkMD5.ArrayBuffer.prototype.reset=function(){this._buff=new Uint8Array(0);this._length=0;this._hash=[1732584193,-271733879,-1732584194,271733878];return this};SparkMD5.ArrayBuffer.prototype.getState=function(){var state=SparkMD5.prototype.getState.call(this);state.buff=arrayBuffer2Utf8Str(state.buff);return state};SparkMD5.ArrayBuffer.prototype.setState=function(state){state.buff=utf8Str2ArrayBuffer(state.buff,true);return SparkMD5.prototype.setState.call(this,state)};SparkMD5.ArrayBuffer.prototype.destroy=SparkMD5.prototype.destroy;SparkMD5.ArrayBuffer.prototype._finish=SparkMD5.prototype._finish;SparkMD5.ArrayBuffer.hash=function(arr,raw){var hash=md51_array(new Uint8Array(arr));return!!raw?hash:hex(hash)};return SparkMD5})},{}],3:[function(require,module,exports){window.TableStore=module.exports=require("./lib/core");require("./lib/http/xhr")},{"./lib/core":6,"./lib/http/xhr":11}],4:[function(require,module,exports){var TableStore=require("./core");var inherit=TableStore.util.inherit;var capitalizeFirstLetter=function(string){return string.charAt(0).toUpperCase()+string.slice(1)};TableStore.Client=inherit({constructor:function Client(config){this.config=new TableStore.Config(config)},setupRequestListeners:function setupRequestListeners(request){request.addListener("build",this.populateHeader);request.addListener("build",this.populateURI);request.addListener("build",this.buildContent);request.addListener("build",this.computeContentMd5);request.addListener("extractError",this.extractError);request.addListener("extractData",this.extractData)},populateURI:function populateURI(req){var httpRequest=req.httpRequest;httpRequest.endpoint.host=httpRequest.endpoint.hostname;httpRequest.path="/"+TableStore.util.string.upperFirst(req.operation)},populateHeader:function populateHeader(req){var httpRequest=req.httpRequest;httpRequest.headers["x-ots-apiversion"]="2015-12-31";httpRequest.headers["x-ots-instancename"]=req.config.instancename},buildContent:function buildContent(req){var request=TableStore.encoder.encode(req.operation,req.params);var buffer=request.encode();req.httpRequest.body=buffer.toBuffer()},computeContentMd5:function computeContentMd5(req){var md5=TableStore.util.crypto.md5(req.httpRequest.body,"base64");req.httpRequest.headers["x-ots-contentmd5"]=md5},extractData:function extractData(resp){resp.data=TableStore.decoder.decode(resp.request.operation,resp.httpResponse.body);resp.data.RequestId=resp.httpResponse.headers["x-ots-request-id"]||resp.httpResponse.headers["x-ots-requestid"]},extractError:function extractError(resp){var codes={304:"NotModified",403:"Forbidden",400:"BadRequest",404:"NotFound"};var code=resp.httpResponse.statusCode;var body=resp.httpResponse.body;if(codes[code]&&body.length===0){resp.error=TableStore.util.error(new Error,{code:codes[resp.httpResponse.statusCode],message:null,headers:resp.httpResponse.headers})}else{var data;try{data=new TableStore.XML.Parser({}).parse(body.toString());resp.error=TableStore.util.error(new Error,{code:data.Code||code,message:data.Message||null,headers:resp.httpResponse.headers})}catch(e){data=body.toString();resp.error=TableStore.util.error(new Error,{code:code,message:data,headers:resp.httpResponse.headers})}}},makeRequest:function makeRequest(operation,params,callback){if(typeof params==="function"){callback=params;params=null}var request=new TableStore.Request(this.config,operation,params);this.addAllRequestListeners(request);if(callback){request.send(callback);return request}else{return new Promise(function(resolve,reject){request.send(function(err,data){if(err){return reject(err)}resolve(data)})})}},addAllRequestListeners:function addAllRequestListeners(request){var list=[TableStore.events,TableStore.EventListeners.Core];for(var i=0;i<list.length;i++){if(list[i])request.addListeners(list[i])}if(this.config.logger){request.addListeners(TableStore.EventListeners.Logger)}this.setupRequestListeners(request)},createTable:function createTable(params,callback){return this.makeRequest("createTable",params,callback)},listTable:function listTable(params,callback){return this.makeRequest("listTable",params,callback)},deleteTable:function deleteTable(params,callback){return this.makeRequest("deleteTable",params,callback)},updateTable:function describeTable(params,callback){return this.makeRequest("updateTable",params,callback)},describeTable:function describeTable(params,callback){return this.makeRequest("describeTable",params,callback)},getRow:function getRow(params,callback){return this.makeRequest("getRow",params,callback)},putRow:function putRow(params,callback){return this.makeRequest("putRow",params,callback)},updateRow:function updateRow(params,callback){return this.makeRequest("updateRow",params,callback)},deleteRow:function deleteRow(params,callback){return this.makeRequest("deleteRow",params,callback)},getRange:function getRange(params,callback){return this.makeRequest("getRange",params,callback)},batchGetRow:function batchGetRow(params,callback){return this.makeRequest("batchGetRow",params,callback)},batchWriteRow:function batchWriteRow(params,callback){return this.makeRequest("batchWriteRow",params,callback)}})},{"./core":6}],5:[function(require,module,exports){var TableStore=require("./core");TableStore.Config=TableStore.util.inherit({constructor:function Config(options){if(options===undefined)options={};TableStore.util.each.call(this,this.keys,function(key,value){var optionVal=options[key];if(typeof options[key]==="string"){optionVal=options[key].replace(/^\s+/g,"")}this.set(key,optionVal,value)})},clear:function clear(){TableStore.util.each.call(this,this.keys,function(key){delete this[key]});this.set("credentials",undefined);this.set("credentialProvider",undefined)},getCredentials:function getCredentials(){return{accessKeyId:this.accessKeyId,secretAccessKey:this.secretAccessKey,securityToken:this.stsToken}},set:function set(property,value,defaultValue){if(value===undefined){if(defaultValue===undefined){defaultValue=this.keys[property]}if(typeof defaultValue==="function"){this[property]=defaultValue.call(this)}else{this[property]=defaultValue}}else{this[property]=value}},keys:{accessKeyId:null,secretAccessKey:null,stsToken:null,logger:null,endpoint:undefined,httpOptions:{},maxRetries:undefined,instancename:undefined,computeChecksums:true}})},{"./core":6}],6:[function(require,module,exports){var TableStore={};module.exports=TableStore;require("./util");require("./metadata");require("./long");require("./protocol/plain_buffer_consts");require("./protocol/plain_buffer_crc8");require("./protocol/plain_buffer_stream");require("./protocol/plain_buffer_coded_stream");require("./protocol/plian_buffer_builder");require("./filter");require("./protocol/encoder");require("./protocol/decoder");require("./metadata");require("./config");require("./http");require("./sequential_executor");require("./event_listeners");require("./request");require("./signer");TableStore.events=new TableStore.SequentialExecutor;require("./http/node");require("./retry/retry_util");require("./retry/default_retry_policy");require("./client")},{"./client":4,"./config":5,"./event_listeners":7,"./filter":8,"./http":9,"./http/node":10,"./long":12,"./metadata":13,"./protocol/decoder":14,"./protocol/encoder":15,"./protocol/plain_buffer_coded_stream":16,"./protocol/plain_buffer_consts":17,"./protocol/plain_buffer_crc8":18,"./protocol/plain_buffer_stream":19,"./protocol/plian_buffer_builder":20,"./request":23,"./retry/default_retry_policy":24,"./retry/retry_util":25,"./sequential_executor":26,"./signer":27,"./util":28}],7:[function(require,module,exports){var TableStore=require("./core");require("./sequential_executor");TableStore.EventListeners={Core:{}};TableStore.EventListeners={Core:(new TableStore.SequentialExecutor).addNamedListeners(function(add,addAsync){add("SET_CONTENT_LENGTH","afterBuild",function SET_CONTENT_LENGTH(req){if(req.httpRequest.headers["Content-Length"]===undefined){var length=TableStore.util.string.byteLength(req.httpRequest.body);req.httpRequest.headers["Content-Length"]=length}});add("SET_HTTP_HOST","afterBuild",function SET_HTTP_HOST(req){req.httpRequest.headers["Host"]=req.httpRequest.endpoint.host});addAsync("SIGN","sign",function SIGN(req,done){var credentials=req.config.getCredentials();try{var date=TableStore.util.date.getDate();var signer=new TableStore.Signer(req.httpRequest);signer.addAuthorization(credentials,date)}catch(e){req.response.error=e}done()});add("VALIDATE_RESPONSE","validateResponse",function VALIDATE_RESPONSE(resp){if(resp.httpResponse.statusCode<300){resp.data={};resp.error=null}else{resp.data=null;resp.error=TableStore.util.error(new Error,{code:"UnknownError",message:"An unknown error occurred."})}});addAsync("SEND","send",function SEND(resp,done){function callback(httpResp){resp.httpResponse.stream=httpResp;resp.httpResponse._abortCallback=done;httpResp.on("headers",function onHeaders(statusCode,headers){resp.request.emit("httpHeaders",[statusCode,headers,resp]);if(!resp.request.httpRequest._streaming){if(TableStore.HttpClient.streamsApiVersion===2){httpResp.on("readable",function onReadable(){var data=httpResp.read();if(data!==null){resp.request.emit("httpData",[data,resp])}})}else{httpResp.on("data",function onData(data){resp.request.emit("httpData",[data,resp])})}}});httpResp.on("end",function onEnd(){resp.request.emit("httpDone");done()})}function progress(httpResp){httpResp.on("sendProgress",function onSendProgress(progress){resp.request.emit("httpUploadProgress",[progress,resp])});httpResp.on("receiveProgress",function onReceiveProgress(progress){resp.request.emit("httpDownloadProgress",[progress,resp])})}function error(err){resp.error=TableStore.util.error(err,{code:"NetworkingError",region:resp.request.httpRequest.region,hostname:resp.request.httpRequest.endpoint.hostname,retryable:true});resp.request.emit("httpError",[resp.error,resp],function(){done()})}resp.error=null;resp.data=null;var http=TableStore.HttpClient.getInstance();var httpOptions=resp.request.config.httpOptions||{};var s=http.handleRequest(this.httpRequest,httpOptions,callback,error);progress(s)});add("HTTP_HEADERS","httpHeaders",function HTTP_HEADERS(statusCode,headers,resp){resp.httpResponse.statusCode=statusCode;resp.httpResponse.headers=headers;resp.httpResponse.body=new TableStore.util.Buffer("");resp.httpResponse.buffers=[];resp.httpResponse.numBytes=0});add("HTTP_DATA","httpData",function HTTP_DATA(chunk,resp){if(chunk){resp.httpResponse.numBytes+=chunk.length;var total=resp.httpResponse.headers["content-length"];var progress={loaded:resp.httpResponse.numBytes,total:total};resp.request.emit("httpDownloadProgress",[progress,resp]);resp.httpResponse.buffers.push(new TableStore.util.Buffer(chunk))}});add("HTTP_DONE","httpDone",function HTTP_DONE(resp){if(resp.httpResponse.buffers&&resp.httpResponse.buffers.length>0){var body=TableStore.util.buffer.concat(resp.httpResponse.buffers);resp.httpResponse.body=body}delete resp.httpResponse.numBytes;delete resp.httpResponse.buffers});add("RETRY_CHECK","retry",function FINALIZE_ERROR(resp){if(resp.error){resp.error.retryable=TableStore.DefaultRetryPolicy.shouldRetry(resp.retryCount,resp.error,resp.request.operation)}});addAsync("RESET_RETRY_STATE","afterRetry",function RESET_RETRY_STATE(resp,done){var delay,willRetry=false;if(resp.error){delay=TableStore.DefaultRetryPolicy.getRetryDelay(resp.retryCount,resp.error);var maxRetryTimes=TableStore.DefaultRetryPolicy.maxRetryTimes;if(resp.error.retryable&&resp.retryCount<maxRetryTimes){resp.retryCount++;willRetry=true}}if(willRetry){resp.error=null;setTimeout(done,delay)}else{done()}})}),Logger:(new TableStore.SequentialExecutor).addNamedListeners(function(add){add("LOG_REQUEST","complete",function LOG_REQUEST(resp){var req=resp.request;var logger=req.config.logger;if(!logger)return;function buildMessage(){var time=TableStore.util.date.getDate().getTime();var delta=(time-req.startTime.getTime())/1e3;var ansi=logger.isTTY?true:false;var status=resp.httpResponse.statusCode;var params=require("util").inspect(req.params,true,true);var message="";if(ansi)message+="";message+="[TableStore "+req.service.serviceIdentifier+" "+status;message+=" "+delta.toString()+"s "+resp.retryCount+" retries]";if(ansi)message+="";message+=" "+req.operation+"("+params+")";if(ansi)message+="";return message}var message=buildMessage();if(typeof logger.log==="function"){logger.log(message)}else if(typeof logger.write==="function"){logger.write(message+"\n")}})})}},{"./core":6,"./sequential_executor":26,util:81}],8:[function(require,module,exports){var TableStore=require("./core");var tsFilterProtos=require("./protocol/tablestore_filter_proto.js").tablestore.filter.proto;var inherit=TableStore.util.inherit;TableStore.LogicalOperator={NOT:tsFilterProtos.LogicalOperator.LO_NOT,AND:tsFilterProtos.LogicalOperator.LO_AND,OR:tsFilterProtos.LogicalOperator.LO_OR};TableStore.ColumnConditionType={COMPOSITE_COLUMN_CONDITION:0,SINGLE_COLUMN_CONDITION:1};TableStore.ComparatorType={EQUAL:tsFilterProtos.ComparatorType.CT_EQUAL,NOT_EQUAL:tsFilterProtos.ComparatorType.CT_NOT_EQUAL,GREATER_THAN:tsFilterProtos.ComparatorType.CT_GREATER_THAN,GREATER_EQUAL:tsFilterProtos.ComparatorType.CT_GREATER_EQUAL,LESS_THAN:tsFilterProtos.ComparatorType.CT_LESS_THAN,LESS_EQUAL:tsFilterProtos.ComparatorType.CT_LESS_EQUAL};TableStore.RowExistenceExpectation={IGNORE:"IGNORE",EXPECT_EXIST:"EXPECT_EXIST",EXPECT_NOT_EXIST:"EXPECT_NOT_EXIST"};TableStore.ColumnCondition=inherit({});TableStore.CompositeCondition=inherit(TableStore.ColumnCondition,{constructor:function(combinator){this.sub_conditions=[];this.setCombinator(combinator)},getType:function(){return tsFilterProtos.FilterType.FT_COMPOSITE_COLUMN_VALUE},setCombinator:function(combinator){var isValidateValue=false;for(pro in TableStore.LogicalOperator){if(TableStore.LogicalOperator[pro]===combinator){isValidateValue=true;break}}if(!isValidateValue){throw new Error("Expect input combinator should be one of TableStore.LogicalOperator")}this.combinator=combinator},getCombinator:function(){return combinator},addSubCondition:function(condition){if(!condition instanceof TableStore.ColumnCondition){throw new Error("The input condition should be an instance of TableStore.ColumnCondition")}this.sub_conditions.push(condition)},clearSubCondition:function(){this.sub_conditions=[]}});TableStore.SingleColumnCondition=inherit(TableStore.ColumnCondition,{constructor:function(columnName,columnValue,comparator,passIfMissing,latestVersionOnly){if(passIfMissing===undefined){passIfMissing=true}if(latestVersionOnly===undefined){latestVersionOnly=true}this.columnName=columnName;this.columnValue=columnValue;this.comparator=null;this.passIfMissing=null;this.latestVersionOnly=null;this.setComparator(comparator);this.setPassIfMissing(passIfMissing);this.setLatestVersionOnly(latestVersionOnly)},getType:function(){return tsFilterProtos.FilterType.FT_SINGLE_COLUMN_VALUE},setPassIfMissing:function(passIfMissing){if(!typeof passIfMissing==="boolean"){throw new Error("The input passIfMissing should be an instance of Bool")}this.passIfMissing=passIfMissing},getPassIfMissing:function(){return this.passIfMissing},setLatestVersionOnly:function(latestVersionOnly){if(!typeof latestVersionOnly==="boolean"){throw new Error("The input passIfMissing should be an instance of Bool")}this.latestVersionOnly=latestVersionOnly},getLatestVersionOnly:function(){return this.latestVersionOnly},setColumnName:function(columnName){this.columnName=columnName},getColumnName:function(){return this.columnName},setColumnValue:function(columnValue){this.columnValue=columnValue},getColumnValue:function(){return this.columnValue},setComparator:function(comparator){var isValidateValue=false;for(pro in TableStore.ComparatorType){if(TableStore.ComparatorType[pro]===comparator){isValidateValue=true;break}}if(!isValidateValue){throw new Error("Expect input comparator should be one of TableStore.ComparatorType")}this.comparator=comparator},getComparator:function(){return this.comparator}});TableStore.Condition=inherit({constructor:function(rowExistenceExpectation,columnCondition){this.rowExistenceExpectation=null;this.columnCondition=null;if(undefined===columnCondition){columnCondition=null}this.setRowExistenceExpectation(rowExistenceExpectation);if(columnCondition!=null){this.setColumnCondition(columnCondition)}},setRowExistenceExpectation:function(rowExistenceExpectation){var isValidateValue=false;for(pro in TableStore.RowExistenceExpectation){if(TableStore.RowExistenceExpectation[pro]===rowExistenceExpectation){isValidateValue=true;break}}if(!isValidateValue){throw new Error("Expect input rowExistenceExpectation should be one of TableStore.RowExistenceExpectation")}this.rowExistenceExpectation=rowExistenceExpectation},getRowExistenceExpectation:function(){return this.rowExistenceExpectation},setColumnCondition:function(columnCondition){if(!columnCondition instanceof TableStore.ColumnCondition){throw new Error("The input columnCondition should be an instance of TableStore.ColumnCondition")}this.columnCondition=columnCondition},getColumnCondition:function(){this.columnCondition}});TableStore.ColumnPaginationFilter=inherit({constructor:function(limit,offset){this.limit=limit===undefined?1:limit;this.offset=offset===undefined?0:offset},getType:function(){return tsFilterProtos.FilterType.FT_COLUMN_PAGINATION}})},{"./core":6,"./protocol/tablestore_filter_proto.js":21}],9:[function(require,module,exports){(function(process){var TableStore=require("./core");var inherit=TableStore.util.inherit;TableStore.Endpoint=inherit({constructor:function Endpoint(endpoint){TableStore.util.hideProperties(this,["slashes","auth","hash","search","query"]);if(typeof endpoint==="undefined"||endpoint===null){throw new Error("Invalid endpoint: "+endpoint)}if(!endpoint.match(/^http/)){throw new Error("错误的 endpoint 格式, 需要以 http 或者 https 开头")}TableStore.util.update(this,TableStore.util.urlParse(endpoint));if(this.port){this.port=parseInt(this.port,10)}else{this.port=this.protocol==="https:"?443:80}}});TableStore.HttpRequest=inherit({constructor:function HttpRequest(endpoint,region){this.method="POST";this.path=endpoint.path||"/";this.headers={};this.body="";this.endpoint=endpoint;this.region=region},pathname:function pathname(){return this.path.split("?",1)[0]},search:function search(){return this.path.split("?",2)[1]||""},debug:function(){if(process.env.DEBUG=="aliyun"){console.log("-------- HttpRequest Start: --------");console.log("method:",this.method);console.log("path:",this.path);console.log("headers:");for(var i in this.headers){if(i=="constructor")continue;console.log(i,":",this.headers[i])}}}});TableStore.HttpResponse=inherit({constructor:function HttpResponse(){this.statusCode=undefined;this.headers={};this.body=undefined}});TableStore.HttpClient=inherit({});TableStore.HttpClient.getInstance=function getInstance(){if(this.singleton===undefined){this.singleton=new this}return this.singleton}}).call(this,require("_process"))},{"./core":6,_process:50}],10:[function(require,module,exports){var TableStore=require("../core");var Stream=require("stream").Stream;var WritableStream=require("stream").Writable;var ReadableStream=require("stream").Readable;require("../http");TableStore.NodeHttpClient=TableStore.util.inherit({handleRequest:function handleRequest(httpRequest,httpOptions,callback,errCallback){var endpoint=httpRequest.endpoint;var pathPrefix="";if(!httpOptions)httpOptions={};var useSSL=endpoint.protocol==="https:";var http=useSSL?require("https"):require("http");var options={host:endpoint.hostname,port:endpoint.port,method:httpRequest.method,headers:httpRequest.headers,path:pathPrefix+httpRequest.path};if(useSSL&&!httpOptions.agent){options.agent=this.sslAgent()}TableStore.util.update(options,httpOptions);delete options.proxy;delete options.timeout;var stream=http.request(options,function(httpResp){callback(httpResp);httpResp.emit("headers",httpResp.statusCode,httpResp.headers)});httpRequest.stream=stream;stream.setTimeout(httpOptions.timeout||0);stream.once("timeout",function(){var msg="Connection timed out after "+httpOptions.timeout+"ms";errCallback(TableStore.util.error(new Error(msg),{code:"TimeoutError"}));stream.removeListener("error",errCallback);stream.on("error",function(){});stream.abort()});stream.on("error",errCallback);this.writeBody(stream,httpRequest);return stream},writeBody:function writeBody(stream,httpRequest){var body=httpRequest.body;if(body&&WritableStream&&ReadableStream){if(!(body instanceof Stream))body=this.bufferToStream(body);body.pipe(this.progressStream(stream,httpRequest))}if(body instanceof Stream){body.pipe(stream)}else if(body){stream.end(body)}else{stream.end()}},sslAgent:function sslAgent(){var https=require("https");if(!TableStore.NodeHttpClient.sslAgent){TableStore.NodeHttpClient.sslAgent=new https.Agent({rejectUnauthorized:true});TableStore.NodeHttpClient.sslAgent.setMaxListeners(0);Object.defineProperty(TableStore.NodeHttpClient.sslAgent,"maxSockets",{enumerable:true,get:function(){return https.globalAgent.maxSockets}})}return TableStore.NodeHttpClient.sslAgent},progressStream:function progressStream(stream,httpRequest){var numBytes=0;var totalBytes=httpRequest.headers["Content-Length"];var writer=new WritableStream;writer._write=function(chunk,encoding,callback){if(chunk){numBytes+=chunk.length;stream.emit("sendProgress",{loaded:numBytes,total:totalBytes})}callback()};return writer},bufferToStream:function bufferToStream(buffer){if(!TableStore.util.Buffer.isBuffer(buffer))buffer=new TableStore.util.Buffer(buffer);var readable=new ReadableStream;var pos=0;readable._read=function(size){if(pos>=buffer.length)return readable.push(null);var end=pos+size;if(end>buffer.length)end=buffer.length;readable.push(buffer.slice(pos,end));pos=end};return readable},emitter:null});TableStore.HttpClient.prototype=TableStore.NodeHttpClient.prototype;TableStore.HttpClient.streamsApiVersion=ReadableStream?2:1},{"../core":6,"../http":9,http:70,https:44,stream:69}],11:[function(require,module,exports){var TableStore=require("../core");var EventEmitter=require("events").EventEmitter;require("../http");TableStore.XHRClient=TableStore.util.inherit({handleRequest:function handleRequest(httpRequest,httpOptions,callback,errCallback){var self=this;var endpoint=httpRequest.endpoint;var emitter=new EventEmitter;var href=endpoint.protocol+"//"+endpoint.hostname;if(endpoint.port!=80&&endpoint.port!=443){href+=":"+endpoint.port}href+=httpRequest.path;var xhr=new XMLHttpRequest;httpRequest.stream=xhr;if(httpOptions.timeout){xhr.timeout=httpOptions.timeout}xhr.addEventListener("readystatechange",function(){try{if(xhr.status===0)return}catch(e){return}if(this.readyState===this.HEADERS_RECEIVED){try{xhr.responseType="arraybuffer"}catch(e){}emitter.statusCode=xhr.status;emitter.headers=self.parseHeaders(xhr.getAllResponseHeaders());emitter.emit("headers",emitter.statusCode,emitter.headers)}else if(this.readyState===this.DONE){self.finishRequest(xhr,emitter)}},false);xhr.upload.addEventListener("progress",function(evt){emitter.emit("sendProgress",evt)});xhr.addEventListener("progress",function(evt){emitter.emit("receiveProgress",evt)},false);xhr.addEventListener("timeout",function(){errCallback(TableStore.util.error(new Error("Timeout"),{code:"TimeoutError"}))},false);xhr.addEventListener("error",function(){errCallback(TableStore.util.error(new Error("Network Failure"),{code:"NetworkingError"}))},false);callback(emitter);xhr.open(httpRequest.method,href,true);TableStore.util.each(httpRequest.headers,function(key,value){if(key!=="Content-Length"&&key!=="User-Agent"&&key!=="Host"&&key!=="Date"){xhr.setRequestHeader(key,value)}});if(httpRequest.body&&typeof httpRequest.body.buffer==="object"){xhr.send(httpRequest.body.buffer)}else{xhr.send(httpRequest.body)}return emitter},parseHeaders:function parseHeaders(rawHeaders){var headers={};TableStore.util.arrayEach(rawHeaders.split(/\r?\n/),function(line){var key=line.split(":",1)[0];var value=line.substring(key.length+2);if(key.length>0)headers[key]=value});return headers},finishRequest:function finishRequest(xhr,emitter){var buffer;if(xhr.responseType==="arraybuffer"&&xhr.response){var ab=xhr.response;buffer=new TableStore.util.Buffer(ab.byteLength);var view=new Uint8Array(ab);for(var i=0;i<buffer.length;++i){buffer[i]=view[i]}}try{if(!buffer&&typeof xhr.responseText==="string"){buffer=new TableStore.util.Buffer(xhr.responseText)}}catch(e){}if(buffer)emitter.emit("data",buffer);emitter.emit("end")}});TableStore.HttpClient.prototype=TableStore.XHRClient.prototype;TableStore.HttpClient.streamsApiVersion=1},{"../core":6,"../http":9,events:43}],12:[function(require,module,exports){var TableStore=require("./core");var Int64buf=require("int64-buffer");TableStore.Long={fromNumber:function(num){this.int64=new Int64buf.Int64LE(num);return this.int64},fromString:function(str){this.int64=new Int64buf.Int64LE(str,10);return this.int64},toBuffer:function(){return this.int64.toBuffer()},toNumber:function(){return this.int64.toNumber()}}},{"./core":6,"int64-buffer":33}],13:[function(require,module,exports){var TableStore=require("./core");var inherit=TableStore.util.inherit;TableStore.rowExistenceExpectation={IGNORE:"IGNORE",EXPECT_EXIST:"EXPECT_EXIST",EXPECT_NOT_EXIST:"EXPECT_NOT_EXIST"};TableStore.Direction={FORWARD:"FORWARD",BACKWARD:"BACKWARD"};TableStore.UpdateType={PUT:"PUT",DELETE:"DELETE",DELETE_ALL:"DELETE_ALL"};TableStore.ReturnType={NONE:0,Primarykey:1};TableStore.INF_MIN={};TableStore.INF_MAX={};TableStore.PK_AUTO_INCR={}},{"./core":6}],14:[function(require,module,exports){var TableStore=require("../core");var tsProtos=require("./tablestore_proto.js").tablestore.proto;var tsFilterProtos=require("./tablestore_filter_proto.js").tablestore.filter.proto;TableStore.decoder={decode:function(operation,buffers){return tsMap[operation](buffers)},decodeCreateTable:function(buffers){var response=tsProtos.CreateTableResponse.decode(buffers);return response},decodeListTable:function(buffers){var response=tsProtos.ListTableResponse.decode(buffers);return response},decodeDeleteTable:function(buffers){var response=tsProtos.DeleteTableResponse.decode(buffers);return response},decodeUpdateTable:function(buffers){var response=tsProtos.UpdateTableResponse.decode(buffers);return response},decodeDescribeTable:function(buffers){var response=tsProtos.DescribeTableResponse.decode(buffers);return response},decodeGetRow:function(buffers){var response=tsProtos.GetRowResponse.decode(buffers);if(response.row&&response.row.limit>response.row.offset){var inputStream=new TableStore.PlainBufferInputStream(response.row);var codedInputStream=new TableStore.PlainBufferCodedInputStream(inputStream);response.row=codedInputStream.readRow()}else{response.row={}}return response},decodePutRow:function(buffers){var response=tsProtos.UpdateRowResponse.decode(buffers);if(response.row&&response.row.limit>response.row.offset){var inputStream=new TableStore.PlainBufferInputStream(response.row);var codedInputStream=new TableStore.PlainBufferCodedInputStream(inputStream);response.row=codedInputStream.readRow()}else{response.row={}}return response},decodeUpdateRow:function(buffers){var response=tsProtos.UpdateRowResponse.decode(buffers);return response},decodeDeleteRow:function(buffers){var response=tsProtos.DeleteRowResponse.decode(buffers);return response},decodeGetRange:function(buffers){var response=tsProtos.GetRangeResponse.decode(buffers);if(response.rows&&response.rows.limit>response.rows.offset){var inputStream=new TableStore.PlainBufferInputStream(response.rows);var codedInputStream=new TableStore.PlainBufferCodedInputStream(inputStream);response.rows=codedInputStream.readRows()}else{response.rows=[]}if(response.next_start_primary_key!=null){var nextPkInputStream=new TableStore.PlainBufferInputStream(response.next_start_primary_key);var nextPkCodedInputStream=new TableStore.PlainBufferCodedInputStream(nextPkInputStream);var nextPk=nextPkCodedInputStream.readRow();response.next_start_primary_key=nextPk.primaryKey}return response},decodeBatchGetRow:fu