|
(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
|
|
(function (Buffer){
|
|
|
|
exports.code = Buffer.from("AGFzbQEAAAABbA5gAn9/AGABfwBgAX8Bf2ACf38Bf2ADf39/AX9gA39/fwBgA39+fwBgAn9+AGAEf39/fwBgBX9/f39/AGAFf39/f38Bf2AHf39/f39/fwF/YAl/f39/f39/f38Bf2ALf39/f39/f39/f38BfwIQAQNlbnYGbWVtb3J5AgDoBwPDAcEBAAECAQMDBAQFAAAGBwgFBQUAAAUAAAAAAgABBQgIAAIFBQAABQAAAAACAAEFCAgAAgUAAAICAQADAAUABQAAAAgBAgACBQgJCAAFCQMABQUFBQACBQUIAAgCAQEABQUABQUAAAAAAwAICAIBAAMABQAFAAAACAECAAIFCAkIAAUJAAIBAQAFAAUFAAAAAwAICAACAQEABQUABQUAAAAAAwAICAUAAAAACAgFAAAAAAAAAAAAAAAAAAAAAAQKCwwNBQf5E7EBCGludF9jb3B5AAAIaW50X3plcm8AAQdpbnRfb25lAAMKaW50X2lzWmVybwACBmludF9lcQAEB2ludF9ndGUABQdpbnRfYWRkAAYHaW50X3N1YgAHB2ludF9tdWwACAppbnRfc3F1YXJlAAkNaW50X3NxdWFyZU9sZAAKB2ludF9kaXYADQ5pbnRfaW52ZXJzZU1vZAAOB2YxbV9hZGQADwdmMW1fc3ViABAHZjFtX25lZwARDmYxbV9pc05lZ2F0aXZlABgLZjFtX21SZWR1Y3QAEgdmMW1fbXVsABMKZjFtX3NxdWFyZQAUDWYxbV9zcXVhcmVPbGQAFRJmMW1fZnJvbU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AIABCATcDACAAQgA3AwggAEIANwMQIABCADcDGAtHACAAKQMYIAEpAxhRBEAgACkDECABKQMQUQRAIAApAwggASkDCFEEQCAAKQMAIAEpAwBRDwVBAA8LBUEADwsFQQAPC0EADwt9ACAAKQMYIAEpAxhUBEBBAA8FIAApAxggASkDGFYEQEEBDwUgACkDECABKQMQVARAQQAPBSAAKQMQIAEpAxBWBEBBAQ8FIAApAwggASkDCFQEQEEADwUgACkDCCABKQMIVgRAQQEPBSAAKQMAIAEpAwBaDwsLCwsLC0EADwvUAQEBfiAANQIAIAE1AgB8IQMgAiADPgIAIAA1AgQgATUCBHwgA0IgiHwhAyACIAM+AgQgADUCCCABNQIIfCADQiCIfCEDIAIgAz4CCCAANQIMIAE1Agx8IANCIIh8IQMgAiADPgIMIAA1AhAgATUCEHwgA0IgiHwhAyACIAM+AhAgADUCFCABNQIUfCADQiCIfCEDIAIgAz4CFCAANQIYIAE1Ahh8IANCIIh8IQMgAiADPgIYIAA1AhwgATUCHHwgA0IgiHwhAyACIAM+AhwgA0IgiKcLjAIBAX4gADUCACABNQIAfSEDIAIgA0L/////D4M+AgAgADUCBCABNQIEfSADQiCHfCEDIAIgA0L/////D4M+AgQgADUCCCABNQIIfSADQiCHfCEDIAIgA0L/////D4M+AgggADUCDCABNQIMfSADQiCHfCEDIAIgA0L/////D4M+AgwgADUCECABNQIQfSADQiCHfCEDIAIgA0L/////D4M+AhAgADUCFCABNQIUfSADQiCHfCEDIAIgA0L/////D4M+AhQgADUCGCABNQIYfSADQiCHfCEDIAIgA0L/////D4M+AhggADUCHCABNQIcfSADQiCHfCEDIAIgA0L/////D4M+AhwgA0Igh6cLjxASAX4BfgF+AX4BfgF+AX4BfgF+AX4BfgF+AX4BfgF+AX4BfgF+IANC/////w+DIAA1AgAiBSABNQIAIgZ+fCEDIAQgA0IgiHwhBCACIAM+AgAgBEIgiCEDIARC/////w+DIAUgATUCBCIIfnwhBCADIARCIIh8IQMgBEL/////D4MgADUCBCIHIAZ+fCEEIAMgBEIgiHwhAyACIAQ+AgQgA0IgiCEEIANC/////w+DIAUgATUCCCIKfnwhAyAEIANCIIh8IQQgA0L/////D4MgByAIfnwhAyAEIANCIIh8IQQgA0L/////D4MgADUCCCIJIAZ+fCEDIAQgA0IgiHwhBCACIAM+AgggBEIgiCEDIARC/////w+DIAUgATUCDCIMfnwhBCADIARCIIh8IQMgBEL/////D4MgByAKfnwhBCADIARCIIh8IQMgBEL/////D4MgCSAIfnwhBCADIARCIIh8IQMgBEL/////D4MgADUCDCILIAZ+fCEEIAMgBEIgiHwhAyACIAQ+AgwgA0IgiCEEIANC/////w+DIAUgATUCECIOfnwhAyAEIANCIIh8IQQgA0L/////D4MgByAMfnwhAyAEIANCIIh8IQQgA0L/////D4MgCSAKfnwhAyAEIANCIIh8IQQgA0L/////D4MgCyAIfnwhAyAEIANCIIh8IQQgA0L/////D4MgADUCECINIAZ+fCEDIAQgA0IgiHwhBCACIAM+AhAgBEIgiCEDIARC/////w+DIAUgATUCFCIQfnwhBCADIARCIIh8IQMgBEL/////D4MgByAOfnwhBCADIARCIIh8IQMgBEL/////D4MgCSAMfnwhBCADIARCIIh8IQMgBEL/////D4MgCyAKfnwhBCADIARCIIh8IQMgBEL/////D4MgDSAIfnwhBCADIARCIIh8IQMgBEL/////D4MgADUCFCIPIAZ+fCEEIAMgBEIgiHwhAyACIAQ+AhQgA0IgiCEEIANC/////w+DIAUgATUCGCISfnwhAyAEIANCIIh8IQQgA0L/////D4MgByAQfnwhAyAEIANCIIh8IQQgA0L/////D4MgCSAOfnwhAyAEIANCIIh8IQQgA0L/////D4MgCyAMfnwhAyAEIANCIIh8IQQgA0L/////D4MgDSAKfnwhAyAEIANCIIh8IQQgA0L/////D4MgDyAIfnwhAyAEIANCIIh8IQQgA0L/////D4MgADUCGCIRIAZ+fCEDIAQgA0IgiHwhBCACIAM+AhggBEIgiCEDIARC/////w+DIAUgATUCHCIUfnwhBCADIARCIIh8IQMgBEL/////D4MgByASfnwhBCADIARCIIh8IQMgBEL/////D4MgCSAQfnwhBCADIARCIIh8IQMgBEL/////D4MgCyAOfnwhBCADIARCIIh8IQMgBEL/////D4MgDSAMfnwhBCADIARCIIh8IQMgBEL/////D4MgDyAKfnwhBCADIARCIIh8IQMgBEL/////D4MgESAIfnwhBCADIARCIIh8IQMgBEL/////D4MgADUCHCITIAZ+fCEEIAMgBEIgiHwhAyACIAQ+AhwgA0IgiCEEIANC/////w+DIAcgFH58IQMgBCADQiCIfCEEIANC/////w+DIAkgEn58IQMgBCADQiCIfCEEIANC/////w+DIAsgEH58IQMgBCADQiCIfCEEIANC/////w+DIA0gDn58IQMgBCADQiCIfCEEIANC/////w+DIA8gDH58IQMgBCADQiCIfCEEIANC/////w+DIBEgCn58IQMgBCADQiCIfCEEIANC/////w+DIBMgCH58IQMgBCADQiCIfCEEIAIgAz4CICAEQiCIIQMgBEL/////D4MgCSAUfnwhBCADIARCIIh8IQMgBEL/////D4MgCyASfnwhBCADIARCIIh8IQMgBEL/////D4MgDSAQfnwhBCADIARCIIh8IQMgBEL/////D4MgDyAOfnwhBCADIARCIIh8IQMgBEL/////D4MgESAMfnwhBCADIARCIIh8IQMgBEL/////D4MgEyAKfnwhBCADIARCIIh8IQMgAiAEPgIkIANCIIghBCADQv////8PgyALIBR+fCEDIAQgA0IgiHwhBCADQv////8PgyANIBJ+fCEDIAQgA0IgiHwhBCADQv////8PgyAPIBB+fCEDIAQgA0IgiHwhBCADQv////8PgyARIA5+fCEDIAQgA0IgiHwhBCADQv////8PgyATIAx+fCEDIAQgA0IgiHwhBCACIAM+AiggBEIgiCEDIARC/////w+DIA0gFH58IQQgAyAEQiCIfCEDIARC/////w+DIA8gEn58IQQgAyAEQiCIfCEDIARC/////w+DIBEgEH58IQQgAyAEQiCIfCEDIARC/////w+DIBMgDn58IQQgAyAEQiCIfCEDIAIgBD4CLCADQiCIIQQgA0L/////D4MgDyAUfnwhAyAEIANCIIh8IQQgA0L/////D4MgESASfnwhAyAEIANCIIh8IQQgA0L/////D4MgEyAQfnwhAyAEIANCIIh8IQQgAiADPgIwIARCIIghAyAEQv////8PgyARIBR+fCEEIAMgBEIgiHwhAyAEQv////8PgyATIBJ+fCEEIAMgBEIgiHwhAyACIAQ+AjQgA0IgiCEEIANC/////w+DIBMgFH58IQMgBCADQiCIfCEEIAIgAz4COCAEQiCIIQMgAiAEPgI8C4wSDAF+AX4BfgF+AX4BfgF+AX4BfgF+AX4BfkIAIQJCACEDIAJC/////w+DQgGGIQIgA0IBhiACQiCIfCEDIAJC/////w+DIAA1AgAiBiAGfnwhAiADIAJCIIh8IQMgASACPgIAIAMhBCAEQiCIIQVCACECQgAhAyACQv////8PgyAGIAA1AgQiB358IQIgAyACQiCIfCEDIAJC/////w+DQgGGIQIgA0IBhiACQiCIfCEDIAJC/////w+DIARC/////w+DfCECIAMgAkIgiHwgBXwhAyABIAI+AgQgAyEEIARCIIghBUIAIQJCACEDIAJC/////w+DIAYgADUCCCIIfnwhAiADIAJCIIh8IQMgAkL/////D4NCAYYhAiADQgGGIAJCIIh8IQMgAkL/////D4MgByAHfnwhAiADIAJCIIh8IQMgAkL/////D4MgBEL/////D4N8IQIgAyACQiCIfCAFfCEDIAEgAj4CCCADIQQgBEIgiCEFQgAhAkIAIQMgAkL/////D4MgBiAANQIMIgl+fCECIAMgAkIgiHwhAyACQv////8PgyAHIAh+fCECIAMgAkIgiHwhAyACQv////8Pg0IBhiECIANCAYYgAkIgiHwhAyACQv////8PgyAEQv////8Pg3whAiADIAJCIIh8IAV8IQMgASACPgIMIAMhBCAEQiCIIQVCACECQgAhAyACQv////8PgyAGIAA1AhAiCn58IQIgAyACQiCIfCEDIAJC/////w+DIAcgCX58IQIgAyACQiCIfCEDIAJC/////w+DQgGGIQIgA0IBhiACQiCIfCEDIAJC/////w+DIAggCH58IQIgAyACQiCIfCEDIAJC/////w+DIARC/////w+DfCECIAMgAkIgiHwgBXwhAyABIAI+AhAgAyEEIARCIIghBUIAIQJCACEDIAJC/////w+DIAYgADUCFCILfnwhAiADIAJCIIh8IQMgAkL/////D4MgByAKfnwhAiADIAJCIIh8IQMgAkL/////D4MgCCAJfnwhAiADIAJCIIh8IQMgAkL/////D4NCAYYhAiADQgGGIAJCIIh8IQMgAkL/////D4MgBEL/////D4N8IQIgAyACQiCIfCAFfCEDIAEgAj4CFCADIQQgBEIgiCEFQgAhAkIAIQMgAkL/////D4MgBiAANQIYIgx+fCECIAMgAkIgiHwhAyACQv////8PgyAHIAt+fCECIAMgAkIgiHwhAyACQv////8PgyAIIAp+fCECIAMgAkIgiHwhAyACQv////8Pg0IBhiECIANCAYYgAkIgiHwhAyACQv////8PgyAJIAl+fCECIAMgAkIgiHwhAyACQv////8PgyAEQv////8Pg3whAiADIAJCIIh8IAV8IQMgASACPgIYIAMhBCAEQiCIIQVCACECQgAhAyACQv////8PgyAGIAA1AhwiDX58IQIgAyACQiCIfCEDIAJC/////w+DIAcgDH58IQIgAyACQiCIfCEDIAJC/////w+DIAggC358IQIgAyACQiCIfCEDIAJC/////w+DIAkgCn58IQIgAyACQiCIfCEDIAJC/////w+DQgGGIQIgA0IBhiACQiCIfCEDIAJC/////w+DIARC/////w+DfCECIAMgAkIgiHwgBXwhAyABIAI+AhwgAyEEIARCIIghBUIAIQJCACEDIAJC/////w+DIAcgDX58IQIgAyACQiCIfCEDIAJC/////w+DIAggDH58IQIgAyACQiCIfCEDIAJC/////w+DIAkgC358IQIgAyACQiCIfCEDIAJC/////w+DQgGGIQIgA0IBhiACQiCIfCEDIAJC/////w+DIAogCn58IQIgAyACQiCIfCEDIAJC/////w+DIARC/////w+DfCECIAMgAkIgiHwgBXwhAyABIAI+AiAgAyEEIARCIIghBUIAIQJCACEDIAJC/////w+DIAggDX58IQIgAyACQiCIfCEDIAJC/////w+DIAkgDH58IQIgAyACQiCIfCEDIAJC/////w+DIAogC358IQIgAyACQiCIfCEDIAJC/////w+DQgGGIQIgA0IBhiACQiCIfCEDIAJC/////w+DIARC/////w+DfCECIAMgAkIgiHwgBXwhAyABIAI+AiQgAyEEIARCIIghBUIAIQJCACEDIAJC/////w+DIAkgDX58IQIgAyACQiCIfCEDIAJC/////w+DIAogDH58IQIgAyACQiCIfCEDIAJC/////w+DQgGGIQIgA0IBhiACQiCIfCEDIAJC/////w+DIAsgC358IQIgAyACQiCIfCEDIAJC/////w+DIARC/////w+DfCECIAMgAkIgiHwgBXwhAyABIAI+AiggAyEEIARCIIghBUIAIQJCACEDIAJC/////w+DIAogDX58IQIgAyACQiCIfCEDIAJC/////w+DIAsgDH58IQIgAyACQiCIfCEDIAJC/////w+DQgGGIQIgA0IBhiACQiCIfCEDIAJC/////w+DIARC/////w+DfCECIAMgAkIgiHwgBXwhAyABIAI+AiwgAyEEIARCIIghBUIAIQJCACEDIAJC/////w+DIAsgDX58IQIgAyACQiCIfCEDIAJC/////w+DQgGGIQIgA0IBhiACQiCIfCEDIAJC/////w+DIAwgDH58IQIgAyACQiCIfCEDIAJC/////w+DIARC/////w+DfCECIAMgAkIgiHwgBXwhAyABIAI+AjAgAyEEIARCIIghBUIAIQJCACEDIAJC/////w+DIAwgDX58IQIgAyACQiCIfCEDIAJC/////w+DQgGGIQIgA0IBhiACQiCIfCEDIAJC/////w+DIARC/////w+DfCECIAMgAkIgiHwgBXwhAyABIAI+AjQgAyEEIARCIIghBUIAIQJCACEDIAJC/////w+DQgGGIQIgA0IBhiACQiCIfCEDIAJC/////w+DIA0gDX58IQIgAyACQiCIfCEDIAJC/////w+DIARC/////w+DfCECIAMgAkIgiHwgBXwhAyABIAI+AjggAyEEIARCIIghBSABIAQ+AjwLCgAgACAAIAEQCAu2AQEBfiAANQAAIAF+IQMgAiADPgAAIAA1AAQgAX4gA0IgiHwhAyACIAM+AAQgADUACCABfiADQiCIfCEDIAIgAz4ACCAANQAMIAF+IANCIIh8IQMgAiADPgAMIAA1ABAgAX4gA0IgiHwhAyACIAM+ABAgADUAFCABfiADQiCIfCEDIAIgAz4AFCAANQAYIAF+IANCIIh8IQMgAiADPgAYIAA1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ADUCHCADQiCIfEGIBDUCBCAEfnwhAyAAIAM+AhwgADUCICADQiCIfEGIBDUCCCAEfnwhAyAAIAM+AiAgADUCJCADQiCIfEGIBDUCDCAEfnwhAyAAIAM+AiQgADUCKCADQiCIfEGIBDUCECAEfnwhAyAAIAM+AiggADUCLCADQiCIfEGIBDUCFCAEfnwhAyAAIAM+AiwgADUCMCADQiCIfEGIBDUCGCAEfnwhAyAAIAM+AjAgADUCNCADQiCIfEGIBDUCHCAEfnwhAyAAIAM+AjRB6AYgA0IgiD4CGEIAIQMgADUCHCACfkL/////D4MhBCAANQIcIANCIIh8QYgENQIAIAR+fCEDIAAgAz4CHCAANQIgIANCIIh8QYgENQIEIAR+fCEDIAAgAz4CICAANQIkIANCIIh8QYgENQIIIAR+fCEDIAAgAz4CJCAANQIoIANCIIh8QYgENQIMIAR+fCEDIAAgAz4CKCAANQIsIANCIIh8QYgENQIQIAR+fCEDIAAgAz4CLCAANQIwIANCIIh8QYgENQIUIAR+fCEDIAAgAz4CMCAANQI0IANCIIh8QYgENQIYIAR+fCEDIAAgAz4CNCAANQI4IANCIIh8QYgENQIcIAR+fCEDIAAgAz4COEHoBiADQiCIPgIcQegGIABBIGogARAPC74fIwF+AX4BfgF+AX4BfgF+AX4BfgF+AX4BfgF+AX4BfgF+AX4BfgF+AX4BfgF+AX4BfgF+AX4BfgF+AX4BfgF+AX4BfgF+AX5CiceZpA4hBSADQv////8PgyAANQIAIgYgATUCACIHfnwhAyAEIANCIIh8IQQgA0L/////D4MgBX5C/////w+DIQggA0L/////D4NBADUCiAQiCSAIfnwhAyAEIANCIIh8IQQgBEIgiCEDIARC/////w+DIAYgATUCBCILfnwhBCADIARCIIh8IQMgBEL/////D4MgADUCBCIKIAd+fCEEIAMgBEIgiHwhAyAEQv////8Pg0EANQKMBCINIAh+fCEEIAMgBEIgiHwhAyAEQv////8PgyAFfkL/////D4MhDCAEQv////8PgyAJIAx+fCEEIAMgBEIgiHwhAyADQiCIIQQgA0L/////D4MgBiABNQIIIg9+fCEDIAQgA0IgiHwhBCADQv////8PgyAKIAt+fCEDIAQgA0IgiHwhBCADQv////8PgyAANQIIIg4gB358IQMgBCADQiCIfCEEIANC/////w+DIA0gDH58IQMgBCADQiCIfCEEIANC/////w+DQQA1ApAEIhEgCH58IQMgBCADQiCIfCEEIANC/////w+DIAV+Qv////8PgyEQIANC/////w+DIAkgEH58IQMgBCADQiCIfCEEIARCIIghAyAEQv////8PgyAGIAE1AgwiE358IQQgAyAEQiCIfCEDIARC/////w+DIAogD358IQQgAyAEQiCIfCEDIARC/////w+DIA4gC358IQQgAyAEQiCIfCEDIARC/////w+DIAA1AgwiEiAHfnwhBCADIARCIIh8IQMgBEL/////D4MgDSAQfnwhBCADIARCIIh8IQMgBEL/////D4MgESAMfnwhBCADIARCIIh8IQMgBEL/////D4NBADUClAQiFSAIfnwhBCADIARCIIh8IQMgBEL/////D4MgBX5C/////w+DIRQgBEL/////D4MgCSAUfnwhBCADIARCIIh8IQMgA0IgiCEEIANC/////w+DIAYgATUCECIXfnwhAyAEIANCIIh8IQQgA0L/////D4MgCiATfnwhAyAEIANCIIh8IQQgA0L/////D4MgDiAPfnwhAyAEIANCIIh8IQQgA0L/////D4MgEiALfnwhAyAEIANCIIh8IQQgA0L/////D4MgADUCECIWIAd+fCEDIAQgA0IgiHwhBCADQv////8PgyANIBR+fCEDIAQgA0IgiHwhBCADQv////8PgyARIBB+fCEDIAQgA0IgiHwhBCADQv////8PgyAVIAx+fCEDIAQgA0IgiHwhBCADQv////8Pg0EANQKYBCIZIAh+fCEDIAQgA0IgiHwhBCADQv////8PgyAFfkL/////D4MhGCADQv////8PgyAJIBh+fCEDIAQgA0IgiHwhBCAEQiCIIQMgBEL/////D4MgBiABNQIUIht+fCEEIAMgBEIgiHwhAyAEQv////8PgyAKIBd+fCEEIAMgBEIgiHwhAyAEQv////8PgyAOIBN+fCEEIAMgBEIgiHwhAyAEQv////8PgyASIA9+fCEEIAMgBEIgiHwhAyAEQv////8PgyAWIAt+fCEEIAMgBEIgiHwhAyAEQv////8PgyAANQIUIhogB358IQQgAyAEQiCIfCEDIARC/////w+DIA0gGH58IQQgAyAEQiCIfCEDIARC/////w+DIBEgFH58IQQgAyAEQiCIfCEDIARC/////w+DIBUgEH58IQQgAyAEQiCIfCEDIARC/////w+DIBkgDH58IQQgAyAEQiCIfCEDIARC/////w+DQQA1ApwEIh0gCH58IQQgAyAEQiCIfCEDIARC/////w+DIAV+Qv////8PgyEcIARC/////w+DIAkgHH58IQQgAyAEQiCIfCEDIANCIIghBCADQv////8PgyAGIAE1AhgiH358IQMgBCADQiCIfCEEIANC/////w+DIAogG358IQMgBCADQiCIfCEEIANC/////w+DIA4gF358IQMgBCADQiCIfCEEIANC/////w+DIBIgE358IQMgBCADQiCIfCEEIANC/////w+DIBYgD358IQMgBCADQiCIfCEEIANC/////w+DIBogC358IQMgBCADQiCIfCEEIANC/////w+DIAA1AhgiHiAHfnwhAyAEIANCIIh8IQQgA0L/////D4MgDSAcfnwhAyAEIANCIIh8IQQgA0L/////D4MgESAYfnwhAyAEIANCIIh8IQQgA0L/////D4MgFSAUfnwhAyAEIANCIIh8IQQgA0L/////D4MgGSAQfnwhAyAEIANCIIh8IQQgA0L/////D4MgHSAMfnwhAyAEIANCIIh8IQQgA0L/////D4NBADUCoAQiISAIfnwhAyAEIANCIIh8IQQgA0L/////D4MgBX5C/////w+DISAgA0L/////D4MgCSAgfnwhAyAEIANCIIh8IQQgBEIgiCEDIARC/////w+DIAYgATUCHCIjfnwhBCADIARCIIh8IQMgBEL/////D4MgCiAffnwhBCADIARCIIh8IQMgBEL/////D4MgDiAbfnwhBCADIARCIIh8IQMgBEL/////D4MgEiAXfnwhBCADIARCIIh8IQMgBEL/////D4MgFiATfnwhBCADIARCIIh8IQMgBEL/////D4MgGiAPfnwhBCADIARCIIh8IQMgBEL/////D4MgHiALfnwhBCADIARCIIh8IQMgBEL/////D4MgADUCHCIiIAd+fCEEIAMgBEIgiHwhAyAEQv////8PgyANICB+fCEEIAMgBEIgiHwhAyAEQv////8PgyARIBx+fCEEIAMgBEIgiHwhAyAEQv////8PgyAVIBh+fCEEIAMgBEIgiHwhAyAEQv////8PgyAZIBR+fCEEIAMgBEIgiHwhAyAEQv////8PgyAdIBB+fCEEIAMgBEIgiHwhAyAEQv////8PgyAhIAx+fCEEIAMgBEIgiHwhAyAEQv////8Pg0EANQKkBCIlIAh+fCEEIAMgBEIgiHwhAyAEQv////8PgyAFfkL/////D4MhJCAEQv////8PgyAJICR+fCEEIAMgBEIgiHwhAyADQiCIIQQgA0L/////D4MgCiAjfnwhAyAEIANCIIh8IQQgA0L/////D4MgDiAffnwhAyAEIANCIIh8IQQgA0L/////D4MgEiAbfnwhAyAEIANCIIh8IQQgA0L/////D4MgFiAXfnwhAyAEIANCIIh8IQQgA0L/////D4MgGiATfnwhAyAEIANCIIh8IQQgA0L/////D4MgHiAPfnwhAyAEIANCIIh8IQQgA0L/////D4MgIiALfnwhAyAEIANCIIh8IQQgA0L/////D4MgDSAkfnwhAyAEIANCIIh8IQQgA0L/////D4MgESAgfnwhAyAEIANCIIh8IQQgA0L/////D4MgFSAcfnwhAyAEIANCIIh8IQQgA0L/////D4MgGSAYfnwhAyAEIANCIIh8IQQgA0L/////D4MgHSAUfnwhAyAEIANCIIh8IQQgA0L/////D4MgISAQfnwhAyAEIANCIIh8IQQgA0L/////D4MgJSAMfnwhAyAEIANCIIh8IQQgAiADPgIAIARCIIghAyAEQv////8PgyAOICN+fCEEIAMgBEIgiHwhAyAEQv////8PgyASIB9+fCEEIAMgBEIgiHwhAyAEQv////8PgyAWIBt+fCEEIAMgBEIgiHwhAyAEQv////8PgyAaIBd+fCEEIAMgBEIgiHwhAyAEQv////8PgyAeIBN+fCEEIAMgBEIgiHwhAyAEQv////8PgyAiIA9+fCEEIAMgBEIgiHwhAyAEQv////8PgyARICR+fCEEIAMgBEIgiHwhAyAEQv////8PgyAVICB+fCEEIAMgBEIgiHwhAyAEQv////8PgyAZIBx+fCEEIAMgBEIgiHwhAyAEQv////8PgyAdIBh+fCEEIAMgBEIgiHwhAyAEQv////8PgyAhIBR+fCEEIAMgBEIgiHwhAyAEQv////8PgyAlIBB+fCEEIAMgBEIgiHwhAyACIAQ+AgQgA0IgiCEEIANC/////w+DIBIgI358IQMgBCADQiCIfCEEIANC/////w+DIBYgH358IQMgBCADQiCIfCEEIANC/////w+DIBogG358IQMgBCADQiCIfCEEIANC/////w+DIB4gF358IQMgBCADQiCIfCEEIANC/////w+DICIgE358IQMgBCADQiCIfCEEIANC/////w+DIBUgJH58IQMgBCADQiCIfCEEIANC/////w+DIBkgIH58IQMgBCADQiCIfCEEIANC/////w+DIB0gHH58IQMgBCADQiCIfCEEIANC/////w+DICEgGH58IQMgBCADQiCIfCEEIANC/////w+DICUgFH58IQMgBCADQiCIfCEEIAIgAz4CCCAEQiCIIQMgBEL/////D4MgFiAjfnwhBCADIARCIIh8IQMgBEL/////D4MgGiAffnwhBCADIARCIIh8IQMgBEL/////D4MgHiAbfnwhBCADIARCIIh8IQMgBEL/////D4MgIiAXfnwhBCADIARCIIh8IQMgBEL/////D4MgGSAkfnwhBCADIARCIIh8IQMgBEL/////D4MgHSAgfnwhBCADIARCIIh8IQMgBEL/////D4MgISAcfnwhBCADIARCIIh8IQMgBEL/////D4MgJSAYfnwhBCADIARCIIh8IQMgAiAEPgIMIANCIIghBCADQv////8PgyAaICN+fCEDIAQgA0IgiHwhBCADQv////8PgyAeIB9+fCEDIAQgA0IgiHwhBCADQv////8PgyAiIBt+fCEDIAQgA0IgiHwhBCADQv////8PgyAdICR+fCEDIAQgA0IgiHwhBCADQv////8PgyAhICB+fCEDIAQgA0IgiHwhBCADQv////8PgyAlIBx+fCEDIAQgA0IgiHwhBCACIAM+AhAgBEIgiCEDIARC/////w+DIB4gI358IQQgAyAEQiCIfCEDIARC/////w+DICIgH358IQQgAyAEQiCIfCEDIARC/////w+DICEgJH58IQQgAyAEQiCIfCEDIARC/////w+DICUgIH58IQQgAyAEQiCIfCEDIAIgBD4CFCADQiCIIQQgA0L/////D4MgIiAjfnwhAyAEIANCIIh8IQQgA0L/////D4MgJSAkfnwhAyAEIANCIIh8IQQgAiADPgIYIARCIIghAyACIAQ+AhwgA6cEQCACQYgEIAIQBxoFIAJBiAQQBQRAIAJBiAQgAhAHGgsLC7shHQF+AX4BfgF+AX4BfgF+AX4BfgF+AX4BfgF+AX4BfgF+AX4BfgF+AX4BfgF+AX4BfgF+AX4BfgF+AX5CiceZpA4hBkIAIQJCACEDIAJC/////w+DQgGGIQIgA0IBhiACQiCIfCEDIAJC/////w+DIAA1AgAiByAHfnwhAiADIAJCIIh8IQMgAkL/////D4MgBn5C/////w+DIQggAkL/////D4NBADUCiAQiCSAIfnwhAiADIAJCIIh8IQMgAyEEIARCIIghBUIAIQJCACEDIAJC/////w+DIAcgADUCBCIKfnwhAiADIAJCIIh8IQMgAkL/////D4NCAYYhAiADQgGGIAJCIIh8IQMgAkL/////D4MgBEL/////D4N8IQIgAyACQiCIfCAFfCEDIAJC/////w+DQQA1AowEIgwgCH58IQIgAyACQiCIfCEDIAJC/////w+DIAZ+Qv////8PgyELIAJC/////w+DIAkgC358IQIgAyACQiCIfCEDIAMhBCAEQiCIIQVCACECQgAhAyACQv////8PgyAHIAA1AggiDX58IQIgAyACQiCIfCEDIAJC/////w+DQgGGIQIgA0IBhiACQiCIfCEDIAJC/////w+DIAogCn58IQIgAyACQiCIfCEDIAJC/////w+DIARC/////w+DfCECIAMgAkIgiHwgBXwhAyACQv////8PgyAMIAt+fCECIAMgAkIgiHwhAyACQv////8Pg0EANQKQBCIPIAh+fCECIAMgAkIgiHwhAyACQv////8PgyAGfkL/////D4MhDiACQv////8PgyAJIA5+fCECIAMgAkIgiHwhAyADIQQgBEIgiCEFQgAhAkIAIQMgAkL/////D4MgByAANQIMIhB+fCECIAMgAkIgiHwhAyACQv////8PgyAKIA1+fCECIAMgAkIgiHwhAyACQv////8Pg0IBhiECIANCAYYgAkIgiHwhAyACQv////8PgyAEQv////8Pg3whAiADIAJCIIh8IAV8IQMgAkL/////D4MgDCAOfnwhAiADIAJCIIh8IQMgAkL/////D4MgDyALfnwhAiADIAJCIIh8IQMgAkL/////D4NBADUClAQiEiAIfnwhAiADIAJCIIh8IQMgAkL/////D4MgBn5C/////w+DIREgAkL/////D4MgCSARfnwhAiADIAJCIIh8IQMgAyEEIARCIIghBUIAIQJCACEDIAJC/////w+DIAcgADUCECITfnwhAiADIAJCIIh8IQMgAkL/////D4MgCiAQfnwhAiADIAJCIIh8IQMgAkL/////D4NCAYYhAiADQgGGIAJCIIh8IQMgAkL/////D4MgDSANfnwhAiADIAJCIIh8IQMgAkL/////D4MgBEL/////D4N8IQIgAyACQiCIfCAFfCEDIAJC/////w+DIAwgEX58IQIgAyACQiCIfCEDIAJC/////w+DIA8gDn58IQIgAyACQiCIfCEDIAJC/////w+DIBIgC358IQIgAyACQiCIfCEDIAJC/////w+DQQA1ApgEIhUgCH58IQIgAyACQiCIfCEDIAJC/////w+DIAZ+Qv////8PgyEUIAJC/////w+DIAkgFH58IQIgAyACQiCIfCEDIAMhBCAEQiCIIQVCACECQgAhAyACQv////8PgyAHIAA1AhQiFn58IQIgAyACQiCIfCEDIAJC/////w+DIAogE358IQIgAyACQiCIfCEDIAJC/////w+DIA0gEH58IQIgAyACQiCIfCEDIAJC/////w+DQgGGIQIgA0IBhiACQiCIfCEDIAJC/////w+DIARC/////w+DfCECIAMgAkIgiHwgBXwhAyACQv////8PgyAMIBR+fCECIAMgAkIgiHwhAyACQv////8PgyAPIBF+fCECIAMgAkIgiHwhAyACQv////8PgyASIA5+fCECIAMgAkIgiHwhAyACQv////8PgyAVIAt+fCECIAMgAkIgiHwhAyACQv////8Pg0EANQKcBCIYIAh+fCECIAMgAkIgiHwhAyACQv////8PgyAGfkL/////D4MhFyACQv////8PgyAJIBd+fCECIAMgAkIgiHwhAyADIQQgBEIgiCEFQgAhAkIAIQMgAkL/////D4MgByAANQIYIhl+fCECIAMgAkIgiHwhAyACQv////8PgyAKIBZ+fCECIAMgAkIgiHwhAyACQv////8PgyANIBN+fCECIAMgAkIgiHwhAyACQv////8Pg0IBhiECIANCAYYgAkIgiHwhAyACQv////8PgyAQIBB+fCECIAMgAkIgiHwhAyACQv////8PgyAEQv////8Pg3whAiADIAJCIIh8IAV8IQMgAkL/////D4MgDCAXfnwhAiADIAJCIIh8IQMgAkL/////D4MgDyAUfnwhAiADIAJCIIh8IQMgAkL/////D4MgEiARfnwhAiADIAJCIIh8IQMgAkL/////D4MgFSAOfnwhAiADIAJCIIh8IQMgAkL/////D4MgGCALfnwhAiADIAJCIIh8IQMgAkL/////D4NBADUCoAQiGyAIfnwhAiADIAJCIIh8IQMgAkL/////D4MgBn5C/////w+DIRogAkL/////D4MgCSAafnwhAiADIAJCIIh8IQMgAyEEIARCIIghBUIAIQJCACEDIAJC/////w+DIAcgADUCHCIcfnwhAiADIAJCIIh8IQMgAkL/////D4MgCiAZfnwhAiADIAJCIIh8IQMgAkL/////D4MgDSAWfnwhAiADIAJCIIh8IQMgAkL/////D4MgECATfnwhAiADIAJCIIh8IQMgAkL/////D4NCAYYhAiADQgGGIAJCIIh8IQMgAkL/////D4MgBEL/////D4N8IQIgAyACQiCIfCAFfCEDIAJC/////w+DIAwgGn58IQIgAyACQiCIfCEDIAJC/////w+DIA8gF358IQIgAyACQiCIfCEDIAJC/////w+DIBIgFH58IQIgAyACQiCIfCEDIAJC/////w+DIBUgEX58IQIgAyACQiCIfCEDIAJC/////w+DIBggDn58IQIgAyACQiCIfCEDIAJC/////w+DIBsgC358IQIgAyACQiCIfCEDIAJC/////w+DQQA1AqQEIh4gCH58IQIgAyACQiCIfCEDIAJC/////w+DIAZ+Qv////8PgyEdIAJC/////w+DIAkgHX58IQIgAyACQiCIfCEDIAMhBCAEQiCIIQVCACECQgAhAyACQv////8PgyAKIBx+fCECIAMgAkIgiHwhAyACQv////8PgyANIBl+fCECIAMgAkIgiHwhAyACQv////8PgyAQIBZ+fCECIAMgAkIgiHwhAyACQv////8Pg0IBhiECIANCAYYgAkIgiHwhAyACQv////8PgyATIBN+fCECIAMgAkIgiHwhAyACQv////8PgyAEQv////8Pg3whAiADIAJCIIh8IAV8IQMgAkL/////D4MgDCAdfnwhAiADIAJCIIh8IQMgAkL/////D4MgDyAafnwhAiADIAJCIIh8IQMgAkL/////D4MgEiAXfnwhAiADIAJCIIh8IQMgAkL/////D4MgFSAUfnwhAiADIAJCIIh8IQMgAkL/////D4MgGCARfnwhAiADIAJCIIh8IQMgAkL/////D4MgGyAOfnwhAiADIAJCIIh8IQMgAkL/////D4MgHiALfnwhAiADIAJCIIh8IQMgASACPgIAIAMhBCAEQiCIIQVCACECQgAhAyACQv////8PgyANIBx+fCECIAMgAkIgiHwhAyACQv////8PgyAQIBl+fCECIAMgAkIgiHwhAyACQv////8PgyATIBZ+fCECIAMgAkIgiHwhAyACQv////8Pg0IBhiECIANCAYYgAkIgiHwhAyACQv////8PgyAEQv////8Pg3whAiADIAJCIIh8IAV8IQMgAkL/////D4MgDyAdfnwhAiADIAJCIIh8IQMgAkL/////D4MgEiAafnwhAiADIAJCIIh8IQMgAkL/////D4MgFSAXfnwhAiADIAJCIIh8IQMgAkL/////D4MgGCAUfnwhAiADIAJCIIh8IQMgAkL/////D4MgGyARfnwhAiADIAJCIIh8IQMgAkL/////D4MgHiAOfnwhAiADIAJCIIh8IQMgASACPgIEIAMhBCAEQiCIIQVCACECQgAhAyACQv////8PgyAQIBx+fCECIAMgAkIgiHwhAyACQv////8PgyATIBl+fCECIAMgAkIgiHwhAyACQv////8Pg0IBhiECIANCAYYgAkIgiHwhAyACQv////8PgyAWIBZ+fCECIAMgAkIgiHwhAyACQv////8PgyAEQv////8Pg3whAiADIAJCIIh8IAV8IQMgAkL/////D4MgEiAdfnwhAiADIAJCIIh8IQMgAkL/////D4MgFSAafnwhAiADIAJCIIh8IQMgAkL/////D4MgGCAXfnwhAiADIAJCIIh8IQMgAkL/////D4MgGyAUfnwhAiADIAJCIIh8IQMgAkL/////D4MgHiARfnwhAiADIAJCIIh8IQMgASACPgIIIAMhBCAEQiCIIQVCACECQgAhAyACQv////8PgyATIBx+fCECIAMgAkIgiHwhAyACQv////8PgyAWIBl+fCECIAMgAkIgiHwhAyACQv////8Pg0IBhiECIANCAYYgAkIgiHwhAyACQv////8PgyAEQv////8Pg3whAiADIAJCIIh8IAV8IQMgAkL/////D4MgFSAdfnwhAiADIAJCIIh8IQMgAkL/////D4MgGCAafnwhAiADIAJCIIh8IQMgAkL/////D4MgGyAXfnwhAiADIAJCIIh8IQMgAkL/////D4MgHiAUfnwhAiADIAJCIIh8IQMgASACPgIMIAMhBCAEQiCIIQVCACECQgAhAyACQv////8PgyAWIBx+fCECIAMgAkIgiHwhAyACQv////8Pg0IBhiECIANCAYYgAkIgiHwhAyACQv////8PgyAZIBl+fCECIAMgAkIgiHwhAyACQv////8PgyAEQv////8Pg3whAiADIAJCIIh8IAV8IQMgAkL/////D4MgGCAdfnwhAiADIAJCIIh8IQMgAkL/////D4MgGyAafnwhAiADIAJCIIh8IQMgAkL/////D4MgHiAXfnwhAiADIAJCIIh8IQMgASACPgIQIAMhBCAEQiCIIQVCACECQgAhAyACQv////8PgyAZIBx+fCECIAMgAkIgiHwhAyACQv////8Pg0IBhiECIANCAYYgAkIgiHwhAyACQv////8PgyAEQv////8Pg3whAiADIAJCIIh8IAV8IQMgAkL/////D4MgGyAdfnwhAiADIAJCIIh8IQMgAkL/////D4MgHiAafnwhAiADIAJCIIh8IQMgASACPgIUIAMhBCAEQiCIIQVCACECQgAhAyACQv////8Pg0IBhiECIANCAYYgAkIgiHwhAyACQv////8PgyAcIBx+fCECIAMgAkIgiHwhAyACQv////8PgyAEQv////8Pg3whAiADIAJCIIh8IAV8IQMgAkL/////D4MgHiAdfnwhAiADIAJCIIh8IQMgASACPgIYIAMhBCAEQiCIIQUgASAEPgIcIAWnBEAgAUGIBCABEAcaBSABQYgEEAUEQCABQYgEIAEQBxoLCwsKACAAIAAgARATCwsA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hAgBH58IQMgACADPgIYIAA1AhwgA0IgiHxBiA41AhQgBH58IQMgACADPgIcIAA1AiAgA0IgiHxBiA41AhggBH58IQMgACADPgIgIAA1AiQgA0IgiHxBiA41AhwgBH58IQMgACADPgIkQegQIANCIIg+AghCACEDIAA1AgwgAn5C/////w+DIQQgADUCDCADQiCIfEGIDjUCACAEfnwhAyAAIAM+AgwgADUCECADQiCIfEGIDjUCBCAEfnwhAyAAIAM+AhAgADUCFCADQiCIfEGIDjUCCCAEfnwhAyAAIAM+AhQgADUCGCADQiCIfEGIDjUCDCAEfnwhAyAAIAM+AhggADUCHCADQiCIfEGIDjUCECAEfnwhAyAAIAM+AhwgADUCICADQiCIfEGIDjUCFCAEfnwhAyAAIAM+AiAgADUCJCADQiCIfEGIDjUCGCAEfnwhAyAAIAM+AiQgADUCKCADQiCIfEGIDjUCHCAEfnwhAyAAIAM+AihB6BAgA0IgiD4CDEIAIQMgADUCECACfkL/////D4MhBCAANQIQIANCIIh8QYgONQIAIAR+fCEDIAAgAz4CECAANQIUIANCIIh8QYgONQIEIAR+fCEDIAAgAz4CFCAANQIYIANCIIh8QYgONQIIIAR+fCEDIAAgAz4CGCAANQIcIANCIIh8QYgONQIMIAR+fCEDIAAgAz4CHCAANQIgIANCIIh8QYgONQIQIAR+fCEDIAAgAz4CICAANQIkIANCIIh8QYgONQIUIAR+fCEDIAAgAz4CJCAANQIoIANCIIh8QYgONQIYIAR+fCEDIAAgAz4CKCAANQIsIANCIIh8QYgONQIcIAR+fCEDIAAgAz4CLEHoECADQiCIPgIQQgAhAyAANQIUIAJ+Qv////8PgyEEIAA1AhQgA0IgiHxBiA41AgAgBH58IQMgACADPgIUIAA1AhggA0IgiHxBiA41AgQgBH58IQMgACADPgIYIAA1AhwgA0IgiHxBiA41AgggBH58IQMgACADPgIcIAA1AiAgA0IgiHxBiA41AgwgBH58IQMgACADPgIgIAA1AiQgA0IgiHxBiA41AhAgBH58IQMgACADPgIkIAA1AiggA0IgiHxBiA41AhQgBH58IQMgACADPgIoIAA1AiwgA0IgiHxBiA41AhggBH58IQMgACADPgIsIAA1AjAgA0IgiHxBiA41AhwgBH58IQMgACADPgIwQegQIANCIIg+AhRCACEDIAA1AhggAn5C/////w+DIQQgADUCGCADQiCIfEGIDjUCACAEfnwhAyAAIAM+AhggADUCHCADQiCIfEGIDjUCBCAEfnwhAyAAIAM+AhwgADUCICADQiCIfEGIDjUCCCAEfnwhAyAAIAM+AiAgADUCJCADQiCIfEGIDjUCDCAEfnwhAyAAIAM+AiQgADUCKCADQiCIfEGIDjUCECAEfnwhAyAAIAM+AiggADUCLCADQiCIfEGIDjUCFCAEfnwhAyAAIAM+AiwgADUCMCADQiCIfEGIDjUCGCAEfnwhAyAAIAM+AjAgADUCNCADQiCIfEGIDjUCHCAEfnwhAyAAIAM+AjRB6BAgA0IgiD4CGEIAIQMgADUCHCACfkL/////D4MhBCAANQIcIANCIIh8QYgONQIAIAR+fCEDIAAgAz4CHCAANQIgIANCIIh8QYgONQIEIAR+fCEDIAAgAz4CICAANQIkIANCIIh8QYgONQIIIAR+fCEDIAAgAz4CJCAANQIoIANCIIh8QYgONQIMIAR+fCEDIAAgAz4CKCAANQIsIANCIIh8QYgONQIQIAR+fCEDIAAgAz4CLCAANQIwIANCIIh8QYgONQIUIAR+fCEDIAAgAz4CMCAANQI0IANCIIh8QYgONQIYIAR+fCEDIAAgAz4CNCAANQI4IANCIIh8QYgONQIcIAR+fCEDIAAgAz4COEHoECADQiCIPgIcQegQIABBIGogARAgC74fIwF+AX4BfgF+AX4BfgF+AX4BfgF+AX4BfgF+AX4BfgF+AX4BfgF+AX4BfgF+AX4BfgF+AX4BfgF+AX4BfgF+AX4BfgF+AX5C/////w4hBSADQv////8PgyAANQIAIgYgATUCACIHfnwhAyAEIANCIIh8IQQgA0L/////D4MgBX5C/////w+DIQggA0L/////D4NBADUCiA4iCSAIfnwhAyAEIANCIIh8IQQgBEIgiCEDIARC/////w+DIAYgATUCBCILfnwhBCADIARCIIh8IQMgBEL/////D4MgADUCBCIKIAd+fCEEIAMgBEIgiHwhAyAEQv////8Pg0EANQKMDiINIAh+fCEEIAMgBEIgiHwhAyAEQv////8PgyAFfkL/////D4MhDCAEQv////8PgyAJIAx+fCEEIAMgBEIgiHwhAyADQiCIIQQgA0L/////D4MgBiABNQIIIg9+fCEDIAQgA0IgiHwhBCADQv////8PgyAKIAt+fCEDIAQgA0IgiHwhBCADQv////8PgyAANQIIIg4gB358IQMgBCADQiCIfCEEIANC/////w+DIA0gDH58IQMgBCADQiCIfCEEIANC/////w+DQQA1ApAOIhEgCH58IQMgBCADQiCIfCEEIANC/////w+DIAV+Qv////8PgyEQIANC/////w+DIAkgEH58IQMgBCADQiCIfCEEIARCIIghAyAEQv////8PgyAGIAE1AgwiE358IQQgAyAEQiCIfCEDIARC/////w+DIAogD358IQQgAyAEQiCIfCEDIARC/////w+DIA4gC358IQQgAyAEQiCIfCEDIARC/////w+DIAA1AgwiEiAHfnwhBCADIARCIIh8IQMgBEL/////D4MgDSAQfnwhBCADIARCIIh8IQMgBEL/////D4MgESAMfnwhBCADIARCIIh8IQMgBEL/////D4NBADUClA4iFSAIfnwhBCADIARCIIh8IQMgBEL/////D4MgBX5C/////w+DIRQgBEL/////D4MgCSAUfnwhBCADIARCIIh8IQMgA0IgiCEEIANC/////w+DIAYgATUCECIXfnwhAyAEIANCIIh8IQQgA0L/////D4MgCiATfnwhAyAEIANCIIh8IQQgA0L/////D4MgDiAPfnwhAyAEIANCIIh8IQQgA0L/////D4MgEiALfnwhAyAEIANCIIh8IQQgA0L/////D4MgADUCECIWIAd+fCEDIAQgA0IgiHwhBCADQv////8PgyANIBR+fCEDIAQgA0IgiHwhBCADQv////8PgyARIBB+fCEDIAQgA0IgiHwhBCADQv////8PgyAVIAx+fCEDIAQgA0IgiHwhBCADQv////8Pg0EANQKYDiIZIAh+fCEDIAQgA0IgiHwhBCADQv////8PgyAFfkL/////D4MhGCADQv////8PgyAJIBh+fCEDIAQgA0IgiHwhBCAEQiCIIQMgBEL/////D4MgBiABNQIUIht+fCEEIAMgBEIgiHwhAyAEQv////8PgyAKIBd+fCEEIAMgBEIgiHwhAyAEQv////8PgyAOIBN+fCEEIAMgBEIgiHwhAyAEQv////8PgyASIA9+fCEEIAMgBEIgiHwhAyAEQv////8PgyAWIAt+fCEEIAMgBEIgiHwhAyAEQv////8PgyAANQIUIhogB358IQQgAyAEQiCIfCEDIARC/////w+DIA0gGH58IQQgAyAEQiCIfCEDIARC/////w+DIBEgFH58IQQgAyAEQiCIfCEDIARC/////w+DIBUgEH58IQQgAyAEQiCIfCEDIARC/////w+DIBkgDH58IQQgAyAEQiCIfCEDIARC/////w+DQQA1ApwOIh0gCH58IQQgAyAEQiCIfCEDIARC/////w+DIAV+Qv////8PgyEcIARC/////w+DIAkgHH58IQQgAyAEQiCIfCEDIANCIIghBCADQv////8PgyAGIAE1AhgiH358IQMgBCADQiCIfCEEIANC/////w+DIAogG358IQMgBCADQiCIfCEEIANC/////w+DIA4gF358IQMgBCADQiCIfCEEIANC/////w+DIBIgE358IQMgBCADQiCIfCEEIANC/////w+DIBYgD358IQMgBCADQiCIfCEEIANC/////w+DIBogC358IQMgBCADQiCIfCEEIANC/////w+DIAA1AhgiHiAHfnwhAyAEIANCIIh8IQQgA0L/////D4MgDSAcfnwhAyAEIANCIIh8IQQgA0L/////D4MgESAYfnwhAyAEIANCIIh8IQQgA0L/////D4MgFSAUfnwhAyAEIANCIIh8IQQgA0L/////D4MgGSAQfnwhAyAEIANCIIh8IQQgA0L/////D4MgHSAMfnwhAyAEIANCIIh8IQQgA0L/////D4NBADUCoA4iISAIfnwhAyAEIANCIIh8IQQgA0L/////D4MgBX5C/////w+DISAgA0L/////D4MgCSAgfnwhAyAEIANCIIh8IQQgBEIgiCEDIARC/////w+DIAYgATUCHCIjfnwhBCADIARCIIh8IQMgBEL/////D4MgCiAffnwhBCADIARCIIh8IQMgBEL/////D4MgDiAbfnwhBCADIARCIIh8IQMgBEL/////D4MgEiAXfnwhBCADIARCIIh8IQMgBEL/////D4MgFiATfnwhBCADIARCIIh8IQMgBEL/////D4MgGiAPfnwhBCADIARCIIh8IQMgBEL/////D4MgHiALfnwhBCADIARCIIh8IQMgBEL/////D4MgADUCHCIiIAd+fCEEIAMgBEIgiHwhAyAEQv////8PgyANICB+fCEEIAMgBEIgiHwhAyAEQv////8PgyARIBx+fCEEIAMgBEIgiHwhAyAEQv////8PgyAVIBh+fCEEIAMgBEIgiHwhAyAEQv////8PgyAZIBR+fCEEIAMgBEIgiHwhAyAEQv////8PgyAdIBB+fCEEIAMgBEIgiHwhAyAEQv////8PgyAhIAx+fCEEIAMgBEIgiHwhAyAEQv////8Pg0EANQKkDiIlIAh+fCEEIAMgBEIgiHwhAyAEQv////8PgyAFfkL/////D4MhJCAEQv////8PgyAJICR+fCEEIAMgBEIgiHwhAyADQiCIIQQgA0L/////D4MgCiAjfnwhAyAEIANCIIh8IQQgA0L/////D4MgDiAffnwhAyAEIANCIIh8IQQgA0L/////D4MgEiAbfnwhAyAEIANCIIh8IQQgA0L/////D4MgFiAXfnwhAyAEIANCIIh8IQQgA0L/////D4MgGiATfnwhAyAEIANCIIh8IQQgA0L/////D4MgHiAPfnwhAyAEIANCIIh8IQQgA0L/////D4MgIiALfnwhAyAEIANCIIh8IQQgA0L/////D4MgDSAkfnwhAyAEIANCIIh8IQQgA0L/////D4MgESAgfnwhAyAEIANCIIh8IQQgA0L/////D4MgFSAcfnwhAyAEIANCIIh8IQQgA0L/////D4MgGSAYfnwhAyAEIANCIIh8IQQgA0L/////D4MgHSAUfnwhAyAEIANCIIh8IQQgA0L/////D4MgISAQfnwhAyAEIANCIIh8IQQgA0L/////D4MgJSAMfnwhAyAEIANCIIh8IQQgAiADPgIAIARCIIghAyAEQv////8PgyAOICN+fCEEIAMgBEIgiHwhAyAEQv////8PgyASIB9+fCEEIAMgBEIgiHwhAyAEQv////8PgyAWIBt+fCEEIAMgBEIgiHwhAyAEQv////8PgyAaIBd+fCEEIAMgBEIgiHwhAyAEQv////8PgyAeIBN+fCEEIAMgBEIgiHwhAyAEQv////8PgyAiIA9+fCEEIAMgBEIgiHwhAyAEQv////8PgyARICR+fCEEIAMgBEIgiHwhAyAEQv////8PgyAVICB+fCEEIAMgBEIgiHwhAyAEQv////8PgyAZIBx+fCEEIAMgBEIgiHwhAyAEQv////8PgyAdIBh+fCEEIAMgBEIgiHwhAyAEQv////8PgyAhIBR+fCEEIAMgBEIgiHwhAyAEQv////8PgyAlIBB+fCEEIAMgBEIgiHwhAyACIAQ+AgQgA0IgiCEEIANC/////w+DIBIgI358IQMgBCADQiCIfCEEIANC/////w+DIBYgH358IQMgBCADQiCIfCEEIANC/////w+DIBogG358IQMgBCADQiCIfCEEIANC/////w+DIB4gF358IQMgBCADQiCIfCEEIANC/////w+DICIgE358IQMgBCADQiCIfCEEIANC/////w+DIBUgJH58IQMgBCADQiCIfCEEIANC/////w+DIBkgIH58IQMgBCADQiCIfCEEIANC/////w+DIB0gHH58IQMgBCADQiCIfCEEIANC/////w+DICEgGH58IQMgBCADQiCIfCEEIANC/////w+DICUgFH58IQMgBCADQiCIfCEEIAIgAz4CCCAEQiCIIQMgBEL/////D4MgFiAjfnwhBCADIARCIIh8IQMgBEL/////D4MgGiAffnwhBCADIARCIIh8IQMgBEL/////D4MgHiAbfnwhBCADIARCIIh8IQMgBEL/////D4MgIiAXfnwhBCADIARCIIh8IQMgBEL/////D4MgGSAkfnwhBCADIARCIIh8IQMgBEL/////D4MgHSAgfnwhBCADIARCIIh8IQMgBEL/////D4MgISAcfnwhBCADIARCIIh8IQMgBEL/////D4MgJSAYfnwhBCADIARCIIh8IQMgAiAEPgIMIANCIIghBCADQv////8PgyAaICN+fCEDIAQgA0IgiHwhBCADQv////8PgyAeIB9+fCEDIAQgA0IgiHwhBCADQv////8PgyAiIBt+fCEDIAQgA0IgiHwhBCADQv////8PgyAdICR+fCEDIAQgA0IgiHwhBCADQv////8PgyAhICB+fCEDIAQgA0IgiHwhBCADQv////8PgyAlIBx+fCEDIAQgA0IgiHwhBCACIAM+AhAgBEIgiCEDIARC/////w+DIB4gI358IQQgAyAEQiCIfCEDIARC/////w+DICIgH358IQQgAyAEQiCIfCEDIARC/////w+DICEgJH58IQQgAyAEQiCIfCEDIARC/////w+DICUgIH58IQQgAyAEQiCIfCEDIAIgBD4CFCADQiCIIQQgA0L/////D4MgIiAjfnwhAyAEIANCIIh8IQQgA0L/////D4MgJSAkfnwhAyAEIANCIIh8IQQgAiADPgIYIARCIIghAyACIAQ+AhwgA6cEQCACQYgOIAIQBxoFIAJBiA4QBQRAIAJBiA4gAhAHGgsLC7shHQF+AX4BfgF+AX4BfgF+AX4BfgF+AX4BfgF+AX4BfgF+AX4BfgF+AX4BfgF+AX4BfgF+AX4BfgF+AX5C/////w4hBkIAIQJCACEDIAJC/////w+DQgGGIQIgA0IBhiACQiCIfCEDIAJC/////w+DIAA1AgAiByAHfnwhAiADIAJCIIh8IQMgAkL/////D4MgBn5C/////w+DIQggAkL/////D4NBADUCiA4iCSAIfnwhAiADIAJCIIh8IQMgAyEEIARCIIghBUIAIQJCACEDIAJC/////w+DIAcgADUCBCIKfnwhAiADIAJCIIh8IQMgAkL/////D4NCAYYhAiADQgGGIAJCIIh8IQMgAkL/////D4MgBEL/////D4N8IQIgAyACQiCIfCAFfCEDIAJC/////w+DQQA1AowOIgwgCH58IQIgAyACQiCIfCEDIAJC/////w+DIAZ+Qv////8PgyELIAJC/////w+DIAkgC358IQIgAyACQiCIfCEDIAMhBCAEQiCIIQVCACECQgAhAyACQv////8PgyAHIAA1AggiDX58IQIgAyACQiCIfCEDIAJC/////w+DQgGGIQIgA0IBhiACQiCIfCEDIAJC/////w+DIAogCn58IQIgAyACQiCIfCEDIAJC/////w+DIARC/////w+DfCECIAMgAkIgiHwgBXwhAyACQv////8PgyAMIAt+fCECIAMgAkIgiHwhAyACQv////8Pg0EANQKQDiIPIAh+fCECIAMgAkIgiHwhAyACQv////8PgyAGfkL/////D4MhDiACQv////8PgyAJIA5+fCECIAMgAkIgiHwhAyADIQQgBEIgiCEFQgAhAkIAIQMgAkL/////D4MgByAANQIMIhB+fCECIAMgAkIgiHwhAyACQv////8PgyAKIA1+fCECIAMgAkIgiHwhAyACQv////8Pg0IBhiECIANCAYYgAkIgiHwhAyACQv////8PgyAEQv////8Pg3whAiADIAJCIIh8IAV8IQMgAkL/////D4MgDCAOfnwhAiADIAJCIIh8IQMgAkL/////D4MgDyALfnwhAiADIAJCIIh8IQMgAkL/////D4NBADUClA4iEiAIfnwhAiADIAJCIIh8IQMgAkL/////D4MgBn5C/////w+DIREgAkL/////D4MgCSARfnwhAiADIAJCIIh8IQMgAyEEIARCIIghBUIAIQJCACEDIAJC/////w+DIAcgADUCECITfnwhAiADIAJCIIh8IQMgAkL/////D4MgCiAQfnwhAiADIAJCIIh8IQMgAkL/////D4NCAYYhAiADQgGGIAJCIIh8IQMgAkL/////D4MgDSANfnwhAiADIAJCIIh8IQMgAkL/////D4MgBEL/////D4N8IQIgAyACQiCIfCAFfCEDIAJC/////w+DIAwgEX58IQIgAyACQiCIfCEDIAJC/////w+DIA8gDn58IQIgAyACQiCIfCEDIAJC/////w+DIBIgC358IQIgAyACQiCIfCEDIAJC/////w+DQQA1ApgOIhUgCH58IQIgAyACQiCIfCEDIAJC/////w+DIAZ+Qv////8PgyEUIAJC/////w+DIAkgFH58IQIgAyACQiCIfCEDIAMhBCAEQiCIIQVCACECQgAhAyACQv////8PgyAHIAA1AhQiFn58IQIgAyACQiCIfCEDIAJC/////w+DIAogE358IQIgAyACQiCIfCEDIAJC/////w+DIA0gEH58IQIgAyACQiCIfCEDIAJC/////w+DQgGGIQIgA0IBhiACQiCIfCEDIAJC/////w+DIARC/////w+DfCECIAMgAkIgiHwgBXwhAyACQv////8PgyAMIBR+fCECIAMgAkIgiHwhAyACQv////8PgyAPIBF+fCECIAMgAkIgiHwhAyACQv////8PgyASIA5+fCECIAMgAkIgiHwhAyACQv////8PgyAVIAt+fCECIAMgAkIgiHwhAyACQv////8Pg0EANQKcDiIYIAh+fCECIAMgAkIgiHwhAyACQv////8PgyAGfkL/////D4MhFyACQv////8PgyAJIBd+fCECIAMgAkIgiHwhAyADIQQgBEIgiCEFQgAhAkIAIQMgAkL/////D4MgByAANQIYIhl+fCECIAMgAkIgiHwhAyACQv////8PgyAKIBZ+fCECIAMgAkIgiHwhAyACQv////8PgyANIBN+fCECIAMgAkIgiHwhAyACQv////8Pg0IBhiECIANCAYYgAkIgiHwhAyACQv////8PgyAQIBB+fCECIAMgAkIgiHwhAyACQv////8PgyAEQv////8Pg3whAiADIAJCIIh8IAV8IQMgAkL/////D4MgDCAXfnwhAiADIAJCIIh8IQMgAkL/////D4MgDyAUfnwhAiADIAJCIIh8IQMgAkL/////D4MgEiARfnwhAiADIAJCIIh8IQMgAkL/////D4MgFSAOfnwhAiADIAJCIIh8IQMgAkL/////D4MgGCALfnwhAiADIAJCIIh8IQMgAkL/////D4NBADUCoA4iGyAIfnwhAiADIAJCIIh8IQMgAkL/////D4MgBn5C/////w+DIRogAkL/////D4MgCSAafnwhAiADIAJCIIh8IQMgAyEEIARCIIghBUIAIQJCACEDIAJC/////w+DIAcgADUCHCIcfnwhAiADIAJCIIh8IQMgAkL/////D4MgCiAZfnwhAiADIAJCIIh8IQMgAkL/////D4MgDSAWfnwhAiADIAJCIIh8IQMgAkL/////D4MgECATfnwhAiADIAJCIIh8IQMgAkL/////D4NCAYYhAiADQgGGIAJCIIh8IQMgAkL/////D4MgBEL/////D4N8IQIgAyACQiCIfCAFfCEDIAJC/////w+DIAwgGn58IQIgAyACQiCIfCEDIAJC/////w+DIA8gF358IQIgAyACQiCIfCEDIAJC/////w+DIBIgFH58IQIgAyACQiCIfCEDIAJC/////w+DIBUgEX58IQIgAyACQiCIfCEDIAJC/////w+DIBggDn58IQIgAyACQiCIfCEDIAJC/////w+DIBsgC358IQIgAyACQiCIfCEDIAJC/////w+DQQA1AqQOIh4gCH58IQIgAyACQiCIfCEDIAJC/////w+DIAZ+Qv////8PgyEdIAJC/////w+DIAkgHX58IQIgAyACQiCIfCEDIAMhBCAEQiCIIQVCACECQgAhAyACQv////8PgyAKIBx+fCECIAMgAkIgiHwhAyACQv////8PgyANIBl+fCECIAMgAkIgiHwhAyACQv////8PgyAQIBZ+fCECIAMgAkIgiHwhAyACQv////8Pg0IBhiECIANCAYYgAkIgiHwhAyACQv////8PgyATIBN+fCECIAMgAkIgiHwhAyACQv////8PgyAEQv////8Pg3whAiADIAJCIIh8IAV8IQMgAkL/////D4MgDCAdfnwhAiADIAJCIIh8IQMgAkL/////D4MgDyAafnwhAiADIAJCIIh8IQMgAkL/////D4MgEiAXfnwhAiADIAJCIIh8IQMgAkL/////D4MgFSAUfnwhAiADIAJCIIh8IQMgAkL/////D4MgGCARfnwhAiADIAJCIIh8IQMgAkL/////D4MgGyAOfnwhAiADIAJCIIh8IQMgAkL/////D4MgHiALfnwhAiADIAJCIIh8IQMgASACPgIAIAMhBCAEQiCIIQVCACECQgAhAyACQv////8PgyANIBx+fCECIAMgAkIgiHwhAyACQv////8PgyAQIBl+fCECIAMgAkIgiHwhAyACQv////8PgyATIBZ+fCECIAMgAkIgiHwhAyACQv////8Pg0IBhiECIANCAYYgAkIgiHwhAyACQv////8PgyAEQv////8Pg3whAiADIAJCIIh8IAV8IQMgAkL/////D4MgDyAdfnwhAiADIAJCIIh8IQMgAkL/////D4MgEiAafnwhAiADIAJCIIh8IQMgAkL/////D4MgFSAXfnwhAiADIAJCIIh8IQMgAkL/////D4MgGCAUfnwhAiADIAJCIIh8IQMgAkL/////D4MgGyARfnwhAiADIAJCIIh8IQMgAkL/////D4MgHiAOfnwhAiADIAJCIIh8IQMgASACPgIEIAMhBCAEQiCIIQVCACECQgAhAyACQv////8PgyAQIBx+fCECIAMgAkIgiHwhAyACQv////8PgyATIBl+fCECIAMgAkIgiHwhAyACQv////8Pg0IBhiECIANCAYYgAkIgiHwhAyACQv////8PgyAWIBZ+fCECIAMgAkIgiHwhAyACQv////8PgyAEQv////8Pg3whAiADIAJCIIh8IAV8IQMgAkL/////D4MgEiAdfnwhAiADIAJCIIh8IQMgAkL/////D4MgFSAafnwhAiADIAJCIIh8IQMgAkL/////D4MgGCAXfnwhAiADIAJCIIh8IQMgAkL/////D4MgGyAUfnwhAiADIAJCIIh8IQMgAkL/////D4MgHiARfnwhAiADIAJCIIh8IQMgASACPgIIIAMhBCAEQiCIIQVCACECQgAhAyACQv////8PgyATIBx+fCECIAMgAkIgiHwhAyACQv////8PgyAWIBl+fCECIAMgAkIgiHwhAyACQv////8Pg0IBhiECIANCAYYgAkIgiHwhAyACQv////8PgyAEQv////8Pg3whAiADIAJCIIh8IAV8IQMgAkL/////D4MgFSAdfnwhAiADIAJCIIh8IQMgAkL/////D4MgGCAafnwhAiADIAJCIIh8IQMgAkL/////D4MgGyAXfnwhAiADIAJCIIh8IQMgAkL/////D4MgHiAUfnwhAiADIAJCIIh8IQMgASACPgIMIAMhBCAEQiCIIQVCACECQgAhAyACQv////8PgyAWIBx+fCECIAMgAkIgiHwhAyACQv////8Pg0IBhiECIANCAYYgAkIgiHwhAyACQv////8PgyAZIBl+fCECIAMgAkIgiHwhAyACQv////8PgyAEQv////8Pg3whAiADIAJCIIh8IAV8IQMgAkL/////D4MgGCAdfnwhAiADIAJCIIh8IQMgAkL/////D4MgGyAafnwhAiADIAJCIIh8IQMgAkL/////D4MgHiAXfnwhAiADIAJCIIh8IQMgASACPgIQIAMhBCAEQiCIIQVCACECQgAhAyACQv////8PgyAZIBx+fCECIAMgAkIgiHwhAyACQv////8Pg0IBhiECIANCAYYgAkIgiHwhAyACQv////8PgyAEQv////8Pg3whAiADIAJCIIh8IAV8IQMgAkL/////D4MgGyAdfnwhAiADIAJCIIh8IQMgAkL/////D4MgHiAafnwhAiADIAJCIIh8IQMgASACPgIUIAMhBCAEQiCIIQVCACECQgAhAyACQv////8Pg0IBhiECIANCAYYgAkIgiHwhAyACQv////8PgyAcIBx+fCECIAMgAkIgiHwhAyACQv////8Pg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gACADQSBsaiEIIAggBCAIECQLQwIBfwF/IABBAXYhAkEAIQECQANAIAJFDQEgAkEBdiECIAFBAWohAQwACwsgAEEBIAF0RwRAAAsgAUEcSwRAAAsgAQsSAQF/IAEQUyEDIAAgAyACEE4LGAEBfyABEFMhAyAAIAMgAhBOIAAgAxBSC0wEAX8BfwF/AX8gACEEIAEhBSADIQYgACACQSBsaiEHAkADQCAEIAdGDQEgBCAFIAYQJCAEQSBqIQQgBUEgaiEFIAZBIGohBgwACwsLLgIBfwF/IAAhAyAAIAFBIGxqIQICQANAIAMgAkYNASADEAEgA0EgaiEDDAALCwuOAQYBfwF/AX8BfwF/AX9BACEEIAAhBiABIQcCQANAIAQgAkYNASAGKAIAIQkgBkEEaiEGQQAhBQJAA0AgBSAJRg0BIAMgBigCAEEgbGohCCAGQQRqIQYgByAGQai+AxAkQai+AyAIIAgQICAGQSBqIQYgBUEBaiEFDAALCyAHQSBqIQcgBEEBaiEEDAALCwsOACAAEAIgAEEgahACcQsNACAAEAEgAEEgahABCw0AIAAQGiAAQSBqEAELFAAgACABEAAgAEEgaiABQSBqEAALdQAgACABQci+AxATIABBIGogAUEgakHovgMQEyAAIABBIGpBiL8DEA8gASABQSBqQai/AxAPQYi/A0GovwNBiL8DEBNB6L4DIAIQEUHIvgMgAiACEA9ByL4DQei+AyACQSBqEA9BiL8DIAJBIGogAkEgahAQCxgAIAAgASACEBMgAEEgaiABIAJBIGoQEwtwACAAIABBIGpByL8DEBMgACAAQSBqQei/AxAPIABBIGpBiMADEBEgAEGIwANBiMADEA9ByL8DQajAAxARQajAA0HIvwNBqMADEA9B6L8DQYjAAyABEBMgAUGowAMgARAQQci/A0HIvwMgAUEgahAPCxsAIAAgASACEA8gAEEgaiABQSBqIAJBIGoQDwsbACAAIAEgAhAQIABBIGogAUEgaiACQSBqEBALFAAgACABEBEgAEEgaiABQSBqEBELFAAgACABEAAgAEEgaiABQSBqEBELFAAgACABEBYgAEEgaiABQSBqEBYLFAAgACABEBcgAE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CkHohgoQiAFB6IMKQaiFCiABEIYBIAFB6IYKIAEQiQFBqIIKQaiCCiABQcABahCIAQsgACAAIAEgAhCIASAAQcABaiABQcABaiACQcABahCIAQsgACAAIAEgAhCJASAAQcABaiABQcABaiACQcABahCJAQsYACAAIAEQigEgAEHAAWogAUHAAWoQigELGAAgACABEIUBIABBwAFqIAFBwAFqEIoBCxgAIAAgARCLASAAQcABaiABQcABahCLAQsYACAAIAEQjAEgAEHAAWogAUHAAWoQjAELGQAgACABEI0BIABBwAFqIAFBwAFqEI0BcQtqACAAQaiIChCHASAAQcABakHoiQoQhwFB6IkKQaiLChCRAUGoiApBqIsKQaiLChCJAUGoiwpB6IwKEI4BIABB6IwKIAEQhgEgAEHAAWpB6IwKIAFBwAFqEIYBIAFBwAFqIAFBwAFqEIoBCyAAIAAgASACIAMQjwEgAEHAAWogASACIANBwAFqEI8BC8ICAgF/AX8gAEGojgoQlQEgAxCUASACIQQCQANAIARBAWshBCABIARqLQAAIQUgAyADEJgBIAVBgAFPBEAgBUGAAWshBUGojgogAyADEJYBCyADIAMQmAEgBUHAAE8EQCAFQcAAayEFQaiOCiADIAMQlgELIAMgAxCYASAFQSBPBEAgBUEgayEFQaiOCiADIAMQlgELIAMgAxCYASAFQRBPBEAgBUEQayEFQaiOCiADIAMQlgELIAMgAxCYASAFQQhPBEAgBUEIayEFQaiOCiADIAMQlgELIAMgAxCYASAFQQRPBEAgBUEEayEFQaiOCiADIAMQlgELIAMgAxCYASAFQQJPBEAgBUECayEFQaiOCiADIAMQlgELIAMgAxCYASAFQQFPBEAgBUEBayEFQaiOCiADIAMQlgELIARFDQEMAAsLC8wCACAAIAFBgAFqIAJBwABqEF0gASACQcAAaiACQcAAahBhIABBwABqIAFBgAFqQfCtCxBdIAFBwABqQfCtC0HwrQsQYSACQcAAakGwrgsQX0HwrQtB8K4LEF8gAkHAAGpBsK4LQbCvCxBdIAFBsK4LQfCvCxBdQfCvC0HwrwtB8LALEGAgAUGAAWpB8K4LQbC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hCoASADQcABaiEDIAQsAKiRCgRAIANBwABqIABBIGpBsMULEF4gA0GAAWogAEHwxQsQXiADQbDFC0HwxQsgAhCoASADQcABaiEDCyAERQ0BIARBAWshBAwACwsgA0HAAGogAEEgakGwxQsQXiADQYABaiAAQfDFCxBeIANBsMULQfDFCyACEKgBIANBwAFqIQMgA0HAAGogAEEgakGwxQsQXiADQYABaiAAQfDFCxBeIANBsMULQfDFCyACEKgBIANBwAFqIQMLZgAgAEGwxgsgARBdIABBwABqQfDGCyABQcAAahBdIABBgAFqQbDHCyABQYABahBdIABBwAFqQfDHCyABQcABahBdIABBgAJqQbDICyABQYACahBdIABBwAJqQfDICyABQcACahBdC4QCACAAIAEQACAAQSBqIAFBIGoQESABQbDJCyABEF0gAEHAAGogAUHAAGoQACAAQeAAaiABQeAAahARIAFBwABqQfDJCyABQcAAahBdIABBgAFqIAFBgAFqEAAgAEGgAWogAUGgAWoQESABQYABakGwygsgAUGAAWoQXSAAQcABaiABQcABahAAIABB4AFqIAFB4AFqEBEgAUHAAWpB8MoLIAFBwAFqEF0gAEGAAmogAUGAAmoQACAAQaACaiABQaACahARIAFBgAJqQbDLCyABQYACahBdIABBwAJqIAFBwAJqEAAgAEHgAmogAUHgAmoQESABQcACakHwywsgAUHAAmoQXQtmACAAQbDMCyABEF0gAEHAAGpB8MwLIAFBwABqEF0gAEGAAWpBsM0LIAFBgAFqEF0gAEHAAWpB8M0LIAFBwAFqEF0gAEGAAmpBsM4LIAFBgAJqEF0gAEHAAmpB8M4LIAFBwAJqEF0LhAIAIAAgARAAIABBIGogAUEgahARIAFBsM8LIAEQXSAAQcAAaiABQcAAahAAIABB4ABqIAFB4ABqEBEgAUHAAGpB8M8LIAFBwABqEF0gAEGAAWogAUGAAWoQACAAQaABaiABQaABahARIAFBgAFqQbDQCyABQYABahBdIABBwAFqIAFBwAFqEAAgAEHgAWogAUHgAWoQESABQcABakHw0AsgAUHAAWoQXSAAQYACaiABQYACahAAIABBoAJqIAFBoAJqEBEgAUGAAmpBsNELIAFBgAJqEF0gAEHAAmogAUHAAmoQACAAQeACaiABQeACahARIAFBwAJqQfDRCyABQcACahBdC2YAIABBsNILIAEQXSAAQcAAakHw0gsgAUHAAGoQXSAAQYABakGw0wsgAUGAAWoQXSAAQcABakHw0wsgAUHAAWoQXSAAQYACakGw1AsgAUGAAmoQXSAAQcACakHw1AsgAUHAAmoQXQuEAgAgACABEAAgAEEgaiABQSBqEBEgAUGw1QsgARBdIABBwABqIAFBwABqEAAgAEHgAGogAUHgAGoQESABQcAAakHw1QsgAUHAAGoQXSAAQYABaiABQYABahAAIABBoAFqIAFBoAFqEBEgAUGAAWpBsNYLIAFBgAFqEF0gAEHAAWogAUHAAWoQACAAQeABaiABQeABahARIAFBwAFqQfDWCyABQcABahBdIABBgAJqIAFBgAJqEAAgAEGgAmogAUGgAmoQESABQYACakGw1wsgAUGAAmoQXSAAQcACaiABQcACahAAIABB4AJqIAFB4AJqEBEgAUHAAmpB8NcLIAFBwAJqEF0LZgAgAEGw2AsgARBdIABBwABqQfDYCyABQcAAahBdIABBgAFqQbDZCyABQYABahBdIABBwAFqQfDZCyABQcABahBdIABBgAJqQbDaCyABQYACahBdIABBwAJqQfDaCyABQcACahBdC4QCACAAIAEQACAAQSBqIAFBIGoQESABQbDbCyABEF0gAEHAAGogAUHAAGoQACAAQeAAaiABQeAAahARIAFBwABqQfDbCyABQcAAahBdIABBgAFqIAFBgAFqEAAgAEGgAWogAUGgAWoQESABQYABakGw3AsgAUGAAWoQXSAAQcABaiABQcABahAAIABB4AFqIAFB4AFqEBEgAUHAAWpB8NwLIAFBwAFqEF0gAEGAAmogAUGAAmoQACAAQaACaiABQaACahARIAFBgAJqQbDdCyABQYACahBdIABBwAJqIAFBwAJqEAAgAEHgAmogAUHgAmoQESABQcACakHw3QsgAUHAAmoQXQtmACAAQbDeCyABEF0gAEHAAGpB8N4LIAFBwABqEF0gAEGAAWpBsN8LIAFBgAFqEF0gAEHAAWpB8N8LIAFBwAFqE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AAAAAAAAAAAAAAAAAAAAAAAA=", "base64");
|
|
exports.pq = 520;
|
|
exports.pr = 1800;
|
|
exports.pG1gen = 160040;
|
|
exports.pG1zero = 160136;
|
|
exports.pG2gen = 160232;
|
|
exports.pG2zero = 160424;
|
|
exports.pOneT = 160616;
|
|
exports.prePSize = undefined;
|
|
exports.preQSize = undefined;
|
|
|
|
}).call(this,require("buffer").Buffer)
|
|
},{"buffer":9}],2:[function(require,module,exports){
|
|
/*
|
|
Copyright 2019 0KIMS association.
|
|
|
|
This file is part of wasmsnark (Web Assembly zkSnark Prover).
|
|
|
|
wasmsnark is a free software: you can redistribute it and/or modify it
|
|
under the terms of the GNU General Public License as published by
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
(at your option) any later version.
|
|
|
|
wasmsnark is distributed in the hope that it will be useful, but WITHOUT
|
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
|
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
|
|
License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with wasmsnark. If not, see <https://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
/* globals window */
|
|
|
|
const buildBn128 = require("./src/bn128.js");
|
|
|
|
buildBn128().then( (bn128) => {
|
|
window.bn128 = bn128;
|
|
window.groth16GenProof = function(witness, provingKey, cb) {
|
|
|
|
const p = bn128.groth16GenProof(witness, provingKey);
|
|
|
|
if (cb) {
|
|
p.then( (proof) => {
|
|
cb(null, proof);
|
|
}, (err) => {
|
|
cb(err);
|
|
});
|
|
} else {
|
|
return p;
|
|
}
|
|
};
|
|
|
|
window.groth16Verify = function(verificationKey, input, proof, cb) {
|
|
|
|
const p = bn128.groth16Verify(verificationKey, input, proof);
|
|
|
|
if (cb) {
|
|
p.then( (proof) => {
|
|
cb(null, proof);
|
|
}, (err) => {
|
|
cb(err);
|
|
});
|
|
} else {
|
|
return p;
|
|
}
|
|
};
|
|
});
|
|
|
|
|
|
|
|
},{"./src/bn128.js":13}],3:[function(require,module,exports){
|
|
(function (global){
|
|
'use strict';
|
|
|
|
var objectAssign = require('object-assign');
|
|
|
|
// compare and isBuffer taken from https://github.com/feross/buffer/blob/680e9e5e488f22aac27599a57dc844a6315928dd/index.js
|
|
// original notice:
|
|
|
|
/*!
|
|
* The buffer module from node.js, for the browser.
|
|
*
|
|
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
|
|
* @license MIT
|
|
*/
|
|
function compare(a, b) {
|
|
if (a === b) {
|
|
return 0;
|
|
}
|
|
|
|
var x = a.length;
|
|
var y = b.length;
|
|
|
|
for (var i = 0, len = Math.min(x, y); i < len; ++i) {
|
|
if (a[i] !== b[i]) {
|
|
x = a[i];
|
|
y = b[i];
|
|
break;
|
|
}
|
|
}
|
|
|
|
if (x < y) {
|
|
return -1;
|
|
}
|
|
if (y < x) {
|
|
return 1;
|
|
}
|
|
return 0;
|
|
}
|
|
function isBuffer(b) {
|
|
if (global.Buffer && typeof global.Buffer.isBuffer === 'function') {
|
|
return global.Buffer.isBuffer(b);
|
|
}
|
|
return !!(b != null && b._isBuffer);
|
|
}
|
|
|
|
// based on node assert, original notice:
|
|
// NB: The URL to the CommonJS spec is kept just for tradition.
|
|
// node-assert has evolved a lot since then, both in API and behavior.
|
|
|
|
// http://wiki.commonjs.org/wiki/Unit_Testing/1.0
|
|
//
|
|
// THIS IS NOT TESTED NOR LIKELY TO WORK OUTSIDE V8!
|
|
//
|
|
// Originally from narwhal.js (http://narwhaljs.org)
|
|
// Copyright (c) 2009 Thomas Robinson <280north.com>
|
|
//
|
|
// 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 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.
|
|
|
|
var util = require('util/');
|
|
var hasOwn = Object.prototype.hasOwnProperty;
|
|
var pSlice = Array.prototype.slice;
|
|
var functionsHaveNames = (function () {
|
|
return function foo() {}.name === 'foo';
|
|
}());
|
|
function pToString (obj) {
|
|
return Object.prototype.toString.call(obj);
|
|
}
|
|
function isView(arrbuf) {
|
|
if (isBuffer(arrbuf)) {
|
|
return false;
|
|
}
|
|
if (typeof global.ArrayBuffer !== 'function') {
|
|
return false;
|
|
}
|
|
if (typeof ArrayBuffer.isView === 'function') {
|
|
return ArrayBuffer.isView(arrbuf);
|
|
}
|
|
if (!arrbuf) {
|
|
return false;
|
|
}
|
|
if (arrbuf instanceof DataView) {
|
|
return true;
|
|
}
|
|
if (arrbuf.buffer && arrbuf.buffer instanceof ArrayBuffer) {
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
// 1. The assert module provides functions that throw
|
|
// AssertionError's when particular conditions are not met. The
|
|
// assert module must conform to the following interface.
|
|
|
|
var assert = module.exports = ok;
|
|
|
|
// 2. The AssertionError is defined in assert.
|
|
// new assert.AssertionError({ message: message,
|
|
// actual: actual,
|
|
// expected: expected })
|
|
|
|
var regex = /\s*function\s+([^\(\s]*)\s*/;
|
|
// based on https://github.com/ljharb/function.prototype.name/blob/adeeeec8bfcc6068b187d7d9fb3d5bb1d3a30899/implementation.js
|
|
function getName(func) {
|
|
if (!util.isFunction(func)) {
|
|
return;
|
|
}
|
|
if (functionsHaveNames) {
|
|
return func.name;
|
|
}
|
|
var str = func.toString();
|
|
var match = str.match(regex);
|
|
return match && match[1];
|
|
}
|
|
assert.AssertionError = function AssertionError(options) {
|
|
this.name = 'AssertionError';
|
|
this.actual = options.actual;
|
|
this.expected = options.expected;
|
|
this.operator = options.operator;
|
|
if (options.message) {
|
|
this.message = options.message;
|
|
this.generatedMessage = false;
|
|
} else {
|
|
this.message = getMessage(this);
|
|
this.generatedMessage = true;
|
|
}
|
|
var stackStartFunction = options.stackStartFunction || fail;
|
|
if (Error.captureStackTrace) {
|
|
Error.captureStackTrace(this, stackStartFunction);
|
|
} else {
|
|
// non v8 browsers so we can have a stacktrace
|
|
var err = new Error();
|
|
if (err.stack) {
|
|
var out = err.stack;
|
|
|
|
// try to strip useless frames
|
|
var fn_name = getName(stackStartFunction);
|
|
var idx = out.indexOf('\n' + fn_name);
|
|
if (idx >= 0) {
|
|
// once we have located the function frame
|
|
// we need to strip out everything before it (and its line)
|
|
var next_line = out.indexOf('\n', idx + 1);
|
|
out = out.substring(next_line + 1);
|
|
}
|
|
|
|
this.stack = out;
|
|
}
|
|
}
|
|
};
|
|
|
|
// assert.AssertionError instanceof Error
|
|
util.inherits(assert.AssertionError, Error);
|
|
|
|
function truncate(s, n) {
|
|
if (typeof s === 'string') {
|
|
return s.length < n ? s : s.slice(0, n);
|
|
} else {
|
|
return s;
|
|
}
|
|
}
|
|
function inspect(something) {
|
|
if (functionsHaveNames || !util.isFunction(something)) {
|
|
return util.inspect(something);
|
|
}
|
|
var rawname = getName(something);
|
|
var name = rawname ? ': ' + rawname : '';
|
|
return '[Function' + name + ']';
|
|
}
|
|
function getMessage(self) {
|
|
return truncate(inspect(self.actual), 128) + ' ' +
|
|
self.operator + ' ' +
|
|
truncate(inspect(self.expected), 128);
|
|
}
|
|
|
|
// At present only the three keys mentioned above are used and
|
|
// understood by the spec. Implementations or sub modules can pass
|
|
// other keys to the AssertionError's constructor - they will be
|
|
// ignored.
|
|
|
|
// 3. All of the following functions must throw an AssertionError
|
|
// when a corresponding condition is not met, with a message that
|
|
// may be undefined if not provided. All assertion methods provide
|
|
// both the actual and expected values to the assertion error for
|
|
// display purposes.
|
|
|
|
function fail(actual, expected, message, operator, stackStartFunction) {
|
|
throw new assert.AssertionError({
|
|
message: message,
|
|
actual: actual,
|
|
expected: expected,
|
|
operator: operator,
|
|
stackStartFunction: stackStartFunction
|
|
});
|
|
}
|
|
|
|
// EXTENSION! allows for well behaved errors defined elsewhere.
|
|
assert.fail = fail;
|
|
|
|
// 4. Pure assertion tests whether a value is truthy, as determined
|
|
// by !!guard.
|
|
// assert.ok(guard, message_opt);
|
|
// This statement is equivalent to assert.equal(true, !!guard,
|
|
// message_opt);. To test strictly for the value true, use
|
|
// assert.strictEqual(true, guard, message_opt);.
|
|
|
|
function ok(value, message) {
|
|
if (!value) fail(value, true, message, '==', assert.ok);
|
|
}
|
|
assert.ok = ok;
|
|
|
|
// 5. The equality assertion tests shallow, coercive equality with
|
|
// ==.
|
|
// assert.equal(actual, expected, message_opt);
|
|
|
|
assert.equal = function equal(actual, expected, message) {
|
|
if (actual != expected) fail(actual, expected, message, '==', assert.equal);
|
|
};
|
|
|
|
// 6. The non-equality assertion tests for whether two objects are not equal
|
|
// with != assert.notEqual(actual, expected, message_opt);
|
|
|
|
assert.notEqual = function notEqual(actual, expected, message) {
|
|
if (actual == expected) {
|
|
fail(actual, expected, message, '!=', assert.notEqual);
|
|
}
|
|
};
|
|
|
|
// 7. The equivalence assertion tests a deep equality relation.
|
|
// assert.deepEqual(actual, expected, message_opt);
|
|
|
|
assert.deepEqual = function deepEqual(actual, expected, message) {
|
|
if (!_deepEqual(actual, expected, false)) {
|
|
fail(actual, expected, message, 'deepEqual', assert.deepEqual);
|
|
}
|
|
};
|
|
|
|
assert.deepStrictEqual = function deepStrictEqual(actual, expected, message) {
|
|
if (!_deepEqual(actual, expected, true)) {
|
|
fail(actual, expected, message, 'deepStrictEqual', assert.deepStrictEqual);
|
|
}
|
|
};
|
|
|
|
function _deepEqual(actual, expected, strict, memos) {
|
|
// 7.1. All identical values are equivalent, as determined by ===.
|
|
if (actual === expected) {
|
|
return true;
|
|
} else if (isBuffer(actual) && isBuffer(expected)) {
|
|
return compare(actual, expected) === 0;
|
|
|
|
// 7.2. If the expected value is a Date object, the actual value is
|
|
// equivalent if it is also a Date object that refers to the same time.
|
|
} else if (util.isDate(actual) && util.isDate(expected)) {
|
|
return actual.getTime() === expected.getTime();
|
|
|
|
// 7.3 If the expected value is a RegExp object, the actual value is
|
|
// equivalent if it is also a RegExp object with the same source and
|
|
// properties (`global`, `multiline`, `lastIndex`, `ignoreCase`).
|
|
} else if (util.isRegExp(actual) && util.isRegExp(expected)) {
|
|
return actual.source === expected.source &&
|
|
actual.global === expected.global &&
|
|
actual.multiline === expected.multiline &&
|
|
actual.lastIndex === expected.lastIndex &&
|
|
actual.ignoreCase === expected.ignoreCase;
|
|
|
|
// 7.4. Other pairs that do not both pass typeof value == 'object',
|
|
// equivalence is determined by ==.
|
|
} else if ((actual === null || typeof actual !== 'object') &&
|
|
(expected === null || typeof expected !== 'object')) {
|
|
return strict ? actual === expected : actual == expected;
|
|
|
|
// If both values are instances of typed arrays, wrap their underlying
|
|
// ArrayBuffers in a Buffer each to increase performance
|
|
// This optimization requires the arrays to have the same type as checked by
|
|
// Object.prototype.toString (aka pToString). Never perform binary
|
|
// comparisons for Float*Arrays, though, since e.g. +0 === -0 but their
|
|
// bit patterns are not identical.
|
|
} else if (isView(actual) && isView(expected) &&
|
|
pToString(actual) === pToString(expected) &&
|
|
!(actual instanceof Float32Array ||
|
|
actual instanceof Float64Array)) {
|
|
return compare(new Uint8Array(actual.buffer),
|
|
new Uint8Array(expected.buffer)) === 0;
|
|
|
|
// 7.5 For all other Object pairs, including Array objects, equivalence is
|
|
// determined by having the same number of owned properties (as verified
|
|
// with Object.prototype.hasOwnProperty.call), the same set of keys
|
|
// (although not necessarily the same order), equivalent values for every
|
|
// corresponding key, and an identical 'prototype' property. Note: this
|
|
// accounts for both named and indexed properties on Arrays.
|
|
} else if (isBuffer(actual) !== isBuffer(expected)) {
|
|
return false;
|
|
} else {
|
|
memos = memos || {actual: [], expected: []};
|
|
|
|
var actualIndex = memos.actual.indexOf(actual);
|
|
if (actualIndex !== -1) {
|
|
if (actualIndex === memos.expected.indexOf(expected)) {
|
|
return true;
|
|
}
|
|
}
|
|
|
|
memos.actual.push(actual);
|
|
memos.expected.push(expected);
|
|
|
|
return objEquiv(actual, expected, strict, memos);
|
|
}
|
|
}
|
|
|
|
function isArguments(object) {
|
|
return Object.prototype.toString.call(object) == '[object Arguments]';
|
|
}
|
|
|
|
function objEquiv(a, b, strict, actualVisitedObjects) {
|
|
if (a === null || a === undefined || b === null || b === undefined)
|
|
return false;
|
|
// if one is a primitive, the other must be same
|
|
if (util.isPrimitive(a) || util.isPrimitive(b))
|
|
return a === b;
|
|
if (strict && Object.getPrototypeOf(a) !== Object.getPrototypeOf(b))
|
|
return false;
|
|
var aIsArgs = isArguments(a);
|
|
var bIsArgs = isArguments(b);
|
|
if ((aIsArgs && !bIsArgs) || (!aIsArgs && bIsArgs))
|
|
return false;
|
|
if (aIsArgs) {
|
|
a = pSlice.call(a);
|
|
b = pSlice.call(b);
|
|
return _deepEqual(a, b, strict);
|
|
}
|
|
var ka = objectKeys(a);
|
|
var kb = objectKeys(b);
|
|
var key, i;
|
|
// having the same number of owned properties (keys incorporates
|
|
// hasOwnProperty)
|
|
if (ka.length !== kb.length)
|
|
return false;
|
|
//the same set of keys (although not necessarily the same order),
|
|
ka.sort();
|
|
kb.sort();
|
|
//~~~cheap key test
|
|
for (i = ka.length - 1; i >= 0; i--) {
|
|
if (ka[i] !== kb[i])
|
|
return false;
|
|
}
|
|
//equivalent values for every corresponding key, and
|
|
//~~~possibly expensive deep test
|
|
for (i = ka.length - 1; i >= 0; i--) {
|
|
key = ka[i];
|
|
if (!_deepEqual(a[key], b[key], strict, actualVisitedObjects))
|
|
return false;
|
|
}
|
|
return true;
|
|
}
|
|
|
|
// 8. The non-equivalence assertion tests for any deep inequality.
|
|
// assert.notDeepEqual(actual, expected, message_opt);
|
|
|
|
assert.notDeepEqual = function notDeepEqual(actual, expected, message) {
|
|
if (_deepEqual(actual, expected, false)) {
|
|
fail(actual, expected, message, 'notDeepEqual', assert.notDeepEqual);
|
|
}
|
|
};
|
|
|
|
assert.notDeepStrictEqual = notDeepStrictEqual;
|
|
function notDeepStrictEqual(actual, expected, message) {
|
|
if (_deepEqual(actual, expected, true)) {
|
|
fail(actual, expected, message, 'notDeepStrictEqual', notDeepStrictEqual);
|
|
}
|
|
}
|
|
|
|
|
|
// 9. The strict equality assertion tests strict equality, as determined by ===.
|
|
// assert.strictEqual(actual, expected, message_opt);
|
|
|
|
assert.strictEqual = function strictEqual(actual, expected, message) {
|
|
if (actual !== expected) {
|
|
fail(actual, expected, message, '===', assert.strictEqual);
|
|
}
|
|
};
|
|
|
|
// 10. The strict non-equality assertion tests for strict inequality, as
|
|
// determined by !==. assert.notStrictEqual(actual, expected, message_opt);
|
|
|
|
assert.notStrictEqual = function notStrictEqual(actual, expected, message) {
|
|
if (actual === expected) {
|
|
fail(actual, expected, message, '!==', assert.notStrictEqual);
|
|
}
|
|
};
|
|
|
|
function expectedException(actual, expected) {
|
|
if (!actual || !expected) {
|
|
return false;
|
|
}
|
|
|
|
if (Object.prototype.toString.call(expected) == '[object RegExp]') {
|
|
return expected.test(actual);
|
|
}
|
|
|
|
try {
|
|
if (actual instanceof expected) {
|
|
return true;
|
|
}
|
|
} catch (e) {
|
|
// Ignore. The instanceof check doesn't work for arrow functions.
|
|
}
|
|
|
|
if (Error.isPrototypeOf(expected)) {
|
|
return false;
|
|
}
|
|
|
|
return expected.call({}, actual) === true;
|
|
}
|
|
|
|
function _tryBlock(block) {
|
|
var error;
|
|
try {
|
|
block();
|
|
} catch (e) {
|
|
error = e;
|
|
}
|
|
return error;
|
|
}
|
|
|
|
function _throws(shouldThrow, block, expected, message) {
|
|
var actual;
|
|
|
|
if (typeof block !== 'function') {
|
|
throw new TypeError('"block" argument must be a function');
|
|
}
|
|
|
|
if (typeof expected === 'string') {
|
|
message = expected;
|
|
expected = null;
|
|
}
|
|
|
|
actual = _tryBlock(block);
|
|
|
|
message = (expected && expected.name ? ' (' + expected.name + ').' : '.') +
|
|
(message ? ' ' + message : '.');
|
|
|
|
if (shouldThrow && !actual) {
|
|
fail(actual, expected, 'Missing expected exception' + message);
|
|
}
|
|
|
|
var userProvidedMessage = typeof message === 'string';
|
|
var isUnwantedException = !shouldThrow && util.isError(actual);
|
|
var isUnexpectedException = !shouldThrow && actual && !expected;
|
|
|
|
if ((isUnwantedException &&
|
|
userProvidedMessage &&
|
|
expectedException(actual, expected)) ||
|
|
isUnexpectedException) {
|
|
fail(actual, expected, 'Got unwanted exception' + message);
|
|
}
|
|
|
|
if ((shouldThrow && actual && expected &&
|
|
!expectedException(actual, expected)) || (!shouldThrow && actual)) {
|
|
throw actual;
|
|
}
|
|
}
|
|
|
|
// 11. Expected to throw an error:
|
|
// assert.throws(block, Error_opt, message_opt);
|
|
|
|
assert.throws = function(block, /*optional*/error, /*optional*/message) {
|
|
_throws(true, block, error, message);
|
|
};
|
|
|
|
// EXTENSION! This is annoying to write outside this module.
|
|
assert.doesNotThrow = function(block, /*optional*/error, /*optional*/message) {
|
|
_throws(false, block, error, message);
|
|
};
|
|
|
|
assert.ifError = function(err) { if (err) throw err; };
|
|
|
|
// Expose a strict only variant of assert
|
|
function strict(value, message) {
|
|
if (!value) fail(value, true, message, '==', strict);
|
|
}
|
|
assert.strict = objectAssign(strict, assert, {
|
|
equal: assert.strictEqual,
|
|
deepEqual: assert.deepStrictEqual,
|
|
notEqual: assert.notStrictEqual,
|
|
notDeepEqual: assert.notDeepStrictEqual
|
|
});
|
|
assert.strict.strict = assert.strict;
|
|
|
|
var objectKeys = Object.keys || function (obj) {
|
|
var keys = [];
|
|
for (var key in obj) {
|
|
if (hasOwn.call(obj, key)) keys.push(key);
|
|
}
|
|
return keys;
|
|
};
|
|
|
|
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
|
},{"object-assign":11,"util/":6}],4:[function(require,module,exports){
|
|
if (typeof Object.create === 'function') {
|
|
// implementation from standard node.js 'util' module
|
|
module.exports = function inherits(ctor, superCtor) {
|
|
ctor.super_ = superCtor
|
|
ctor.prototype = Object.create(superCtor.prototype, {
|
|
constructor: {
|
|
value: ctor,
|
|
enumerable: false,
|
|
writable: true,
|
|
configurable: true
|
|
}
|
|
});
|
|
};
|
|
} else {
|
|
// old school shim for old browsers
|
|
module.exports = function inherits(ctor, superCtor) {
|
|
ctor.super_ = superCtor
|
|
var TempCtor = function () {}
|
|
TempCtor.prototype = superCtor.prototype
|
|
ctor.prototype = new TempCtor()
|
|
ctor.prototype.constructor = ctor
|
|
}
|
|
}
|
|
|
|
},{}],5:[function(require,module,exports){
|
|
module.exports = function isBuffer(arg) {
|
|
return arg && typeof arg === 'object'
|
|
&& typeof arg.copy === 'function'
|
|
&& typeof arg.fill === 'function'
|
|
&& typeof arg.readUInt8 === 'function';
|
|
}
|
|
},{}],6:[function(require,module,exports){
|
|
(function (process,global){
|
|
// Copyright Joyent, Inc. and other Node contributors.
|
|
//
|
|
// 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.
|
|
|
|
var formatRegExp = /%[sdj%]/g;
|
|
exports.format = function(f) {
|
|
if (!isString(f)) {
|
|
var objects = [];
|
|
for (var i = 0; i < arguments.length; i++) {
|
|
objects.push(inspect(arguments[i]));
|
|
}
|
|
return objects.join(' ');
|
|
}
|
|
|
|
var i = 1;
|
|
var args = arguments;
|
|
var len = args.length;
|
|
var str = String(f).replace(formatRegExp, function(x) {
|
|
if (x === '%%') return '%';
|
|
if (i >= len) return x;
|
|
switch (x) {
|
|
case '%s': return String(args[i++]);
|
|
case '%d': return Number(args[i++]);
|
|
case '%j':
|
|
try {
|
|
return JSON.stringify(args[i++]);
|
|
} catch (_) {
|
|
return '[Circular]';
|
|
}
|
|
default:
|
|
return x;
|
|
}
|
|
});
|
|
for (var x = args[i]; i < len; x = args[++i]) {
|
|
if (isNull(x) || !isObject(x)) {
|
|
str += ' ' + x;
|
|
} else {
|
|
str += ' ' + inspect(x);
|
|
}
|
|
}
|
|
return str;
|
|
};
|
|
|
|
|
|
// Mark that a method should not be used.
|
|
// Returns a modified function which warns once by default.
|
|
// If --no-deprecation is set, then it is a no-op.
|
|
exports.deprecate = function(fn, msg) {
|
|
// Allow for deprecating things in the process of starting up.
|
|
if (isUndefined(global.process)) {
|
|
return function() {
|
|
return exports.deprecate(fn, msg).apply(this, arguments);
|
|
};
|
|
}
|
|
|
|
if (process.noDeprecation === true) {
|
|
return fn;
|
|
}
|
|
|
|
var warned = false;
|
|
function deprecated() {
|
|
if (!warned) {
|
|
if (process.throwDeprecation) {
|
|
throw new Error(msg);
|
|
} else if (process.traceDeprecation) {
|
|
console.trace(msg);
|
|
} else {
|
|
console.error(msg);
|
|
}
|
|
warned = true;
|
|
}
|
|
return fn.apply(this, arguments);
|
|
}
|
|
|
|
return deprecated;
|
|
};
|
|
|
|
|
|
var debugs = {};
|
|
var debugEnviron;
|
|
exports.debuglog = function(set) {
|
|
if (isUndefined(debugEnviron))
|
|
debugEnviron = process.env.NODE_DEBUG || '';
|
|
set = set.toUpperCase();
|
|
if (!debugs[set]) {
|
|
if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) {
|
|
var pid = process.pid;
|
|
debugs[set] = function() {
|
|
var msg = exports.format.apply(exports, arguments);
|
|
console.error('%s %d: %s', set, pid, msg);
|
|
};
|
|
} else {
|
|
debugs[set] = function() {};
|
|
}
|
|
}
|
|
return debugs[set];
|
|
};
|
|
|
|
|
|
/**
|
|
* Echos the value of a value. Trys to print the value out
|
|
* in the best way possible given the different types.
|
|
*
|
|
* @param {Object} obj The object to print out.
|
|
* @param {Object} opts Optional options object that alters the output.
|
|
*/
|
|
/* legacy: obj, showHidden, depth, colors*/
|
|
function inspect(obj, opts) {
|
|
// default options
|
|
var ctx = {
|
|
seen: [],
|
|
stylize: stylizeNoColor
|
|
};
|
|
// legacy...
|
|
if (arguments.length >= 3) ctx.depth = arguments[2];
|
|
if (arguments.length >= 4) ctx.colors = arguments[3];
|
|
if (isBoolean(opts)) {
|
|
// legacy...
|
|
ctx.showHidden = opts;
|
|
} else if (opts) {
|
|
// got an "options" object
|
|
exports._extend(ctx, opts);
|
|
}
|
|
// set default options
|
|
if (isUndefined(ctx.showHidden)) ctx.showHidden = false;
|
|
if (isUndefined(ctx.depth)) ctx.depth = 2;
|
|
if (isUndefined(ctx.colors)) ctx.colors = false;
|
|
if (isUndefined(ctx.customInspect)) ctx.customInspect = true;
|
|
if (ctx.colors) ctx.stylize = stylizeWithColor;
|
|
return formatValue(ctx, obj, ctx.depth);
|
|
}
|
|
exports.inspect = inspect;
|
|
|
|
|
|
// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics
|
|
inspect.colors = {
|
|
'bold' : [1, 22],
|
|
'italic' : [3, 23],
|
|
'underline' : [4, 24],
|
|
'inverse' : [7, 27],
|
|
'white' : [37, 39],
|
|
'grey' : [90, 39],
|
|
'black' : [30, 39],
|
|
'blue' : [34, 39],
|
|
'cyan' : [36, 39],
|
|
'green' : [32, 39],
|
|
'magenta' : [35, 39],
|
|
'red' : [31, 39],
|
|
'yellow' : [33, 39]
|
|
};
|
|
|
|
// Don't use 'blue' not visible on cmd.exe
|
|
inspect.styles = {
|
|
'special': 'cyan',
|
|
'number': 'yellow',
|
|
'boolean': 'yellow',
|
|
'undefined': 'grey',
|
|
'null': 'bold',
|
|
'string': 'green',
|
|
'date': 'magenta',
|
|
// "name": intentionally not styling
|
|
'regexp': 'red'
|
|
};
|
|
|
|
|
|
function stylizeWithColor(str, styleType) {
|
|
var style = inspect.styles[styleType];
|
|
|
|
if (style) {
|
|
return '\u001b[' + inspect.colors[style][0] + 'm' + str +
|
|
'\u001b[' + inspect.colors[style][1] + 'm';
|
|
} else {
|
|
return str;
|
|
}
|
|
}
|
|
|
|
|
|
function stylizeNoColor(str, styleType) {
|
|
return str;
|
|
}
|
|
|
|
|
|
function arrayToHash(array) {
|
|
var hash = {};
|
|
|
|
array.forEach(function(val, idx) {
|
|
hash[val] = true;
|
|
});
|
|
|
|
return hash;
|
|
}
|
|
|
|
|
|
function formatValue(ctx, value, recurseTimes) {
|
|
// Provide a hook for user-specified inspect functions.
|
|
// Check that value is an object with an inspect function on it
|
|
if (ctx.customInspect &&
|
|
value &&
|
|
isFunction(value.inspect) &&
|
|
// Filter out the util module, it's inspect function is special
|
|
value.inspect !== exports.inspect &&
|
|
// Also filter out any prototype objects using the circular check.
|
|
!(value.constructor && value.constructor.prototype === value)) {
|
|
var ret = value.inspect(recurseTimes, ctx);
|
|
if (!isString(ret)) {
|
|
ret = formatValue(ctx, ret, recurseTimes);
|
|
}
|
|
return ret;
|
|
}
|
|
|
|
// Primitive types cannot have properties
|
|
var primitive = formatPrimitive(ctx, value);
|
|
if (primitive) {
|
|
return primitive;
|
|
}
|
|
|
|
// Look up the keys of the object.
|
|
var keys = Object.keys(value);
|
|
var visibleKeys = arrayToHash(keys);
|
|
|
|
if (ctx.showHidden) {
|
|
keys = Object.getOwnPropertyNames(value);
|
|
}
|
|
|
|
// IE doesn't make error fields non-enumerable
|
|
// http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx
|
|
if (isError(value)
|
|
&& (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) {
|
|
return formatError(value);
|
|
}
|
|
|
|
// Some type of object without properties can be shortcutted.
|
|
if (keys.length === 0) {
|
|
if (isFunction(value)) {
|
|
var name = value.name ? ': ' + value.name : '';
|
|
return ctx.stylize('[Function' + name + ']', 'special');
|
|
}
|
|
if (isRegExp(value)) {
|
|
return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
|
|
}
|
|
if (isDate(value)) {
|
|
return ctx.stylize(Date.prototype.toString.call(value), 'date');
|
|
}
|
|
if (isError(value)) {
|
|
return formatError(value);
|
|
}
|
|
}
|
|
|
|
var base = '', array = false, braces = ['{', '}'];
|
|
|
|
// Make Array say that they are Array
|
|
if (isArray(value)) {
|
|
array = true;
|
|
braces = ['[', ']'];
|
|
}
|
|
|
|
// Make functions say that they are functions
|
|
if (isFunction(value)) {
|
|
var n = value.name ? ': ' + value.name : '';
|
|
base = ' [Function' + n + ']';
|
|
}
|
|
|
|
// Make RegExps say that they are RegExps
|
|
if (isRegExp(value)) {
|
|
base = ' ' + RegExp.prototype.toString.call(value);
|
|
}
|
|
|
|
// Make dates with properties first say the date
|
|
if (isDate(value)) {
|
|
base = ' ' + Date.prototype.toUTCString.call(value);
|
|
}
|
|
|
|
// Make error with message first say the error
|
|
if (isError(value)) {
|
|
base = ' ' + formatError(value);
|
|
}
|
|
|
|
if (keys.length === 0 && (!array || value.length == 0)) {
|
|
return braces[0] + base + braces[1];
|
|
}
|
|
|
|
if (recurseTimes < 0) {
|
|
if (isRegExp(value)) {
|
|
return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
|
|
} else {
|
|
return ctx.stylize('[Object]', 'special');
|
|
}
|
|
}
|
|
|
|
ctx.seen.push(value);
|
|
|
|
var output;
|
|
if (array) {
|
|
output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);
|
|
} else {
|
|
output = keys.map(function(key) {
|
|
return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);
|
|
});
|
|
}
|
|
|
|
ctx.seen.pop();
|
|
|
|
return reduceToSingleString(output, base, braces);
|
|
}
|
|
|
|
|
|
function formatPrimitive(ctx, value) {
|
|
if (isUndefined(value))
|
|
return ctx.stylize('undefined', 'undefined');
|
|
if (isString(value)) {
|
|
var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '')
|
|
.replace(/'/g, "\\'")
|
|
.replace(/\\"/g, '"') + '\'';
|
|
return ctx.stylize(simple, 'string');
|
|
}
|
|
if (isNumber(value))
|
|
return ctx.stylize('' + value, 'number');
|
|
if (isBoolean(value))
|
|
return ctx.stylize('' + value, 'boolean');
|
|
// For some reason typeof null is "object", so special case here.
|
|
if (isNull(value))
|
|
return ctx.stylize('null', 'null');
|
|
}
|
|
|
|
|
|
function formatError(value) {
|
|
return '[' + Error.prototype.toString.call(value) + ']';
|
|
}
|
|
|
|
|
|
function formatArray(ctx, value, recurseTimes, visibleKeys, keys) {
|
|
var output = [];
|
|
for (var i = 0, l = value.length; i < l; ++i) {
|
|
if (hasOwnProperty(value, String(i))) {
|
|
output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,
|
|
String(i), true));
|
|
} else {
|
|
output.push('');
|
|
}
|
|
}
|
|
keys.forEach(function(key) {
|
|
if (!key.match(/^\d+$/)) {
|
|
output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,
|
|
key, true));
|
|
}
|
|
});
|
|
return output;
|
|
}
|
|
|
|
|
|
function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {
|
|
var name, str, desc;
|
|
desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] };
|
|
if (desc.get) {
|
|
if (desc.set) {
|
|
str = ctx.stylize('[Getter/Setter]', 'special');
|
|
} else {
|
|
str = ctx.stylize('[Getter]', 'special');
|
|
}
|
|
} else {
|
|
if (desc.set) {
|
|
str = ctx.stylize('[Setter]', 'special');
|
|
}
|
|
}
|
|
if (!hasOwnProperty(visibleKeys, key)) {
|
|
name = '[' + key + ']';
|
|
}
|
|
if (!str) {
|
|
if (ctx.seen.indexOf(desc.value) < 0) {
|
|
if (isNull(recurseTimes)) {
|
|
str = formatValue(ctx, desc.value, null);
|
|
} else {
|
|
str = formatValue(ctx, desc.value, recurseTimes - 1);
|
|
}
|
|
if (str.indexOf('\n') > -1) {
|
|
if (array) {
|
|
str = str.split('\n').map(function(line) {
|
|
return ' ' + line;
|
|
}).join('\n').substr(2);
|
|
} else {
|
|
str = '\n' + str.split('\n').map(function(line) {
|
|
return ' ' + line;
|
|
}).join('\n');
|
|
}
|
|
}
|
|
} else {
|
|
str = ctx.stylize('[Circular]', 'special');
|
|
}
|
|
}
|
|
if (isUndefined(name)) {
|
|
if (array && key.match(/^\d+$/)) {
|
|
return str;
|
|
}
|
|
name = JSON.stringify('' + key);
|
|
if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) {
|
|
name = name.substr(1, name.length - 2);
|
|
name = ctx.stylize(name, 'name');
|
|
} else {
|
|
name = name.replace(/'/g, "\\'")
|
|
.replace(/\\"/g, '"')
|
|
.replace(/(^"|"$)/g, "'");
|
|
name = ctx.stylize(name, 'string');
|
|
}
|
|
}
|
|
|
|
return name + ': ' + str;
|
|
}
|
|
|
|
|
|
function reduceToSingleString(output, base, braces) {
|
|
var numLinesEst = 0;
|
|
var length = output.reduce(function(prev, cur) {
|
|
numLinesEst++;
|
|
if (cur.indexOf('\n') >= 0) numLinesEst++;
|
|
return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1;
|
|
}, 0);
|
|
|
|
if (length > 60) {
|
|
return braces[0] +
|
|
(base === '' ? '' : base + '\n ') +
|
|
' ' +
|
|
output.join(',\n ') +
|
|
' ' +
|
|
braces[1];
|
|
}
|
|
|
|
return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];
|
|
}
|
|
|
|
|
|
// NOTE: These type checking functions intentionally don't use `instanceof`
|
|
// because it is fragile and can be easily faked with `Object.create()`.
|
|
function isArray(ar) {
|
|
return Array.isArray(ar);
|
|
}
|
|
exports.isArray = isArray;
|
|
|
|
function isBoolean(arg) {
|
|
return typeof arg === 'boolean';
|
|
}
|
|
exports.isBoolean = isBoolean;
|
|
|
|
function isNull(arg) {
|
|
return arg === null;
|
|
}
|
|
exports.isNull = isNull;
|
|
|
|
function isNullOrUndefined(arg) {
|
|
return arg == null;
|
|
}
|
|
exports.isNullOrUndefined = isNullOrUndefined;
|
|
|
|
function isNumber(arg) {
|
|
return typeof arg === 'number';
|
|
}
|
|
exports.isNumber = isNumber;
|
|
|
|
function isString(arg) {
|
|
return typeof arg === 'string';
|
|
}
|
|
exports.isString = isString;
|
|
|
|
function isSymbol(arg) {
|
|
return typeof arg === 'symbol';
|
|
}
|
|
exports.isSymbol = isSymbol;
|
|
|
|
function isUndefined(arg) {
|
|
return arg === void 0;
|
|
}
|
|
exports.isUndefined = isUndefined;
|
|
|
|
function isRegExp(re) {
|
|
return isObject(re) && objectToString(re) === '[object RegExp]';
|
|
}
|
|
exports.isRegExp = isRegExp;
|
|
|
|
function isObject(arg) {
|
|
return typeof arg === 'object' && arg !== null;
|
|
}
|
|
exports.isObject = isObject;
|
|
|
|
function isDate(d) {
|
|
return isObject(d) && objectToString(d) === '[object Date]';
|
|
}
|
|
exports.isDate = isDate;
|
|
|
|
function isError(e) {
|
|
return isObject(e) &&
|
|
(objectToString(e) === '[object Error]' || e instanceof Error);
|
|
}
|
|
exports.isError = isError;
|
|
|
|
function isFunction(arg) {
|
|
return typeof arg === 'function';
|
|
}
|
|
exports.isFunction = isFunction;
|
|
|
|
function isPrimitive(arg) {
|
|
return arg === null ||
|
|
typeof arg === 'boolean' ||
|
|
typeof arg === 'number' ||
|
|
typeof arg === 'string' ||
|
|
typeof arg === 'symbol' || // ES6 symbol
|
|
typeof arg === 'undefined';
|
|
}
|
|
exports.isPrimitive = isPrimitive;
|
|
|
|
exports.isBuffer = require('./support/isBuffer');
|
|
|
|
function objectToString(o) {
|
|
return Object.prototype.toString.call(o);
|
|
}
|
|
|
|
|
|
function pad(n) {
|
|
return n < 10 ? '0' + n.toString(10) : n.toString(10);
|
|
}
|
|
|
|
|
|
var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep',
|
|
'Oct', 'Nov', 'Dec'];
|
|
|
|
// 26 Feb 16:19:34
|
|
function timestamp() {
|
|
var d = new Date();
|
|
var time = [pad(d.getHours()),
|
|
pad(d.getMinutes()),
|
|
pad(d.getSeconds())].join(':');
|
|
return [d.getDate(), months[d.getMonth()], time].join(' ');
|
|
}
|
|
|
|
|
|
// log is just a thin wrapper to console.log that prepends a timestamp
|
|
exports.log = function() {
|
|
console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments));
|
|
};
|
|
|
|
|
|
/**
|
|
* Inherit the prototype methods from one constructor into another.
|
|
*
|
|
* The Function.prototype.inherits from lang.js rewritten as a standalone
|
|
* function (not on Function.prototype). NOTE: If this file is to be loaded
|
|
* during bootstrapping this function needs to be rewritten using some native
|
|
* functions as prototype setup using normal JavaScript does not work as
|
|
* expected during bootstrapping (see mirror.js in r114903).
|
|
*
|
|
* @param {function} ctor Constructor function which needs to inherit the
|
|
* prototype.
|
|
* @param {function} superCtor Constructor function to inherit prototype from.
|
|
*/
|
|
exports.inherits = require('inherits');
|
|
|
|
exports._extend = function(origin, add) {
|
|
// Don't do anything if add isn't an object
|
|
if (!add || !isObject(add)) return origin;
|
|
|
|
var keys = Object.keys(add);
|
|
var i = keys.length;
|
|
while (i--) {
|
|
origin[keys[i]] = add[keys[i]];
|
|
}
|
|
return origin;
|
|
};
|
|
|
|
function hasOwnProperty(obj, prop) {
|
|
return Object.prototype.hasOwnProperty.call(obj, prop);
|
|
}
|
|
|
|
}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
|
},{"./support/isBuffer":5,"_process":12,"inherits":4}],7:[function(require,module,exports){
|
|
'use strict'
|
|
|
|
exports.byteLength = byteLength
|
|
exports.toByteArray = toByteArray
|
|
exports.fromByteArray = fromByteArray
|
|
|
|
var lookup = []
|
|
var revLookup = []
|
|
var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array
|
|
|
|
var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
|
|
for (var i = 0, len = code.length; i < len; ++i) {
|
|
lookup[i] = code[i]
|
|
revLookup[code.charCodeAt(i)] = i
|
|
}
|
|
|
|
// Support decoding URL-safe base64 strings, as Node.js does.
|
|
// See: https://en.wikipedia.org/wiki/Base64#URL_applications
|
|
revLookup['-'.charCodeAt(0)] = 62
|
|
revLookup['_'.charCodeAt(0)] = 63
|
|
|
|
function getLens (b64) {
|
|
var len = b64.length
|
|
|
|
if (len % 4 > 0) {
|
|
throw new Error('Invalid string. Length must be a multiple of 4')
|
|
}
|
|
|
|
// Trim off extra bytes after placeholder bytes are found
|
|
// See: https://github.com/beatgammit/base64-js/issues/42
|
|
var validLen = b64.indexOf('=')
|
|
if (validLen === -1) validLen = len
|
|
|
|
var placeHoldersLen = validLen === len
|
|
? 0
|
|
: 4 - (validLen % 4)
|
|
|
|
return [validLen, placeHoldersLen]
|
|
}
|
|
|
|
// base64 is 4/3 + up to two characters of the original data
|
|
function byteLength (b64) {
|
|
var lens = getLens(b64)
|
|
var validLen = lens[0]
|
|
var placeHoldersLen = lens[1]
|
|
return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen
|
|
}
|
|
|
|
function _byteLength (b64, validLen, placeHoldersLen) {
|
|
return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen
|
|
}
|
|
|
|
function toByteArray (b64) {
|
|
var tmp
|
|
var lens = getLens(b64)
|
|
var validLen = lens[0]
|
|
var placeHoldersLen = lens[1]
|
|
|
|
var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))
|
|
|
|
var curByte = 0
|
|
|
|
// if there are placeholders, only get up to the last complete 4 chars
|
|
var len = placeHoldersLen > 0
|
|
? validLen - 4
|
|
: validLen
|
|
|
|
var i
|
|
for (i = 0; i < len; i += 4) {
|
|
tmp =
|
|
(revLookup[b64.charCodeAt(i)] << 18) |
|
|
(revLookup[b64.charCodeAt(i + 1)] << 12) |
|
|
(revLookup[b64.charCodeAt(i + 2)] << 6) |
|
|
revLookup[b64.charCodeAt(i + 3)]
|
|
arr[curByte++] = (tmp >> 16) & 0xFF
|
|
arr[curByte++] = (tmp >> 8) & 0xFF
|
|
arr[curByte++] = tmp & 0xFF
|
|
}
|
|
|
|
if (placeHoldersLen === 2) {
|
|
tmp =
|
|
(revLookup[b64.charCodeAt(i)] << 2) |
|
|
(revLookup[b64.charCodeAt(i + 1)] >> 4)
|
|
arr[curByte++] = tmp & 0xFF
|
|
}
|
|
|
|
if (placeHoldersLen === 1) {
|
|
tmp =
|
|
(revLookup[b64.charCodeAt(i)] << 10) |
|
|
(revLookup[b64.charCodeAt(i + 1)] << 4) |
|
|
(revLookup[b64.charCodeAt(i + 2)] >> 2)
|
|
arr[curByte++] = (tmp >> 8) & 0xFF
|
|
arr[curByte++] = tmp & 0xFF
|
|
}
|
|
|
|
return arr
|
|
}
|
|
|
|
function tripletToBase64 (num) {
|
|
return lookup[num >> 18 & 0x3F] +
|
|
lookup[num >> 12 & 0x3F] +
|
|
lookup[num >> 6 & 0x3F] +
|
|
lookup[num & 0x3F]
|
|
}
|
|
|
|
function encodeChunk (uint8, start, end) {
|
|
var tmp
|
|
var output = []
|
|
for (var i = start; i < end; i += 3) {
|
|
tmp =
|
|
((uint8[i] << 16) & 0xFF0000) +
|
|
((uint8[i + 1] << 8) & 0xFF00) +
|
|
(uint8[i + 2] & 0xFF)
|
|
output.push(tripletToBase64(tmp))
|
|
}
|
|
return output.join('')
|
|
}
|
|
|
|
function fromByteArray (uint8) {
|
|
var tmp
|
|
var len = uint8.length
|
|
var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes
|
|
var parts = []
|
|
var maxChunkLength = 16383 // must be multiple of 3
|
|
|
|
// go through the array every three bytes, we'll deal with trailing stuff later
|
|
for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {
|
|
parts.push(encodeChunk(
|
|
uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)
|
|
))
|
|
}
|
|
|
|
// pad the end with zeros, but make sure to not forget the extra bytes
|
|
if (extraBytes === 1) {
|
|
tmp = uint8[len - 1]
|
|
parts.push(
|
|
lookup[tmp >> 2] +
|
|
lookup[(tmp << 4) & 0x3F] +
|
|
'=='
|
|
)
|
|
} else if (extraBytes === 2) {
|
|
tmp = (uint8[len - 2] << 8) + uint8[len - 1]
|
|
parts.push(
|
|
lookup[tmp >> 10] +
|
|
lookup[(tmp >> 4) & 0x3F] +
|
|
lookup[(tmp << 2) & 0x3F] +
|
|
'='
|
|
)
|
|
}
|
|
|
|
return parts.join('')
|
|
}
|
|
|
|
},{}],8:[function(require,module,exports){
|
|
var bigInt = (function (undefined) {
|
|
"use strict";
|
|
|
|
var BASE = 1e7,
|
|
LOG_BASE = 7,
|
|
MAX_INT = 9007199254740992,
|
|
MAX_INT_ARR = smallToArray(MAX_INT),
|
|
DEFAULT_ALPHABET = "0123456789abcdefghijklmnopqrstuvwxyz";
|
|
|
|
var supportsNativeBigInt = typeof BigInt === "function";
|
|
|
|
function Integer(v, radix, alphabet, caseSensitive) {
|
|
if (typeof v === "undefined") return Integer[0];
|
|
if (typeof radix !== "undefined") return +radix === 10 && !alphabet ? parseValue(v) : parseBase(v, radix, alphabet, caseSensitive);
|
|
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 NativeBigInt(value) {
|
|
this.value = value;
|
|
}
|
|
NativeBigInt.prototype = Object.create(Integer.prototype);
|
|
|
|
function isPrecise(n) {
|
|
return -MAX_INT < n && n < MAX_INT;
|
|
}
|
|
|
|
function smallToArray(n) { // For performance reasons doesn't reference BASE, need to change this function if BASE changes
|
|
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) { // If BASE changes this function may need to change
|
|
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) { // function shamelessly stolen from Yaffle's library https://github.com/Yaffle/BigInteger
|
|
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) { // assumes a and b are arrays with a.length >= b.length
|
|
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) { // assumes a is array, carry is number with 0 <= carry < MAX_INT
|
|
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 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;
|
|
|
|
NativeBigInt.prototype.add = function (v) {
|
|
return new NativeBigInt(this.value + parseValue(v).value);
|
|
}
|
|
NativeBigInt.prototype.plus = NativeBigInt.prototype.add;
|
|
|
|
function subtract(a, b) { // assumes a and b are arrays with 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;
|
|
if (compareAbs(a, b) >= 0) {
|
|
value = subtract(a, b);
|
|
} else {
|
|
value = 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) { // assumes a is array, b is number with 0 <= b < MAX_INT
|
|
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 subtractSmall(b, Math.abs(a), a >= 0);
|
|
};
|
|
SmallInteger.prototype.minus = SmallInteger.prototype.subtract;
|
|
|
|
NativeBigInt.prototype.subtract = function (v) {
|
|
return new NativeBigInt(this.value - parseValue(v).value);
|
|
}
|
|
NativeBigInt.prototype.minus = NativeBigInt.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;
|
|
};
|
|
NativeBigInt.prototype.negate = function () {
|
|
return new NativeBigInt(-this.value);
|
|
}
|
|
|
|
BigInteger.prototype.abs = function () {
|
|
return new BigInteger(this.value, false);
|
|
};
|
|
SmallInteger.prototype.abs = function () {
|
|
return new SmallInteger(Math.abs(this.value));
|
|
};
|
|
NativeBigInt.prototype.abs = function () {
|
|
return new NativeBigInt(this.value >= 0 ? this.value : -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) { // assumes a is array, b is number with |b| < BASE
|
|
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;
|
|
}
|
|
|
|
// The following function is derived from a surface fit of a graph plotting the performance difference
|
|
// between long multiplication and karatsuba multiplication versus the lengths of the two arrays.
|
|
function useKaratsuba(l1, l2) {
|
|
return -0.012 * l1 - 0.012 * l2 + 0.000015 * l1 * l2 > 0;
|
|
}
|
|
|
|
BigInteger.prototype.multiply = function (v) {
|
|
var 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)) // Karatsuba is only faster for certain array sizes
|
|
return new BigInteger(multiplyKaratsuba(a, b), sign);
|
|
return new BigInteger(multiplyLong(a, b), sign);
|
|
};
|
|
|
|
BigInteger.prototype.times = BigInteger.prototype.multiply;
|
|
|
|
function multiplySmallAndArray(a, b, sign) { // a >= 0
|
|
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;
|
|
|
|
NativeBigInt.prototype.multiply = function (v) {
|
|
return new NativeBigInt(this.value * parseValue(v).value);
|
|
}
|
|
NativeBigInt.prototype.times = NativeBigInt.prototype.multiply;
|
|
|
|
function square(a) {
|
|
//console.assert(2 * BASE * BASE < MAX_INT);
|
|
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];
|
|
carry = 0 - a_i * a_i;
|
|
for (var j = i; j < l; j++) {
|
|
a_j = a[j];
|
|
product = 2 * (a_i * a_j) + r[i + j] + carry;
|
|
carry = Math.floor(product / base);
|
|
r[i + j] = product - carry * base;
|
|
}
|
|
r[i + l] = 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);
|
|
};
|
|
|
|
NativeBigInt.prototype.square = function (v) {
|
|
return new NativeBigInt(this.value * this.value);
|
|
}
|
|
|
|
function divMod1(a, b) { // Left over from previous version. Performs faster than divMod2 on smaller input sizes.
|
|
var a_l = a.length,
|
|
b_l = b.length,
|
|
base = BASE,
|
|
result = createArray(b.length),
|
|
divisorMostSignificantDigit = b[b_l - 1],
|
|
// normalization
|
|
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);
|
|
}
|
|
// quotientDigit <= base - 1
|
|
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;
|
|
}
|
|
// denormalization
|
|
remainder = divModSmall(remainder, lambda)[0];
|
|
return [arrayToSmall(result), arrayToSmall(remainder)];
|
|
}
|
|
|
|
function divMod2(a, b) { // Implementation idea shamelessly stolen from Silent Matt's library http://silentmatt.com/biginteger/
|
|
// Performs faster than divMod1 on larger input sizes.
|
|
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);
|
|
if (supportsNativeBigInt) {
|
|
return [new NativeBigInt(self.value / n.value), new NativeBigInt(self.value % n.value)];
|
|
}
|
|
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]];
|
|
|
|
// divMod1 is faster on smaller input sizes
|
|
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]
|
|
};
|
|
};
|
|
NativeBigInt.prototype.divmod = SmallInteger.prototype.divmod = BigInteger.prototype.divmod;
|
|
|
|
|
|
BigInteger.prototype.divide = function (v) {
|
|
return divModAny(this, v)[0];
|
|
};
|
|
NativeBigInt.prototype.over = NativeBigInt.prototype.divide = function (v) {
|
|
return new NativeBigInt(this.value / parseValue(v).value);
|
|
};
|
|
SmallInteger.prototype.over = SmallInteger.prototype.divide = BigInteger.prototype.over = BigInteger.prototype.divide;
|
|
|
|
BigInteger.prototype.mod = function (v) {
|
|
return divModAny(this, v)[1];
|
|
};
|
|
NativeBigInt.prototype.mod = NativeBigInt.prototype.remainder = function (v) {
|
|
return new NativeBigInt(this.value % parseValue(v).value);
|
|
};
|
|
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;
|
|
|
|
NativeBigInt.prototype.pow = function (v) {
|
|
var n = parseValue(v);
|
|
var a = this.value, b = n.value;
|
|
var _0 = BigInt(0), _1 = BigInt(1), _2 = BigInt(2);
|
|
if (b === _0) return Integer[1];
|
|
if (a === _0) return Integer[0];
|
|
if (a === _1) return Integer[1];
|
|
if (a === BigInt(-1)) return n.isEven() ? Integer[1] : Integer[-1];
|
|
if (n.isNegative()) return new NativeBigInt(_0);
|
|
var x = this;
|
|
var 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;
|
|
}
|
|
|
|
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);
|
|
if (exp.isNegative()) {
|
|
exp = exp.multiply(Integer[-1]);
|
|
base = base.modInv(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;
|
|
};
|
|
NativeBigInt.prototype.modPow = 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;
|
|
};
|
|
NativeBigInt.prototype.compareAbs = function (v) {
|
|
var a = this.value;
|
|
var b = parseValue(v).value;
|
|
a = a >= 0 ? a : -a;
|
|
b = b >= 0 ? b : -b;
|
|
return a === b ? 0 : a > b ? 1 : -1;
|
|
}
|
|
|
|
BigInteger.prototype.compare = function (v) {
|
|
// See discussion about comparison with Infinity:
|
|
// https://github.com/peterolson/BigInteger.js/issues/61
|
|
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;
|
|
|
|
SmallInteger.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;
|
|
|
|
NativeBigInt.prototype.compare = function (v) {
|
|
if (v === Infinity) {
|
|
return -1;
|
|
}
|
|
if (v === -Infinity) {
|
|
return 1;
|
|
}
|
|
var a = this.value;
|
|
var b = parseValue(v).value;
|
|
return a === b ? 0 : a > b ? 1 : -1;
|
|
}
|
|
NativeBigInt.prototype.compareTo = NativeBigInt.prototype.compare;
|
|
|
|
BigInteger.prototype.equals = function (v) {
|
|
return this.compare(v) === 0;
|
|
};
|
|
NativeBigInt.prototype.eq = NativeBigInt.prototype.equals = SmallInteger.prototype.eq = SmallInteger.prototype.equals = BigInteger.prototype.eq = BigInteger.prototype.equals;
|
|
|
|
BigInteger.prototype.notEquals = function (v) {
|
|
return this.compare(v) !== 0;
|
|
};
|
|
NativeBigInt.prototype.neq = NativeBigInt.prototype.notEquals = SmallInteger.prototype.neq = SmallInteger.prototype.notEquals = BigInteger.prototype.neq = BigInteger.prototype.notEquals;
|
|
|
|
BigInteger.prototype.greater = function (v) {
|
|
return this.compare(v) > 0;
|
|
};
|
|
NativeBigInt.prototype.gt = NativeBigInt.prototype.greater = SmallInteger.prototype.gt = SmallInteger.prototype.greater = BigInteger.prototype.gt = BigInteger.prototype.greater;
|
|
|
|
BigInteger.prototype.lesser = function (v) {
|
|
return this.compare(v) < 0;
|
|
};
|
|
NativeBigInt.prototype.lt = NativeBigInt.prototype.lesser = SmallInteger.prototype.lt = SmallInteger.prototype.lesser = BigInteger.prototype.lt = BigInteger.prototype.lesser;
|
|
|
|
BigInteger.prototype.greaterOrEquals = function (v) {
|
|
return this.compare(v) >= 0;
|
|
};
|
|
NativeBigInt.prototype.geq = NativeBigInt.prototype.greaterOrEquals = SmallInteger.prototype.geq = SmallInteger.prototype.greaterOrEquals = BigInteger.prototype.geq = BigInteger.prototype.greaterOrEquals;
|
|
|
|
BigInteger.prototype.lesserOrEquals = function (v) {
|
|
return this.compare(v) <= 0;
|
|
};
|
|
NativeBigInt.prototype.leq = NativeBigInt.prototype.lesserOrEquals = 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;
|
|
};
|
|
NativeBigInt.prototype.isEven = function () {
|
|
return (this.value & BigInt(1)) === BigInt(0);
|
|
}
|
|
|
|
BigInteger.prototype.isOdd = function () {
|
|
return (this.value[0] & 1) === 1;
|
|
};
|
|
SmallInteger.prototype.isOdd = function () {
|
|
return (this.value & 1) === 1;
|
|
};
|
|
NativeBigInt.prototype.isOdd = function () {
|
|
return (this.value & BigInt(1)) === BigInt(1);
|
|
}
|
|
|
|
BigInteger.prototype.isPositive = function () {
|
|
return !this.sign;
|
|
};
|
|
SmallInteger.prototype.isPositive = function () {
|
|
return this.value > 0;
|
|
};
|
|
NativeBigInt.prototype.isPositive = SmallInteger.prototype.isPositive;
|
|
|
|
BigInteger.prototype.isNegative = function () {
|
|
return this.sign;
|
|
};
|
|
SmallInteger.prototype.isNegative = function () {
|
|
return this.value < 0;
|
|
};
|
|
NativeBigInt.prototype.isNegative = SmallInteger.prototype.isNegative;
|
|
|
|
BigInteger.prototype.isUnit = function () {
|
|
return false;
|
|
};
|
|
SmallInteger.prototype.isUnit = function () {
|
|
return Math.abs(this.value) === 1;
|
|
};
|
|
NativeBigInt.prototype.isUnit = function () {
|
|
return this.abs().value === BigInt(1);
|
|
}
|
|
|
|
BigInteger.prototype.isZero = function () {
|
|
return false;
|
|
};
|
|
SmallInteger.prototype.isZero = function () {
|
|
return this.value === 0;
|
|
};
|
|
NativeBigInt.prototype.isZero = function () {
|
|
return this.value === BigInt(0);
|
|
}
|
|
|
|
BigInteger.prototype.isDivisibleBy = function (v) {
|
|
var n = parseValue(v);
|
|
if (n.isZero()) return false;
|
|
if (n.isUnit()) return true;
|
|
if (n.compareAbs(2) === 0) return this.isEven();
|
|
return this.mod(n).isZero();
|
|
};
|
|
NativeBigInt.prototype.isDivisibleBy = 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(49)) return true;
|
|
// we don't know if it's prime: let the other functions figure it out
|
|
}
|
|
|
|
function millerRabinTest(n, a) {
|
|
var nPrev = n.prev(),
|
|
b = nPrev,
|
|
r = 0,
|
|
d, t, i, x;
|
|
while (b.isEven()) b = b.divide(2), r++;
|
|
next: for (i = 0; i < a.length; i++) {
|
|
if (n.lesser(a[i])) continue;
|
|
x = bigInt(a[i]).modPow(b, n);
|
|
if (x.isUnit() || x.equals(nPrev)) continue;
|
|
for (d = r - 1; d != 0; d--) {
|
|
x = x.square().mod(n);
|
|
if (x.isUnit()) return false;
|
|
if (x.equals(nPrev)) continue next;
|
|
}
|
|
return false;
|
|
}
|
|
return true;
|
|
}
|
|
|
|
// Set "strict" to true to force GRH-supported lower bound of 2*log(N)^2
|
|
BigInteger.prototype.isPrime = function (strict) {
|
|
var isPrime = isBasicPrime(this);
|
|
if (isPrime !== undefined) return isPrime;
|
|
var n = this.abs();
|
|
var bits = n.bitLength();
|
|
if (bits <= 64)
|
|
return millerRabinTest(n, [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37]);
|
|
var logN = Math.log(2) * bits.toJSNumber();
|
|
var t = Math.ceil((strict === true) ? (2 * Math.pow(logN, 2)) : logN);
|
|
for (var a = [], i = 0; i < t; i++) {
|
|
a.push(bigInt(i + 2));
|
|
}
|
|
return millerRabinTest(n, a);
|
|
};
|
|
NativeBigInt.prototype.isPrime = SmallInteger.prototype.isPrime = BigInteger.prototype.isPrime;
|
|
|
|
BigInteger.prototype.isProbablePrime = function (iterations, rng) {
|
|
var isPrime = isBasicPrime(this);
|
|
if (isPrime !== undefined) return isPrime;
|
|
var n = this.abs();
|
|
var t = iterations === undefined ? 5 : iterations;
|
|
for (var a = [], i = 0; i < t; i++) {
|
|
a.push(bigInt.randBetween(2, n.minus(2), rng));
|
|
}
|
|
return millerRabinTest(n, a);
|
|
};
|
|
NativeBigInt.prototype.isProbablePrime = 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.isZero()) {
|
|
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.isUnit()) 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();
|
|
}
|
|
return t;
|
|
};
|
|
|
|
NativeBigInt.prototype.modInv = 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);
|
|
};
|
|
NativeBigInt.prototype.next = function () {
|
|
return new NativeBigInt(this.value + BigInt(1));
|
|
}
|
|
|
|
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);
|
|
};
|
|
NativeBigInt.prototype.prev = function () {
|
|
return new NativeBigInt(this.value - BigInt(1));
|
|
}
|
|
|
|
var powersOfTwo = [1];
|
|
while (2 * 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 Math.abs(n) <= BASE;
|
|
}
|
|
|
|
BigInteger.prototype.shiftLeft = function (v) {
|
|
var n = parseValue(v).toJSNumber();
|
|
if (!shift_isSmall(n)) {
|
|
throw new Error(String(n) + " is too large for shifting.");
|
|
}
|
|
if (n < 0) return this.shiftRight(-n);
|
|
var result = this;
|
|
if (result.isZero()) return result;
|
|
while (n >= powers2Length) {
|
|
result = result.multiply(highestPower2);
|
|
n -= powers2Length - 1;
|
|
}
|
|
return result.multiply(powersOfTwo[n]);
|
|
};
|
|
NativeBigInt.prototype.shiftLeft = SmallInteger.prototype.shiftLeft = BigInteger.prototype.shiftLeft;
|
|
|
|
BigInteger.prototype.shiftRight = function (v) {
|
|
var remQuo;
|
|
var n = parseValue(v).toJSNumber();
|
|
if (!shift_isSmall(n)) {
|
|
throw new Error(String(n) + " is too large for shifting.");
|
|
}
|
|
if (n < 0) return this.shiftLeft(-n);
|
|
var result = this;
|
|
while (n >= powers2Length) {
|
|
if (result.isZero() || (result.isNegative() && result.isUnit())) 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];
|
|
};
|
|
NativeBigInt.prototype.shiftRight = 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 xDigit = 0, yDigit = 0;
|
|
var xDivMod = null, yDivMod = null;
|
|
var result = [];
|
|
while (!xRem.isZero() || !yRem.isZero()) {
|
|
xDivMod = divModAny(xRem, highestPower2);
|
|
xDigit = xDivMod[1].toJSNumber();
|
|
if (xSign) {
|
|
xDigit = highestPower2 - 1 - xDigit; // two's complement for negative numbers
|
|
}
|
|
|
|
yDivMod = divModAny(yRem, highestPower2);
|
|
yDigit = yDivMod[1].toJSNumber();
|
|
if (ySign) {
|
|
yDigit = highestPower2 - 1 - yDigit; // two's complement for negative numbers
|
|
}
|
|
|
|
xRem = xDivMod[0];
|
|
yRem = yDivMod[0];
|
|
result.push(fn(xDigit, yDigit));
|
|
}
|
|
var sum = fn(xSign ? 1 : 0, ySign ? 1 : 0) !== 0 ? bigInt(-1) : bigInt(0);
|
|
for (var i = result.length - 1; i >= 0; i -= 1) {
|
|
sum = sum.multiply(highestPower2).add(bigInt(result[i]));
|
|
}
|
|
return sum;
|
|
}
|
|
|
|
BigInteger.prototype.not = function () {
|
|
return this.negate().prev();
|
|
};
|
|
NativeBigInt.prototype.not = SmallInteger.prototype.not = BigInteger.prototype.not;
|
|
|
|
BigInteger.prototype.and = function (n) {
|
|
return bitwise(this, n, function (a, b) { return a & b; });
|
|
};
|
|
NativeBigInt.prototype.and = SmallInteger.prototype.and = BigInteger.prototype.and;
|
|
|
|
BigInteger.prototype.or = function (n) {
|
|
return bitwise(this, n, function (a, b) { return a | b; });
|
|
};
|
|
NativeBigInt.prototype.or = SmallInteger.prototype.or = BigInteger.prototype.or;
|
|
|
|
BigInteger.prototype.xor = function (n) {
|
|
return bitwise(this, n, function (a, b) { return a ^ b; });
|
|
};
|
|
NativeBigInt.prototype.xor = SmallInteger.prototype.xor = BigInteger.prototype.xor;
|
|
|
|
var LOBMASK_I = 1 << 30, LOBMASK_BI = (BASE & -BASE) * (BASE & -BASE) | LOBMASK_I;
|
|
function roughLOB(n) { // get lowestOneBit (rough)
|
|
// SmallInteger: return Min(lowestOneBit(n), 1 << 30)
|
|
// BigInteger: return Min(lowestOneBit(n), 1 << 14) [BASE=1e7]
|
|
var v = n.value,
|
|
x = typeof v === "number" ? v | LOBMASK_I :
|
|
typeof v === "bigint" ? v | BigInt(LOBMASK_I) :
|
|
v[0] + v[1] * BASE | LOBMASK_BI;
|
|
return x & -x;
|
|
}
|
|
|
|
function integerLogarithm(value, base) {
|
|
if (base.compareTo(value) <= 0) {
|
|
var tmp = integerLogarithm(value, base.square(base));
|
|
var p = tmp.p;
|
|
var e = tmp.e;
|
|
var t = p.multiply(base);
|
|
return t.compareTo(value) <= 0 ? { p: t, e: e * 2 + 1 } : { p: p, e: e * 2 };
|
|
}
|
|
return { p: bigInt(1), e: 0 };
|
|
}
|
|
|
|
BigInteger.prototype.bitLength = function () {
|
|
var n = this;
|
|
if (n.compareTo(bigInt(0)) < 0) {
|
|
n = n.negate().subtract(bigInt(1));
|
|
}
|
|
if (n.compareTo(bigInt(0)) === 0) {
|
|
return bigInt(0);
|
|
}
|
|
return bigInt(integerLogarithm(n, bigInt(2)).e).add(bigInt(1));
|
|
}
|
|
NativeBigInt.prototype.bitLength = SmallInteger.prototype.bitLength = BigInteger.prototype.bitLength;
|
|
|
|
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 = 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, rng) {
|
|
a = parseValue(a);
|
|
b = parseValue(b);
|
|
var usedRNG = rng || Math.random;
|
|
var low = min(a, b), high = max(a, b);
|
|
var range = high.subtract(low).add(1);
|
|
if (range.isSmall) return low.add(Math.floor(usedRNG() * range));
|
|
var digits = toBase(range, BASE).value;
|
|
var result = [], restricted = true;
|
|
for (var i = 0; i < digits.length; i++) {
|
|
var top = restricted ? digits[i] : BASE;
|
|
var digit = truncate(usedRNG() * top);
|
|
result.push(digit);
|
|
if (digit < top) restricted = false;
|
|
}
|
|
return low.add(Integer.fromArray(result, BASE, false));
|
|
}
|
|
|
|
var parseBase = function (text, base, alphabet, caseSensitive) {
|
|
alphabet = alphabet || DEFAULT_ALPHABET;
|
|
text = String(text);
|
|
if (!caseSensitive) {
|
|
text = text.toLowerCase();
|
|
alphabet = alphabet.toLowerCase();
|
|
}
|
|
var length = text.length;
|
|
var i;
|
|
var absBase = Math.abs(base);
|
|
var alphabetValues = {};
|
|
for (i = 0; i < alphabet.length; i++) {
|
|
alphabetValues[alphabet[i]] = i;
|
|
}
|
|
for (i = 0; i < length; i++) {
|
|
var c = text[i];
|
|
if (c === "-") continue;
|
|
if (c in alphabetValues) {
|
|
if (alphabetValues[c] >= absBase) {
|
|
if (c === "1" && absBase === 1) continue;
|
|
throw new Error(c + " is not a valid digit in base " + base + ".");
|
|
}
|
|
}
|
|
}
|
|
base = parseValue(base);
|
|
var digits = [];
|
|
var isNegative = text[0] === "-";
|
|
for (i = isNegative ? 1 : 0; i < text.length; i++) {
|
|
var c = text[i];
|
|
if (c in alphabetValues) digits.push(parseValue(alphabetValues[c]));
|
|
else if (c === "<") {
|
|
var start = i;
|
|
do { i++; } while (text[i] !== ">" && i < text.length);
|
|
digits.push(parseValue(text.slice(start + 1, i)));
|
|
}
|
|
else throw new Error(c + " is not a valid character");
|
|
}
|
|
return parseBaseFromArray(digits, base, isNegative);
|
|
};
|
|
|
|
function parseBaseFromArray(digits, base, isNegative) {
|
|
var val = Integer[0], pow = Integer[1], i;
|
|
for (i = digits.length - 1; i >= 0; i--) {
|
|
val = val.add(digits[i].times(pow));
|
|
pow = pow.times(base);
|
|
}
|
|
return isNegative ? val.negate() : val;
|
|
}
|
|
|
|
function stringify(digit, alphabet) {
|
|
alphabet = alphabet || DEFAULT_ALPHABET;
|
|
if (digit < alphabet.length) {
|
|
return alphabet[digit];
|
|
}
|
|
return "<" + digit + ">";
|
|
}
|
|
|
|
function toBase(n, base) {
|
|
base = bigInt(base);
|
|
if (base.isZero()) {
|
|
if (n.isZero()) return { value: [0], isNegative: false };
|
|
throw new Error("Cannot convert nonzero numbers to base 0.");
|
|
}
|
|
if (base.equals(-1)) {
|
|
if (n.isZero()) return { value: [0], isNegative: false };
|
|
if (n.isNegative())
|
|
return {
|
|
value: [].concat.apply([], Array.apply(null, Array(-n.toJSNumber()))
|
|
.map(Array.prototype.valueOf, [1, 0])
|
|
),
|
|
isNegative: false
|
|
};
|
|
|
|
var arr = Array.apply(null, Array(n.toJSNumber() - 1))
|
|
.map(Array.prototype.valueOf, [0, 1]);
|
|
arr.unshift([1]);
|
|
return {
|
|
value: [].concat.apply([], arr),
|
|
isNegative: false
|
|
};
|
|
}
|
|
|
|
var neg = false;
|
|
if (n.isNegative() && base.isPositive()) {
|
|
neg = true;
|
|
n = n.abs();
|
|
}
|
|
if (base.isUnit()) {
|
|
if (n.isZero()) return { value: [0], isNegative: false };
|
|
|
|
return {
|
|
value: Array.apply(null, Array(n.toJSNumber()))
|
|
.map(Number.prototype.valueOf, 1),
|
|
isNegative: neg
|
|
};
|
|
}
|
|
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(digit.toJSNumber());
|
|
}
|
|
out.push(left.toJSNumber());
|
|
return { value: out.reverse(), isNegative: neg };
|
|
}
|
|
|
|
function toBaseString(n, base, alphabet) {
|
|
var arr = toBase(n, base);
|
|
return (arr.isNegative ? "-" : "") + arr.value.map(function (x) {
|
|
return stringify(x, alphabet);
|
|
}).join('');
|
|
}
|
|
|
|
BigInteger.prototype.toArray = function (radix) {
|
|
return toBase(this, radix);
|
|
};
|
|
|
|
SmallInteger.prototype.toArray = function (radix) {
|
|
return toBase(this, radix);
|
|
};
|
|
|
|
NativeBigInt.prototype.toArray = function (radix) {
|
|
return toBase(this, radix);
|
|
};
|
|
|
|
BigInteger.prototype.toString = function (radix, alphabet) {
|
|
if (radix === undefined) radix = 10;
|
|
if (radix !== 10) return toBaseString(this, radix, alphabet);
|
|
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, alphabet) {
|
|
if (radix === undefined) radix = 10;
|
|
if (radix != 10) return toBaseString(this, radix, alphabet);
|
|
return String(this.value);
|
|
};
|
|
|
|
NativeBigInt.prototype.toString = SmallInteger.prototype.toString;
|
|
|
|
NativeBigInt.prototype.toJSON = BigInteger.prototype.toJSON = SmallInteger.prototype.toJSON = function () { return this.toString(); }
|
|
|
|
BigInteger.prototype.valueOf = function () {
|
|
return parseInt(this.toString(), 10);
|
|
};
|
|
BigInteger.prototype.toJSNumber = BigInteger.prototype.valueOf;
|
|
|
|
SmallInteger.prototype.valueOf = function () {
|
|
return this.value;
|
|
};
|
|
SmallInteger.prototype.toJSNumber = SmallInteger.prototype.valueOf;
|
|
NativeBigInt.prototype.valueOf = NativeBigInt.prototype.toJSNumber = function () {
|
|
return parseInt(this.toString(), 10);
|
|
}
|
|
|
|
function parseStringValue(v) {
|
|
if (isPrecise(+v)) {
|
|
var x = +v;
|
|
if (x === truncate(x))
|
|
return supportsNativeBigInt ? new NativeBigInt(BigInt(x)) : new SmallInteger(x);
|
|
throw new Error("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);
|
|
if (supportsNativeBigInt) {
|
|
return new NativeBigInt(BigInt(sign ? "-" + v : 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 BigInteger(r, sign);
|
|
}
|
|
|
|
function parseNumberValue(v) {
|
|
if (supportsNativeBigInt) {
|
|
return new NativeBigInt(BigInt(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);
|
|
}
|
|
if (typeof v === "bigint") {
|
|
return new NativeBigInt(v);
|
|
}
|
|
return v;
|
|
}
|
|
// Pre-define numbers in range [-999,999]
|
|
for (var i = 0; i < 1000; i++) {
|
|
Integer[i] = parseValue(i);
|
|
if (i > 0) Integer[-i] = parseValue(-i);
|
|
}
|
|
// Backwards compatibility
|
|
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 || x instanceof NativeBigInt; };
|
|
Integer.randBetween = randBetween;
|
|
|
|
Integer.fromArray = function (digits, base, isNegative) {
|
|
return parseBaseFromArray(digits.map(parseValue), parseValue(base || 10), isNegative);
|
|
};
|
|
|
|
return Integer;
|
|
})();
|
|
|
|
// Node.js check
|
|
if (typeof module !== "undefined" && module.hasOwnProperty("exports")) {
|
|
module.exports = bigInt;
|
|
}
|
|
|
|
//amd check
|
|
if (typeof define === "function" && define.amd) {
|
|
define( function () {
|
|
return bigInt;
|
|
});
|
|
}
|
|
|
|
},{}],9:[function(require,module,exports){
|
|
(function (Buffer){
|
|
/*!
|
|
* The buffer module from node.js, for the browser.
|
|
*
|
|
* @author Feross Aboukhadijeh <https://feross.org>
|
|
* @license MIT
|
|
*/
|
|
/* eslint-disable no-proto */
|
|
|
|
'use strict'
|
|
|
|
var base64 = require('base64-js')
|
|
var ieee754 = require('ieee754')
|
|
var customInspectSymbol =
|
|
(typeof Symbol === 'function' && typeof Symbol.for === 'function')
|
|
? Symbol.for('nodejs.util.inspect.custom')
|
|
: null
|
|
|
|
exports.Buffer = Buffer
|
|
exports.SlowBuffer = SlowBuffer
|
|
exports.INSPECT_MAX_BYTES = 50
|
|
|
|
var K_MAX_LENGTH = 0x7fffffff
|
|
exports.kMaxLength = K_MAX_LENGTH
|
|
|
|
/**
|
|
* If `Buffer.TYPED_ARRAY_SUPPORT`:
|
|
* === true Use Uint8Array implementation (fastest)
|
|
* === false Print warning and recommend using `buffer` v4.x which has an Object
|
|
* implementation (most compatible, even IE6)
|
|
*
|
|
* Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,
|
|
* Opera 11.6+, iOS 4.2+.
|
|
*
|
|
* We report that the browser does not support typed arrays if the are not subclassable
|
|
* using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array`
|
|
* (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support
|
|
* for __proto__ and has a buggy typed array implementation.
|
|
*/
|
|
Buffer.TYPED_ARRAY_SUPPORT = typedArraySupport()
|
|
|
|
if (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' &&
|
|
typeof console.error === 'function') {
|
|
console.error(
|
|
'This browser lacks typed array (Uint8Array) support which is required by ' +
|
|
'`buffer` v5.x. Use `buffer` v4.x if you require old browser support.'
|
|
)
|
|
}
|
|
|
|
function typedArraySupport () {
|
|
// Can typed array instances can be augmented?
|
|
try {
|
|
var arr = new Uint8Array(1)
|
|
var proto = { foo: function () { return 42 } }
|
|
Object.setPrototypeOf(proto, Uint8Array.prototype)
|
|
Object.setPrototypeOf(arr, proto)
|
|
return arr.foo() === 42
|
|
} catch (e) {
|
|
return false
|
|
}
|
|
}
|
|
|
|
Object.defineProperty(Buffer.prototype, 'parent', {
|
|
enumerable: true,
|
|
get: function () {
|
|
if (!Buffer.isBuffer(this)) return undefined
|
|
return this.buffer
|
|
}
|
|
})
|
|
|
|
Object.defineProperty(Buffer.prototype, 'offset', {
|
|
enumerable: true,
|
|
get: function () {
|
|
if (!Buffer.isBuffer(this)) return undefined
|
|
return this.byteOffset
|
|
}
|
|
})
|
|
|
|
function createBuffer (length) {
|
|
if (length > K_MAX_LENGTH) {
|
|
throw new RangeError('The value "' + length + '" is invalid for option "size"')
|
|
}
|
|
// Return an augmented `Uint8Array` instance
|
|
var buf = new Uint8Array(length)
|
|
Object.setPrototypeOf(buf, Buffer.prototype)
|
|
return buf
|
|
}
|
|
|
|
/**
|
|
* The Buffer constructor returns instances of `Uint8Array` that have their
|
|
* prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of
|
|
* `Uint8Array`, so the returned instances will have all the node `Buffer` methods
|
|
* and the `Uint8Array` methods. Square bracket notation works as expected -- it
|
|
* returns a single octet.
|
|
*
|
|
* The `Uint8Array` prototype remains unmodified.
|
|
*/
|
|
|
|
function Buffer (arg, encodingOrOffset, length) {
|
|
// Common case.
|
|
if (typeof arg === 'number') {
|
|
if (typeof encodingOrOffset === 'string') {
|
|
throw new TypeError(
|
|
'The "string" argument must be of type string. Received type number'
|
|
)
|
|
}
|
|
return allocUnsafe(arg)
|
|
}
|
|
return from(arg, encodingOrOffset, length)
|
|
}
|
|
|
|
// Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97
|
|
if (typeof Symbol !== 'undefined' && Symbol.species != null &&
|
|
Buffer[Symbol.species] === Buffer) {
|
|
Object.defineProperty(Buffer, Symbol.species, {
|
|
value: null,
|
|
configurable: true,
|
|
enumerable: false,
|
|
writable: false
|
|
})
|
|
}
|
|
|
|
Buffer.poolSize = 8192 // not used by this implementation
|
|
|
|
function from (value, encodingOrOffset, length) {
|
|
if (typeof value === 'string') {
|
|
return fromString(value, encodingOrOffset)
|
|
}
|
|
|
|
if (ArrayBuffer.isView(value)) {
|
|
return fromArrayLike(value)
|
|
}
|
|
|
|
if (value == null) {
|
|
throw new TypeError(
|
|
'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +
|
|
'or Array-like Object. Received type ' + (typeof value)
|
|
)
|
|
}
|
|
|
|
if (isInstance(value, ArrayBuffer) ||
|
|
(value && isInstance(value.buffer, ArrayBuffer))) {
|
|
return fromArrayBuffer(value, encodingOrOffset, length)
|
|
}
|
|
|
|
if (typeof SharedArrayBuffer !== 'undefined' &&
|
|
(isInstance(value, SharedArrayBuffer) ||
|
|
(value && isInstance(value.buffer, SharedArrayBuffer)))) {
|
|
return fromArrayBuffer(value, encodingOrOffset, length)
|
|
}
|
|
|
|
if (typeof value === 'number') {
|
|
throw new TypeError(
|
|
'The "value" argument must not be of type number. Received type number'
|
|
)
|
|
}
|
|
|
|
var valueOf = value.valueOf && value.valueOf()
|
|
if (valueOf != null && valueOf !== value) {
|
|
return Buffer.from(valueOf, encodingOrOffset, length)
|
|
}
|
|
|
|
var b = fromObject(value)
|
|
if (b) return b
|
|
|
|
if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null &&
|
|
typeof value[Symbol.toPrimitive] === 'function') {
|
|
return Buffer.from(
|
|
value[Symbol.toPrimitive]('string'), encodingOrOffset, length
|
|
)
|
|
}
|
|
|
|
throw new TypeError(
|
|
'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +
|
|
'or Array-like Object. Received type ' + (typeof value)
|
|
)
|
|
}
|
|
|
|
/**
|
|
* Functionally equivalent to Buffer(arg, encoding) but throws a TypeError
|
|
* if value is a number.
|
|
* Buffer.from(str[, encoding])
|
|
* Buffer.from(array)
|
|
* Buffer.from(buffer)
|
|
* Buffer.from(arrayBuffer[, byteOffset[, length]])
|
|
**/
|
|
Buffer.from = function (value, encodingOrOffset, length) {
|
|
return from(value, encodingOrOffset, length)
|
|
}
|
|
|
|
// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug:
|
|
// https://github.com/feross/buffer/pull/148
|
|
Object.setPrototypeOf(Buffer.prototype, Uint8Array.prototype)
|
|
Object.setPrototypeOf(Buffer, Uint8Array)
|
|
|
|
function assertSize (size) {
|
|
if (typeof size !== 'number') {
|
|
throw new TypeError('"size" argument must be of type number')
|
|
} else if (size < 0) {
|
|
throw new RangeError('The value "' + size + '" is invalid for option "size"')
|
|
}
|
|
}
|
|
|
|
function alloc (size, fill, encoding) {
|
|
assertSize(size)
|
|
if (size <= 0) {
|
|
return createBuffer(size)
|
|
}
|
|
if (fill !== undefined) {
|
|
// Only pay attention to encoding if it's a string. This
|
|
// prevents accidentally sending in a number that would
|
|
// be interpretted as a start offset.
|
|
return typeof encoding === 'string'
|
|
? createBuffer(size).fill(fill, encoding)
|
|
: createBuffer(size).fill(fill)
|
|
}
|
|
return createBuffer(size)
|
|
}
|
|
|
|
/**
|
|
* Creates a new filled Buffer instance.
|
|
* alloc(size[, fill[, encoding]])
|
|
**/
|
|
Buffer.alloc = function (size, fill, encoding) {
|
|
return alloc(size, fill, encoding)
|
|
}
|
|
|
|
function allocUnsafe (size) {
|
|
assertSize(size)
|
|
return createBuffer(size < 0 ? 0 : checked(size) | 0)
|
|
}
|
|
|
|
/**
|
|
* Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.
|
|
* */
|
|
Buffer.allocUnsafe = function (size) {
|
|
return allocUnsafe(size)
|
|
}
|
|
/**
|
|
* Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
|
|
*/
|
|
Buffer.allocUnsafeSlow = function (size) {
|
|
return allocUnsafe(size)
|
|
}
|
|
|
|
function fromString (string, encoding) {
|
|
if (typeof encoding !== 'string' || encoding === '') {
|
|
encoding = 'utf8'
|
|
}
|
|
|
|
if (!Buffer.isEncoding(encoding)) {
|
|
throw new TypeError('Unknown encoding: ' + encoding)
|
|
}
|
|
|
|
var length = byteLength(string, encoding) | 0
|
|
var buf = createBuffer(length)
|
|
|
|
var actual = buf.write(string, encoding)
|
|
|
|
if (actual !== length) {
|
|
// Writing a hex string, for example, that contains invalid characters will
|
|
// cause everything after the first invalid character to be ignored. (e.g.
|
|
// 'abxxcd' will be treated as 'ab')
|
|
buf = buf.slice(0, actual)
|
|
}
|
|
|
|
return buf
|
|
}
|
|
|
|
function fromArrayLike (array) {
|
|
var length = array.length < 0 ? 0 : checked(array.length) | 0
|
|
var buf = createBuffer(length)
|
|
for (var i = 0; i < length; i += 1) {
|
|
buf[i] = array[i] & 255
|
|
}
|
|
return buf
|
|
}
|
|
|
|
function fromArrayBuffer (array, byteOffset, length) {
|
|
if (byteOffset < 0 || array.byteLength < byteOffset) {
|
|
throw new RangeError('"offset" is outside of buffer bounds')
|
|
}
|
|
|
|
if (array.byteLength < byteOffset + (length || 0)) {
|
|
throw new RangeError('"length" is outside of buffer bounds')
|
|
}
|
|
|
|
var buf
|
|
if (byteOffset === undefined && length === undefined) {
|
|
buf = new Uint8Array(array)
|
|
} else if (length === undefined) {
|
|
buf = new Uint8Array(array, byteOffset)
|
|
} else {
|
|
buf = new Uint8Array(array, byteOffset, length)
|
|
}
|
|
|
|
// Return an augmented `Uint8Array` instance
|
|
Object.setPrototypeOf(buf, Buffer.prototype)
|
|
|
|
return buf
|
|
}
|
|
|
|
function fromObject (obj) {
|
|
if (Buffer.isBuffer(obj)) {
|
|
var len = checked(obj.length) | 0
|
|
var buf = createBuffer(len)
|
|
|
|
if (buf.length === 0) {
|
|
return buf
|
|
}
|
|
|
|
obj.copy(buf, 0, 0, len)
|
|
return buf
|
|
}
|
|
|
|
if (obj.length !== undefined) {
|
|
if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) {
|
|
return createBuffer(0)
|
|
}
|
|
return fromArrayLike(obj)
|
|
}
|
|
|
|
if (obj.type === 'Buffer' && Array.isArray(obj.data)) {
|
|
return fromArrayLike(obj.data)
|
|
}
|
|
}
|
|
|
|
function checked (length) {
|
|
// Note: cannot use `length < K_MAX_LENGTH` here because that fails when
|
|
// length is NaN (which is otherwise coerced to zero.)
|
|
if (length >= K_MAX_LENGTH) {
|
|
throw new RangeError('Attempt to allocate Buffer larger than maximum ' +
|
|
'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes')
|
|
}
|
|
return length | 0
|
|
}
|
|
|
|
function SlowBuffer (length) {
|
|
if (+length != length) { // eslint-disable-line eqeqeq
|
|
length = 0
|
|
}
|
|
return Buffer.alloc(+length)
|
|
}
|
|
|
|
Buffer.isBuffer = function isBuffer (b) {
|
|
return b != null && b._isBuffer === true &&
|
|
b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false
|
|
}
|
|
|
|
Buffer.compare = function compare (a, b) {
|
|
if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength)
|
|
if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength)
|
|
if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {
|
|
throw new TypeError(
|
|
'The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array'
|
|
)
|
|
}
|
|
|
|
if (a === b) return 0
|
|
|
|
var x = a.length
|
|
var y = b.length
|
|
|
|
for (var i = 0, len = Math.min(x, y); i < len; ++i) {
|
|
if (a[i] !== b[i]) {
|
|
x = a[i]
|
|
y = b[i]
|
|
break
|
|
}
|
|
}
|
|
|
|
if (x < y) return -1
|
|
if (y < x) return 1
|
|
return 0
|
|
}
|
|
|
|
Buffer.isEncoding = function isEncoding (encoding) {
|
|
switch (String(encoding).toLowerCase()) {
|
|
case 'hex':
|
|
case 'utf8':
|
|
case 'utf-8':
|
|
case 'ascii':
|
|
case 'latin1':
|
|
case 'binary':
|
|
case 'base64':
|
|
case 'ucs2':
|
|
case 'ucs-2':
|
|
case 'utf16le':
|
|
case 'utf-16le':
|
|
return true
|
|
default:
|
|
return false
|
|
}
|
|
}
|
|
|
|
Buffer.concat = function concat (list, length) {
|
|
if (!Array.isArray(list)) {
|
|
throw new TypeError('"list" argument must be an Array of Buffers')
|
|
}
|
|
|
|
if (list.length === 0) {
|
|
return Buffer.alloc(0)
|
|
}
|
|
|
|
var i
|
|
if (length === undefined) {
|
|
length = 0
|
|
for (i = 0; i < list.length; ++i) {
|
|
length += list[i].length
|
|
}
|
|
}
|
|
|
|
var buffer = Buffer.allocUnsafe(length)
|
|
var pos = 0
|
|
for (i = 0; i < list.length; ++i) {
|
|
var buf = list[i]
|
|
if (isInstance(buf, Uint8Array)) {
|
|
buf = Buffer.from(buf)
|
|
}
|
|
if (!Buffer.isBuffer(buf)) {
|
|
throw new TypeError('"list" argument must be an Array of Buffers')
|
|
}
|
|
buf.copy(buffer, pos)
|
|
pos += buf.length
|
|
}
|
|
return buffer
|
|
}
|
|
|
|
function byteLength (string, encoding) {
|
|
if (Buffer.isBuffer(string)) {
|
|
return string.length
|
|
}
|
|
if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) {
|
|
return string.byteLength
|
|
}
|
|
if (typeof string !== 'string') {
|
|
throw new TypeError(
|
|
'The "string" argument must be one of type string, Buffer, or ArrayBuffer. ' +
|
|
'Received type ' + typeof string
|
|
)
|
|
}
|
|
|
|
var len = string.length
|
|
var mustMatch = (arguments.length > 2 && arguments[2] === true)
|
|
if (!mustMatch && len === 0) return 0
|
|
|
|
// Use a for loop to avoid recursion
|
|
var loweredCase = false
|
|
for (;;) {
|
|
switch (encoding) {
|
|
case 'ascii':
|
|
case 'latin1':
|
|
case 'binary':
|
|
return len
|
|
case 'utf8':
|
|
case 'utf-8':
|
|
return utf8ToBytes(string).length
|
|
case 'ucs2':
|
|
case 'ucs-2':
|
|
case 'utf16le':
|
|
case 'utf-16le':
|
|
return len * 2
|
|
case 'hex':
|
|
return len >>> 1
|
|
case 'base64':
|
|
return base64ToBytes(string).length
|
|
default:
|
|
if (loweredCase) {
|
|
return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8
|
|
}
|
|
encoding = ('' + encoding).toLowerCase()
|
|
loweredCase = true
|
|
}
|
|
}
|
|
}
|
|
Buffer.byteLength = byteLength
|
|
|
|
function slowToString (encoding, start, end) {
|
|
var loweredCase = false
|
|
|
|
// No need to verify that "this.length <= MAX_UINT32" since it's a read-only
|
|
// property of a typed array.
|
|
|
|
// This behaves neither like String nor Uint8Array in that we set start/end
|
|
// to their upper/lower bounds if the value passed is out of range.
|
|
// undefined is handled specially as per ECMA-262 6th Edition,
|
|
// Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.
|
|
if (start === undefined || start < 0) {
|
|
start = 0
|
|
}
|
|
// Return early if start > this.length. Done here to prevent potential uint32
|
|
// coercion fail below.
|
|
if (start > this.length) {
|
|
return ''
|
|
}
|
|
|
|
if (end === undefined || end > this.length) {
|
|
end = this.length
|
|
}
|
|
|
|
if (end <= 0) {
|
|
return ''
|
|
}
|
|
|
|
// Force coersion to uint32. This will also coerce falsey/NaN values to 0.
|
|
end >>>= 0
|
|
start >>>= 0
|
|
|
|
if (end <= start) {
|
|
return ''
|
|
}
|
|
|
|
if (!encoding) encoding = 'utf8'
|
|
|
|
while (true) {
|
|
switch (encoding) {
|
|
case 'hex':
|
|
return hexSlice(this, start, end)
|
|
|
|
case 'utf8':
|
|
case 'utf-8':
|
|
return utf8Slice(this, start, end)
|
|
|
|
case 'ascii':
|
|
return asciiSlice(this, start, end)
|
|
|
|
case 'latin1':
|
|
case 'binary':
|
|
return latin1Slice(this, start, end)
|
|
|
|
case 'base64':
|
|
return base64Slice(this, start, end)
|
|
|
|
case 'ucs2':
|
|
case 'ucs-2':
|
|
case 'utf16le':
|
|
case 'utf-16le':
|
|
return utf16leSlice(this, start, end)
|
|
|
|
default:
|
|
if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)
|
|
encoding = (encoding + '').toLowerCase()
|
|
loweredCase = true
|
|
}
|
|
}
|
|
}
|
|
|
|
// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package)
|
|
// to detect a Buffer instance. It's not possible to use `instanceof Buffer`
|
|
// reliably in a browserify context because there could be multiple different
|
|
// copies of the 'buffer' package in use. This method works even for Buffer
|
|
// instances that were created from another copy of the `buffer` package.
|
|
// See: https://github.com/feross/buffer/issues/154
|
|
Buffer.prototype._isBuffer = true
|
|
|
|
function swap (b, n, m) {
|
|
var i = b[n]
|
|
b[n] = b[m]
|
|
b[m] = i
|
|
}
|
|
|
|
Buffer.prototype.swap16 = function swap16 () {
|
|
var len = this.length
|
|
if (len % 2 !== 0) {
|
|
throw new RangeError('Buffer size must be a multiple of 16-bits')
|
|
}
|
|
for (var i = 0; i < len; i += 2) {
|
|
swap(this, i, i + 1)
|
|
}
|
|
return this
|
|
}
|
|
|
|
Buffer.prototype.swap32 = function swap32 () {
|
|
var len = this.length
|
|
if (len % 4 !== 0) {
|
|
throw new RangeError('Buffer size must be a multiple of 32-bits')
|
|
}
|
|
for (var i = 0; i < len; i += 4) {
|
|
swap(this, i, i + 3)
|
|
swap(this, i + 1, i + 2)
|
|
}
|
|
return this
|
|
}
|
|
|
|
Buffer.prototype.swap64 = function swap64 () {
|
|
var len = this.length
|
|
if (len % 8 !== 0) {
|
|
throw new RangeError('Buffer size must be a multiple of 64-bits')
|
|
}
|
|
for (var i = 0; i < len; i += 8) {
|
|
swap(this, i, i + 7)
|
|
swap(this, i + 1, i + 6)
|
|
swap(this, i + 2, i + 5)
|
|
swap(this, i + 3, i + 4)
|
|
}
|
|
return this
|
|
}
|
|
|
|
Buffer.prototype.toString = function toString () {
|
|
var length = this.length
|
|
if (length === 0) return ''
|
|
if (arguments.length === 0) return utf8Slice(this, 0, length)
|
|
return slowToString.apply(this, arguments)
|
|
}
|
|
|
|
Buffer.prototype.toLocaleString = Buffer.prototype.toString
|
|
|
|
Buffer.prototype.equals = function equals (b) {
|
|
if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')
|
|
if (this === b) return true
|
|
return Buffer.compare(this, b) === 0
|
|
}
|
|
|
|
Buffer.prototype.inspect = function inspect () {
|
|
var str = ''
|
|
var max = exports.INSPECT_MAX_BYTES
|
|
str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim()
|
|
if (this.length > max) str += ' ... '
|
|
return '<Buffer ' + str + '>'
|
|
}
|
|
if (customInspectSymbol) {
|
|
Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect
|
|
}
|
|
|
|
Buffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {
|
|
if (isInstance(target, Uint8Array)) {
|
|
target = Buffer.from(target, target.offset, target.byteLength)
|
|
}
|
|
if (!Buffer.isBuffer(target)) {
|
|
throw new TypeError(
|
|
'The "target" argument must be one of type Buffer or Uint8Array. ' +
|
|
'Received type ' + (typeof target)
|
|
)
|
|
}
|
|
|
|
if (start === undefined) {
|
|
start = 0
|
|
}
|
|
if (end === undefined) {
|
|
end = target ? target.length : 0
|
|
}
|
|
if (thisStart === undefined) {
|
|
thisStart = 0
|
|
}
|
|
if (thisEnd === undefined) {
|
|
thisEnd = this.length
|
|
}
|
|
|
|
if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {
|
|
throw new RangeError('out of range index')
|
|
}
|
|
|
|
if (thisStart >= thisEnd && start >= end) {
|
|
return 0
|
|
}
|
|
if (thisStart >= thisEnd) {
|
|
return -1
|
|
}
|
|
if (start >= end) {
|
|
return 1
|
|
}
|
|
|
|
start >>>= 0
|
|
end >>>= 0
|
|
thisStart >>>= 0
|
|
thisEnd >>>= 0
|
|
|
|
if (this === target) return 0
|
|
|
|
var x = thisEnd - thisStart
|
|
var y = end - start
|
|
var len = Math.min(x, y)
|
|
|
|
var thisCopy = this.slice(thisStart, thisEnd)
|
|
var targetCopy = target.slice(start, end)
|
|
|
|
for (var i = 0; i < len; ++i) {
|
|
if (thisCopy[i] !== targetCopy[i]) {
|
|
x = thisCopy[i]
|
|
y = targetCopy[i]
|
|
break
|
|
}
|
|
}
|
|
|
|
if (x < y) return -1
|
|
if (y < x) return 1
|
|
return 0
|
|
}
|
|
|
|
// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,
|
|
// OR the last index of `val` in `buffer` at offset <= `byteOffset`.
|
|
//
|
|
// Arguments:
|
|
// - buffer - a Buffer to search
|
|
// - val - a string, Buffer, or number
|
|
// - byteOffset - an index into `buffer`; will be clamped to an int32
|
|
// - encoding - an optional encoding, relevant is val is a string
|
|
// - dir - true for indexOf, false for lastIndexOf
|
|
function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {
|
|
// Empty buffer means no match
|
|
if (buffer.length === 0) return -1
|
|
|
|
// Normalize byteOffset
|
|
if (typeof byteOffset === 'string') {
|
|
encoding = byteOffset
|
|
byteOffset = 0
|
|
} else if (byteOffset > 0x7fffffff) {
|
|
byteOffset = 0x7fffffff
|
|
} else if (byteOffset < -0x80000000) {
|
|
byteOffset = -0x80000000
|
|
}
|
|
byteOffset = +byteOffset // Coerce to Number.
|
|
if (numberIsNaN(byteOffset)) {
|
|
// byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer
|
|
byteOffset = dir ? 0 : (buffer.length - 1)
|
|
}
|
|
|
|
// Normalize byteOffset: negative offsets start from the end of the buffer
|
|
if (byteOffset < 0) byteOffset = buffer.length + byteOffset
|
|
if (byteOffset >= buffer.length) {
|
|
if (dir) return -1
|
|
else byteOffset = buffer.length - 1
|
|
} else if (byteOffset < 0) {
|
|
if (dir) byteOffset = 0
|
|
else return -1
|
|
}
|
|
|
|
// Normalize val
|
|
if (typeof val === 'string') {
|
|
val = Buffer.from(val, encoding)
|
|
}
|
|
|
|
// Finally, search either indexOf (if dir is true) or lastIndexOf
|
|
if (Buffer.isBuffer(val)) {
|
|
// Special case: looking for empty string/buffer always fails
|
|
if (val.length === 0) {
|
|
return -1
|
|
}
|
|
return arrayIndexOf(buffer, val, byteOffset, encoding, dir)
|
|
} else if (typeof val === 'number') {
|
|
val = val & 0xFF // Search for a byte value [0-255]
|
|
if (typeof Uint8Array.prototype.indexOf === 'function') {
|
|
if (dir) {
|
|
return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)
|
|
} else {
|
|
return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)
|
|
}
|
|
}
|
|
return arrayIndexOf(buffer, [val], byteOffset, encoding, dir)
|
|
}
|
|
|
|
throw new TypeError('val must be string, number or Buffer')
|
|
}
|
|
|
|
function arrayIndexOf (arr, val, byteOffset, encoding, dir) {
|
|
var indexSize = 1
|
|
var arrLength = arr.length
|
|
var valLength = val.length
|
|
|
|
if (encoding !== undefined) {
|
|
encoding = String(encoding).toLowerCase()
|
|
if (encoding === 'ucs2' || encoding === 'ucs-2' ||
|
|
encoding === 'utf16le' || encoding === 'utf-16le') {
|
|
if (arr.length < 2 || val.length < 2) {
|
|
return -1
|
|
}
|
|
indexSize = 2
|
|
arrLength /= 2
|
|
valLength /= 2
|
|
byteOffset /= 2
|
|
}
|
|
}
|
|
|
|
function read (buf, i) {
|
|
if (indexSize === 1) {
|
|
return buf[i]
|
|
} else {
|
|
return buf.readUInt16BE(i * indexSize)
|
|
}
|
|
}
|
|
|
|
var i
|
|
if (dir) {
|
|
var foundIndex = -1
|
|
for (i = byteOffset; i < arrLength; i++) {
|
|
if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {
|
|
if (foundIndex === -1) foundIndex = i
|
|
if (i - foundIndex + 1 === valLength) return foundIndex * indexSize
|
|
} else {
|
|
if (foundIndex !== -1) i -= i - foundIndex
|
|
foundIndex = -1
|
|
}
|
|
}
|
|
} else {
|
|
if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength
|
|
for (i = byteOffset; i >= 0; i--) {
|
|
var found = true
|
|
for (var j = 0; j < valLength; j++) {
|
|
if (read(arr, i + j) !== read(val, j)) {
|
|
found = false
|
|
break
|
|
}
|
|
}
|
|
if (found) return i
|
|
}
|
|
}
|
|
|
|
return -1
|
|
}
|
|
|
|
Buffer.prototype.includes = function includes (val, byteOffset, encoding) {
|
|
return this.indexOf(val, byteOffset, encoding) !== -1
|
|
}
|
|
|
|
Buffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {
|
|
return bidirectionalIndexOf(this, val, byteOffset, encoding, true)
|
|
}
|
|
|
|
Buffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {
|
|
return bidirectionalIndexOf(this, val, byteOffset, encoding, false)
|
|
}
|
|
|
|
function hexWrite (buf, string, offset, length) {
|
|
offset = Number(offset) || 0
|
|
var remaining = buf.length - offset
|
|
if (!length) {
|
|
length = remaining
|
|
} else {
|
|
length = Number(length)
|
|
if (length > remaining) {
|
|
length = remaining
|
|
}
|
|
}
|
|
|
|
var strLen = string.length
|
|
|
|
if (length > strLen / 2) {
|
|
length = strLen / 2
|
|
}
|
|
for (var i = 0; i < length; ++i) {
|
|
var parsed = parseInt(string.substr(i * 2, 2), 16)
|
|
if (numberIsNaN(parsed)) return i
|
|
buf[offset + i] = parsed
|
|
}
|
|
return i
|
|
}
|
|
|
|
function utf8Write (buf, string, offset, length) {
|
|
return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)
|
|
}
|
|
|
|
function asciiWrite (buf, string, offset, length) {
|
|
return blitBuffer(asciiToBytes(string), buf, offset, length)
|
|
}
|
|
|
|
function latin1Write (buf, string, offset, length) {
|
|
return asciiWrite(buf, string, offset, length)
|
|
}
|
|
|
|
function base64Write (buf, string, offset, length) {
|
|
return blitBuffer(base64ToBytes(string), buf, offset, length)
|
|
}
|
|
|
|
function ucs2Write (buf, string, offset, length) {
|
|
return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)
|
|
}
|
|
|
|
Buffer.prototype.write = function write (string, offset, length, encoding) {
|
|
// Buffer#write(string)
|
|
if (offset === undefined) {
|
|
encoding = 'utf8'
|
|
length = this.length
|
|
offset = 0
|
|
// Buffer#write(string, encoding)
|
|
} else if (length === undefined && typeof offset === 'string') {
|
|
encoding = offset
|
|
length = this.length
|
|
offset = 0
|
|
// Buffer#write(string, offset[, length][, encoding])
|
|
} else if (isFinite(offset)) {
|
|
offset = offset >>> 0
|
|
if (isFinite(length)) {
|
|
length = length >>> 0
|
|
if (encoding === undefined) encoding = 'utf8'
|
|
} else {
|
|
encoding = length
|
|
length = undefined
|
|
}
|
|
} else {
|
|
throw new Error(
|
|
'Buffer.write(string, encoding, offset[, length]) is no longer supported'
|
|
)
|
|
}
|
|
|
|
var remaining = this.length - offset
|
|
if (length === undefined || length > remaining) length = remaining
|
|
|
|
if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {
|
|
throw new RangeError('Attempt to write outside buffer bounds')
|
|
}
|
|
|
|
if (!encoding) encoding = 'utf8'
|
|
|
|
var loweredCase = false
|
|
for (;;) {
|
|
switch (encoding) {
|
|
case 'hex':
|
|
return hexWrite(this, string, offset, length)
|
|
|
|
case 'utf8':
|
|
case 'utf-8':
|
|
return utf8Write(this, string, offset, length)
|
|
|
|
case 'ascii':
|
|
return asciiWrite(this, string, offset, length)
|
|
|
|
case 'latin1':
|
|
case 'binary':
|
|
return latin1Write(this, string, offset, length)
|
|
|
|
case 'base64':
|
|
// Warning: maxLength not taken into account in base64Write
|
|
return base64Write(this, string, offset, length)
|
|
|
|
case 'ucs2':
|
|
case 'ucs-2':
|
|
case 'utf16le':
|
|
case 'utf-16le':
|
|
return ucs2Write(this, string, offset, length)
|
|
|
|
default:
|
|
if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)
|
|
encoding = ('' + encoding).toLowerCase()
|
|
loweredCase = true
|
|
}
|
|
}
|
|
}
|
|
|
|
Buffer.prototype.toJSON = function toJSON () {
|
|
return {
|
|
type: 'Buffer',
|
|
data: Array.prototype.slice.call(this._arr || this, 0)
|
|
}
|
|
}
|
|
|
|
function base64Slice (buf, start, end) {
|
|
if (start === 0 && end === buf.length) {
|
|
return base64.fromByteArray(buf)
|
|
} else {
|
|
return base64.fromByteArray(buf.slice(start, end))
|
|
}
|
|
}
|
|
|
|
function utf8Slice (buf, start, end) {
|
|
end = Math.min(buf.length, end)
|
|
var res = []
|
|
|
|
var i = start
|
|
while (i < end) {
|
|
var firstByte = buf[i]
|
|
var codePoint = null
|
|
var bytesPerSequence = (firstByte > 0xEF) ? 4
|
|
: (firstByte > 0xDF) ? 3
|
|
: (firstByte > 0xBF) ? 2
|
|
: 1
|
|
|
|
if (i + bytesPerSequence <= end) {
|
|
var secondByte, thirdByte, fourthByte, tempCodePoint
|
|
|
|
switch (bytesPerSequence) {
|
|
case 1:
|
|
if (firstByte < 0x80) {
|
|
codePoint = firstByte
|
|
}
|
|
break
|
|
case 2:
|
|
secondByte = buf[i + 1]
|
|
if ((secondByte & 0xC0) === 0x80) {
|
|
tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)
|
|
if (tempCodePoint > 0x7F) {
|
|
codePoint = tempCodePoint
|
|
}
|
|
}
|
|
break
|
|
case 3:
|
|
secondByte = buf[i + 1]
|
|
thirdByte = buf[i + 2]
|
|
if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {
|
|
tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)
|
|
if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {
|
|
codePoint = tempCodePoint
|
|
}
|
|
}
|
|
break
|
|
case 4:
|
|
secondByte = buf[i + 1]
|
|
thirdByte = buf[i + 2]
|
|
fourthByte = buf[i + 3]
|
|
if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {
|
|
tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)
|
|
if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {
|
|
codePoint = tempCodePoint
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
if (codePoint === null) {
|
|
// we did not generate a valid codePoint so insert a
|
|
// replacement char (U+FFFD) and advance only 1 byte
|
|
codePoint = 0xFFFD
|
|
bytesPerSequence = 1
|
|
} else if (codePoint > 0xFFFF) {
|
|
// encode to utf16 (surrogate pair dance)
|
|
codePoint -= 0x10000
|
|
res.push(codePoint >>> 10 & 0x3FF | 0xD800)
|
|
codePoint = 0xDC00 | codePoint & 0x3FF
|
|
}
|
|
|
|
res.push(codePoint)
|
|
i += bytesPerSequence
|
|
}
|
|
|
|
return decodeCodePointsArray(res)
|
|
}
|
|
|
|
// Based on http://stackoverflow.com/a/22747272/680742, the browser with
|
|
// the lowest limit is Chrome, with 0x10000 args.
|
|
// We go 1 magnitude less, for safety
|
|
var MAX_ARGUMENTS_LENGTH = 0x1000
|
|
|
|
function decodeCodePointsArray (codePoints) {
|
|
var len = codePoints.length
|
|
if (len <= MAX_ARGUMENTS_LENGTH) {
|
|
return String.fromCharCode.apply(String, codePoints) // avoid extra slice()
|
|
}
|
|
|
|
// Decode in chunks to avoid "call stack size exceeded".
|
|
var res = ''
|
|
var i = 0
|
|
while (i < len) {
|
|
res += String.fromCharCode.apply(
|
|
String,
|
|
codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)
|
|
)
|
|
}
|
|
return res
|
|
}
|
|
|
|
function asciiSlice (buf, start, end) {
|
|
var ret = ''
|
|
end = Math.min(buf.length, end)
|
|
|
|
for (var i = start; i < end; ++i) {
|
|
ret += String.fromCharCode(buf[i] & 0x7F)
|
|
}
|
|
return ret
|
|
}
|
|
|
|
function latin1Slice (buf, start, end) {
|
|
var ret = ''
|
|
end = Math.min(buf.length, end)
|
|
|
|
for (var i = start; i < end; ++i) {
|
|
ret += String.fromCharCode(buf[i])
|
|
}
|
|
return ret
|
|
}
|
|
|
|
function hexSlice (buf, start, end) {
|
|
var len = buf.length
|
|
|
|
if (!start || start < 0) start = 0
|
|
if (!end || end < 0 || end > len) end = len
|
|
|
|
var out = ''
|
|
for (var i = start; i < end; ++i) {
|
|
out += hexSliceLookupTable[buf[i]]
|
|
}
|
|
return out
|
|
}
|
|
|
|
function utf16leSlice (buf, start, end) {
|
|
var bytes = buf.slice(start, end)
|
|
var res = ''
|
|
for (var i = 0; i < bytes.length; i += 2) {
|
|
res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256))
|
|
}
|
|
return res
|
|
}
|
|
|
|
Buffer.prototype.slice = function slice (start, end) {
|
|
var len = this.length
|
|
start = ~~start
|
|
end = end === undefined ? len : ~~end
|
|
|
|
if (start < 0) {
|
|
start += len
|
|
if (start < 0) start = 0
|
|
} else if (start > len) {
|
|
start = len
|
|
}
|
|
|
|
if (end < 0) {
|
|
end += len
|
|
if (end < 0) end = 0
|
|
} else if (end > len) {
|
|
end = len
|
|
}
|
|
|
|
if (end < start) end = start
|
|
|
|
var newBuf = this.subarray(start, end)
|
|
// Return an augmented `Uint8Array` instance
|
|
Object.setPrototypeOf(newBuf, Buffer.prototype)
|
|
|
|
return newBuf
|
|
}
|
|
|
|
/*
|
|
* Need to make sure that buffer isn't trying to write out of bounds.
|
|
*/
|
|
function checkOffset (offset, ext, length) {
|
|
if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')
|
|
if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')
|
|
}
|
|
|
|
Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {
|
|
offset = offset >>> 0
|
|
byteLength = byteLength >>> 0
|
|
if (!noAssert) checkOffset(offset, byteLength, this.length)
|
|
|
|
var val = this[offset]
|
|
var mul = 1
|
|
var i = 0
|
|
while (++i < byteLength && (mul *= 0x100)) {
|
|
val += this[offset + i] * mul
|
|
}
|
|
|
|
return val
|
|
}
|
|
|
|
Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {
|
|
offset = offset >>> 0
|
|
byteLength = byteLength >>> 0
|
|
if (!noAssert) {
|
|
checkOffset(offset, byteLength, this.length)
|
|
}
|
|
|
|
var val = this[offset + --byteLength]
|
|
var mul = 1
|
|
while (byteLength > 0 && (mul *= 0x100)) {
|
|
val += this[offset + --byteLength] * mul
|
|
}
|
|
|
|
return val
|
|
}
|
|
|
|
Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {
|
|
offset = offset >>> 0
|
|
if (!noAssert) checkOffset(offset, 1, this.length)
|
|
return this[offset]
|
|
}
|
|
|
|
Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {
|
|
offset = offset >>> 0
|
|
if (!noAssert) checkOffset(offset, 2, this.length)
|
|
return this[offset] | (this[offset + 1] << 8)
|
|
}
|
|
|
|
Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {
|
|
offset = offset >>> 0
|
|
if (!noAssert) checkOffset(offset, 2, this.length)
|
|
return (this[offset] << 8) | this[offset + 1]
|
|
}
|
|
|
|
Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {
|
|
offset = offset >>> 0
|
|
if (!noAssert) checkOffset(offset, 4, this.length)
|
|
|
|
return ((this[offset]) |
|
|
(this[offset + 1] << 8) |
|
|
(this[offset + 2] << 16)) +
|
|
(this[offset + 3] * 0x1000000)
|
|
}
|
|
|
|
Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {
|
|
offset = offset >>> 0
|
|
if (!noAssert) checkOffset(offset, 4, this.length)
|
|
|
|
return (this[offset] * 0x1000000) +
|
|
((this[offset + 1] << 16) |
|
|
(this[offset + 2] << 8) |
|
|
this[offset + 3])
|
|
}
|
|
|
|
Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {
|
|
offset = offset >>> 0
|
|
byteLength = byteLength >>> 0
|
|
if (!noAssert) checkOffset(offset, byteLength, this.length)
|
|
|
|
var val = this[offset]
|
|
var mul = 1
|
|
var i = 0
|
|
while (++i < byteLength && (mul *= 0x100)) {
|
|
val += this[offset + i] * mul
|
|
}
|
|
mul *= 0x80
|
|
|
|
if (val >= mul) val -= Math.pow(2, 8 * byteLength)
|
|
|
|
return val
|
|
}
|
|
|
|
Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {
|
|
offset = offset >>> 0
|
|
byteLength = byteLength >>> 0
|
|
if (!noAssert) checkOffset(offset, byteLength, this.length)
|
|
|
|
var i = byteLength
|
|
var mul = 1
|
|
var val = this[offset + --i]
|
|
while (i > 0 && (mul *= 0x100)) {
|
|
val += this[offset + --i] * mul
|
|
}
|
|
mul *= 0x80
|
|
|
|
if (val >= mul) val -= Math.pow(2, 8 * byteLength)
|
|
|
|
return val
|
|
}
|
|
|
|
Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) {
|
|
offset = offset >>> 0
|
|
if (!noAssert) checkOffset(offset, 1, this.length)
|
|
if (!(this[offset] & 0x80)) return (this[offset])
|
|
return ((0xff - this[offset] + 1) * -1)
|
|
}
|
|
|
|
Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {
|
|
offset = offset >>> 0
|
|
if (!noAssert) checkOffset(offset, 2, this.length)
|
|
var val = this[offset] | (this[offset + 1] << 8)
|
|
return (val & 0x8000) ? val | 0xFFFF0000 : val
|
|
}
|
|
|
|
Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {
|
|
offset = offset >>> 0
|
|
if (!noAssert) checkOffset(offset, 2, this.length)
|
|
var val = this[offset + 1] | (this[offset] << 8)
|
|
return (val & 0x8000) ? val | 0xFFFF0000 : val
|
|
}
|
|
|
|
Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {
|
|
offset = offset >>> 0
|
|
if (!noAssert) checkOffset(offset, 4, this.length)
|
|
|
|
return (this[offset]) |
|
|
(this[offset + 1] << 8) |
|
|
(this[offset + 2] << 16) |
|
|
(this[offset + 3] << 24)
|
|
}
|
|
|
|
Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {
|
|
offset = offset >>> 0
|
|
if (!noAssert) checkOffset(offset, 4, this.length)
|
|
|
|
return (this[offset] << 24) |
|
|
(this[offset + 1] << 16) |
|
|
(this[offset + 2] << 8) |
|
|
(this[offset + 3])
|
|
}
|
|
|
|
Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {
|
|
offset = offset >>> 0
|
|
if (!noAssert) checkOffset(offset, 4, this.length)
|
|
return ieee754.read(this, offset, true, 23, 4)
|
|
}
|
|
|
|
Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {
|
|
offset = offset >>> 0
|
|
if (!noAssert) checkOffset(offset, 4, this.length)
|
|
return ieee754.read(this, offset, false, 23, 4)
|
|
}
|
|
|
|
Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {
|
|
offset = offset >>> 0
|
|
if (!noAssert) checkOffset(offset, 8, this.length)
|
|
return ieee754.read(this, offset, true, 52, 8)
|
|
}
|
|
|
|
Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {
|
|
offset = offset >>> 0
|
|
if (!noAssert) checkOffset(offset, 8, this.length)
|
|
return ieee754.read(this, offset, false, 52, 8)
|
|
}
|
|
|
|
function checkInt (buf, value, offset, ext, max, min) {
|
|
if (!Buffer.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance')
|
|
if (value > max || value < min) throw new RangeError('"value" argument is out of bounds')
|
|
if (offset + ext > buf.length) throw new RangeError('Index out of range')
|
|
}
|
|
|
|
Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {
|
|
value = +value
|
|
offset = offset >>> 0
|
|
byteLength = byteLength >>> 0
|
|
if (!noAssert) {
|
|
var maxBytes = Math.pow(2, 8 * byteLength) - 1
|
|
checkInt(this, value, offset, byteLength, maxBytes, 0)
|
|
}
|
|
|
|
var mul = 1
|
|
var i = 0
|
|
this[offset] = value & 0xFF
|
|
while (++i < byteLength && (mul *= 0x100)) {
|
|
this[offset + i] = (value / mul) & 0xFF
|
|
}
|
|
|
|
return offset + byteLength
|
|
}
|
|
|
|
Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {
|
|
value = +value
|
|
offset = offset >>> 0
|
|
byteLength = byteLength >>> 0
|
|
if (!noAssert) {
|
|
var maxBytes = Math.pow(2, 8 * byteLength) - 1
|
|
checkInt(this, value, offset, byteLength, maxBytes, 0)
|
|
}
|
|
|
|
var i = byteLength - 1
|
|
var mul = 1
|
|
this[offset + i] = value & 0xFF
|
|
while (--i >= 0 && (mul *= 0x100)) {
|
|
this[offset + i] = (value / mul) & 0xFF
|
|
}
|
|
|
|
return offset + byteLength
|
|
}
|
|
|
|
Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {
|
|
value = +value
|
|
offset = offset >>> 0
|
|
if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)
|
|
this[offset] = (value & 0xff)
|
|
return offset + 1
|
|
}
|
|
|
|
Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {
|
|
value = +value
|
|
offset = offset >>> 0
|
|
if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)
|
|
this[offset] = (value & 0xff)
|
|
this[offset + 1] = (value >>> 8)
|
|
return offset + 2
|
|
}
|
|
|
|
Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {
|
|
value = +value
|
|
offset = offset >>> 0
|
|
if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)
|
|
this[offset] = (value >>> 8)
|
|
this[offset + 1] = (value & 0xff)
|
|
return offset + 2
|
|
}
|
|
|
|
Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {
|
|
value = +value
|
|
offset = offset >>> 0
|
|
if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)
|
|
this[offset + 3] = (value >>> 24)
|
|
this[offset + 2] = (value >>> 16)
|
|
this[offset + 1] = (value >>> 8)
|
|
this[offset] = (value & 0xff)
|
|
return offset + 4
|
|
}
|
|
|
|
Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {
|
|
value = +value
|
|
offset = offset >>> 0
|
|
if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)
|
|
this[offset] = (value >>> 24)
|
|
this[offset + 1] = (value >>> 16)
|
|
this[offset + 2] = (value >>> 8)
|
|
this[offset + 3] = (value & 0xff)
|
|
return offset + 4
|
|
}
|
|
|
|
Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {
|
|
value = +value
|
|
offset = offset >>> 0
|
|
if (!noAssert) {
|
|
var limit = Math.pow(2, (8 * byteLength) - 1)
|
|
|
|
checkInt(this, value, offset, byteLength, limit - 1, -limit)
|
|
}
|
|
|
|
var i = 0
|
|
var mul = 1
|
|
var sub = 0
|
|
this[offset] = value & 0xFF
|
|
while (++i < byteLength && (mul *= 0x100)) {
|
|
if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {
|
|
sub = 1
|
|
}
|
|
this[offset + i] = ((value / mul) >> 0) - sub & 0xFF
|
|
}
|
|
|
|
return offset + byteLength
|
|
}
|
|
|
|
Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {
|
|
value = +value
|
|
offset = offset >>> 0
|
|
if (!noAssert) {
|
|
var limit = Math.pow(2, (8 * byteLength) - 1)
|
|
|
|
checkInt(this, value, offset, byteLength, limit - 1, -limit)
|
|
}
|
|
|
|
var i = byteLength - 1
|
|
var mul = 1
|
|
var sub = 0
|
|
this[offset + i] = value & 0xFF
|
|
while (--i >= 0 && (mul *= 0x100)) {
|
|
if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {
|
|
sub = 1
|
|
}
|
|
this[offset + i] = ((value / mul) >> 0) - sub & 0xFF
|
|
}
|
|
|
|
return offset + byteLength
|
|
}
|
|
|
|
Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {
|
|
value = +value
|
|
offset = offset >>> 0
|
|
if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)
|
|
if (value < 0) value = 0xff + value + 1
|
|
this[offset] = (value & 0xff)
|
|
return offset + 1
|
|
}
|
|
|
|
Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {
|
|
value = +value
|
|
offset = offset >>> 0
|
|
if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)
|
|
this[offset] = (value & 0xff)
|
|
this[offset + 1] = (value >>> 8)
|
|
return offset + 2
|
|
}
|
|
|
|
Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {
|
|
value = +value
|
|
offset = offset >>> 0
|
|
if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)
|
|
this[offset] = (value >>> 8)
|
|
this[offset + 1] = (value & 0xff)
|
|
return offset + 2
|
|
}
|
|
|
|
Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {
|
|
value = +value
|
|
offset = offset >>> 0
|
|
if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)
|
|
this[offset] = (value & 0xff)
|
|
this[offset + 1] = (value >>> 8)
|
|
this[offset + 2] = (value >>> 16)
|
|
this[offset + 3] = (value >>> 24)
|
|
return offset + 4
|
|
}
|
|
|
|
Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {
|
|
value = +value
|
|
offset = offset >>> 0
|
|
if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)
|
|
if (value < 0) value = 0xffffffff + value + 1
|
|
this[offset] = (value >>> 24)
|
|
this[offset + 1] = (value >>> 16)
|
|
this[offset + 2] = (value >>> 8)
|
|
this[offset + 3] = (value & 0xff)
|
|
return offset + 4
|
|
}
|
|
|
|
function checkIEEE754 (buf, value, offset, ext, max, min) {
|
|
if (offset + ext > buf.length) throw new RangeError('Index out of range')
|
|
if (offset < 0) throw new RangeError('Index out of range')
|
|
}
|
|
|
|
function writeFloat (buf, value, offset, littleEndian, noAssert) {
|
|
value = +value
|
|
offset = offset >>> 0
|
|
if (!noAssert) {
|
|
checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)
|
|
}
|
|
ieee754.write(buf, value, offset, littleEndian, 23, 4)
|
|
return offset + 4
|
|
}
|
|
|
|
Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {
|
|
return writeFloat(this, value, offset, true, noAssert)
|
|
}
|
|
|
|
Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {
|
|
return writeFloat(this, value, offset, false, noAssert)
|
|
}
|
|
|
|
function writeDouble (buf, value, offset, littleEndian, noAssert) {
|
|
value = +value
|
|
offset = offset >>> 0
|
|
if (!noAssert) {
|
|
checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)
|
|
}
|
|
ieee754.write(buf, value, offset, littleEndian, 52, 8)
|
|
return offset + 8
|
|
}
|
|
|
|
Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {
|
|
return writeDouble(this, value, offset, true, noAssert)
|
|
}
|
|
|
|
Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {
|
|
return writeDouble(this, value, offset, false, noAssert)
|
|
}
|
|
|
|
// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)
|
|
Buffer.prototype.copy = function copy (target, targetStart, start, end) {
|
|
if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer')
|
|
if (!start) start = 0
|
|
if (!end && end !== 0) end = this.length
|
|
if (targetStart >= target.length) targetStart = target.length
|
|
if (!targetStart) targetStart = 0
|
|
if (end > 0 && end < start) end = start
|
|
|
|
// Copy 0 bytes; we're done
|
|
if (end === start) return 0
|
|
if (target.length === 0 || this.length === 0) return 0
|
|
|
|
// Fatal error conditions
|
|
if (targetStart < 0) {
|
|
throw new RangeError('targetStart out of bounds')
|
|
}
|
|
if (start < 0 || start >= this.length) throw new RangeError('Index out of range')
|
|
if (end < 0) throw new RangeError('sourceEnd out of bounds')
|
|
|
|
// Are we oob?
|
|
if (end > this.length) end = this.length
|
|
if (target.length - targetStart < end - start) {
|
|
end = target.length - targetStart + start
|
|
}
|
|
|
|
var len = end - start
|
|
|
|
if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') {
|
|
// Use built-in when available, missing from IE11
|
|
this.copyWithin(targetStart, start, end)
|
|
} else if (this === target && start < targetStart && targetStart < end) {
|
|
// descending copy from end
|
|
for (var i = len - 1; i >= 0; --i) {
|
|
target[i + targetStart] = this[i + start]
|
|
}
|
|
} else {
|
|
Uint8Array.prototype.set.call(
|
|
target,
|
|
this.subarray(start, end),
|
|
targetStart
|
|
)
|
|
}
|
|
|
|
return len
|
|
}
|
|
|
|
// Usage:
|
|
// buffer.fill(number[, offset[, end]])
|
|
// buffer.fill(buffer[, offset[, end]])
|
|
// buffer.fill(string[, offset[, end]][, encoding])
|
|
Buffer.prototype.fill = function fill (val, start, end, encoding) {
|
|
// Handle string cases:
|
|
if (typeof val === 'string') {
|
|
if (typeof start === 'string') {
|
|
encoding = start
|
|
start = 0
|
|
end = this.length
|
|
} else if (typeof end === 'string') {
|
|
encoding = end
|
|
end = this.length
|
|
}
|
|
if (encoding !== undefined && typeof encoding !== 'string') {
|
|
throw new TypeError('encoding must be a string')
|
|
}
|
|
if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {
|
|
throw new TypeError('Unknown encoding: ' + encoding)
|
|
}
|
|
if (val.length === 1) {
|
|
var code = val.charCodeAt(0)
|
|
if ((encoding === 'utf8' && code < 128) ||
|
|
encoding === 'latin1') {
|
|
// Fast path: If `val` fits into a single byte, use that numeric value.
|
|
val = code
|
|
}
|
|
}
|
|
} else if (typeof val === 'number') {
|
|
val = val & 255
|
|
} else if (typeof val === 'boolean') {
|
|
val = Number(val)
|
|
}
|
|
|
|
// Invalid ranges are not set to a default, so can range check early.
|
|
if (start < 0 || this.length < start || this.length < end) {
|
|
throw new RangeError('Out of range index')
|
|
}
|
|
|
|
if (end <= start) {
|
|
return this
|
|
}
|
|
|
|
start = start >>> 0
|
|
end = end === undefined ? this.length : end >>> 0
|
|
|
|
if (!val) val = 0
|
|
|
|
var i
|
|
if (typeof val === 'number') {
|
|
for (i = start; i < end; ++i) {
|
|
this[i] = val
|
|
}
|
|
} else {
|
|
var bytes = Buffer.isBuffer(val)
|
|
? val
|
|
: Buffer.from(val, encoding)
|
|
var len = bytes.length
|
|
if (len === 0) {
|
|
throw new TypeError('The value "' + val +
|
|
'" is invalid for argument "value"')
|
|
}
|
|
for (i = 0; i < end - start; ++i) {
|
|
this[i + start] = bytes[i % len]
|
|
}
|
|
}
|
|
|
|
return this
|
|
}
|
|
|
|
// HELPER FUNCTIONS
|
|
// ================
|
|
|
|
var INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g
|
|
|
|
function base64clean (str) {
|
|
// Node takes equal signs as end of the Base64 encoding
|
|
str = str.split('=')[0]
|
|
// Node strips out invalid characters like \n and \t from the string, base64-js does not
|
|
str = str.trim().replace(INVALID_BASE64_RE, '')
|
|
// Node converts strings with length < 2 to ''
|
|
if (str.length < 2) return ''
|
|
// Node allows for non-padded base64 strings (missing trailing ===), base64-js does not
|
|
while (str.length % 4 !== 0) {
|
|
str = str + '='
|
|
}
|
|
return str
|
|
}
|
|
|
|
function utf8ToBytes (string, units) {
|
|
units = units || Infinity
|
|
var codePoint
|
|
var length = string.length
|
|
var leadSurrogate = null
|
|
var bytes = []
|
|
|
|
for (var i = 0; i < length; ++i) {
|
|
codePoint = string.charCodeAt(i)
|
|
|
|
// is surrogate component
|
|
if (codePoint > 0xD7FF && codePoint < 0xE000) {
|
|
// last char was a lead
|
|
if (!leadSurrogate) {
|
|
// no lead yet
|
|
if (codePoint > 0xDBFF) {
|
|
// unexpected trail
|
|
if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
|
|
continue
|
|
} else if (i + 1 === length) {
|
|
// unpaired lead
|
|
if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
|
|
continue
|
|
}
|
|
|
|
// valid lead
|
|
leadSurrogate = codePoint
|
|
|
|
continue
|
|
}
|
|
|
|
// 2 leads in a row
|
|
if (codePoint < 0xDC00) {
|
|
if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
|
|
leadSurrogate = codePoint
|
|
continue
|
|
}
|
|
|
|
// valid surrogate pair
|
|
codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000
|
|
} else if (leadSurrogate) {
|
|
// valid bmp char, but last char was a lead
|
|
if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
|
|
}
|
|
|
|
leadSurrogate = null
|
|
|
|
// encode utf8
|
|
if (codePoint < 0x80) {
|
|
if ((units -= 1) < 0) break
|
|
bytes.push(codePoint)
|
|
} else if (codePoint < 0x800) {
|
|
if ((units -= 2) < 0) break
|
|
bytes.push(
|
|
codePoint >> 0x6 | 0xC0,
|
|
codePoint & 0x3F | 0x80
|
|
)
|
|
} else if (codePoint < 0x10000) {
|
|
if ((units -= 3) < 0) break
|
|
bytes.push(
|
|
codePoint >> 0xC | 0xE0,
|
|
codePoint >> 0x6 & 0x3F | 0x80,
|
|
codePoint & 0x3F | 0x80
|
|
)
|
|
} else if (codePoint < 0x110000) {
|
|
if ((units -= 4) < 0) break
|
|
bytes.push(
|
|
codePoint >> 0x12 | 0xF0,
|
|
codePoint >> 0xC & 0x3F | 0x80,
|
|
codePoint >> 0x6 & 0x3F | 0x80,
|
|
codePoint & 0x3F | 0x80
|
|
)
|
|
} else {
|
|
throw new Error('Invalid code point')
|
|
}
|
|
}
|
|
|
|
return bytes
|
|
}
|
|
|
|
function asciiToBytes (str) {
|
|
var byteArray = []
|
|
for (var i = 0; i < str.length; ++i) {
|
|
// Node's code seems to be doing this and not & 0x7F..
|
|
byteArray.push(str.charCodeAt(i) & 0xFF)
|
|
}
|
|
return byteArray
|
|
}
|
|
|
|
function utf16leToBytes (str, units) {
|
|
var c, hi, lo
|
|
var byteArray = []
|
|
for (var i = 0; i < str.length; ++i) {
|
|
if ((units -= 2) < 0) break
|
|
|
|
c = str.charCodeAt(i)
|
|
hi = c >> 8
|
|
lo = c % 256
|
|
byteArray.push(lo)
|
|
byteArray.push(hi)
|
|
}
|
|
|
|
return byteArray
|
|
}
|
|
|
|
function base64ToBytes (str) {
|
|
return base64.toByteArray(base64clean(str))
|
|
}
|
|
|
|
function blitBuffer (src, dst, offset, length) {
|
|
for (var i = 0; i < length; ++i) {
|
|
if ((i + offset >= dst.length) || (i >= src.length)) break
|
|
dst[i + offset] = src[i]
|
|
}
|
|
return i
|
|
}
|
|
|
|
// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass
|
|
// the `instanceof` check but they should be treated as of that type.
|
|
// See: https://github.com/feross/buffer/issues/166
|
|
function isInstance (obj, type) {
|
|
return obj instanceof type ||
|
|
(obj != null && obj.constructor != null && obj.constructor.name != null &&
|
|
obj.constructor.name === type.name)
|
|
}
|
|
function numberIsNaN (obj) {
|
|
// For IE11 support
|
|
return obj !== obj // eslint-disable-line no-self-compare
|
|
}
|
|
|
|
// Create lookup table for `toString('hex')`
|
|
// See: https://github.com/feross/buffer/issues/219
|
|
var hexSliceLookupTable = (function () {
|
|
var alphabet = '0123456789abcdef'
|
|
var table = new Array(256)
|
|
for (var i = 0; i < 16; ++i) {
|
|
var i16 = i * 16
|
|
for (var j = 0; j < 16; ++j) {
|
|
table[i16 + j] = alphabet[i] + alphabet[j]
|
|
}
|
|
}
|
|
return table
|
|
})()
|
|
|
|
}).call(this,require("buffer").Buffer)
|
|
},{"base64-js":7,"buffer":9,"ieee754":10}],10:[function(require,module,exports){
|
|
exports.read = function (buffer, offset, isLE, mLen, nBytes) {
|
|
var e, m
|
|
var eLen = (nBytes * 8) - mLen - 1
|
|
var eMax = (1 << eLen) - 1
|
|
var eBias = eMax >> 1
|
|
var nBits = -7
|
|
var i = isLE ? (nBytes - 1) : 0
|
|
var d = isLE ? -1 : 1
|
|
var s = buffer[offset + i]
|
|
|
|
i += d
|
|
|
|
e = s & ((1 << (-nBits)) - 1)
|
|
s >>= (-nBits)
|
|
nBits += eLen
|
|
for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}
|
|
|
|
m = e & ((1 << (-nBits)) - 1)
|
|
e >>= (-nBits)
|
|
nBits += mLen
|
|
for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}
|
|
|
|
if (e === 0) {
|
|
e = 1 - eBias
|
|
} else if (e === eMax) {
|
|
return m ? NaN : ((s ? -1 : 1) * Infinity)
|
|
} else {
|
|
m = m + Math.pow(2, mLen)
|
|
e = e - eBias
|
|
}
|
|
return (s ? -1 : 1) * m * Math.pow(2, e - mLen)
|
|
}
|
|
|
|
exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
|
|
var e, m, c
|
|
var eLen = (nBytes * 8) - mLen - 1
|
|
var eMax = (1 << eLen) - 1
|
|
var eBias = eMax >> 1
|
|
var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)
|
|
var i = isLE ? 0 : (nBytes - 1)
|
|
var d = isLE ? 1 : -1
|
|
var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0
|
|
|
|
value = Math.abs(value)
|
|
|
|
if (isNaN(value) || value === Infinity) {
|
|
m = isNaN(value) ? 1 : 0
|
|
e = eMax
|
|
} else {
|
|
e = Math.floor(Math.log(value) / Math.LN2)
|
|
if (value * (c = Math.pow(2, -e)) < 1) {
|
|
e--
|
|
c *= 2
|
|
}
|
|
if (e + eBias >= 1) {
|
|
value += rt / c
|
|
} else {
|
|
value += rt * Math.pow(2, 1 - eBias)
|
|
}
|
|
if (value * c >= 2) {
|
|
e++
|
|
c /= 2
|
|
}
|
|
|
|
if (e + eBias >= eMax) {
|
|
m = 0
|
|
e = eMax
|
|
} else if (e + eBias >= 1) {
|
|
m = ((value * c) - 1) * Math.pow(2, mLen)
|
|
e = e + eBias
|
|
} else {
|
|
m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)
|
|
e = 0
|
|
}
|
|
}
|
|
|
|
for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}
|
|
|
|
e = (e << mLen) | m
|
|
eLen += mLen
|
|
for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}
|
|
|
|
buffer[offset + i - d] |= s * 128
|
|
}
|
|
|
|
},{}],11:[function(require,module,exports){
|
|
/*
|
|
object-assign
|
|
(c) Sindre Sorhus
|
|
@license MIT
|
|
*/
|
|
|
|
'use strict';
|
|
/* eslint-disable no-unused-vars */
|
|
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
|
|
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
var propIsEnumerable = Object.prototype.propertyIsEnumerable;
|
|
|
|
function toObject(val) {
|
|
if (val === null || val === undefined) {
|
|
throw new TypeError('Object.assign cannot be called with null or undefined');
|
|
}
|
|
|
|
return Object(val);
|
|
}
|
|
|
|
function shouldUseNative() {
|
|
try {
|
|
if (!Object.assign) {
|
|
return false;
|
|
}
|
|
|
|
// Detect buggy property enumeration order in older V8 versions.
|
|
|
|
// https://bugs.chromium.org/p/v8/issues/detail?id=4118
|
|
var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
|
|
test1[5] = 'de';
|
|
if (Object.getOwnPropertyNames(test1)[0] === '5') {
|
|
return false;
|
|
}
|
|
|
|
// https://bugs.chromium.org/p/v8/issues/detail?id=3056
|
|
var test2 = {};
|
|
for (var i = 0; i < 10; i++) {
|
|
test2['_' + String.fromCharCode(i)] = i;
|
|
}
|
|
var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
|
|
return test2[n];
|
|
});
|
|
if (order2.join('') !== '0123456789') {
|
|
return false;
|
|
}
|
|
|
|
// https://bugs.chromium.org/p/v8/issues/detail?id=3056
|
|
var test3 = {};
|
|
'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
|
|
test3[letter] = letter;
|
|
});
|
|
if (Object.keys(Object.assign({}, test3)).join('') !==
|
|
'abcdefghijklmnopqrst') {
|
|
return false;
|
|
}
|
|
|
|
return true;
|
|
} catch (err) {
|
|
// We don't expect any of the above to throw, but better to be safe.
|
|
return false;
|
|
}
|
|
}
|
|
|
|
module.exports = shouldUseNative() ? Object.assign : function (target, source) {
|
|
var from;
|
|
var to = toObject(target);
|
|
var symbols;
|
|
|
|
for (var s = 1; s < arguments.length; s++) {
|
|
from = Object(arguments[s]);
|
|
|
|
for (var key in from) {
|
|
if (hasOwnProperty.call(from, key)) {
|
|
to[key] = from[key];
|
|
}
|
|
}
|
|
|
|
if (getOwnPropertySymbols) {
|
|
symbols = getOwnPropertySymbols(from);
|
|
for (var i = 0; i < symbols.length; i++) {
|
|
if (propIsEnumerable.call(from, symbols[i])) {
|
|
to[symbols[i]] = from[symbols[i]];
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
return to;
|
|
};
|
|
|
|
},{}],12:[function(require,module,exports){
|
|
// shim for using process in browser
|
|
var process = module.exports = {};
|
|
|
|
// cached from whatever global is present so that test runners that stub it
|
|
// don't break things. But we need to wrap it in a try catch in case it is
|
|
// wrapped in strict mode code which doesn't define any globals. It's inside a
|
|
// function because try/catches deoptimize in certain engines.
|
|
|
|
var cachedSetTimeout;
|
|
var cachedClearTimeout;
|
|
|
|
function defaultSetTimout() {
|
|
throw new Error('setTimeout has not been defined');
|
|
}
|
|
function defaultClearTimeout () {
|
|
throw new Error('clearTimeout has not been defined');
|
|
}
|
|
(function () {
|
|
try {
|
|
if (typeof setTimeout === 'function') {
|
|
cachedSetTimeout = setTimeout;
|
|
} else {
|
|
cachedSetTimeout = defaultSetTimout;
|
|
}
|
|
} catch (e) {
|
|
cachedSetTimeout = defaultSetTimout;
|
|
}
|
|
try {
|
|
if (typeof clearTimeout === 'function') {
|
|
cachedClearTimeout = clearTimeout;
|
|
} else {
|
|
cachedClearTimeout = defaultClearTimeout;
|
|
}
|
|
} catch (e) {
|
|
cachedClearTimeout = defaultClearTimeout;
|
|
}
|
|
} ())
|
|
function runTimeout(fun) {
|
|
if (cachedSetTimeout === setTimeout) {
|
|
//normal enviroments in sane situations
|
|
return setTimeout(fun, 0);
|
|
}
|
|
// if setTimeout wasn't available but was latter defined
|
|
if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
|
|
cachedSetTimeout = setTimeout;
|
|
return setTimeout(fun, 0);
|
|
}
|
|
try {
|
|
// when when somebody has screwed with setTimeout but no I.E. maddness
|
|
return cachedSetTimeout(fun, 0);
|
|
} catch(e){
|
|
try {
|
|
// When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
|
|
return cachedSetTimeout.call(null, fun, 0);
|
|
} catch(e){
|
|
// same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
|
|
return cachedSetTimeout.call(this, fun, 0);
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
function runClearTimeout(marker) {
|
|
if (cachedClearTimeout === clearTimeout) {
|
|
//normal enviroments in sane situations
|
|
return clearTimeout(marker);
|
|
}
|
|
// if clearTimeout wasn't available but was latter defined
|
|
if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
|
|
cachedClearTimeout = clearTimeout;
|
|
return clearTimeout(marker);
|
|
}
|
|
try {
|
|
// when when somebody has screwed with setTimeout but no I.E. maddness
|
|
return cachedClearTimeout(marker);
|
|
} catch (e){
|
|
try {
|
|
// When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
|
|
return cachedClearTimeout.call(null, marker);
|
|
} catch (e){
|
|
// same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
|
|
// Some versions of I.E. have different rules for clearTimeout vs setTimeout
|
|
return cachedClearTimeout.call(this, marker);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
}
|
|
var queue = [];
|
|
var draining = false;
|
|
var currentQueue;
|
|
var queueIndex = -1;
|
|
|
|
function cleanUpNextTick() {
|
|
if (!draining || !currentQueue) {
|
|
return;
|
|
}
|
|
draining = false;
|
|
if (currentQueue.length) {
|
|
queue = currentQueue.concat(queue);
|
|
} else {
|
|
queueIndex = -1;
|
|
}
|
|
if (queue.length) {
|
|
drainQueue();
|
|
}
|
|
}
|
|
|
|
function drainQueue() {
|
|
if (draining) {
|
|
return;
|
|
}
|
|
var timeout = runTimeout(cleanUpNextTick);
|
|
draining = true;
|
|
|
|
var len = queue.length;
|
|
while(len) {
|
|
currentQueue = queue;
|
|
queue = [];
|
|
while (++queueIndex < len) {
|
|
if (currentQueue) {
|
|
currentQueue[queueIndex].run();
|
|
}
|
|
}
|
|
queueIndex = -1;
|
|
len = queue.length;
|
|
}
|
|
currentQueue = null;
|
|
draining = false;
|
|
runClearTimeout(timeout);
|
|
}
|
|
|
|
process.nextTick = function (fun) {
|
|
var args = new Array(arguments.length - 1);
|
|
if (arguments.length > 1) {
|
|
for (var i = 1; i < arguments.length; i++) {
|
|
args[i - 1] = arguments[i];
|
|
}
|
|
}
|
|
queue.push(new Item(fun, args));
|
|
if (queue.length === 1 && !draining) {
|
|
runTimeout(drainQueue);
|
|
}
|
|
};
|
|
|
|
// v8 likes predictible objects
|
|
function Item(fun, array) {
|
|
this.fun = fun;
|
|
this.array = array;
|
|
}
|
|
Item.prototype.run = function () {
|
|
this.fun.apply(null, this.array);
|
|
};
|
|
process.title = 'browser';
|
|
process.browser = true;
|
|
process.env = {};
|
|
process.argv = [];
|
|
process.version = ''; // empty string to avoid regexp issues
|
|
process.versions = {};
|
|
|
|
function noop() {}
|
|
|
|
process.on = noop;
|
|
process.addListener = noop;
|
|
process.once = noop;
|
|
process.off = noop;
|
|
process.removeListener = noop;
|
|
process.removeAllListeners = noop;
|
|
process.emit = noop;
|
|
process.prependListener = noop;
|
|
process.prependOnceListener = noop;
|
|
|
|
process.listeners = function (name) { return [] }
|
|
|
|
process.binding = function (name) {
|
|
throw new Error('process.binding is not supported');
|
|
};
|
|
|
|
process.cwd = function () { return '/' };
|
|
process.chdir = function (dir) {
|
|
throw new Error('process.chdir is not supported');
|
|
};
|
|
process.umask = function() { return 0; };
|
|
|
|
},{}],13:[function(require,module,exports){
|
|
(function (process){
|
|
/*
|
|
Copyright 2019 0KIMS association.
|
|
|
|
This file is part of wasmsnark (Web Assembly zkSnark Prover).
|
|
|
|
wasmsnark is a free software: you can redistribute it and/or modify it
|
|
under the terms of the GNU General Public License as published by
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
(at your option) any later version.
|
|
|
|
wasmsnark is distributed in the hope that it will be useful, but WITHOUT
|
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
|
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
|
|
License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with wasmsnark. If not, see <https://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
const bigInt = require("big-integer");
|
|
const bn128_wasm = require("../build/bn128_wasm.js");
|
|
const assert = require("assert");
|
|
const utils = require("./utils");
|
|
|
|
const SIZEF1 = 32;
|
|
const inBrowser = (typeof window !== "undefined");
|
|
let NodeWorker;
|
|
let NodeCrypto;
|
|
if (!inBrowser) {
|
|
NodeWorker = require("worker_threads").Worker;
|
|
NodeCrypto = require("crypto");
|
|
}
|
|
|
|
|
|
class Deferred {
|
|
constructor() {
|
|
this.promise = new Promise((resolve, reject)=> {
|
|
this.reject = reject;
|
|
this.resolve = resolve;
|
|
});
|
|
}
|
|
}
|
|
|
|
/*
|
|
function delay(ms) {
|
|
return new Promise(resolve => setTimeout(resolve, ms));
|
|
}
|
|
*/
|
|
|
|
function thread(self) {
|
|
let instance;
|
|
let memory;
|
|
let i32;
|
|
|
|
async function init(data) {
|
|
const code = new Uint8Array(data.code);
|
|
const wasmModule = await WebAssembly.compile(code);
|
|
memory = new WebAssembly.Memory({initial:data.init});
|
|
i32 = new Uint32Array(memory.buffer);
|
|
|
|
instance = await WebAssembly.instantiate(wasmModule, {
|
|
env: {
|
|
"memory": memory
|
|
}
|
|
});
|
|
}
|
|
|
|
function alloc(length) {
|
|
while (i32[0] & 3) i32[0]++; // Return always aligned pointers
|
|
const res = i32[0];
|
|
i32[0] += length;
|
|
while (i32[0] > memory.buffer.byteLength) {
|
|
memory.grow(100);
|
|
}
|
|
i32 = new Uint32Array(memory.buffer);
|
|
return res;
|
|
}
|
|
|
|
function putBin(b) {
|
|
const p = alloc(b.byteLength);
|
|
const s32 = new Uint32Array(b);
|
|
i32.set(s32, p/4);
|
|
return p;
|
|
}
|
|
|
|
function getBin(p, l) {
|
|
return memory.buffer.slice(p, p+l);
|
|
}
|
|
|
|
self.onmessage = function(e) {
|
|
let data;
|
|
if (e.data) {
|
|
data = e.data;
|
|
} else {
|
|
data = e;
|
|
}
|
|
|
|
if (data.command == "INIT") {
|
|
init(data).then(function() {
|
|
self.postMessage(data.result);
|
|
});
|
|
} else if (data.command == "G1_MULTIEXP") {
|
|
|
|
const oldAlloc = i32[0];
|
|
const pScalars = putBin(data.scalars);
|
|
const pPoints = putBin(data.points);
|
|
const pRes = alloc(96);
|
|
instance.exports.g1m_zero(pRes);
|
|
instance.exports.g1m_multiexp2(pScalars, pPoints, data.n, 7, pRes);
|
|
|
|
data.result = getBin(pRes, 96);
|
|
i32[0] = oldAlloc;
|
|
self.postMessage(data.result, [data.result]);
|
|
} else if (data.command == "G2_MULTIEXP") {
|
|
|
|
const oldAlloc = i32[0];
|
|
const pScalars = putBin(data.scalars);
|
|
const pPoints = putBin(data.points);
|
|
const pRes = alloc(192);
|
|
instance.exports.g2m_zero(pRes);
|
|
instance.exports.g2m_multiexp(pScalars, pPoints, data.n, 7, pRes);
|
|
|
|
data.result = getBin(pRes, 192);
|
|
i32[0] = oldAlloc;
|
|
self.postMessage(data.result, [data.result]);
|
|
} else if (data.command == "CALC_H") {
|
|
const oldAlloc = i32[0];
|
|
const pSignals = putBin(data.signals);
|
|
const pPolsA = putBin(data.polsA);
|
|
const pPolsB = putBin(data.polsB);
|
|
const nSignals = data.nSignals;
|
|
const domainSize = data.domainSize;
|
|
const pSignalsM = alloc(nSignals*32);
|
|
const pPolA = alloc(domainSize*32);
|
|
const pPolB = alloc(domainSize*32);
|
|
const pPolA2 = alloc(domainSize*32*2);
|
|
const pPolB2 = alloc(domainSize*32*2);
|
|
|
|
instance.exports.fft_toMontgomeryN(pSignals, pSignalsM, nSignals);
|
|
|
|
instance.exports.pol_zero(pPolA, domainSize);
|
|
instance.exports.pol_zero(pPolB, domainSize);
|
|
|
|
instance.exports.pol_constructLC(pPolsA, pSignalsM, nSignals, pPolA);
|
|
instance.exports.pol_constructLC(pPolsB, pSignalsM, nSignals, pPolB);
|
|
|
|
instance.exports.fft_copyNInterleaved(pPolA, pPolA2, domainSize);
|
|
instance.exports.fft_copyNInterleaved(pPolB, pPolB2, domainSize);
|
|
|
|
instance.exports.fft_ifft(pPolA, domainSize, 0);
|
|
instance.exports.fft_ifft(pPolB, domainSize, 0);
|
|
instance.exports.fft_fft(pPolA, domainSize, 1);
|
|
instance.exports.fft_fft(pPolB, domainSize, 1);
|
|
|
|
instance.exports.fft_copyNInterleaved(pPolA, pPolA2+32, domainSize);
|
|
instance.exports.fft_copyNInterleaved(pPolB, pPolB2+32, domainSize);
|
|
|
|
instance.exports.fft_mulN(pPolA2, pPolB2, domainSize*2, pPolA2);
|
|
|
|
instance.exports.fft_ifft(pPolA2, domainSize*2, 0);
|
|
|
|
instance.exports.fft_fromMontgomeryN(pPolA2+domainSize*32, pPolA2+domainSize*32, domainSize);
|
|
|
|
data.result = getBin(pPolA2+domainSize*32, domainSize*32);
|
|
i32[0] = oldAlloc;
|
|
self.postMessage(data.result, [data.result]);
|
|
} else if (data.command == "TERMINATE") {
|
|
process.exit();
|
|
}
|
|
};
|
|
}
|
|
|
|
async function build() {
|
|
|
|
const bn128 = new Bn128();
|
|
|
|
bn128.q = bigInt("21888242871839275222246405745257275088696311157297823662689037894645226208583");
|
|
bn128.r = bigInt("21888242871839275222246405745257275088548364400416034343698204186575808495617");
|
|
bn128.n64 = Math.floor((bn128.q.minus(1).bitLength() - 1)/64) +1;
|
|
bn128.n32 = bn128.n64*2;
|
|
bn128.n8 = bn128.n64*8;
|
|
|
|
bn128.memory = new WebAssembly.Memory({initial:5000});
|
|
bn128.i32 = new Uint32Array(bn128.memory.buffer);
|
|
|
|
const wasmModule = await WebAssembly.compile(bn128_wasm.code);
|
|
|
|
bn128.instance = await WebAssembly.instantiate(wasmModule, {
|
|
env: {
|
|
"memory": bn128.memory
|
|
}
|
|
});
|
|
|
|
bn128.pq = bn128_wasm.pq;
|
|
bn128.pr = bn128_wasm.pr;
|
|
bn128.pG1gen = bn128_wasm.pG1gen;
|
|
bn128.pG1zero = bn128_wasm.pG1zero;
|
|
bn128.pG2gen = bn128_wasm.pG2gen;
|
|
bn128.pG2zero = bn128_wasm.pG2zero;
|
|
bn128.pOneT = bn128_wasm.pOneT;
|
|
|
|
bn128.pr0 = bn128.alloc(192);
|
|
bn128.pr1 = bn128.alloc(192);
|
|
|
|
bn128.workers = [];
|
|
bn128.pendingDeferreds = [];
|
|
bn128.working = [];
|
|
|
|
let concurrency;
|
|
|
|
if ((typeof(navigator) === "object") && navigator.hardwareConcurrency) {
|
|
concurrency = navigator.hardwareConcurrency;
|
|
} else {
|
|
concurrency = 8;
|
|
}
|
|
|
|
function getOnMsg(i) {
|
|
return function(e) {
|
|
let data;
|
|
if ((e)&&(e.data)) {
|
|
data = e.data;
|
|
} else {
|
|
data = e;
|
|
}
|
|
|
|
bn128.working[i]=false;
|
|
bn128.pendingDeferreds[i].resolve(data);
|
|
bn128.processWorks();
|
|
};
|
|
}
|
|
|
|
for (let i = 0; i<concurrency; i++) {
|
|
|
|
if (inBrowser) {
|
|
const blob = new Blob(["(", thread.toString(), ")(self);"], { type: "text/javascript" });
|
|
const url = URL.createObjectURL(blob);
|
|
|
|
bn128.workers[i] = new Worker(url);
|
|
|
|
bn128.workers[i].onmessage = getOnMsg(i);
|
|
|
|
} else {
|
|
bn128.workers[i] = new NodeWorker("(" + thread.toString()+ ")(require('worker_threads').parentPort);", {eval: true});
|
|
|
|
bn128.workers[i].on("message", getOnMsg(i));
|
|
}
|
|
|
|
bn128.working[i]=false;
|
|
}
|
|
|
|
const initPromises = [];
|
|
for (let i=0; i<bn128.workers.length;i++) {
|
|
const copyCode = bn128_wasm.code.buffer.slice(0);
|
|
initPromises.push(bn128.postAction(i, {
|
|
command: "INIT",
|
|
init: 5000,
|
|
code: copyCode
|
|
|
|
}, [copyCode]));
|
|
}
|
|
|
|
await Promise.all(initPromises);
|
|
|
|
return bn128;
|
|
}
|
|
|
|
class Bn128 {
|
|
constructor() {
|
|
this.actionQueue = [];
|
|
}
|
|
|
|
postAction(workerId, e, transfers, _deferred) {
|
|
assert(this.working[workerId] == false);
|
|
this.working[workerId] = true;
|
|
|
|
this.pendingDeferreds[workerId] = _deferred ? _deferred : new Deferred();
|
|
this.workers[workerId].postMessage(e, transfers);
|
|
|
|
return this.pendingDeferreds[workerId].promise;
|
|
}
|
|
|
|
processWorks() {
|
|
for (let i=0; (i<this.workers.length)&&(this.actionQueue.length > 0); i++) {
|
|
if (this.working[i] == false) {
|
|
const work = this.actionQueue.shift();
|
|
this.postAction(i, work.data, work.transfers, work.deferred);
|
|
}
|
|
}
|
|
}
|
|
|
|
queueAction(actionData, transfers) {
|
|
const d = new Deferred();
|
|
this.actionQueue.push({
|
|
data: actionData,
|
|
transfers: transfers,
|
|
deferred: d
|
|
});
|
|
this.processWorks();
|
|
return d.promise;
|
|
}
|
|
|
|
alloc(length) {
|
|
while (this.i32[0] & 3) this.i32[0]++; // Return always aligned pointers
|
|
const res = this.i32[0];
|
|
this.i32[0] += length;
|
|
return res;
|
|
}
|
|
|
|
|
|
putBin(p, b) {
|
|
const s32 = new Uint32Array(b);
|
|
this.i32.set(s32, p/4);
|
|
}
|
|
|
|
getBin(p, l) {
|
|
return this.memory.buffer.slice(p, p+l);
|
|
}
|
|
|
|
bin2int(b) {
|
|
const i32 = new Uint32Array(b);
|
|
let acc = bigInt(i32[7]);
|
|
for (let i=6; i>=0; i--) {
|
|
acc = acc.shiftLeft(32);
|
|
acc = acc.add(i32[i]);
|
|
}
|
|
return acc.toString();
|
|
}
|
|
|
|
bin2g1(b) {
|
|
return [
|
|
this.bin2int(b.slice(0,32)),
|
|
this.bin2int(b.slice(32,64)),
|
|
this.bin2int(b.slice(64,96)),
|
|
];
|
|
}
|
|
bin2g2(b) {
|
|
return [
|
|
[
|
|
this.bin2int(b.slice(0,32)),
|
|
this.bin2int(b.slice(32,64))
|
|
],
|
|
[
|
|
this.bin2int(b.slice(64,96)),
|
|
this.bin2int(b.slice(96,128))
|
|
],
|
|
[
|
|
this.bin2int(b.slice(128,160)),
|
|
this.bin2int(b.slice(160,192))
|
|
],
|
|
];
|
|
}
|
|
|
|
async g1_multiexp(scalars, points) {
|
|
const nPoints = scalars.byteLength /32;
|
|
const nPointsPerThread = Math.floor(nPoints / this.workers.length);
|
|
const opPromises = [];
|
|
for (let i=0; i<this.workers.length; i++) {
|
|
const th_nPoints =
|
|
i < this.workers.length -1 ?
|
|
nPointsPerThread :
|
|
nPoints - (nPointsPerThread * (this.workers.length -1));
|
|
const scalars_th = scalars.slice(i*nPointsPerThread*32, i*nPointsPerThread*32 + th_nPoints*32);
|
|
const points_th = points.slice(i*nPointsPerThread*64, i*nPointsPerThread*64 + th_nPoints*64);
|
|
opPromises.push(
|
|
this.queueAction({
|
|
command: "G1_MULTIEXP",
|
|
scalars: scalars_th,
|
|
points: points_th,
|
|
n: th_nPoints
|
|
}, [scalars_th, points_th])
|
|
);
|
|
}
|
|
|
|
const results = await Promise.all(opPromises);
|
|
|
|
this.instance.exports.g1m_zero(this.pr0);
|
|
for (let i=0; i<results.length; i++) {
|
|
this.putBin(this.pr1, results[i]);
|
|
this.instance.exports.g1m_add(this.pr0, this.pr1, this.pr0);
|
|
}
|
|
|
|
return this.getBin(this.pr0, 96);
|
|
}
|
|
|
|
async g2_multiexp(scalars, points) {
|
|
const nPoints = scalars.byteLength /32;
|
|
const nPointsPerThread = Math.floor(nPoints / this.workers.length);
|
|
const opPromises = [];
|
|
for (let i=0; i<this.workers.length; i++) {
|
|
const th_nPoints =
|
|
i < this.workers.length -1 ?
|
|
nPointsPerThread :
|
|
nPoints - (nPointsPerThread * (this.workers.length -1));
|
|
const scalars_th = scalars.slice(i*nPointsPerThread*32, i*nPointsPerThread*32 + th_nPoints*32);
|
|
const points_th = points.slice(i*nPointsPerThread*128, i*nPointsPerThread*128 + th_nPoints*128);
|
|
opPromises.push(
|
|
this.queueAction({
|
|
command: "G2_MULTIEXP",
|
|
scalars: scalars_th,
|
|
points: points_th,
|
|
n: th_nPoints
|
|
}, [scalars_th, points_th])
|
|
);
|
|
}
|
|
|
|
const results = await Promise.all(opPromises);
|
|
|
|
this.instance.exports.g2m_zero(this.pr0);
|
|
for (let i=0; i<results.length; i++) {
|
|
this.putBin(this.pr1, results[i]);
|
|
this.instance.exports.g2m_add(this.pr0, this.pr1, this.pr0);
|
|
}
|
|
|
|
return this.getBin(this.pr0, 192);
|
|
}
|
|
|
|
g1_affine(p) {
|
|
this.putBin(this.pr0, p);
|
|
this.instance.exports.g1m_affine(this.pr0, this.pr0);
|
|
return this.getBin(this.pr0, 96);
|
|
}
|
|
|
|
g2_affine(p) {
|
|
this.putBin(this.pr0, p);
|
|
this.instance.exports.g2m_affine(this.pr0, this.pr0);
|
|
return this.getBin(this.pr0, 192);
|
|
}
|
|
|
|
g1_fromMontgomery(p) {
|
|
this.putBin(this.pr0, p);
|
|
this.instance.exports.g1m_fromMontgomery(this.pr0, this.pr0);
|
|
return this.getBin(this.pr0, 96);
|
|
}
|
|
|
|
g2_fromMontgomery(p) {
|
|
this.putBin(this.pr0, p);
|
|
this.instance.exports.g2m_fromMontgomery(this.pr0, this.pr0);
|
|
return this.getBin(this.pr0, 192);
|
|
}
|
|
|
|
loadPoint1(b) {
|
|
const p = this.alloc(96);
|
|
this.putBin(p, b);
|
|
this.instance.exports.f1m_one(p+64);
|
|
return p;
|
|
}
|
|
|
|
loadPoint2(b) {
|
|
const p = this.alloc(192);
|
|
this.putBin(p, b);
|
|
this.instance.exports.f2m_one(p+128);
|
|
return p;
|
|
}
|
|
|
|
|
|
setInt(pos, _a, _size) {
|
|
const n32 = _size ? (((_size - 1)>>2)+1) : SIZEF1 >> 2;
|
|
const a = bigInt(_a);
|
|
if (pos & 0x7) throw new Error("Pointer must be aligned");
|
|
for (let i=0; i<n32; i++) {
|
|
this.i32[(pos>>2)+i] = a.shiftRight(i*32).and(0xFFFFFFFF).toJSNumber();
|
|
}
|
|
}
|
|
|
|
setF1(p, e) {
|
|
const n32 = (SIZEF1 >> 2);
|
|
let arr;
|
|
if (Array.isArray(e)) {
|
|
if (e.length == n32 ) {
|
|
arr = e;
|
|
} else if (e.length == 3) {
|
|
arr = e[2].slice(0);
|
|
// Remove
|
|
while (arr[arr.length-1] <0) arr.pop();
|
|
// Fill it with zeros
|
|
const filledElements = arr.length;
|
|
arr.length = n32;
|
|
arr.fill(0, filledElements, n32);
|
|
} else {
|
|
throw new Error("Invalid format");
|
|
}
|
|
this.i32.set(Uint32Array.from(arr), p >> 2);
|
|
} else {
|
|
this.setInt(p, e);
|
|
}
|
|
}
|
|
|
|
|
|
setF2(p, e) {
|
|
this.setF1(p, e[0]);
|
|
this.setF1(p + SIZEF1, e[1]);
|
|
}
|
|
|
|
setF6(p, e) {
|
|
this.setF2(p, e[0]);
|
|
this.setF2(p+2*SIZEF1, e[1]);
|
|
this.setF2(p+4*SIZEF1, e[2]);
|
|
}
|
|
|
|
setF12(p, e) {
|
|
this.setF6(p, e[0]);
|
|
this.setF6(p + 6*SIZEF1, e[1]);
|
|
}
|
|
|
|
setG1Affine(p, e) {
|
|
this.setF1(p, e[0]);
|
|
this.setF1(p + SIZEF1, e[1]);
|
|
this.setF1(p + 2*SIZEF1, 1);
|
|
}
|
|
|
|
setG2Affine(p, e) {
|
|
this.setF2(p, e[0]);
|
|
this.setF2(p + SIZEF1*2, e[1]);
|
|
this.setF2(p + SIZEF1*4, [1, 0]);
|
|
}
|
|
|
|
getF1(p) {
|
|
this.instance.exports.f1m_fromMontgomery(p, p);
|
|
const r = this.bin2int(this.i32.slice(p>>2, (p+SIZEF1)>>2)).toString();
|
|
this.instance.exports.f1m_toMontgomery(p, p);
|
|
}
|
|
|
|
getF2(p) {
|
|
return [
|
|
this.getF1(p),
|
|
this.getF1(p+SIZEF1)
|
|
];
|
|
}
|
|
|
|
getF6(p) {
|
|
return [
|
|
this.getF2(p),
|
|
this.getF2(p+2*SIZEF1),
|
|
this.getF2(p+4*SIZEF1)
|
|
];
|
|
}
|
|
|
|
getF12(p) {
|
|
return [
|
|
this.getF6(p),
|
|
this.getF6(p+6*SIZEF1),
|
|
];
|
|
}
|
|
|
|
getG1(p) {
|
|
return [
|
|
this.getF1(p),
|
|
this.getF1(p+SIZEF1),
|
|
this.getF1(p+2*SIZEF1)
|
|
];
|
|
}
|
|
|
|
getG2(p) {
|
|
return [
|
|
this.getF2(p),
|
|
this.getF2(p+2*SIZEF1),
|
|
this.getF2(p+4*SIZEF1)
|
|
];
|
|
}
|
|
|
|
|
|
terminate() {
|
|
for (let i=0; i<this.workers.length; i++) {
|
|
this.workers[i].postMessage({command: "TERMINATE"});
|
|
}
|
|
}
|
|
|
|
|
|
async calcH(signals, polsA, polsB, nSignals, domainSize) {
|
|
return this.queueAction({
|
|
command: "CALC_H",
|
|
signals: signals,
|
|
polsA: polsA,
|
|
polsB: polsB,
|
|
nSignals: nSignals,
|
|
domainSize: domainSize
|
|
}, [signals, polsA, polsB]);
|
|
}
|
|
|
|
async groth16GenProof(signals, pkey) {
|
|
const pkey32 = new Uint32Array(pkey);
|
|
const nSignals = pkey32[0];
|
|
const nPublic = pkey32[1];
|
|
const domainSize = pkey32[2];
|
|
const pPolsA = pkey32[3];
|
|
const pPolsB = pkey32[4];
|
|
const pPointsA = pkey32[5];
|
|
const pPointsB1 = pkey32[6];
|
|
const pPointsB2 = pkey32[7];
|
|
const pPointsC = pkey32[8];
|
|
const pHExps = pkey32[9];
|
|
const polsA = pkey.slice(pPolsA, pPolsA + pPolsB);
|
|
const polsB = pkey.slice(pPolsB, pPolsB + pPointsA);
|
|
const pointsA = pkey.slice(pPointsA, pPointsA + nSignals*64);
|
|
const pointsB1 = pkey.slice(pPointsB1, pPointsB1 + nSignals*64);
|
|
const pointsB2 = pkey.slice(pPointsB2, pPointsB2 + nSignals*128);
|
|
const pointsC = pkey.slice(pPointsC, pPointsC + (nSignals-nPublic-1)*64);
|
|
const pointsHExps = pkey.slice(pHExps, pHExps + domainSize*64);
|
|
|
|
const alfa1 = pkey.slice(10*4, 10*4 + 64);
|
|
const beta1 = pkey.slice(10*4 + 64, 10*4 + 128);
|
|
const delta1 = pkey.slice(10*4 + 128, 10*4 + 192);
|
|
const beta2 = pkey.slice(10*4 + 192, 10*4 + 320);
|
|
const delta2 = pkey.slice(10*4 + 320, 10*4 + 448);
|
|
|
|
|
|
const pH = this.calcH(signals.slice(0), polsA, polsB, nSignals, domainSize).then( (h) => {
|
|
/* Debug code to print the result of h
|
|
for (let i=0; i<domainSize; i++) {
|
|
const a = this.bin2int(h.slice(i*32, i*32+32));
|
|
console.log(i + " -> " + a.toString());
|
|
}
|
|
*/
|
|
return this.g1_multiexp(h, pointsHExps);
|
|
});
|
|
|
|
const pA = this.g1_multiexp(signals.slice(0), pointsA);
|
|
const pB1 = this.g1_multiexp(signals.slice(0), pointsB1);
|
|
const pB2 = this.g2_multiexp(signals.slice(0), pointsB2);
|
|
const pC = this.g1_multiexp(signals.slice((nPublic+1)*32), pointsC);
|
|
|
|
const res = await Promise.all([pA, pB1, pB2, pC, pH]);
|
|
|
|
const pi_a = this.alloc(96);
|
|
const pi_b = this.alloc(192);
|
|
const pi_c = this.alloc(96);
|
|
const pib1 = this.alloc(96);
|
|
|
|
|
|
this.putBin(pi_a, res[0]);
|
|
this.putBin(pib1, res[1]);
|
|
this.putBin(pi_b, res[2]);
|
|
this.putBin(pi_c, res[3]);
|
|
|
|
const pAlfa1 = this.loadPoint1(alfa1);
|
|
const pBeta1 = this.loadPoint1(beta1);
|
|
const pDelta1 = this.loadPoint1(delta1);
|
|
const pBeta2 = this.loadPoint2(beta2);
|
|
const pDelta2 = this.loadPoint2(delta2);
|
|
|
|
|
|
let rnd = new Uint32Array(8);
|
|
|
|
const aux1 = this.alloc(96);
|
|
const aux2 = this.alloc(192);
|
|
|
|
const pr = this.alloc(32);
|
|
const ps = this.alloc(32);
|
|
|
|
if (inBrowser) {
|
|
window.crypto.getRandomValues(rnd);
|
|
this.putBin(pr, rnd);
|
|
|
|
window.crypto.getRandomValues(rnd);
|
|
this.putBin(ps, rnd);
|
|
} else {
|
|
const br = NodeCrypto.randomBytes(32);
|
|
this.putBin(pr, br);
|
|
const bs = NodeCrypto.randomBytes(32);
|
|
this.putBin(ps, bs);
|
|
}
|
|
|
|
/// Uncoment it to debug and check it works
|
|
// this.instance.exports.f1m_zero(pr);
|
|
// this.instance.exports.f1m_zero(ps);
|
|
|
|
// pi_a = pi_a + Alfa1 + r*Delta1
|
|
this.instance.exports.g1m_add(pAlfa1, pi_a, pi_a);
|
|
this.instance.exports.g1m_timesScalar(pDelta1, pr, 32, aux1);
|
|
this.instance.exports.g1m_add(aux1, pi_a, pi_a);
|
|
|
|
// pi_b = pi_b + Beta2 + s*Delta2
|
|
this.instance.exports.g2m_add(pBeta2, pi_b, pi_b);
|
|
this.instance.exports.g2m_timesScalar(pDelta2, ps, 32, aux2);
|
|
this.instance.exports.g2m_add(aux2, pi_b, pi_b);
|
|
|
|
// pib1 = pib1 + Beta1 + s*Delta1
|
|
this.instance.exports.g1m_add(pBeta1, pib1, pib1);
|
|
this.instance.exports.g1m_timesScalar(pDelta1, ps, 32, aux1);
|
|
this.instance.exports.g1m_add(aux1, pib1, pib1);
|
|
|
|
|
|
// pi_c = pi_c + pH
|
|
this.putBin(aux1, res[4]);
|
|
this.instance.exports.g1m_add(aux1, pi_c, pi_c);
|
|
|
|
|
|
// pi_c = pi_c + s*pi_a
|
|
this.instance.exports.g1m_timesScalar(pi_a, ps, 32, aux1);
|
|
this.instance.exports.g1m_add(aux1, pi_c, pi_c);
|
|
|
|
// pi_c = pi_c + r*pib1
|
|
this.instance.exports.g1m_timesScalar(pib1, pr, 32, aux1);
|
|
this.instance.exports.g1m_add(aux1, pi_c, pi_c);
|
|
|
|
// pi_c = pi_c - r*s*delta1
|
|
const prs = this.alloc(64);
|
|
this.instance.exports.int_mul(pr, ps, prs);
|
|
this.instance.exports.g1m_timesScalar(pDelta1, prs, 64, aux1);
|
|
this.instance.exports.g1m_neg(aux1, aux1);
|
|
this.instance.exports.g1m_add(aux1, pi_c, pi_c);
|
|
|
|
this.instance.exports.g1m_affine(pi_a, pi_a);
|
|
this.instance.exports.g2m_affine(pi_b, pi_b);
|
|
this.instance.exports.g1m_affine(pi_c, pi_c);
|
|
|
|
this.instance.exports.g1m_fromMontgomery(pi_a, pi_a);
|
|
this.instance.exports.g2m_fromMontgomery(pi_b, pi_b);
|
|
this.instance.exports.g1m_fromMontgomery(pi_c, pi_c);
|
|
|
|
return {
|
|
pi_a: this.bin2g1(this.getBin(pi_a, 96)),
|
|
pi_b: this.bin2g2(this.getBin(pi_b, 192)),
|
|
pi_c: this.bin2g1(this.getBin(pi_c, 96)),
|
|
};
|
|
|
|
}
|
|
|
|
async groth16Verify(verificationKey, input, proof) {
|
|
|
|
if (input) {
|
|
if ((!Array.isArray(input))||(utils.isOcamNum(input))) input = [input];
|
|
} else {
|
|
input = [];
|
|
}
|
|
|
|
const oldAlloc = this.i32[0];
|
|
|
|
const pA = this.alloc(SIZEF1*3);
|
|
const pB = this.alloc(SIZEF1*6);
|
|
const pAlfaBeta = this.alloc(SIZEF1*12);
|
|
const pIC = this.alloc(SIZEF1*3);
|
|
const pICaux = this.alloc(SIZEF1*3);
|
|
const pICr = this.alloc(SIZEF1);
|
|
const pC = this.alloc(SIZEF1*3);
|
|
const pDelta2 = this.alloc(SIZEF1*6);
|
|
const pGamma2 = this.alloc(SIZEF1*6);
|
|
const pAlfa1 = this.alloc(SIZEF1*3);
|
|
const pBeta2 = this.alloc(SIZEF1*6);
|
|
|
|
// 1.- start the all precompute G2
|
|
this.setG1Affine(pA, proof.pi_a);
|
|
this.instance.exports.g1m_toMontgomery(pA, pA);
|
|
|
|
this.setG2Affine(pB, proof.pi_b);
|
|
this.instance.exports.g2m_toMontgomery(pB, pB);
|
|
|
|
this.setG1Affine(pC, proof.pi_c);
|
|
this.instance.exports.g1m_toMontgomery(pC, pC);
|
|
|
|
this.setG2Affine(pDelta2, verificationKey.vk_delta_2);
|
|
this.instance.exports.g2m_toMontgomery(pDelta2, pDelta2);
|
|
|
|
this.setG2Affine(pGamma2, verificationKey.vk_gamma_2);
|
|
this.instance.exports.g2m_toMontgomery(pGamma2, pGamma2);
|
|
|
|
this.setF12(pAlfaBeta, verificationKey.vk_alfabeta_12);
|
|
this.instance.exports.ftm_toMontgomery(pAlfaBeta, pAlfaBeta);
|
|
|
|
this.setG1Affine(pAlfa1, verificationKey.vk_alfa_1);
|
|
this.instance.exports.g1m_toMontgomery(pAlfa1, pAlfa1);
|
|
|
|
this.setG2Affine(pBeta2, verificationKey.vk_beta_2);
|
|
this.instance.exports.g2m_toMontgomery(pBeta2, pBeta2);
|
|
|
|
this.setG1Affine(pIC, verificationKey.IC[0]);
|
|
this.instance.exports.g1m_toMontgomery(pIC, pIC);
|
|
for (let i=0; i<input.length; i++) {
|
|
this.setG1Affine(pICaux, verificationKey.IC[i+1]);
|
|
this.instance.exports.g1m_toMontgomery(pICaux, pICaux);
|
|
|
|
this.setF1(pICr, input[i]);
|
|
if (this.instance.exports.int_gte(pICr, this.pr)) return false;
|
|
this.instance.exports.g1m_timesScalar(pICaux, pICr, SIZEF1, pICaux);
|
|
|
|
this.instance.exports.g1m_add(pICaux, pIC, pIC);
|
|
}
|
|
this.instance.exports.g1m_affine(pIC, pIC);
|
|
|
|
this.instance.exports.g1m_neg(pIC, pIC);
|
|
this.instance.exports.g1m_neg(pC, pC);
|
|
this.instance.exports.g1m_neg(pAlfa1, pAlfa1);
|
|
const valid = this.instance.exports.bn128_pairingEq4(pA, pB, pIC, pGamma2, pC, pDelta2, pAlfa1, pBeta2, this.pOneT);
|
|
// const valid = this.instance.exports.bn128_pairingEq3(pA, pB, pIC, pGamma2, pC, pDelta2, pAlfaBeta);
|
|
|
|
this.i32[0] = oldAlloc;
|
|
return (valid==1);
|
|
}
|
|
|
|
|
|
}
|
|
|
|
module.exports = build;
|
|
|
|
}).call(this,require('_process'))
|
|
},{"../build/bn128_wasm.js":1,"./utils":14,"_process":12,"assert":3,"big-integer":8,"crypto":undefined,"worker_threads":undefined}],14:[function(require,module,exports){
|
|
/*
|
|
Copyright 2019 0KIMS association.
|
|
|
|
This file is part of wasmsnark (Web Assembly zkSnark Prover).
|
|
|
|
wasmsnark is a free software: you can redistribute it and/or modify it
|
|
under the terms of the GNU General Public License as published by
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
(at your option) any later version.
|
|
|
|
wasmsnark is distributed in the hope that it will be useful, but WITHOUT
|
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
|
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
|
|
License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with wasmsnark. If not, see <https://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
const bigInt = require("big-integer");
|
|
|
|
exports.bigInt2BytesLE = function bigInt2BytesLE(_a, len) {
|
|
const b = Array(len);
|
|
let v = bigInt(_a);
|
|
for (let i=0; i<len; i++) {
|
|
b[i] = v.and(0xFF).toJSNumber();
|
|
v = v.shiftRight(8);
|
|
}
|
|
return b;
|
|
};
|
|
|
|
exports.bigInt2U32LE = function bigInt2BytesLE(_a, len) {
|
|
const b = Array(len);
|
|
let v = bigInt(_a);
|
|
for (let i=0; i<len; i++) {
|
|
b[i] = v.and(0xFFFFFFFF).toJSNumber();
|
|
v = v.shiftRight(32);
|
|
}
|
|
return b;
|
|
};
|
|
|
|
exports.isOcamNum = function(a) {
|
|
if (!Array.isArray(a)) return false;
|
|
if (a.length != 3) return false;
|
|
if (typeof a[0] !== "number") return false;
|
|
if (typeof a[1] !== "number") return false;
|
|
if (!Array.isArray(a[2])) return false;
|
|
return true;
|
|
}
|
|
|
|
|
|
|
|
},{"big-integer":8}]},{},[2]);
|