CB-12621: reverted elementtree dep to 0.1.6
Project: http://git-wip-us.apache.org/repos/asf/cordova-android/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-android/commit/4a0f69a3 Tree: http://git-wip-us.apache.org/repos/asf/cordova-android/tree/4a0f69a3 Diff: http://git-wip-us.apache.org/repos/asf/cordova-android/diff/4a0f69a3 Branch: refs/heads/master Commit: 4a0f69a3f0a068a7acb5de72e9190aa4afc0cf94 Parents: 8a2e96d Author: Steve Gill <[email protected]> Authored: Sun Apr 2 17:11:17 2017 -0500 Committer: Steve Gill <[email protected]> Committed: Sun Apr 2 17:11:17 2017 -0500 ---------------------------------------------------------------------- node_modules/big-integer/BigInteger.js | 6 +- node_modules/big-integer/BigInteger.min.js | 2 +- node_modules/big-integer/package.json | 20 +- node_modules/elementtree/.travis.yml | 6 +- node_modules/elementtree/CHANGES.md | 2 +- node_modules/elementtree/package.json | 73 +- node_modules/elementtree/tests/data/bom-xml.xml | 17 - node_modules/elementtree/tests/test-simple.js | 9 - node_modules/sax/AUTHORS | 9 + node_modules/sax/LICENSE | 64 +- node_modules/sax/LICENSE-W3C.html | 188 - node_modules/sax/README.md | 105 +- node_modules/sax/examples/big-not-pretty.xml | 8002 ++++++++++++++++++ node_modules/sax/examples/example.js | 41 + node_modules/sax/examples/get-products.js | 58 + node_modules/sax/examples/hello-world.js | 4 + node_modules/sax/examples/not-pretty.xml | 8 + node_modules/sax/examples/pretty-print.js | 74 + node_modules/sax/examples/shopping.xml | 2 + node_modules/sax/examples/strict.dtd | 870 ++ node_modules/sax/examples/switch-bench.js | 45 + node_modules/sax/examples/test.html | 15 + node_modules/sax/examples/test.xml | 1254 +++ node_modules/sax/lib/sax.js | 2385 ++---- node_modules/sax/package.json | 64 +- node_modules/sax/test/buffer-overrun.js | 25 + node_modules/sax/test/cdata-chunked.js | 11 + node_modules/sax/test/cdata-end-split.js | 15 + node_modules/sax/test/cdata-fake-end.js | 28 + node_modules/sax/test/cdata-multiple.js | 15 + node_modules/sax/test/cdata.js | 10 + node_modules/sax/test/index.js | 86 + node_modules/sax/test/issue-23.js | 43 + node_modules/sax/test/issue-30.js | 24 + node_modules/sax/test/issue-35.js | 15 + node_modules/sax/test/issue-47.js | 13 + node_modules/sax/test/issue-49.js | 31 + node_modules/sax/test/parser-position.js | 28 + node_modules/sax/test/script.js | 12 + .../sax/test/self-closing-child-strict.js | 40 + node_modules/sax/test/self-closing-child.js | 40 + node_modules/sax/test/self-closing-tag.js | 25 + node_modules/sax/test/stray-ending.js | 17 + .../sax/test/trailing-non-whitespace.js | 17 + node_modules/sax/test/unquoted.js | 17 + node_modules/sax/test/xmlns-issue-41.js | 67 + node_modules/sax/test/xmlns-rebinding.js | 59 + node_modules/sax/test/xmlns-strict.js | 71 + node_modules/sax/test/xmlns-unbound.js | 15 + .../test/xmlns-xml-default-prefix-attribute.js | 35 + .../sax/test/xmlns-xml-default-prefix.js | 20 + .../sax/test/xmlns-xml-default-redefine.js | 40 + package.json | 2 +- 53 files changed, 12260 insertions(+), 1884 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cordova-android/blob/4a0f69a3/node_modules/big-integer/BigInteger.js ---------------------------------------------------------------------- diff --git a/node_modules/big-integer/BigInteger.js b/node_modules/big-integer/BigInteger.js index ad29f97..aa270d7 100644 --- a/node_modules/big-integer/BigInteger.js +++ b/node_modules/big-integer/BigInteger.js @@ -467,6 +467,7 @@ var bigInt = (function (undefined) { guess, xlen, highx, highy, check; while (a_l) { part.unshift(a[--a_l]); + trim(part); if (compareAbs(part, b) < 0) { result.push(0); continue; @@ -837,6 +838,9 @@ var bigInt = (function (undefined) { if (t.compare(0) === -1) { t = t.add(n); } + if (this.isNegative()) { + return t.negate(); + } return t; } SmallInteger.prototype.modInv = BigInteger.prototype.modInv; @@ -977,7 +981,7 @@ var bigInt = (function (undefined) { b = parseValue(b); return a.greater(b) ? a : b; } - function min(a,b) { + function min(a, b) { a = parseValue(a); b = parseValue(b); return a.lesser(b) ? a : b; http://git-wip-us.apache.org/repos/asf/cordova-android/blob/4a0f69a3/node_modules/big-integer/BigInteger.min.js ---------------------------------------------------------------------- diff --git a/node_modules/big-integer/BigInteger.min.js b/node_modules/big-integer/BigInteger.min.js index 908d242..54f5d2b 100644 --- a/node_modules/big-integer/BigInteger.min.js +++ b/node_modules/big-integer/BigInteger.min.js @@ -1 +1 @@ -var bigInt=function(e){"use strict";function o(e,t){return typeof e=="undefined"?o[0]:typeof t!="undefined"?+t===10?Y(e):$(e,t):Y(e)}function u(e,t){this.value=e,this.sign=t,this.isSmall=!1}function a(e){this.value=e,this.sign=e<0,this.isSmall=!0}function f(e){return-r<e&&e<r}function l(e){return e<1e7?[e]:e<1e14?[e%1e7,Math.floor(e/1e7)]:[e%1e7,Math.floor(e/1e7)%1e7,Math.floor(e/1e14)]}function c(e){h(e);var n=e.length;if(n<4&&_(e,i)<0)switch(n){case 0:return 0;case 1:return e[0];case 2:return e[0]+e[1]*t;default:return e[0]+(e[1]+e[2]*t)*t}return e}function h(e){var t=e.length;while(e[--t]===0);e.length=t+1}function p(e){var t=new Array(e),n=-1;while(++n<e)t[n]=0;return t}function d(e){return e>0?Math.floor(e):Math.ceil(e)}function v(e,n){var r=e.length,i=n.length,s=new Array(r),o=0,u=t,a,f;for(f=0;f<i;f++)a=e[f]+n[f]+o,o=a>=u?1:0,s[f]=a-o*u;while(f<r)a=e[f]+o,o=a===u?1:0,s[f++]=a-o*u;return o>0&&s.push(o),s}function m(e,t){return e.length>=t.length?v(e,t):v(t,e)}function g(e,n){v ar r=e.length,i=new Array(r),s=t,o,u;for(u=0;u<r;u++)o=e[u]-s+n,n=Math.floor(o/s),i[u]=o-n*s,n+=1;while(n>0)i[u++]=n%s,n=Math.floor(n/s);return i}function y(e,n){var r=e.length,i=n.length,s=new Array(r),o=0,u=t,a,f;for(a=0;a<i;a++)f=e[a]-o-n[a],f<0?(f+=u,o=1):o=0,s[a]=f;for(a=i;a<r;a++){f=e[a]-o;if(!(f<0)){s[a++]=f;break}f+=u,s[a]=f}for(;a<r;a++)s[a]=e[a];return h(s),s}function b(e,t,n){var r,i;return _(e,t)>=0?r=y(e,t):(r=y(t,e),n=!n),r=c(r),typeof r=="number"?(n&&(r=-r),new a(r)):new u(r,n)}function w(e,n,r){var i=e.length,s=new Array(i),o=-n,f=t,l,h;for(l=0;l<i;l++)h=e[l]+o,o=Math.floor(h/f),h%=f,s[l]=h<0?h+f:h;return s=c(s),typeof s=="number"?(r&&(s=-s),new a(s)):new u(s,r)}function E(e,n){var r=e.length,i=n.length,s=r+i,o=p(s),u=t,a,f,l,c,d;for(l=0;l<r;++l){c=e[l];for(var v=0;v<i;++v)d=n[v],a=c*d+o[l+v],f=Math.floor(a/u),o[l+v]=a-f*u,o[l+v+1]+=f}return h(o),o}function S(e,n){var r=e.length,i=new Array(r),s=t,o=0,u,a;for(a=0;a<r;a++)u=e[a]*n+o,o=Math.floor(u/s),i[a]=u-o*s;while( o>0)i[a++]=o%s,o=Math.floor(o/s);return i}function x(e,t){var n=[];while(t-->0)n.push(0);return n.concat(e)}function T(e,t){var n=Math.max(e.length,t.length);if(n<=30)return E(e,t);n=Math.ceil(n/2);var r=e.slice(n),i=e.slice(0,n),s=t.slice(n),o=t.slice(0,n),u=T(i,o),a=T(r,s),f=T(m(i,r),m(o,s)),l=m(m(u,x(y(y(f,u),a),n)),x(a,2*n));return h(l),l}function N(e,t){return-0.012*e-.012*t+15e-6*e*t>0}function C(e,n,r){return e<t?new u(S(n,e),r):new u(E(n,l(e)),r)}function k(e){var n=e.length,r=p(n+n),i=t,s,o,u,a,f;for(u=0;u<n;u++){a=e[u];for(var l=0;l<n;l++)f=e[l],s=a*f+r[u+l],o=Math.floor(s/i),r[u+l]=s-o*i,r[u+l+1]+=o}return h(r),r}function L(e,n){var r=e.length,i=n.length,s=t,o=p(n.length),u=n[i-1],a=Math.ceil(s/(2*u)),f=S(e,a),l=S(n,a),h,d,v,m,g,y,b;f.length<=r&&f.push(0),l.push(0),u=l[i-1];for(d=r-i;d>=0;d--){h=s-1,f[d+i]!==u&&(h=Math.floor((f[d+i]*s+f[d+i-1])/u)),v=0,m=0,y=l.length;for(g=0;g<y;g++)v+=h*l[g],b=Math.floor(v/s),m+=f[d+g]-(v-b*s),v=b,m<0?(f[d+g]=m+s,m=-1):(f[d+g]=m,m=0);whi le(m!==0){h-=1,v=0;for(g=0;g<y;g++)v+=f[d+g]-s+l[g],v<0?(f[d+g]=v+s,v=0):(f[d+g]=v,v=1);m+=v}o[d]=h}return f=O(f,a)[0],[c(o),c(f)]}function A(e,n){var r=e.length,i=n.length,s=[],o=[],u=t,a,f,l,h,p;while(r){o.unshift(e[--r]);if(_(o,n)<0){s.push(0);continue}f=o.length,l=o[f-1]*u+o[f-2],h=n[i-1]*u+n[i-2],f>i&&(l=(l+1)*u),a=Math.ceil(l/h);do{p=S(n,a);if(_(p,o)<=0)break;a--}while(a);s.push(a),o=y(o,p)}return s.reverse(),[c(s),c(o)]}function O(e,n){var r=e.length,i=p(r),s=t,o,u,a,f;a=0;for(o=r-1;o>=0;--o)f=a*s+e[o],u=d(f/n),a=f-u*n,i[o]=u|0;return[i,a|0]}function M(e,n){var r,i=Y(n),s=e.value,f=i.value,h;if(f===0)throw new Error("Cannot divide by zero");if(e.isSmall)return i.isSmall?[new a(d(s/f)),new a(s%f)]:[o[0],e];if(i.isSmall){if(f===1)return[e,o[0]];if(f==-1)return[e.negate(),o[0]];var p=Math.abs(f);if(p<t){r=O(s,p),h=c(r[0]);var v=r[1];return e.sign&&(v=-v),typeof h=="number"?(e.sign!==i.sign&&(h=-h),[new a(h),new a(v)]):[new u(h,e.sign!==i.sign),new a(v)]}f=l(p)}var m=_(s,f);if(m= ==-1)return[o[0],e];if(m===0)return[o[e.sign===i.sign?1:-1],o[0]];s.length+f.length<=200?r=L(s,f):r=A(s,f),h=r[0];var g=e.sign!==i.sign,y=r[1],b=e.sign;return typeof h=="number"?(g&&(h=-h),h=new a(h)):h=new u(h,g),typeof y=="number"?(b&&(y=-y),y=new a(y)):y=new u(y,b),[h,y]}function _(e,t){if(e.length!==t.length)return e.length>t.length?1:-1;for(var n=e.length-1;n>=0;n--)if(e[n]!==t[n])return e[n]>t[n]?1:-1;return 0}function D(e){var t=e.abs();if(t.isUnit())return!1;if(t.equals(2)||t.equals(3)||t.equals(5))return!0;if(t.isEven()||t.isDivisibleBy(3)||t.isDivisibleBy(5))return!1;if(t.lesser(25))return!0}function j(e){return(typeof e=="number"||typeof e=="string")&&+Math.abs(e)<=t||e instanceof u&&e.value.length<=1}function F(e,t,n){t=Y(t);var r=e.isNegative(),i=t.isNegative(),s=r?e.not():e,o=i?t.not():t,u=[],a=[],f=!1,l=!1;while(!f||!l)s.isZero()?(f=!0,u.push(r?1:0)):r?u.push(s.isEven()?1:0):u.push(s.isEven()?0:1),o.isZero()?(l=!0,a.push(i?1:0)):i?a.push(o.isEven()?1:0):a.push(o.isEve n()?0:1),s=s.over(2),o=o.over(2);var c=[];for(var h=0;h<u.length;h++)c.push(n(u[h],a[h]));var p=bigInt(c.pop()).negate().times(bigInt(2).pow(c.length));while(c.length)p=p.add(bigInt(c.pop()).times(bigInt(2).pow(c.length)));return p}function R(e){var n=e.value,r=typeof n=="number"?n|I:n[0]+n[1]*t|q;return r&-r}function U(e,t){return e=Y(e),t=Y(t),e.greater(t)?e:t}function z(e,t){return e=Y(e),t=Y(t),e.lesser(t)?e:t}function W(e,t){e=Y(e).abs(),t=Y(t).abs();if(e.equals(t))return e;if(e.isZero())return t;if(t.isZero())return e;var n=o[1],r,i;while(e.isEven()&&t.isEven())r=Math.min(R(e),R(t)),e=e.divide(r),t=t.divide(r),n=n.multiply(r);while(e.isEven())e=e.divide(R(e));do{while(t.isEven())t=t.divide(R(t));e.greater(t)&&(i=t,t=e,e=i),t=t.subtract(e)}while(!t.isZero());return n.isUnit()?e:e.multiply(n)}function X(e,t){return e=Y(e).abs(),t=Y(t).abs(),e.divide(W(e,t)).multiply(t)}function V(e,n){e=Y(e),n=Y(n);var r=z(e,n),i=U(e,n),s=i.subtract(r);if(s.isSmall)return r.add(Math.round(Math.r andom()*s));var o=s.value.length-1,f=[],l=!0;for(var h=o;h>=0;h--){var p=l?s.value[h]:t,v=d(Math.random()*p);f.unshift(v),v<p&&(l=!1)}return f=c(f),r.add(typeof f=="number"?new a(f):new u(f,!1))}function J(e){var t=e.value;return typeof t=="number"&&(t=[t]),t.length===1&&t[0]<=35?"0123456789abcdefghijklmnopqrstuvwxyz".charAt(t[0]):"<"+t+">"}function K(e,t){t=bigInt(t);if(t.isZero()){if(e.isZero())return"0";throw new Error("Cannot convert nonzero numbers to base 0.")}if(t.equals(-1))return e.isZero()?"0":e.isNegative()?(new Array(1-e)).join("10"):"1"+(new Array(+e)).join("01");var n="";e.isNegative()&&t.isPositive()&&(n="-",e=e.abs());if(t.equals(1))return e.isZero()?"0":n+(new Array(+e+1)).join(1);var r=[],i=e,s;while(i.isNegative()||i.compareAbs(t)>=0){s=i.divmod(t),i=s.quotient;var o=s.remainder;o.isNegative()&&(o=t.minus(o).abs(),i=i.next()),r.push(J(o))}return r.push(J(i)),n+r.reverse().join("")}function Q(e){if(f(+e)){var t=+e;if(t===d(t))return new a(t);throw"Invalid integer: "+e}var r=e[0]==="-";r&&(e=e.slice(1));var i=e.split(/e/i);if(i.length>2)throw new Error("Invalid integer: "+i.join("e"));if(i.length===2){var s=i[1];s[0]==="+"&&(s=s.slice(1)),s=+s;if(s!==d(s)||!f(s))throw new Error("Invalid integer: "+s+" is not a valid exponent.");var o=i[0],l=o.indexOf(".");l>=0&&(s-=o.length-l-1,o=o.slice(0,l)+o.slice(l+1));if(s<0)throw new Error("Cannot include negative exponent part for integers");o+=(new Array(s+1)).join("0"),e=o}var c=/^([0-9][0-9]*)$/.test(e);if(!c)throw new Error("Invalid integer: "+e);var p=[],v=e.length,m=n,g=v-m;while(v>0)p.push(+e.slice(g,v)),g-=m,g<0&&(g=0),v-=m;return h(p),new u(p,r)}function G(e){if(f(e)){if(e!==d(e))throw new Error(e+" is not an integer.");return new a(e)}return Q(e.toString())}function Y(e){return typeof e=="number"?G(e):typeof e=="string"?Q(e):e}var t=1e7,n=7,r=9007199254740992,i=l(r),s=Math.log(r);u.prototype=Object.create(o.prototype),a.prototype=Object.create(o.prototype),u.prototype.add=function(e){var t,n=Y (e);if(this.sign!==n.sign)return this.subtract(n.negate());var r=this.value,i=n.value;return n.isSmall?new u(g(r,Math.abs(i)),this.sign):new u(m(r,i),this.sign)},u.prototype.plus=u.prototype.add,a.prototype.add=function(e){var t=Y(e),n=this.value;if(n<0!==t.sign)return this.subtract(t.negate());var r=t.value;if(t.isSmall){if(f(n+r))return new a(n+r);r=l(Math.abs(r))}return new u(g(r,Math.abs(n)),n<0)},a.prototype.plus=a.prototype.add,u.prototype.subtract=function(e){var t=Y(e);if(this.sign!==t.sign)return this.add(t.negate());var n=this.value,r=t.value;return t.isSmall?w(n,Math.abs(r),this.sign):b(n,r,this.sign)},u.prototype.minus=u.prototype.subtract,a.prototype.subtract=function(e){var t=Y(e),n=this.value;if(n<0!==t.sign)return this.add(t.negate());var r=t.value;return t.isSmall?new a(n-r):w(r,Math.abs(n),n>=0)},a.prototype.minus=a.prototype.subtract,u.prototype.negate=function(){return new u(this.value,!this.sign)},a.prototype.negate=function(){var e=this.sign,t=new a(-this.value );return t.sign=!e,t},u.prototype.abs=function(){return new u(this.value,!1)},a.prototype.abs=function(){return new a(Math.abs(this.value))},u.prototype.multiply=function(e){var n,r=Y(e),i=this.value,s=r.value,a=this.sign!==r.sign,f;if(r.isSmall){if(s===0)return o[0];if(s===1)return this;if(s===-1)return this.negate();f=Math.abs(s);if(f<t)return new u(S(i,f),a);s=l(f)}return N(i.length,s.length)?new u(T(i,s),a):new u(E(i,s),a)},u.prototype.times=u.prototype.multiply,a.prototype._multiplyBySmall=function(e){return f(e.value*this.value)?new a(e.value*this.value):C(Math.abs(e.value),l(Math.abs(this.value)),this.sign!==e.sign)},u.prototype._multiplyBySmall=function(e){return e.value===0?o[0]:e.value===1?this:e.value===-1?this.negate():C(Math.abs(e.value),this.value,this.sign!==e.sign)},a.prototype.multiply=function(e){return Y(e)._multiplyBySmall(this)},a.prototype.times=a.prototype.multiply,u.prototype.square=function(){return new u(k(this.value),!1)},a.prototype.square=function(){var e=this.value*this.value;return f(e)?new a(e):new u(k(l(Math.abs(this.value))),!1)},u.prototype.divmod=function(e){var t=M(this,e);return{quotient:t[0],remainder:t[1]}},a.prototype.divmod=u.prototype.divmod,u.prototype.divide=function(e){return M(this,e)[0]},a.prototype.over=a.prototype.divide=u.prototype.over=u.prototype.divide,u.prototype.mod=function(e){return M(this,e)[1]},a.prototype.remainder=a.prototype.mod=u.prototype.remainder=u.prototype.mod,u.prototype.pow=function(e){var t=Y(e),n=this.value,r=t.value,i,s,u;if(r===0)return o[1];if(n===0)return o[0];if(n===1)return o[1];if(n===-1)return t.isEven()?o[1]:o[-1];if(t.sign)return o[0];if(!t.isSmall)throw new Error("The exponent "+t.toString()+" is too large.");if(this.isSmall&&f(i=Math.pow(n,r)))return new a(d(i));s=this,u=o[1];for(;;){r&!0&&(u=u.times(s),--r);if(r===0)break;r/=2,s=s.square()}return u},a.prototype.pow=u.prototype.pow,u.prototype.modPow=function(e,t){e=Y(e),t=Y(t);if(t.isZero())throw new Error("Cannot take modPow with modulus 0");var n=o[1],r=this.mod(t);while(e.isPositive()){if(r.isZero())return o[0];e.isOdd()&&(n=n.multiply(r).mod(t)),e=e.divide(2),r=r.square().mod(t)}return n},a.prototype.modPow=u.prototype.modPow,u.prototype.compareAbs=function(e){var t=Y(e),n=this.value,r=t.value;return t.isSmall?1:_(n,r)},a.prototype.compareAbs=function(e){var t=Y(e),n=Math.abs(this.value),r=t.value;return t.isSmall?(r=Math.abs(r),n===r?0:n>r?1:-1):-1},u.prototype.compare=function(e){if(e===Infinity)return-1;if(e===-Infinity)return 1;var t=Y(e),n=this.value,r=t.value;return this.sign!==t.sign?t.sign?1:-1:t.isSmall?this.sign?-1:1:_(n,r)*(this.sign?-1:1)},u.prototype.compareTo=u.prototype.compare,a.prototype.compare=function(e){if(e===Infinity)return-1;if(e===-Infinity)return 1;var t=Y(e),n=this.value,r=t.value;return t.isSmall?n==r?0:n>r?1:-1:n<0!==t.sign?n<0?-1:1:n<0?1:-1},a.prototype.compareTo=a.prototype.compare,u.prototype.equals=function(e){return this.compare(e)===0},a.prototype.eq=a.prototype.eq uals=u.prototype.eq=u.prototype.equals,u.prototype.notEquals=function(e){return this.compare(e)!==0},a.prototype.neq=a.prototype.notEquals=u.prototype.neq=u.prototype.notEquals,u.prototype.greater=function(e){return this.compare(e)>0},a.prototype.gt=a.prototype.greater=u.prototype.gt=u.prototype.greater,u.prototype.lesser=function(e){return this.compare(e)<0},a.prototype.lt=a.prototype.lesser=u.prototype.lt=u.prototype.lesser,u.prototype.greaterOrEquals=function(e){return this.compare(e)>=0},a.prototype.geq=a.prototype.greaterOrEquals=u.prototype.geq=u.prototype.greaterOrEquals,u.prototype.lesserOrEquals=function(e){return this.compare(e)<=0},a.prototype.leq=a.prototype.lesserOrEquals=u.prototype.leq=u.prototype.lesserOrEquals,u.prototype.isEven=function(){return(this.value[0]&1)===0},a.prototype.isEven=function(){return(this.value&1)===0},u.prototype.isOdd=function(){return(this.value[0]&1)===1},a.prototype.isOdd=function(){return(this.value&1)===1},u.prototype.isPositive=function( ){return!this.sign},a.prototype.isPositive=function(){return this.value>0},u.prototype.isNegative=function(){return this.sign},a.prototype.isNegative=function(){return this.value<0},u.prototype.isUnit=function(){return!1},a.prototype.isUnit=function(){return Math.abs(this.value)===1},u.prototype.isZero=function(){return!1},a.prototype.isZero=function(){return this.value===0},u.prototype.isDivisibleBy=function(e){var t=Y(e),n=t.value;return n===0?!1:n===1?!0:n===2?this.isEven():this.mod(t).equals(o[0])},a.prototype.isDivisibleBy=u.prototype.isDivisibleBy,u.prototype.isPrime=function(){var t=D(this);if(t!==e)return t;var n=this.abs(),r=n.prev(),i=[2,3,5,7,11,13,17,19],s=r,u,a,f,l;while(s.isEven())s=s.divide(2);for(f=0;f<i.length;f++){l=bigInt(i[f]).modPow(s,n);if(l.equals(o[1])||l.equals(r))continue;for(a=!0,u=s;a&&u.lesser(r);u=u.multiply(2))l=l.square().mod(n),l.equals(r)&&(a=!1);if(a)return!1}return!0},a.prototype.isPrime=u.prototype.isPrime,u.prototype.isProbablePrime=function(t){ var n=D(this);if(n!==e)return n;var r=this.abs(),i=t===e?5:t;for(var s=0;s<i;s++){var o=bigInt.randBetween(2,r.minus(2));if(!o.modPow(r.prev(),r).isUnit())return!1}return!0},a.prototype.isProbablePrime=u.prototype.isProbablePrime,u.prototype.modInv=function(e){var t=bigInt.zero,n=bigInt.one,r=Y(e),i=this.abs(),s,o,u;while(!i.equals(bigInt.zero))s=r.divide(i),o=t,u=r,t=n,r=i,n=o.subtract(s.multiply(n)),i=u.subtract(s.multiply(i));if(!r.equals(1))throw new Error(this.toString()+" and "+e.toString()+" are not co-prime");return t.compare(0)===-1&&(t=t.add(e)),t},a.prototype.modInv=u.prototype.modInv,u.prototype.next=function(){var e=this.value;return this.sign?w(e,1,this.sign):new u(g(e,1),this.sign)},a.prototype.next=function(){var e=this.value;return e+1<r?new a(e+1):new u(i,!1)},u.prototype.prev=function(){var e=this.value;return this.sign?new u(g(e,1),!0):w(e,1,this.sign)},a.prototype.prev=function(){var e=this.value;return e-1>-r?new a(e-1):new u(i,!0)};var P=[1];while(P[P.length-1 ]<=t)P.push(2*P[P.length-1]);var H=P.length,B=P[H-1];u.prototype.shiftLeft=function(e){if(!j(e))throw new Error(String(e)+" is too large for shifting.");e=+e;if(e<0)return this.shiftRight(-e);var t=this;while(e>=H)t=t.multiply(B),e-=H-1;return t.multiply(P[e])},a.prototype.shiftLeft=u.prototype.shiftLeft,u.prototype.shiftRight=function(e){var t;if(!j(e))throw new Error(String(e)+" is too large for shifting.");e=+e;if(e<0)return this.shiftLeft(-e);var n=this;while(e>=H){if(n.isZero())return n;t=M(n,B),n=t[1].isNegative()?t[0].prev():t[0],e-=H-1}return t=M(n,P[e]),t[1].isNegative()?t[0].prev():t[0]},a.prototype.shiftRight=u.prototype.shiftRight,u.prototype.not=function(){return this.negate().prev()},a.prototype.not=u.prototype.not,u.prototype.and=function(e){return F(this,e,function(e,t){return e&t})},a.prototype.and=u.prototype.and,u.prototype.or=function(e){return F(this,e,function(e,t){return e|t})},a.prototype.or=u.prototype.or,u.prototype.xor=function(e){return F(this,e,function( e,t){return e^t})},a.prototype.xor=u.prototype.xor;var I=1<<30,q=(t&-t)*(t&-t)|I,$=function(e,t){var n=o[0],r=o[1],i=e.length;if(2<=t&&t<=36&&i<=s/Math.log(t))return new a(parseInt(e,t));t=Y(t);var u=[],f,l=e[0]==="-";for(f=l?1:0;f<e.length;f++){var c=e[f].toLowerCase(),h=c.charCodeAt(0);if(48<=h&&h<=57)u.push(Y(c));else if(97<=h&&h<=122)u.push(Y(c.charCodeAt(0)-87));else{if(c!=="<")throw new Error(c+" is not a valid character");var p=f;do f++;while(e[f]!==">");u.push(Y(e.slice(p+1,f)))}}u.reverse();for(f=0;f<u.length;f++)n=n.add(u[f].times(r)),r=r.times(t);return l?n.negate():n};u.prototype.toString=function(t){t===e&&(t=10);if(t!==10)return K(this,t);var n=this.value,r=n.length,i=String(n[--r]),s="0000000",o;while(--r>=0)o=String(n[r]),i+=s.slice(o.length)+o;var u=this.sign?"-":"";return u+i},a.prototype.toString=function(t){return t===e&&(t=10),t!=10?K(this,t):String(this.value)},u.prototype.valueOf=function(){return+this.toString()},u.prototype.toJSNumber=u.prototype.valueOf,a.p rototype.valueOf=function(){return this.value},a.prototype.toJSNumber=a.prototype.valueOf;for(var Z=0;Z<1e3;Z++)o[Z]=new a(Z),Z>0&&(o[-Z]=new a(-Z));return o.one=o[1],o.zero=o[0],o.minusOne=o[-1],o.max=U,o.min=z,o.gcd=W,o.lcm=X,o.isInstance=function(e){return e instanceof u||e instanceof a},o.randBetween=V,o}();typeof module!="undefined"&&module.hasOwnProperty("exports")&&(module.exports=bigInt); \ No newline at end of file +var bigInt=function(undefined){"use strict";var BASE=1e7,LOG_BASE=7,MAX_INT=9007199254740992,MAX_INT_ARR=smallToArray(MAX_INT),LOG_MAX_INT=Math.log(MAX_INT);function Integer(v,radix){if(typeof v==="undefined")return Integer[0];if(typeof radix!=="undefined")return+radix===10?parseValue(v):parseBase(v,radix);return parseValue(v)}function BigInteger(value,sign){this.value=value;this.sign=sign;this.isSmall=false}BigInteger.prototype=Object.create(Integer.prototype);function SmallInteger(value){this.value=value;this.sign=value<0;this.isSmall=true}SmallInteger.prototype=Object.create(Integer.prototype);function isPrecise(n){return-MAX_INT<n&&n<MAX_INT}function smallToArray(n){if(n<1e7)return[n];if(n<1e14)return[n%1e7,Math.floor(n/1e7)];return[n%1e7,Math.floor(n/1e7)%1e7,Math.floor(n/1e14)]}function arrayToSmall(arr){trim(arr);var length=arr.length;if(length<4&&compareAbs(arr,MAX_INT_ARR)<0){switch(length){case 0:return 0;case 1:return arr[0];case 2:return arr[0]+arr[1]*BASE;default:return arr[0]+(arr[1]+arr[2]*BASE)*BASE}}return arr}function trim(v){var i=v.length;while(v[--i]===0);v.length=i+1}function createArray(length){var x=new Array(length);var i=-1;while(++i<length){x[i]=0}return x}function truncate(n){if(n>0)return Math.floor(n);return Math.ceil(n)}function add(a,b){var l_a=a.length,l_b=b.length,r=new Array(l_a),carry=0,base=BASE,sum,i;for(i=0;i<l_b;i++){sum=a[i]+b[i]+carry;carry=sum>=base?1:0;r[i]=sum-carry*base}while(i<l_a){sum=a[i]+carry;carry=sum===base?1:0;r[i++]=sum-carry*base}if(carry>0)r.push(carry);return r}function addAny(a,b){if(a.length>=b.length)return add(a,b);return add(b,a)}function addSmall(a,carry){var l=a.length,r=new Array(l),base=BASE,sum,i;for(i=0;i<l;i++){sum=a[i]-base+carry;carry=Math.floor(sum/base);r[i]=sum-carry*base;carry+=1}while(carry>0){r[i++]=carry%base;carry=Math.floor(carry/base)}return r}BigInteger.prototype.add=function(v){var value,n=parseValue(v);if(this.sign!==n.sign){return this.subtract(n.negate())}var a=this.value,b= n.value;if(n.isSmall){return new BigInteger(addSmall(a,Math.abs(b)),this.sign)}return new BigInteger(addAny(a,b),this.sign)};BigInteger.prototype.plus=BigInteger.prototype.add;SmallInteger.prototype.add=function(v){var n=parseValue(v);var a=this.value;if(a<0!==n.sign){return this.subtract(n.negate())}var b=n.value;if(n.isSmall){if(isPrecise(a+b))return new SmallInteger(a+b);b=smallToArray(Math.abs(b))}return new BigInteger(addSmall(b,Math.abs(a)),a<0)};SmallInteger.prototype.plus=SmallInteger.prototype.add;function subtract(a,b){var a_l=a.length,b_l=b.length,r=new Array(a_l),borrow=0,base=BASE,i,difference;for(i=0;i<b_l;i++){difference=a[i]-borrow-b[i];if(difference<0){difference+=base;borrow=1}else borrow=0;r[i]=difference}for(i=b_l;i<a_l;i++){difference=a[i]-borrow;if(difference<0)difference+=base;else{r[i++]=difference;break}r[i]=difference}for(;i<a_l;i++){r[i]=a[i]}trim(r);return r}function subtractAny(a,b,sign){var value,isSmall;if(compareAbs(a,b)>=0){value=subtract(a,b)}else{v alue=subtract(b,a);sign=!sign}value=arrayToSmall(value);if(typeof value==="number"){if(sign)value=-value;return new SmallInteger(value)}return new BigInteger(value,sign)}function subtractSmall(a,b,sign){var l=a.length,r=new Array(l),carry=-b,base=BASE,i,difference;for(i=0;i<l;i++){difference=a[i]+carry;carry=Math.floor(difference/base);difference%=base;r[i]=difference<0?difference+base:difference}r=arrayToSmall(r);if(typeof r==="number"){if(sign)r=-r;return new SmallInteger(r)}return new BigInteger(r,sign)}BigInteger.prototype.subtract=function(v){var n=parseValue(v);if(this.sign!==n.sign){return this.add(n.negate())}var a=this.value,b=n.value;if(n.isSmall)return subtractSmall(a,Math.abs(b),this.sign);return subtractAny(a,b,this.sign)};BigInteger.prototype.minus=BigInteger.prototype.subtract;SmallInteger.prototype.subtract=function(v){var n=parseValue(v);var a=this.value;if(a<0!==n.sign){return this.add(n.negate())}var b=n.value;if(n.isSmall){return new SmallInteger(a-b)}return subt ractSmall(b,Math.abs(a),a>=0)};SmallInteger.prototype.minus=SmallInteger.prototype.subtract;BigInteger.prototype.negate=function(){return new BigInteger(this.value,!this.sign)};SmallInteger.prototype.negate=function(){var sign=this.sign;var small=new SmallInteger(-this.value);small.sign=!sign;return small};BigInteger.prototype.abs=function(){return new BigInteger(this.value,false)};SmallInteger.prototype.abs=function(){return new SmallInteger(Math.abs(this.value))};function multiplyLong(a,b){var a_l=a.length,b_l=b.length,l=a_l+b_l,r=createArray(l),base=BASE,product,carry,i,a_i,b_j;for(i=0;i<a_l;++i){a_i=a[i];for(var j=0;j<b_l;++j){b_j=b[j];product=a_i*b_j+r[i+j];carry=Math.floor(product/base);r[i+j]=product-carry*base;r[i+j+1]+=carry}}trim(r);return r}function multiplySmall(a,b){var l=a.length,r=new Array(l),base=BASE,carry=0,product,i;for(i=0;i<l;i++){product=a[i]*b+carry;carry=Math.floor(product/base);r[i]=product-carry*base}while(carry>0){r[i++]=carry%base;carry=Math.floor(carry/ base)}return r}function shiftLeft(x,n){var r=[];while(n-- >0)r.push(0);return r.concat(x)}function multiplyKaratsuba(x,y){var n=Math.max(x.length,y.length);if(n<=30)return multiplyLong(x,y);n=Math.ceil(n/2);var b=x.slice(n),a=x.slice(0,n),d=y.slice(n),c=y.slice(0,n);var ac=multiplyKaratsuba(a,c),bd=multiplyKaratsuba(b,d),abcd=multiplyKaratsuba(addAny(a,b),addAny(c,d));var product=addAny(addAny(ac,shiftLeft(subtract(subtract(abcd,ac),bd),n)),shiftLeft(bd,2*n));trim(product);return product}function useKaratsuba(l1,l2){return-.012*l1-.012*l2+15e-6*l1*l2>0}BigInteger.prototype.multiply=function(v){var value,n=parseValue(v),a=this.value,b=n.value,sign=this.sign!==n.sign,abs;if(n.isSmall){if(b===0)return Integer[0];if(b===1)return this;if(b===-1)return this.negate();abs=Math.abs(b);if(abs<BASE){return new BigInteger(multiplySmall(a,abs),sign)}b=smallToArray(abs)}if(useKaratsuba(a.length,b.length))return new BigInteger(multiplyKaratsuba(a,b),sign);return new BigInteger(multiplyLong(a,b),si gn)};BigInteger.prototype.times=BigInteger.prototype.multiply;function multiplySmallAndArray(a,b,sign){if(a<BASE){return new BigInteger(multiplySmall(b,a),sign)}return new BigInteger(multiplyLong(b,smallToArray(a)),sign)}SmallInteger.prototype._multiplyBySmall=function(a){if(isPrecise(a.value*this.value)){return new SmallInteger(a.value*this.value)}return multiplySmallAndArray(Math.abs(a.value),smallToArray(Math.abs(this.value)),this.sign!==a.sign)};BigInteger.prototype._multiplyBySmall=function(a){if(a.value===0)return Integer[0];if(a.value===1)return this;if(a.value===-1)return this.negate();return multiplySmallAndArray(Math.abs(a.value),this.value,this.sign!==a.sign)};SmallInteger.prototype.multiply=function(v){return parseValue(v)._multiplyBySmall(this)};SmallInteger.prototype.times=SmallInteger.prototype.multiply;function square(a){var l=a.length,r=createArray(l+l),base=BASE,product,carry,i,a_i,a_j;for(i=0;i<l;i++){a_i=a[i];for(var j=0;j<l;j++){a_j=a[j];product=a_i*a_j+r[i+j];c arry=Math.floor(product/base);r[i+j]=product-carry*base;r[i+j+1]+=carry}}trim(r);return r}BigInteger.prototype.square=function(){return new BigInteger(square(this.value),false)};SmallInteger.prototype.square=function(){var value=this.value*this.value;if(isPrecise(value))return new SmallInteger(value);return new BigInteger(square(smallToArray(Math.abs(this.value))),false)};function divMod1(a,b){var a_l=a.length,b_l=b.length,base=BASE,result=createArray(b.length),divisorMostSignificantDigit=b[b_l-1],lambda=Math.ceil(base/(2*divisorMostSignificantDigit)),remainder=multiplySmall(a,lambda),divisor=multiplySmall(b,lambda),quotientDigit,shift,carry,borrow,i,l,q;if(remainder.length<=a_l)remainder.push(0);divisor.push(0);divisorMostSignificantDigit=divisor[b_l-1];for(shift=a_l-b_l;shift>=0;shift--){quotientDigit=base-1;if(remainder[shift+b_l]!==divisorMostSignificantDigit){quotientDigit=Math.floor((remainder[shift+b_l]*base+remainder[shift+b_l-1])/divisorMostSignificantDigit)}carry=0;borrow= 0;l=divisor.length;for(i=0;i<l;i++){carry+=quotientDigit*divisor[i];q=Math.floor(carry/base);borrow+=remainder[shift+i]-(carry-q*base);carry=q;if(borrow<0){remainder[shift+i]=borrow+base;borrow=-1}else{remainder[shift+i]=borrow;borrow=0}}while(borrow!==0){quotientDigit-=1;carry=0;for(i=0;i<l;i++){carry+=remainder[shift+i]-base+divisor[i];if(carry<0){remainder[shift+i]=carry+base;carry=0}else{remainder[shift+i]=carry;carry=1}}borrow+=carry}result[shift]=quotientDigit}remainder=divModSmall(remainder,lambda)[0];return[arrayToSmall(result),arrayToSmall(remainder)]}function divMod2(a,b){var a_l=a.length,b_l=b.length,result=[],part=[],base=BASE,guess,xlen,highx,highy,check;while(a_l){part.unshift(a[--a_l]);trim(part);if(compareAbs(part,b)<0){result.push(0);continue}xlen=part.length;highx=part[xlen-1]*base+part[xlen-2];highy=b[b_l-1]*base+b[b_l-2];if(xlen>b_l){highx=(highx+1)*base}guess=Math.ceil(highx/highy);do{check=multiplySmall(b,guess);if(compareAbs(check,part)<=0)break;guess--}while( guess);result.push(guess);part=subtract(part,check)}result.reverse();return[arrayToSmall(result),arrayToSmall(part)]}function divModSmall(value,lambda){var length=value.length,quotient=createArray(length),base=BASE,i,q,remainder,divisor;remainder=0;for(i=length-1;i>=0;--i){divisor=remainder*base+value[i];q=truncate(divisor/lambda);remainder=divisor-q*lambda;quotient[i]=q|0}return[quotient,remainder|0]}function divModAny(self,v){var value,n=parseValue(v);var a=self.value,b=n.value;var quotient;if(b===0)throw new Error("Cannot divide by zero");if(self.isSmall){if(n.isSmall){return[new SmallInteger(truncate(a/b)),new SmallInteger(a%b)]}return[Integer[0],self]}if(n.isSmall){if(b===1)return[self,Integer[0]];if(b==-1)return[self.negate(),Integer[0]];var abs=Math.abs(b);if(abs<BASE){value=divModSmall(a,abs);quotient=arrayToSmall(value[0]);var remainder=value[1];if(self.sign)remainder=-remainder;if(typeof quotient==="number"){if(self.sign!==n.sign)quotient=-quotient;return[new SmallInteger( quotient),new SmallInteger(remainder)]}return[new BigInteger(quotient,self.sign!==n.sign),new SmallInteger(remainder)]}b=smallToArray(abs)}var comparison=compareAbs(a,b);if(comparison===-1)return[Integer[0],self];if(comparison===0)return[Integer[self.sign===n.sign?1:-1],Integer[0]];if(a.length+b.length<=200)value=divMod1(a,b);else value=divMod2(a,b);quotient=value[0];var qSign=self.sign!==n.sign,mod=value[1],mSign=self.sign;if(typeof quotient==="number"){if(qSign)quotient=-quotient;quotient=new SmallInteger(quotient)}else quotient=new BigInteger(quotient,qSign);if(typeof mod==="number"){if(mSign)mod=-mod;mod=new SmallInteger(mod)}else mod=new BigInteger(mod,mSign);return[quotient,mod]}BigInteger.prototype.divmod=function(v){var result=divModAny(this,v);return{quotient:result[0],remainder:result[1]}};SmallInteger.prototype.divmod=BigInteger.prototype.divmod;BigInteger.prototype.divide=function(v){return divModAny(this,v)[0]};SmallInteger.prototype.over=SmallInteger.prototype.divide=B igInteger.prototype.over=BigInteger.prototype.divide;BigInteger.prototype.mod=function(v){return divModAny(this,v)[1]};SmallInteger.prototype.remainder=SmallInteger.prototype.mod=BigInteger.prototype.remainder=BigInteger.prototype.mod;BigInteger.prototype.pow=function(v){var n=parseValue(v),a=this.value,b=n.value,value,x,y;if(b===0)return Integer[1];if(a===0)return Integer[0];if(a===1)return Integer[1];if(a===-1)return n.isEven()?Integer[1]:Integer[-1];if(n.sign){return Integer[0]}if(!n.isSmall)throw new Error("The exponent "+n.toString()+" is too large.");if(this.isSmall){if(isPrecise(value=Math.pow(a,b)))return new SmallInteger(truncate(value))}x=this;y=Integer[1];while(true){if(b&1===1){y=y.times(x);--b}if(b===0)break;b/=2;x=x.square()}return y};SmallInteger.prototype.pow=BigInteger.prototype.pow;BigInteger.prototype.modPow=function(exp,mod){exp=parseValue(exp);mod=parseValue(mod);if(mod.isZero())throw new Error("Cannot take modPow with modulus 0");var r=Integer[1],base=this.mod( mod);while(exp.isPositive()){if(base.isZero())return Integer[0];if(exp.isOdd())r=r.multiply(base).mod(mod);exp=exp.divide(2);base=base.square().mod(mod)}return r};SmallInteger.prototype.modPow=BigInteger.prototype.modPow;function compareAbs(a,b){if(a.length!==b.length){return a.length>b.length?1:-1}for(var i=a.length-1;i>=0;i--){if(a[i]!==b[i])return a[i]>b[i]?1:-1}return 0}BigInteger.prototype.compareAbs=function(v){var n=parseValue(v),a=this.value,b=n.value;if(n.isSmall)return 1;return compareAbs(a,b)};SmallInteger.prototype.compareAbs=function(v){var n=parseValue(v),a=Math.abs(this.value),b=n.value;if(n.isSmall){b=Math.abs(b);return a===b?0:a>b?1:-1}return-1};BigInteger.prototype.compare=function(v){if(v===Infinity){return-1}if(v===-Infinity){return 1}var n=parseValue(v),a=this.value,b=n.value;if(this.sign!==n.sign){return n.sign?1:-1}if(n.isSmall){return this.sign?-1:1}return compareAbs(a,b)*(this.sign?-1:1)};BigInteger.prototype.compareTo=BigInteger.prototype.compare;SmallInteg er.prototype.compare=function(v){if(v===Infinity){return-1}if(v===-Infinity){return 1}var n=parseValue(v),a=this.value,b=n.value;if(n.isSmall){return a==b?0:a>b?1:-1}if(a<0!==n.sign){return a<0?-1:1}return a<0?1:-1};SmallInteger.prototype.compareTo=SmallInteger.prototype.compare;BigInteger.prototype.equals=function(v){return this.compare(v)===0};SmallInteger.prototype.eq=SmallInteger.prototype.equals=BigInteger.prototype.eq=BigInteger.prototype.equals;BigInteger.prototype.notEquals=function(v){return this.compare(v)!==0};SmallInteger.prototype.neq=SmallInteger.prototype.notEquals=BigInteger.prototype.neq=BigInteger.prototype.notEquals;BigInteger.prototype.greater=function(v){return this.compare(v)>0};SmallInteger.prototype.gt=SmallInteger.prototype.greater=BigInteger.prototype.gt=BigInteger.prototype.greater;BigInteger.prototype.lesser=function(v){return this.compare(v)<0};SmallInteger.prototype.lt=SmallInteger.prototype.lesser=BigInteger.prototype.lt=BigInteger.prototype.lesser;Big Integer.prototype.greaterOrEquals=function(v){return this.compare(v)>=0};SmallInteger.prototype.geq=SmallInteger.prototype.greaterOrEquals=BigInteger.prototype.geq=BigInteger.prototype.greaterOrEquals;BigInteger.prototype.lesserOrEquals=function(v){return this.compare(v)<=0};SmallInteger.prototype.leq=SmallInteger.prototype.lesserOrEquals=BigInteger.prototype.leq=BigInteger.prototype.lesserOrEquals;BigInteger.prototype.isEven=function(){return(this.value[0]&1)===0};SmallInteger.prototype.isEven=function(){return(this.value&1)===0};BigInteger.prototype.isOdd=function(){return(this.value[0]&1)===1};SmallInteger.prototype.isOdd=function(){return(this.value&1)===1};BigInteger.prototype.isPositive=function(){return!this.sign};SmallInteger.prototype.isPositive=function(){return this.value>0};BigInteger.prototype.isNegative=function(){return this.sign};SmallInteger.prototype.isNegative=function(){return this.value<0};BigInteger.prototype.isUnit=function(){return false};SmallInteger.prototy pe.isUnit=function(){return Math.abs(this.value)===1};BigInteger.prototype.isZero=function(){return false};SmallInteger.prototype.isZero=function(){return this.value===0};BigInteger.prototype.isDivisibleBy=function(v){var n=parseValue(v);var value=n.value;if(value===0)return false;if(value===1)return true;if(value===2)return this.isEven();return this.mod(n).equals(Integer[0])};SmallInteger.prototype.isDivisibleBy=BigInteger.prototype.isDivisibleBy;function isBasicPrime(v){var n=v.abs();if(n.isUnit())return false;if(n.equals(2)||n.equals(3)||n.equals(5))return true;if(n.isEven()||n.isDivisibleBy(3)||n.isDivisibleBy(5))return false;if(n.lesser(25))return true}BigInteger.prototype.isPrime=function(){var isPrime=isBasicPrime(this);if(isPrime!==undefined)return isPrime;var n=this.abs(),nPrev=n.prev();var a=[2,3,5,7,11,13,17,19],b=nPrev,d,t,i,x;while(b.isEven())b=b.divide(2);for(i=0;i<a.length;i++){x=bigInt(a[i]).modPow(b,n);if(x.equals(Integer[1])||x.equals(nPrev))continue;for(t=true,d=b ;t&&d.lesser(nPrev);d=d.multiply(2)){x=x.square().mod(n);if(x.equals(nPrev))t=false}if(t)return false}return true};SmallInteger.prototype.isPrime=BigInteger.prototype.isPrime;BigInteger.prototype.isProbablePrime=function(iterations){var isPrime=isBasicPrime(this);if(isPrime!==undefined)return isPrime;var n=this.abs();var t=iterations===undefined?5:iterations;for(var i=0;i<t;i++){var a=bigInt.randBetween(2,n.minus(2));if(!a.modPow(n.prev(),n).isUnit())return false}return true};SmallInteger.prototype.isProbablePrime=BigInteger.prototype.isProbablePrime;BigInteger.prototype.modInv=function(n){var t=bigInt.zero,newT=bigInt.one,r=parseValue(n),newR=this.abs(),q,lastT,lastR;while(!newR.equals(bigInt.zero)){q=r.divide(newR);lastT=t;lastR=r;t=newT;r=newR;newT=lastT.subtract(q.multiply(newT));newR=lastR.subtract(q.multiply(newR))}if(!r.equals(1))throw new Error(this.toString()+" and "+n.toString()+" are not co-prime");if(t.compare(0)===-1){t=t.add(n)}if(this.isNegative()){return t.negate()}r eturn t};SmallInteger.prototype.modInv=BigInteger.prototype.modInv;BigInteger.prototype.next=function(){var value=this.value;if(this.sign){return subtractSmall(value,1,this.sign)}return new BigInteger(addSmall(value,1),this.sign)};SmallInteger.prototype.next=function(){var value=this.value;if(value+1<MAX_INT)return new SmallInteger(value+1);return new BigInteger(MAX_INT_ARR,false)};BigInteger.prototype.prev=function(){var value=this.value;if(this.sign){return new BigInteger(addSmall(value,1),true)}return subtractSmall(value,1,this.sign)};SmallInteger.prototype.prev=function(){var value=this.value;if(value-1>-MAX_INT)return new SmallInteger(value-1);return new BigInteger(MAX_INT_ARR,true)};var powersOfTwo=[1];while(powersOfTwo[powersOfTwo.length-1]<=BASE)powersOfTwo.push(2*powersOfTwo[powersOfTwo.length-1]);var powers2Length=powersOfTwo.length,highestPower2=powersOfTwo[powers2Length-1];function shift_isSmall(n){return(typeof n==="number"||typeof n==="string")&&+Math.abs(n)<=BASE||n i nstanceof BigInteger&&n.value.length<=1}BigInteger.prototype.shiftLeft=function(n){if(!shift_isSmall(n)){throw new Error(String(n)+" is too large for shifting.")}n=+n;if(n<0)return this.shiftRight(-n);var result=this;while(n>=powers2Length){result=result.multiply(highestPower2);n-=powers2Length-1}return result.multiply(powersOfTwo[n])};SmallInteger.prototype.shiftLeft=BigInteger.prototype.shiftLeft;BigInteger.prototype.shiftRight=function(n){var remQuo;if(!shift_isSmall(n)){throw new Error(String(n)+" is too large for shifting.")}n=+n;if(n<0)return this.shiftLeft(-n);var result=this;while(n>=powers2Length){if(result.isZero())return result;remQuo=divModAny(result,highestPower2);result=remQuo[1].isNegative()?remQuo[0].prev():remQuo[0];n-=powers2Length-1}remQuo=divModAny(result,powersOfTwo[n]);return remQuo[1].isNegative()?remQuo[0].prev():remQuo[0]};SmallInteger.prototype.shiftRight=BigInteger.prototype.shiftRight;function bitwise(x,y,fn){y=parseValue(y);var xSign=x.isNegative(),ySign =y.isNegative();var xRem=xSign?x.not():x,yRem=ySign?y.not():y;var xBits=[],yBits=[];var xStop=false,yStop=false;while(!xStop||!yStop){if(xRem.isZero()){xStop=true;xBits.push(xSign?1:0)}else if(xSign)xBits.push(xRem.isEven()?1:0);else xBits.push(xRem.isEven()?0:1);if(yRem.isZero()){yStop=true;yBits.push(ySign?1:0)}else if(ySign)yBits.push(yRem.isEven()?1:0);else yBits.push(yRem.isEven()?0:1);xRem=xRem.over(2);yRem=yRem.over(2)}var result=[];for(var i=0;i<xBits.length;i++)result.push(fn(xBits[i],yBits[i]));var sum=bigInt(result.pop()).negate().times(bigInt(2).pow(result.length));while(result.length){sum=sum.add(bigInt(result.pop()).times(bigInt(2).pow(result.length)))}return sum}BigInteger.prototype.not=function(){return this.negate().prev()};SmallInteger.prototype.not=BigInteger.prototype.not;BigInteger.prototype.and=function(n){return bitwise(this,n,function(a,b){return a&b})};SmallInteger.prototype.and=BigInteger.prototype.and;BigInteger.prototype.or=function(n){return bitwise(this ,n,function(a,b){return a|b})};SmallInteger.prototype.or=BigInteger.prototype.or;BigInteger.prototype.xor=function(n){return bitwise(this,n,function(a,b){return a^b})};SmallInteger.prototype.xor=BigInteger.prototype.xor;var LOBMASK_I=1<<30,LOBMASK_BI=(BASE&-BASE)*(BASE&-BASE)|LOBMASK_I;function roughLOB(n){var v=n.value,x=typeof v==="number"?v|LOBMASK_I:v[0]+v[1]*BASE|LOBMASK_BI;return x&-x}function max(a,b){a=parseValue(a);b=parseValue(b);return a.greater(b)?a:b}function min(a,b){a=parseValue(a);b=parseValue(b);return a.lesser(b)?a:b}function gcd(a,b){a=parseValue(a).abs();b=parseValue(b).abs();if(a.equals(b))return a;if(a.isZero())return b;if(b.isZero())return a;var c=Integer[1],d,t;while(a.isEven()&&b.isEven()){d=Math.min(roughLOB(a),roughLOB(b));a=a.divide(d);b=b.divide(d);c=c.multiply(d)}while(a.isEven()){a=a.divide(roughLOB(a))}do{while(b.isEven()){b=b.divide(roughLOB(b))}if(a.greater(b)){t=b;b=a;a=t}b=b.subtract(a)}while(!b.isZero());return c.isUnit()?a:a.multiply(c)}function lcm(a,b){a=parseValue(a).abs();b=parseValue(b).abs();return a.divide(gcd(a,b)).multiply(b)}function randBetween(a,b){a=parseValue(a);b=parseValue(b);var low=min(a,b),high=max(a,b);var range=high.subtract(low);if(range.isSmall)return low.add(Math.round(Math.random()*range));var length=range.value.length-1;var result=[],restricted=true;for(var i=length;i>=0;i--){var top=restricted?range.value[i]:BASE;var digit=truncate(Math.random()*top);result.unshift(digit);if(digit<top)restricted=false}result=arrayToSmall(result);return low.add(typeof result==="number"?new SmallInteger(result):new BigInteger(result,false))}var parseBase=function(text,base){var val=Integer[0],pow=Integer[1],length=text.length;if(2<=base&&base<=36){if(length<=LOG_MAX_INT/Math.log(base)){return new SmallInteger(parseInt(text,base))}}base=parseValue(base);var digits=[];var i;var isNegative=text[0]==="-";for(i=isNegative?1:0;i<text.length;i++){var c=text[i].toLowerCase(),charCode=c.charCodeAt(0);if(48<=charCode&&charCo de<=57)digits.push(parseValue(c));else if(97<=charCode&&charCode<=122)digits.push(parseValue(c.charCodeAt(0)-87));else if(c==="<"){var start=i;do{i++}while(text[i]!==">");digits.push(parseValue(text.slice(start+1,i)))}else throw new Error(c+" is not a valid character")}digits.reverse();for(i=0;i<digits.length;i++){val=val.add(digits[i].times(pow));pow=pow.times(base)}return isNegative?val.negate():val};function stringify(digit){var v=digit.value;if(typeof v==="number")v=[v];if(v.length===1&&v[0]<=35){return"0123456789abcdefghijklmnopqrstuvwxyz".charAt(v[0])}return"<"+v+">"}function toBase(n,base){base=bigInt(base);if(base.isZero()){if(n.isZero())return"0";throw new Error("Cannot convert nonzero numbers to base 0.")}if(base.equals(-1)){if(n.isZero())return"0";if(n.isNegative())return new Array(1-n).join("10");return"1"+new Array(+n).join("01")}var minusSign="";if(n.isNegative()&&base.isPositive()){minusSign="-";n=n.abs()}if(base.equals(1)){if(n.isZero())return"0";return minusSign+new Array(+n+1).join(1)}var out=[];var left=n,divmod;while(left.isNegative()||left.compareAbs(base)>=0){divmod=left.divmod(base);left=divmod.quotient;var digit=divmod.remainder;if(digit.isNegative()){digit=base.minus(digit).abs();left=left.next()}out.push(stringify(digit))}out.push(stringify(left));return minusSign+out.reverse().join("")}BigInteger.prototype.toString=function(radix){if(radix===undefined)radix=10;if(radix!==10)return toBase(this,radix);var v=this.value,l=v.length,str=String(v[--l]),zeros="0000000",digit;while(--l>=0){digit=String(v[l]);str+=zeros.slice(digit.length)+digit}var sign=this.sign?"-":"";return sign+str};SmallInteger.prototype.toString=function(radix){if(radix===undefined)radix=10;if(radix!=10)return toBase(this,radix);return String(this.value)};BigInteger.prototype.valueOf=function(){return+this.toString()};BigInteger.prototype.toJSNumber=BigInteger.prototype.valueOf;SmallInteger.prototype.valueOf=function(){return this.value};SmallInteger.prototype.toJSNumbe r=SmallInteger.prototype.valueOf;function parseStringValue(v){if(isPrecise(+v)){var x=+v;if(x===truncate(x))return new SmallInteger(x);throw"Invalid integer: "+v}var sign=v[0]==="-";if(sign)v=v.slice(1);var split=v.split(/e/i);if(split.length>2)throw new Error("Invalid integer: "+split.join("e"));if(split.length===2){var exp=split[1];if(exp[0]==="+")exp=exp.slice(1);exp=+exp;if(exp!==truncate(exp)||!isPrecise(exp))throw new Error("Invalid integer: "+exp+" is not a valid exponent.");var text=split[0];var decimalPlace=text.indexOf(".");if(decimalPlace>=0){exp-=text.length-decimalPlace-1;text=text.slice(0,decimalPlace)+text.slice(decimalPlace+1)}if(exp<0)throw new Error("Cannot include negative exponent part for integers");text+=new Array(exp+1).join("0");v=text}var isValid=/^([0-9][0-9]*)$/.test(v);if(!isValid)throw new Error("Invalid integer: "+v);var r=[],max=v.length,l=LOG_BASE,min=max-l;while(max>0){r.push(+v.slice(min,max));min-=l;if(min<0)min=0;max-=l}trim(r);return new BigInteg er(r,sign)}function parseNumberValue(v){if(isPrecise(v)){if(v!==truncate(v))throw new Error(v+" is not an integer.");return new SmallInteger(v)}return parseStringValue(v.toString())}function parseValue(v){if(typeof v==="number"){return parseNumberValue(v)}if(typeof v==="string"){return parseStringValue(v)}return v}for(var i=0;i<1e3;i++){Integer[i]=new SmallInteger(i);if(i>0)Integer[-i]=new SmallInteger(-i)}Integer.one=Integer[1];Integer.zero=Integer[0];Integer.minusOne=Integer[-1];Integer.max=max;Integer.min=min;Integer.gcd=gcd;Integer.lcm=lcm;Integer.isInstance=function(x){return x instanceof BigInteger||x instanceof SmallInteger};Integer.randBetween=randBetween;return Integer}();if(typeof module!=="undefined"&&module.hasOwnProperty("exports")){module.exports=bigInt} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cordova-android/blob/4a0f69a3/node_modules/big-integer/package.json ---------------------------------------------------------------------- diff --git a/node_modules/big-integer/package.json b/node_modules/big-integer/package.json index d2b080c..2c66e1e 100644 --- a/node_modules/big-integer/package.json +++ b/node_modules/big-integer/package.json @@ -14,19 +14,19 @@ ] ], "_from": "big-integer@>=1.6.7 <2.0.0", - "_id": "[email protected]", + "_id": "[email protected]", "_inCache": true, "_location": "/big-integer", - "_nodeVersion": "4.4.5", + "_nodeVersion": "6.9.4", "_npmOperationalInternal": { "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/big-integer-1.6.17.tgz_1478721202721_0.8068355675786734" + "tmp": "tmp/big-integer-1.6.19.tgz_1491096256363_0.04815615131519735" }, "_npmUser": { "name": "peterolson", "email": "[email protected]" }, - "_npmVersion": "2.15.5", + "_npmVersion": "3.10.10", "_phantomChildren": {}, "_requested": { "raw": "big-integer@^1.6.7", @@ -40,8 +40,8 @@ "_requiredBy": [ "/bplist-parser" ], - "_resolved": "http://registry.npmjs.org/big-integer/-/big-integer-1.6.17.tgz", - "_shasum": "f0dcf5109a949e42a993ee3e8fb2070452817b51", + "_resolved": "http://registry.npmjs.org/big-integer/-/big-integer-1.6.19.tgz", + "_shasum": "4a5e915e3188c8708f254b356196f28542acc1e0", "_shrinkwrap": null, "_spec": "big-integer@^1.6.7", "_where": "/Users/steveng/repo/cordova/cordova-android/node_modules/bplist-parser", @@ -67,13 +67,13 @@ }, "directories": {}, "dist": { - "shasum": "f0dcf5109a949e42a993ee3e8fb2070452817b51", - "tarball": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.17.tgz" + "shasum": "4a5e915e3188c8708f254b356196f28542acc1e0", + "tarball": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.19.tgz" }, "engines": { "node": ">=0.6" }, - "gitHead": "d25d0bfcd96f31001ec8572c8d01de4770d99e63", + "gitHead": "f0f751478d6623a84a5ed9618d94937829bbd015", "homepage": "https://github.com/peterolson/BigInteger.js#readme", "keywords": [ "math", @@ -104,5 +104,5 @@ "scripts": { "test": "karma start my.conf.js" }, - "version": "1.6.17" + "version": "1.6.19" } http://git-wip-us.apache.org/repos/asf/cordova-android/blob/4a0f69a3/node_modules/elementtree/.travis.yml ---------------------------------------------------------------------- diff --git a/node_modules/elementtree/.travis.yml b/node_modules/elementtree/.travis.yml index 1ab2652..6f27c96 100644 --- a/node_modules/elementtree/.travis.yml +++ b/node_modules/elementtree/.travis.yml @@ -1,11 +1,7 @@ language: node_js -sudo: false node_js: - - "0.10" - - "0.11" - - "0.12" - - "iojs" + - 0.6 script: make test http://git-wip-us.apache.org/repos/asf/cordova-android/blob/4a0f69a3/node_modules/elementtree/CHANGES.md ---------------------------------------------------------------------- diff --git a/node_modules/elementtree/CHANGES.md b/node_modules/elementtree/CHANGES.md index 08fdb1f..50d415d 100644 --- a/node_modules/elementtree/CHANGES.md +++ b/node_modules/elementtree/CHANGES.md @@ -1,4 +1,4 @@ -elementtree v0.1.6 - 2014-02-06 +elementtree v0.1.6 (in development) * Add support for CData elements. (#14) [hermannpencole] http://git-wip-us.apache.org/repos/asf/cordova-android/blob/4a0f69a3/node_modules/elementtree/package.json ---------------------------------------------------------------------- diff --git a/node_modules/elementtree/package.json b/node_modules/elementtree/package.json index 9d973b6..e059c5f 100644 --- a/node_modules/elementtree/package.json +++ b/node_modules/elementtree/package.json @@ -2,49 +2,44 @@ "_args": [ [ { - "raw": "elementtree@^0.1.6", + "raw": "[email protected]", "scope": null, "escapedName": "elementtree", "name": "elementtree", - "rawSpec": "^0.1.6", - "spec": ">=0.1.6 <0.2.0", - "type": "range" + "rawSpec": "0.1.6", + "spec": "0.1.6", + "type": "version" }, "/Users/steveng/repo/cordova/cordova-android" ] ], - "_from": "elementtree@>=0.1.6 <0.2.0", - "_id": "[email protected]", + "_from": "[email protected]", + "_id": "[email protected]", "_inCache": true, "_location": "/elementtree", - "_nodeVersion": "4.5.0", - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/elementtree-0.1.7.tgz_1485230431723_0.19623595383018255" - }, "_npmUser": { - "name": "mburns", - "email": "[email protected]" + "name": "rphillips", + "email": "[email protected]" }, - "_npmVersion": "2.15.9", + "_npmVersion": "1.3.24", "_phantomChildren": {}, "_requested": { - "raw": "elementtree@^0.1.6", + "raw": "[email protected]", "scope": null, "escapedName": "elementtree", "name": "elementtree", - "rawSpec": "^0.1.6", - "spec": ">=0.1.6 <0.2.0", - "type": "range" + "rawSpec": "0.1.6", + "spec": "0.1.6", + "type": "version" }, "_requiredBy": [ "/", "/cordova-common" ], - "_resolved": "http://registry.npmjs.org/elementtree/-/elementtree-0.1.7.tgz", - "_shasum": "9ac91be6e52fb6e6244c4e54a4ac3ed8ae8e29c0", + "_resolved": "http://registry.npmjs.org/elementtree/-/elementtree-0.1.6.tgz", + "_shasum": "2ac4c46ea30516c8c4cbdb5e3ac7418e592de20c", "_shrinkwrap": null, - "_spec": "elementtree@^0.1.6", + "_spec": "[email protected]", "_where": "/Users/steveng/repo/cordova/cordova-android", "author": { "name": "Rackspace US, Inc." @@ -63,7 +58,7 @@ } ], "dependencies": { - "sax": "1.1.4" + "sax": "0.3.5" }, "description": "XML Serialization and Parsing module based on Python's ElementTree.", "devDependencies": { @@ -73,13 +68,12 @@ "lib": "lib" }, "dist": { - "shasum": "9ac91be6e52fb6e6244c4e54a4ac3ed8ae8e29c0", - "tarball": "https://registry.npmjs.org/elementtree/-/elementtree-0.1.7.tgz" + "shasum": "2ac4c46ea30516c8c4cbdb5e3ac7418e592de20c", + "tarball": "https://registry.npmjs.org/elementtree/-/elementtree-0.1.6.tgz" }, "engines": { "node": ">= 0.4.0" }, - "gitHead": "1e9496379f6a1072e2b817f51a296f7cd9f07e43", "homepage": "https://github.com/racker/node-elementtree", "keywords": [ "xml", @@ -88,30 +82,15 @@ "seralization", "elementtree" ], - "license": "Apache-2.0", + "licenses": [ + { + "type": "Apache", + "url": "http://www.apache.org/licenses/LICENSE-2.0.html" + } + ], "main": "lib/elementtree.js", "maintainers": [ { - "name": "jirwin", - "email": "[email protected]" - }, - { - "name": "kami", - "email": "[email protected]" - }, - { - "name": "mburns", - "email": "[email protected]" - }, - { - "name": "pquerna", - "email": "[email protected]" - }, - { - "name": "rchiniquy", - "email": "[email protected]" - }, - { "name": "rphillips", "email": "[email protected]" } @@ -126,5 +105,5 @@ "scripts": { "test": "make test" }, - "version": "0.1.7" + "version": "0.1.6" } http://git-wip-us.apache.org/repos/asf/cordova-android/blob/4a0f69a3/node_modules/elementtree/tests/data/bom-xml.xml ---------------------------------------------------------------------- diff --git a/node_modules/elementtree/tests/data/bom-xml.xml b/node_modules/elementtree/tests/data/bom-xml.xml deleted file mode 100644 index 122cce6..0000000 --- a/node_modules/elementtree/tests/data/bom-xml.xml +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0"?> -<container name="test_container_1" xmlns:android="http://schemas.android.com/apk/res/android"> - <object>dd - <name>test_object_1</name> - <hash>4281c348eaf83e70ddce0e07221c3d28</hash> - <bytes android:type="cool">14</bytes> - <content_type>application/octetstream</content_type> - <last_modified>2009-02-03T05:26:32.612278</last_modified> - </object> - <object> - <name>test_object_2</name> - <hash>b039efe731ad111bc1b0ef221c3849d0</hash> - <bytes android:type="lame">64</bytes> - <content_type>application/octetstream</content_type> - <last_modified>2009-02-03T05:26:32.612278</last_modified> - </object> -</container> http://git-wip-us.apache.org/repos/asf/cordova-android/blob/4a0f69a3/node_modules/elementtree/tests/test-simple.js ---------------------------------------------------------------------- diff --git a/node_modules/elementtree/tests/test-simple.js b/node_modules/elementtree/tests/test-simple.js index 629a208..1fc04b8 100644 --- a/node_modules/elementtree/tests/test-simple.js +++ b/node_modules/elementtree/tests/test-simple.js @@ -337,12 +337,3 @@ exports['test_cdata_write'] = function(test, assert) { test.finish(); }; - -exports['test_read_bom'] = function(test, assert) { - var file = readFile('bom-xml.xml'); - var etree = et.parse(file); - - // If parse finished, test was successful - - test.finish(); -}; http://git-wip-us.apache.org/repos/asf/cordova-android/blob/4a0f69a3/node_modules/sax/AUTHORS ---------------------------------------------------------------------- diff --git a/node_modules/sax/AUTHORS b/node_modules/sax/AUTHORS new file mode 100644 index 0000000..26d8659 --- /dev/null +++ b/node_modules/sax/AUTHORS @@ -0,0 +1,9 @@ +# contributors sorted by whether or not they're me. +Isaac Z. Schlueter <[email protected]> +Stein Martin Hustad <[email protected]> +Mikeal Rogers <[email protected]> +Laurie Harper <[email protected]> +Jann Horn <[email protected]> +Elijah Insua <[email protected]> +Henry Rawas <[email protected]> +Justin Makeig <[email protected]> http://git-wip-us.apache.org/repos/asf/cordova-android/blob/4a0f69a3/node_modules/sax/LICENSE ---------------------------------------------------------------------- diff --git a/node_modules/sax/LICENSE b/node_modules/sax/LICENSE index ccffa08..05a4010 100644 --- a/node_modules/sax/LICENSE +++ b/node_modules/sax/LICENSE @@ -1,41 +1,23 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -==== - -`String.fromCodePoint` by Mathias Bynens used according to terms of MIT -License, as follows: - - Copyright Mathias Bynens <https://mathiasbynens.be/> - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +Copyright 2009, 2010, 2011 Isaac Z. Schlueter. +All rights reserved. + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. http://git-wip-us.apache.org/repos/asf/cordova-android/blob/4a0f69a3/node_modules/sax/LICENSE-W3C.html ---------------------------------------------------------------------- diff --git a/node_modules/sax/LICENSE-W3C.html b/node_modules/sax/LICENSE-W3C.html deleted file mode 100644 index a611e3f..0000000 --- a/node_modules/sax/LICENSE-W3C.html +++ /dev/null @@ -1,188 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><meta name="generator" content="HTML Tidy for Mac OS X (vers 31 October 2006 - Apple Inc. build 13), see www.w3.org" /><title>W3C Software Notice and License</title><link rel="stylesheet" href="/2008/site/css/minimum" type="text/css" media="handheld, all" /><style type="text/css" media="print, screen and (min-width: 481px)" xml:space="preserve"> - @import url("/2008/site/css/advanced"); -</style><link href="/2008/site/css/minimum" rel="stylesheet" type="text/css" media="handheld, only screen and (max-device-width: 480px)" /><meta name="viewport" content="width=device-width" /><link rel="stylesheet" href="/2008/site/css/print" type="text/css" media="print" /><link rel="shortcut icon" href="/2008/site/images/favicon.ico" type="image/x-icon" /></head><body id="www-w3-org" class="w3c_public"><div id="w3c_container"> - - - - <div id="w3c_mast"> - <h1 class="logo"> - <a tabindex="2" accesskey="1" href="/"><img src="/2008/site/images/logo-w3c-mobile-lg" width="90" height="53" alt="W3C" /></a> - <span class="alt-logo">W3C</span> - </h1> - - <div id="w3c_nav"> - - - - <form action="/Help/search" method="get" enctype="application/x-www-form-urlencoded"><div class="w3c_sec_nav"><!-- --></div><ul class="main_nav"><li class="first-item"> - <a href="/standards/">Standards</a> - </li><li> - <a href="/participate/">Participate</a> - </li><li> - <a href="/Consortium/membership">Membership</a> - </li><li class="last-item"> - <a href="/Consortium/">About W3C</a> - </li><li class="search-item"> - <div id="search-form"> - <input tabindex="3" class="text" name="q" value="" title="Search" type="text" /> - <button id="search-submit" name="search-submit" type="submit"><img class="submit" src="/2008/site/images/search-button" alt="Search" width="21" height="17" /></button> - </div> - </li></ul></form> - </div> - - </div> - - - <div id="w3c_main"> - <div id="w3c_logo_shadow" class="w3c_leftCol"> - <img height="32" alt="" src="/2008/site/images/logo-shadow" /> - </div> - - <div class="w3c_leftCol"><h2 class="offscreen">Site Navigation</h2> - <h3 class="category"><span class="ribbon"><a href="/Consortium/Legal/ipr-notice.html" title="Up to Policies and Legal Information">Policies and Legal Information <img src="/2008/site/images/header-link" alt="Header link" width="13" height="13" class="header-link" /></a></span></h3> - <ul class="theme"> - <li><a href="/Consortium/Legal/2008/04-testsuite-copyright.html">Licenses for W3C Test Suites</a></li> - <li><a href="/2004/10/27-testcases.html">Policies for Contribution of Test Cases to W3C</a></li> - <li><a href="/Consortium/Legal/IPR-FAQ-20000620.html">Intellectual Rights FAQ</a></li> - <li><a href="/Consortium/Legal/privacy-statement-20000612.html">W3C Privacy Statements</a></li> - <li><a href="/Consortium/Legal/2002/copyright-documents-20021231.html">W3C Document License</a></li> - <li><a href="/Consortium/Legal/2002/trademarks-20021231.html">W3C Trademarks and Generic Terms</a></li> - <li><a href="/Consortium/Legal/2002/trademark-license-20021231.html">W3C® Trademark and Service Mark License</a></li> - <li><a class="current">W3C Software Notice and License</a></li> - <li><a href="/Consortium/Legal/2002/collaborators-agreement-20021231.html">W3C Invited Expert and Collaborators Agreement</a></li> - <li><a href="/Consortium/Persistence.html">W3C URI Persistence Policy</a></li> - <li><a href="/1999/10/21-mirroring-policy.html">Mirroring the W3C Site</a></li> - <li><a href="/Consortium/Legal/2006/08-copyright-translations.html">Translations of the Copyright Notice</a></li> - </ul> - <br /></div> - <div class="w3c_mainCol"> - <div id="w3c_crumbs"> - <div id="w3c_crumbs_frame"> - <ul class="bct"> <!-- .bct / Breadcrumbs --> - <li class="skip"><a tabindex="1" accesskey="2" title="Skip to content (e.g., when browsing via audio)" href="#w3c_content_body">Skip</a></li> - <li><a href="/">W3C</a> <span class="cr">»</span> </li> - <li><a href="/Consortium/">About W3C</a> <span class="cr">»</span> </li> - <li><a href="/Consortium/facts.html">Facts About W3C</a> <span class="cr">»</span> </li> - <li><a href="/Consortium/Legal/ipr-notice.html">Policies and Legal Information</a> <span class="cr">»</span> </li> - <li class="current">W3C Software Notice and License</li> - </ul> - </div> - </div> - <h1 class="title">W3C Software Notice and License</h1> - <div id="w3c_content_body"> - <div class="line"> - <p class="intro tPadding">This work (and included software, documentation such as READMEs, or other -related items) is being provided by the copyright holders under the following -license.</p> -<h2>License</h2> - - <p class="tPadding"> -By obtaining, using and/or copying this work, you (the licensee) -agree that you have read, understood, and will comply with the following -terms and conditions.</p> - - <p>Permission to copy, modify, and distribute this software and its -documentation, with or without modification, for any purpose and without -fee or royalty is hereby granted, provided that you include the following on -ALL copies of the software and documentation or portions thereof, including -modifications:</p> - - <ul class="show_items"><li>The full text of this NOTICE in a location viewable to users of the - redistributed or derivative work.</li><li>Any pre-existing intellectual property disclaimers, notices, or terms - and conditions. If none exist, the <a href="copyright-software-short-notice-20021231.html">W3C Software Short - Notice</a> should be included (hypertext is preferred, text is permitted) - within the body of any redistributed or derivative code.</li><li>Notice of any changes or modifications to the files, including the date - changes were made. (We recommend you provide URIs to the location from - which the code is derived.)</li></ul> - -<h2>Disclaimers</h2> - - <p>THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS -MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT -LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR -PURPOSE OR THAT THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE -ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.</p> - - <p>COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR -DOCUMENTATION.</p> - - <p>The name and trademarks of copyright holders may NOT be used in -advertising or publicity pertaining to the software without specific, written -prior permission. Title to copyright in this software and any associated -documentation will at all times remain with copyright holders.</p> - - <h2>Notes</h2> - - <p>This version: http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231</p> - - <p>This formulation of W3C's notice and license became active on December 31 -2002. This version removes the copyright ownership notice such that this -license can be used with materials other than those owned by the W3C, -reflects that ERCIM is now a host of the W3C, includes references to this -specific dated version of the license, and removes the ambiguous grant of -"use". Otherwise, this version is the same as the <a href="http://www.w3.org/Consortium/Legal/copyright-software-19980720">previous -version</a> and is written so as to preserve the <a href="http://www.gnu.org/philosophy/license-list.html#GPLCompatibleLicenses">Free -Software Foundation's assessment of GPL compatibility</a> and <a href="http://www.opensource.org/licenses/W3C.php">OSI's certification</a> -under the <a href="http://www.opensource.org/docs/definition.php">Open Source -Definition</a>.</p> - </div> - </div> - </div> - </div> - - - - </div><div id="w3c_footer"> - <div id="w3c_footer-inner"> - <h2 class="offscreen">Footer Navigation</h2> - <div class="w3c_footer-nav"> - <h3>Navigation</h3> - <ul class="footer_top_nav"><li> - <a href="/">Home</a> - </li><li> - <a href="/standards/">Standards</a> - </li><li> - <a href="/participate/">Participate</a> - </li><li> - <a href="/Consortium/membership">Membership</a> - </li><li class="last-item"> - <a href="/Consortium/">About W3C</a> - </li></ul> - </div> - <div class="w3c_footer-nav"> - <h3>Contact W3C</h3> - <ul class="footer_bottom_nav"><li> - <a href="/Consortium/contact">Contact</a> - </li><li> - <a accesskey="0" href="/Help/">Help and FAQ</a> - </li><li> - <a href="/Consortium/sponsor/">Sponsor / Donate</a> - </li><li> - <a href="/Consortium/siteindex">Site Map</a> - </li><li> - <address id="w3c_signature"> - <a href="http://lists.w3.org/Archives/Public/site-comments/">Feedback</a></address> - </li></ul> - </div> - <div class="w3c_footer-nav"> - <h3>W3C Updates</h3> - <ul class="footer_follow_nav"><li> - <a href="http://twitter.com/W3C" title="Follow W3C on Twitter"> - <img src="/2008/site/images/twitter-bird" alt="Twitter" width="78" height="83" class="social-icon" /> - </a> - <a href="http://identi.ca/w3c" title="See W3C on Identica"> - <img src="/2008/site/images/identica-logo" alt="Identica" width="91" height="83" class="social-icon" /> - </a> - </li></ul> - </div> - <p class="copyright">Copyright © 2012 W3C <sup>®</sup> (<a href="http://www.csail.mit.edu/"> - <acronym title="Massachusetts Institute of Technology">MIT</acronym> - </a>, <a href="http://www.ercim.org/"> - <acronym title="European Research Consortium for Informatics and Mathematics"> ERCIM</acronym> - </a>, <a href="http://www.keio.ac.jp/">Keio</a>) <a href="/Consortium/Legal/ipr-notice">Usage policies apply</a>.</p> - </div> - </div><!-- Generated from data/scripts.php, ../../smarty/{scripts.tpl} --><!-- At the bottom for performance reasons --><div id="w3c_scripts"> - <script type="text/javascript" src="/2008/site/js/main" xml:space="preserve"><!-- --></script> - </div></body></html> http://git-wip-us.apache.org/repos/asf/cordova-android/blob/4a0f69a3/node_modules/sax/README.md ---------------------------------------------------------------------- diff --git a/node_modules/sax/README.md b/node_modules/sax/README.md index 91a0314..9c63dc4 100644 --- a/node_modules/sax/README.md +++ b/node_modules/sax/README.md @@ -9,7 +9,7 @@ the browser or other CommonJS implementations. * A very simple tool to parse through an XML string. * A stepping stone to a streaming HTML parser. -* A handy way to deal with RSS and other mostly-ok-but-kinda-broken XML +* A handy way to deal with RSS and other mostly-ok-but-kinda-broken XML docs. ## What This Is (probably) Not @@ -23,7 +23,7 @@ the browser or other CommonJS implementations. implementations are in Java and do a lot more than this does. * An XML Validator - It does a little validation when in strict mode, but not much. -* A Schema-Aware XSD Thing - Schemas are an exercise in fetishistic +* A Schema-Aware XSD Thing - Schemas are an exercise in fetishistic masochism. * A DTD-aware Thing - Fetching DTDs is a much bigger job. @@ -41,49 +41,48 @@ through unmolested. ## Usage -```javascript -var sax = require("./lib/sax"), - strict = true, // set to false for html-mode - parser = sax.parser(strict); - -parser.onerror = function (e) { - // an error happened. -}; -parser.ontext = function (t) { - // got some text. t is the string of text. -}; -parser.onopentag = function (node) { - // opened a tag. node has "name" and "attributes" -}; -parser.onattribute = function (attr) { - // an attribute. attr has "name" and "value" -}; -parser.onend = function () { - // parser stream is done, and ready to have more stuff written to it. -}; - -parser.write('<xml>Hello, <who name="world">world</who>!</xml>').close(); - -// stream usage -// takes the same options as the parser -var saxStream = require("sax").createStream(strict, options) -saxStream.on("error", function (e) { - // unhandled errors will throw, since this is a proper node - // event emitter. - console.error("error!", e) - // clear the error - this._parser.error = null - this._parser.resume() -}) -saxStream.on("opentag", function (node) { - // same object as above -}) -// pipe is supported, and it's readable/writable -// same chunks coming in also go out. -fs.createReadStream("file.xml") - .pipe(saxStream) - .pipe(fs.createWriteStream("file-copy.xml")) -``` + var sax = require("./lib/sax"), + strict = true, // set to false for html-mode + parser = sax.parser(strict); + + parser.onerror = function (e) { + // an error happened. + }; + parser.ontext = function (t) { + // got some text. t is the string of text. + }; + parser.onopentag = function (node) { + // opened a tag. node has "name" and "attributes" + }; + parser.onattribute = function (attr) { + // an attribute. attr has "name" and "value" + }; + parser.onend = function () { + // parser stream is done, and ready to have more stuff written to it. + }; + + parser.write('<xml>Hello, <who name="world">world</who>!</xml>').close(); + + // stream usage + // takes the same options as the parser + var saxStream = require("sax").createStream(strict, options) + saxStream.on("error", function (e) { + // unhandled errors will throw, since this is a proper node + // event emitter. + console.error("error!", e) + // clear the error + this._parser.error = null + this._parser.resume() + }) + saxStream.on("opentag", function (node) { + // same object as above + }) + // pipe is supported, and it's readable/writable + // same chunks coming in also go out. + fs.createReadStream("file.xml") + .pipe(saxStream) + .pipe(fs.createReadStream("file-copy.xml")) + ## Arguments @@ -99,13 +98,9 @@ Settings supported: * `trim` - Boolean. Whether or not to trim text and comment nodes. * `normalize` - Boolean. If true, then turn any whitespace into a single space. -* `lowercase` - Boolean. If true, then lowercase tag names and attribute names - in loose mode, rather than uppercasing them. +* `lowercasetags` - Boolean. If true, then lowercase tags in loose mode, + rather than uppercasing them. * `xmlns` - Boolean. If true, then namespaces are supported. -* `position` - Boolean. If false, then don't track line/col/position. -* `strictEntities` - Boolean. If true, only parse [predefined XML - entities](http://www.w3.org/TR/REC-xml/#sec-predefined-ent) - (`&`, `'`, `>`, `<`, and `"`) ## Methods @@ -169,7 +164,7 @@ might go away at some point. SAX isn't intended to be used to parse SGML, after all. `opentag` - An opening tag. Argument: object with `name` and `attributes`. -In non-strict mode, tag names are uppercased, unless the `lowercase` +In non-strict mode, tag names are uppercased, unless the `lowercasetags` option is set. If the `xmlns` option is set, then it will contain namespace binding information on the `ns` member, and will have a `local`, `prefix`, and `uri` member. @@ -179,10 +174,8 @@ parent closes. In strict mode, well-formedness is enforced. Note that self-closing tags will have `closeTag` emitted immediately after `openTag`. Argument: tag name. -`attribute` - An attribute node. Argument: object with `name` and `value`. -In non-strict mode, attribute names are uppercased, unless the `lowercase` -option is set. If the `xmlns` option is set, it will also contains namespace -information. +`attribute` - An attribute node. Argument: object with `name` and `value`, +and also namespace information if the `xmlns` option flag is set. `comment` - A comment node. Argument: the string of the comment. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
