From a164115e8c2e5ef9f9fe0fb11ef8d994c37b411d Mon Sep 17 00:00:00 2001
From: Caleb James DeLisle
Date: Thu, 31 Aug 2017 16:28:48 +0200
Subject: [PATCH] Add media-tag-nacl to cryptpad so it will be hosted on the
server
---
www/common/media-tag-nacl.min.js | 1 +
1 file changed, 1 insertion(+)
create mode 100644 www/common/media-tag-nacl.min.js
diff --git a/www/common/media-tag-nacl.min.js b/www/common/media-tag-nacl.min.js
new file mode 100644
index 000000000..8210974fb
--- /dev/null
+++ b/www/common/media-tag-nacl.min.js
@@ -0,0 +1 @@
+!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.MediaTag=e():t.MediaTag=e()}(this,function(){return function(t){function e(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var r={};return e.m=t,e.c=r,e.d=function(t,r,n){e.o(t,r)||Object.defineProperty(t,r,{configurable:!1,enumerable:!0,get:n})},e.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,"a",r),r},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=87)}([function(t,e,r){"use strict";var n={IMAGE:"image",AUDIO:"audio",VIDEO:"video",PDF:"pdf",DASH:"dash",DOWNLOAD:"download",CRYPTO:"crypto",CLEAR_KEY:"clear-key",MEDIA_OBJECT:"media-object"};t.exports=n},function(t,e,r){"use strict";var n={MATCHER:"matcher",RENDERER:"renderer",FILTER:"filter",SANITIZER:"sanitizer"};t.exports=n},function(t,e,r){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var u=function(){function t(t,e){for(var r=0;r0}}]),t}();t.exports=i},function(t,e,r){"use strict";var n=r(16),o=r(15);t.exports=function(t,e){e.mediaObjects.forEach(function(t){n(t)}),e.activeMediaObject=t,o(t)}},function(t,e,r){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var u=r(1),a=r(5),s=r(3),c=function(t){function e(t){return n(this,e),o(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,u.FILTER,a.ANY))}return i(e,t),e}(s);t.exports=c},,,function(t,e,r){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var u=function(){function t(t,e){for(var r=0;r=0&&f.mediaTypes.splice(e,1)},f.removeAllAllowedMediaTypes=function(t){t.forEach(function(t){f.removeAllowedMediaType(t)})},f.isAllowedMediaType=function(t){return f.mediaTypes.some(function(e){return e===t})},t.exports=f},function(t,e,r){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var o=function(){function t(t,e){for(var r=0;r1)throw new Error("More than one plugin matched to update for this pass");1===e.length?e.forEach(function(e){Object.keys(t).forEach(function(r){e[r]=t[r]})}):n.pluginStore.store(t)})},n.configure=function(t){(n.loadingEngine||n.processingEngine).configure(t)},n.loadConfigurations=function(t){var e=t.filter(function(t){return t.hasAttribute("configuration")}).map(function(t){return t.getAttribute("configuration")}).reduce(function(t,e){return t.includes(e)||t.push(e),t},[]).map(function(t){return n.loader.configuration(t)});return Promise.all(e).then(function(t){var e=[];return t.forEach(function(t){n.update(t),n.configure(t),t.dependencies&&t.dependencies.forEach(function(t){e.includes(t)||e.push(t)})}),Promise.all(e.map(function(t){return n.loader.script(t)}))})},n.pluginStore=n.pluginStore||new i,n.processingEngine=n.processingEngine||new o(n.pluginStore),n.loader=new a,t.exports=n},function(t,e,r){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var u=r(1),a=r(5),s=r(3),c=function(t){function e(t){return n(this,e),o(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,u.SANITIZER,a.EVERY))}return i(e,t),e}(s);t.exports=c},function(t,e,r){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var u=function(){function t(t,e){for(var r=0;r MediaTag cannot find a plugin able to render your content
"),this.STACK_SIZE=50,this.SNAPSHOTS_LIMIT=50}return o(t,[{key:"key",value:function(t){return t.getId()}},{key:"configure",value:function(t){var e=this;this.configuration=t,t.processingEngine&&Object.keys(t.processingEngine).forEach(function(r){e[r]="defaultPlugin"===r?t.getDefaultPlugin():r})}},{key:"isConfigured",value:function(){return Boolean(this.configuration)}},{key:"prepare",value:function(t){var e=this;!function(){t.return=function(){return e.return(t)},t.state="processing"}();var r=t.getId();this.stacks.store(r,new h),this.snapshots.store(r,new p),this.stats.store(r,{})}},{key:"start",value:function(t){this.prepare(t),this.routine(t),this.run(t)}},{key:"run",value:function(t){var e=this.key(t),r=this.stacks.top(e);if(!r)return this.end(t);this.configuration?this.configuration.isAllowed(r.identifier)?(r.process||console.warn("FALSY PLUGIN",r),r.process(t)):(this.skip(t,r),this.return(t)):r.process(t)}},{key:"routine",value:function(t){this.fill(t),this.snapshot(t),this.check(t)}},{key:"snapshot",value:function(t){var e=this.key(t),r=this.stacks.get(e).clone();this.snapshots.stack(e,r)}},{key:"fill",value:function(t){var e=this,r=this.key(t),n=this.pluginStore.values(),o=n.filter(function(t){return t.getType()===a.MATCHER}).filter(function(e){return e.process(t)}).map(function(t){return t.getIdentifier()}),i=n.filter(function(t){return t.getType()!==a.MATCHER}).filter(function(t){return o.includes(t.getIdentifier())}),u=s.filterByOccurrencies(i);Object.keys(u).forEach(function(n){u[n].forEach(function(n){e.configuration.isAllowed(n.getIdentifier())?e.stacks.get(r).isStackable(n)&&e.stacks.stack(r,n):e.skip(t,n)})})}},{key:"skip",value:function(t,e){var r=t.getId(),n=this.stats.get(r);n?n.skipped||(n.skipped=[]):n={skipped:[]},n.skipped.push(e.identifier)}},{key:"unstack",value:function(t){var e=t.getId();return this.stacks[e]?this.stacks[e].pop():null}},{key:"check",value:function(t){var e=t.getId();if(this.stacks.length(e)>=this.STACK_SIZE)throw console.error("SNAPSHOTS",this.snapshots.get(e)),new Error("Plugin stack size exceed");if(this.snapshots.length(e)>=this.SNAPSHOT_LIMIT)throw console.error("SNAPSHOTS",this.snapshots.get(e)),new Error("Plugin snapshots count exceed");var r=0;if(this.stacks.plugins(e).forEach(function(t){t.type===a.RENDERER&&r++}),r>1)throw console.error("SNAPSHOTS",this.snapshots.get(e)),new Error("More of one renderer in the stack");if(0===this.stacks.length(e)&&!this.stats.get(e)[a.RENDERER]){if(!this.defaultPlugin)throw new Error("No default plugin assignated");this.stacks.stack(e,this.defaultPlugin)}}},{key:"return",value:function(t){var e=t.getId(),r=this.stacks.unstack(e);if(!r)return this.end(t);try{this.stats.get(e)||this.stats.store(e,{}),this.stats.get(e)[r.type]?this.stats.get(e)[r.type]+=1:this.stats.get(e)[r.type]=1}catch(t){console.error(t,this.snapshots.get(e))}r.type!==a.SANITIZER&&r.type!==a.RENDERER&&this.fill(t),this.snapshot(t),this.check(t),this.run(t)}},{key:"end",value:function(t){return t.status="processed",t}},{key:"setDefaultPlugin",value:function(t){this.defaultPlugin=t}}]),t}();t.exports=y},function(t,e,r){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var o=function(){function t(t,e){for(var r=0;r0&&n(t.mediaObjects[e-1],t)}},function(t,e,r){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var o=function(){function t(t,e){for(var r=0;r1?e[0]:window.location.protocol}},{key:"hostname",value:function(t){var e=t.getAttribute("src").split("://");return e.length>1?e[1].split("/")[0]:window.location.hostname}},{key:"source",value:function(t){return t.getAttribute("src")}},{key:"schemes",value:function(t){return/\w+:/.exec(t.getAttribute("src"))}},{key:"sources",value:function(t){var e=t.getAttribute("sources")||t.getAttribute("srcs");return e?JSON.parse(e):null}},{key:"actions",value:function(t){var e=t.getAttribute("actions");return e?JSON.parse(e):null}},{key:"parse",value:function(e){return{protocol:t.protocol(e),hostname:t.hostname(e),src:t.source(e),type:t.type(e),extension:t.extension(e),mime:t.mime(e),sources:t.sources(e),actions:t.actions(e)}}}]),t}();t.exports=i},function(t,e,r){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var o=function(){function t(t,e){for(var r=0;r1;){if("number"!=typeof t[e])throw new Error("E_UNSAFE_TYPE");if(t[e]>255)throw new Error("E_OUT_OF_BOUNDS");if(255!==t[e])return void t[e]++;if(t[e]=0,0===e)throw new Error("E_NONCE_TOO_LARGE")}}},{key:"encodePrefix",value:function(t){return[65280,255].map(function(e,r){return(t&e)>>8*(1-r)})}},{key:"decodePrefix",value:function(t){return t[0]<<8|t[1]}},{key:"joinChunks",value:function(t){return new Blob(t)}},{key:"slice",value:function(t){return Array.prototype.slice.call(t)}},{key:"getRandomKeyStr",value:function(){var t=window.nacl,e=t.randomBytes(18);return t.util.encodeBase64(e)}},{key:"getKeyFromStr",value:function(t){return window.nacl.util.decodeBase64(t)}},{key:"encrypt",value:function(e,r){var n=e,o=window.nacl.randomBytes(24),i=window.nacl.secretbox(n,o,r);if(i)return new Uint8Array(t.slice(o).concat(t.slice(i)));throw new Error}},{key:"decrypt",value:function(e,r,n){var o=window.nacl,i=function(t){var r=new Event("decryptionProgress");r.percent=t/e.length*100,window.document.dispatchEvent(r)},u=t.createNonce(),a=0,s=e.subarray(0,2),c=t.decodePrefix(s),f={metadata:void 0},l=new Uint8Array(e.subarray(2,2+c)),h=o.secretbox.open(l,u,r);t.increment(u);try{f.metadata=JSON.parse(o.util.encodeUTF8(h))}catch(t){return n("E_METADATA_DECRYPTION")}if(!f.metadata)return n("NO_METADATA");var p=function(n){setTimeout(function(){var s=131088*a+2+c,f=s+131088;a++;var l=new Uint8Array(e.subarray(s,f)),h=o.secretbox.open(l,u,r);if(t.increment(u),!h)return void n("DECRYPTION_FAILURE");i(Math.min(f,e.length)),n(void 0,h)})},y=[];!function r(){p(function(o,i){return o?setTimeout(function(){n(o)}):i?131088*a0&&o(t),e()}catch(t){r(t)}})}function u(e){i(t(e)).catch(function(t){console.error(t)})}var a=new MutationObserver(u),s=document.body,c={characterData:!0,childList:!0,attributes:!0,subtree:!0};a.observe(s,c),i(Array.from(document.getElementsByTagName("media-tag")))}),t.exports=o},function(t,e,r){"use strict";var n=r(42),o=r(43),i=r(64),u=r(65),a=r(66),s=r(67),c=r(68),f=r(19),l=r(12),h=r(44),p=r(45),y=r(46);y.PdfPlugin=s,y.PdfPlugin.viewer="/pdfjs/web/viewer.html",l.functionStore.store("salsa20poly1305",n),l.functionStore.store("cryptpad",o),y.processingEngine.setDefaultPlugin(new f(" Media-Tag can't process your content
","Download")),y.CryptoFilter=l,y.CryptoFilter.setAllowedMediaTypes(["image/png","image/jpeg","image/jpg","image/gif","audio/mp3","audio/ogg","audio/wav","audio/webm","video/mp4","video/ogg","video/webm","application/pdf","application/dash+xml","download"]),y.pluginStore.store(new i),y.pluginStore.store(new u),y.pluginStore.store(new a),y.pluginStore.store(new s),y.pluginStore.store(new c),y.pluginStore.store(new f),y.pluginStore.store(new l),y.pluginStore.store(new h),y.pluginStore.store(new p),t.exports=y},function(t,e,r){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var u=function(){function t(t,e){for(var r=0;r>24&255,t[e+1]=r>>16&255,t[e+2]=r>>8&255,t[e+3]=255&r,t[e+4]=n>>24&255,t[e+5]=n>>16&255,t[e+6]=n>>8&255,t[e+7]=255&n}function n(t,e,r,n,o){var i,u=0;for(i=0;i>>8)-1}function o(t,e,r,o){return n(t,e,r,o,16)}function i(t,e,r,o){return n(t,e,r,o,32)}function u(t,e,r,n){for(var o,i=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,u=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,a=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,s=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,c=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,f=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,l=255&e[0]|(255&e[1])<<8|(255&e[2])<<16|(255&e[3])<<24,h=255&e[4]|(255&e[5])<<8|(255&e[6])<<16|(255&e[7])<<24,p=255&e[8]|(255&e[9])<<8|(255&e[10])<<16|(255&e[11])<<24,y=255&e[12]|(255&e[13])<<8|(255&e[14])<<16|(255&e[15])<<24,b=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,g=255&r[16]|(255&r[17])<<8|(255&r[18])<<16|(255&r[19])<<24,d=255&r[20]|(255&r[21])<<8|(255&r[22])<<16|(255&r[23])<<24,v=255&r[24]|(255&r[25])<<8|(255&r[26])<<16|(255&r[27])<<24,w=255&r[28]|(255&r[29])<<8|(255&r[30])<<16|(255&r[31])<<24,m=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,E=i,_=u,O=a,A=s,k=c,P=f,T=l,j=h,x=p,R=y,S=b,U=g,C=d,M=v,B=w,I=m,D=0;D<20;D+=2)o=E+C|0,k^=o<<7|o>>>25,o=k+E|0,x^=o<<9|o>>>23,o=x+k|0,C^=o<<13|o>>>19,o=C+x|0,E^=o<<18|o>>>14,o=P+_|0,R^=o<<7|o>>>25,o=R+P|0,M^=o<<9|o>>>23,o=M+R|0,_^=o<<13|o>>>19,o=_+M|0,P^=o<<18|o>>>14,o=S+T|0,B^=o<<7|o>>>25,o=B+S|0,O^=o<<9|o>>>23,o=O+B|0,T^=o<<13|o>>>19,o=T+O|0,S^=o<<18|o>>>14,o=I+U|0,A^=o<<7|o>>>25,o=A+I|0,j^=o<<9|o>>>23,o=j+A|0,U^=o<<13|o>>>19,o=U+j|0,I^=o<<18|o>>>14,o=E+A|0,_^=o<<7|o>>>25,o=_+E|0,O^=o<<9|o>>>23,o=O+_|0,A^=o<<13|o>>>19,o=A+O|0,E^=o<<18|o>>>14,o=P+k|0,T^=o<<7|o>>>25,o=T+P|0,j^=o<<9|o>>>23,o=j+T|0,k^=o<<13|o>>>19,o=k+j|0,P^=o<<18|o>>>14,o=S+R|0,U^=o<<7|o>>>25,o=U+S|0,x^=o<<9|o>>>23,o=x+U|0,R^=o<<13|o>>>19,o=R+x|0,S^=o<<18|o>>>14,o=I+B|0,C^=o<<7|o>>>25,o=C+I|0,M^=o<<9|o>>>23,o=M+C|0,B^=o<<13|o>>>19,o=B+M|0,I^=o<<18|o>>>14;E=E+i|0,_=_+u|0,O=O+a|0,A=A+s|0,k=k+c|0,P=P+f|0,T=T+l|0,j=j+h|0,x=x+p|0,R=R+y|0,S=S+b|0,U=U+g|0,C=C+d|0,M=M+v|0,B=B+w|0,I=I+m|0,t[0]=E>>>0&255,t[1]=E>>>8&255,t[2]=E>>>16&255,t[3]=E>>>24&255,t[4]=_>>>0&255,t[5]=_>>>8&255,t[6]=_>>>16&255,t[7]=_>>>24&255,t[8]=O>>>0&255,t[9]=O>>>8&255,t[10]=O>>>16&255,t[11]=O>>>24&255,t[12]=A>>>0&255,t[13]=A>>>8&255,t[14]=A>>>16&255,t[15]=A>>>24&255,t[16]=k>>>0&255,t[17]=k>>>8&255,t[18]=k>>>16&255,t[19]=k>>>24&255,t[20]=P>>>0&255,t[21]=P>>>8&255,t[22]=P>>>16&255,t[23]=P>>>24&255,t[24]=T>>>0&255,t[25]=T>>>8&255,t[26]=T>>>16&255,t[27]=T>>>24&255,t[28]=j>>>0&255,t[29]=j>>>8&255,t[30]=j>>>16&255,t[31]=j>>>24&255,t[32]=x>>>0&255,t[33]=x>>>8&255,t[34]=x>>>16&255,t[35]=x>>>24&255,t[36]=R>>>0&255,t[37]=R>>>8&255,t[38]=R>>>16&255,t[39]=R>>>24&255,t[40]=S>>>0&255,t[41]=S>>>8&255,t[42]=S>>>16&255,t[43]=S>>>24&255,t[44]=U>>>0&255,t[45]=U>>>8&255,t[46]=U>>>16&255,t[47]=U>>>24&255,t[48]=C>>>0&255,t[49]=C>>>8&255,t[50]=C>>>16&255,t[51]=C>>>24&255,t[52]=M>>>0&255,t[53]=M>>>8&255,t[54]=M>>>16&255,t[55]=M>>>24&255,t[56]=B>>>0&255,t[57]=B>>>8&255,t[58]=B>>>16&255,t[59]=B>>>24&255,t[60]=I>>>0&255,t[61]=I>>>8&255,t[62]=I>>>16&255,t[63]=I>>>24&255}function a(t,e,r,n){for(var o,i=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,u=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,a=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,s=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,c=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,f=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,l=255&e[0]|(255&e[1])<<8|(255&e[2])<<16|(255&e[3])<<24,h=255&e[4]|(255&e[5])<<8|(255&e[6])<<16|(255&e[7])<<24,p=255&e[8]|(255&e[9])<<8|(255&e[10])<<16|(255&e[11])<<24,y=255&e[12]|(255&e[13])<<8|(255&e[14])<<16|(255&e[15])<<24,b=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,g=255&r[16]|(255&r[17])<<8|(255&r[18])<<16|(255&r[19])<<24,d=255&r[20]|(255&r[21])<<8|(255&r[22])<<16|(255&r[23])<<24,v=255&r[24]|(255&r[25])<<8|(255&r[26])<<16|(255&r[27])<<24,w=255&r[28]|(255&r[29])<<8|(255&r[30])<<16|(255&r[31])<<24,m=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,E=i,_=u,O=a,A=s,k=c,P=f,T=l,j=h,x=p,R=y,S=b,U=g,C=d,M=v,B=w,I=m,D=0;D<20;D+=2)o=E+C|0,k^=o<<7|o>>>25,o=k+E|0,x^=o<<9|o>>>23,o=x+k|0,C^=o<<13|o>>>19,o=C+x|0,E^=o<<18|o>>>14,o=P+_|0,R^=o<<7|o>>>25,o=R+P|0,M^=o<<9|o>>>23,o=M+R|0,_^=o<<13|o>>>19,o=_+M|0,P^=o<<18|o>>>14,o=S+T|0,B^=o<<7|o>>>25,o=B+S|0,O^=o<<9|o>>>23,o=O+B|0,T^=o<<13|o>>>19,o=T+O|0,S^=o<<18|o>>>14,o=I+U|0,A^=o<<7|o>>>25,o=A+I|0,j^=o<<9|o>>>23,o=j+A|0,U^=o<<13|o>>>19,o=U+j|0,I^=o<<18|o>>>14,o=E+A|0,_^=o<<7|o>>>25,o=_+E|0,O^=o<<9|o>>>23,o=O+_|0,A^=o<<13|o>>>19,o=A+O|0,E^=o<<18|o>>>14,o=P+k|0,T^=o<<7|o>>>25,o=T+P|0,j^=o<<9|o>>>23,o=j+T|0,k^=o<<13|o>>>19,o=k+j|0,P^=o<<18|o>>>14,o=S+R|0,U^=o<<7|o>>>25,o=U+S|0,x^=o<<9|o>>>23,o=x+U|0,R^=o<<13|o>>>19,o=R+x|0,S^=o<<18|o>>>14,o=I+B|0,C^=o<<7|o>>>25,o=C+I|0,M^=o<<9|o>>>23,o=M+C|0,B^=o<<13|o>>>19,o=B+M|0,I^=o<<18|o>>>14;t[0]=E>>>0&255,t[1]=E>>>8&255,t[2]=E>>>16&255,t[3]=E>>>24&255,t[4]=P>>>0&255,t[5]=P>>>8&255,t[6]=P>>>16&255,t[7]=P>>>24&255,t[8]=S>>>0&255,t[9]=S>>>8&255,t[10]=S>>>16&255,t[11]=S>>>24&255,t[12]=I>>>0&255,t[13]=I>>>8&255,t[14]=I>>>16&255,t[15]=I>>>24&255,t[16]=T>>>0&255,t[17]=T>>>8&255,t[18]=T>>>16&255,t[19]=T>>>24&255,t[20]=j>>>0&255,t[21]=j>>>8&255,t[22]=j>>>16&255,t[23]=j>>>24&255,t[24]=x>>>0&255,t[25]=x>>>8&255,t[26]=x>>>16&255,t[27]=x>>>24&255,t[28]=R>>>0&255,t[29]=R>>>8&255,t[30]=R>>>16&255,t[31]=R>>>24&255}function s(t,e,r,n){u(t,e,r,n)}function c(t,e,r,n){a(t,e,r,n)}function f(t,e,r,n,o,i,u){var a,c,f=new Uint8Array(16),l=new Uint8Array(64);for(c=0;c<16;c++)f[c]=0;for(c=0;c<8;c++)f[c]=i[c];for(;o>=64;){for(s(l,f,u,ht),c=0;c<64;c++)t[e+c]=r[n+c]^l[c];for(a=1,c=8;c<16;c++)a=a+(255&f[c])|0,f[c]=255&a,a>>>=8;o-=64,e+=64,n+=64}if(o>0)for(s(l,f,u,ht),c=0;c=64;){for(s(c,a,o,ht),u=0;u<64;u++)t[e+u]=c[u];for(i=1,u=8;u<16;u++)i=i+(255&a[u])|0,a[u]=255&i,i>>>=8;r-=64,e+=64}if(r>0)for(s(c,a,o,ht),u=0;u>16&1),i[r-1]&=65535;i[15]=u[15]-32767-(i[14]>>16&1),o=i[15]>>16&1,i[14]&=65535,m(u,i,1-o)}for(r=0;r<16;r++)t[2*r]=255&u[r],t[2*r+1]=u[r]>>8}function _(t,e){var r=new Uint8Array(32),n=new Uint8Array(32);return E(r,t),E(n,e),i(r,0,n,0)}function O(t){var e=new Uint8Array(32);return E(e,t),1&e[0]}function A(t,e){var r;for(r=0;r<16;r++)t[r]=e[2*r]+(e[2*r+1]<<8);t[15]&=32767}function k(t,e,r){for(var n=0;n<16;n++)t[n]=e[n]+r[n]}function P(t,e,r){for(var n=0;n<16;n++)t[n]=e[n]-r[n]}function T(t,e,r){var n,o,i=0,u=0,a=0,s=0,c=0,f=0,l=0,h=0,p=0,y=0,b=0,g=0,d=0,v=0,w=0,m=0,E=0,_=0,O=0,A=0,k=0,P=0,T=0,j=0,x=0,R=0,S=0,U=0,C=0,M=0,B=0,I=r[0],D=r[1],L=r[2],N=r[3],Y=r[4],F=r[5],K=r[6],z=r[7],H=r[8],G=r[9],Z=r[10],J=r[11],$=r[12],X=r[13],V=r[14],q=r[15];n=e[0],i+=n*I,u+=n*D,a+=n*L,s+=n*N,c+=n*Y,f+=n*F,l+=n*K,h+=n*z,p+=n*H,y+=n*G,b+=n*Z,g+=n*J,d+=n*$,v+=n*X,w+=n*V,m+=n*q,n=e[1],u+=n*I,a+=n*D,s+=n*L,c+=n*N,f+=n*Y,l+=n*F,h+=n*K,p+=n*z,y+=n*H,b+=n*G,g+=n*Z,d+=n*J,v+=n*$,w+=n*X,m+=n*V,E+=n*q,n=e[2],a+=n*I,s+=n*D,c+=n*L,f+=n*N,l+=n*Y,h+=n*F,p+=n*K,y+=n*z,b+=n*H,g+=n*G,d+=n*Z,v+=n*J,w+=n*$,m+=n*X,E+=n*V,_+=n*q,n=e[3],s+=n*I,c+=n*D,f+=n*L,l+=n*N,h+=n*Y,p+=n*F,y+=n*K,b+=n*z,g+=n*H,d+=n*G,v+=n*Z,w+=n*J,m+=n*$,E+=n*X,_+=n*V,O+=n*q,n=e[4],c+=n*I,f+=n*D,l+=n*L,h+=n*N,p+=n*Y,y+=n*F,b+=n*K,g+=n*z,d+=n*H,v+=n*G,w+=n*Z,m+=n*J,E+=n*$,_+=n*X,O+=n*V,A+=n*q,n=e[5],f+=n*I,l+=n*D,h+=n*L,p+=n*N,y+=n*Y,b+=n*F,g+=n*K,d+=n*z,v+=n*H,w+=n*G,m+=n*Z,E+=n*J,_+=n*$,O+=n*X,A+=n*V,k+=n*q,n=e[6],l+=n*I,h+=n*D,p+=n*L,y+=n*N,b+=n*Y,g+=n*F,d+=n*K,v+=n*z,w+=n*H,m+=n*G,E+=n*Z,_+=n*J,O+=n*$,A+=n*X,k+=n*V,P+=n*q,n=e[7],h+=n*I,p+=n*D,y+=n*L,b+=n*N,g+=n*Y,d+=n*F,v+=n*K,w+=n*z,m+=n*H,E+=n*G,_+=n*Z,O+=n*J,A+=n*$,k+=n*X,P+=n*V,T+=n*q,n=e[8],p+=n*I,y+=n*D,b+=n*L,g+=n*N,d+=n*Y,v+=n*F,w+=n*K,m+=n*z,E+=n*H,_+=n*G,O+=n*Z,A+=n*J,k+=n*$,P+=n*X,T+=n*V,j+=n*q,n=e[9],y+=n*I,b+=n*D,g+=n*L,d+=n*N,v+=n*Y,w+=n*F,m+=n*K,E+=n*z,_+=n*H,O+=n*G,A+=n*Z,k+=n*J,P+=n*$,T+=n*X,j+=n*V,x+=n*q,n=e[10],b+=n*I,g+=n*D,d+=n*L,v+=n*N,w+=n*Y,m+=n*F,E+=n*K,_+=n*z,O+=n*H,A+=n*G,k+=n*Z,P+=n*J,T+=n*$,j+=n*X,x+=n*V,R+=n*q,n=e[11],g+=n*I,d+=n*D,v+=n*L,w+=n*N,m+=n*Y,E+=n*F,_+=n*K,O+=n*z,A+=n*H,k+=n*G,P+=n*Z,T+=n*J;j+=n*$,x+=n*X,R+=n*V,S+=n*q,n=e[12],d+=n*I,v+=n*D,w+=n*L,m+=n*N,E+=n*Y,_+=n*F,O+=n*K,A+=n*z,k+=n*H,P+=n*G,T+=n*Z,j+=n*J,x+=n*$,R+=n*X,S+=n*V,U+=n*q,n=e[13],v+=n*I,w+=n*D,m+=n*L,E+=n*N,_+=n*Y,O+=n*F,A+=n*K,k+=n*z,P+=n*H,T+=n*G,j+=n*Z,x+=n*J,R+=n*$,S+=n*X,U+=n*V,C+=n*q,n=e[14],w+=n*I,m+=n*D,E+=n*L,_+=n*N,O+=n*Y,A+=n*F,k+=n*K,P+=n*z,T+=n*H,j+=n*G,x+=n*Z,R+=n*J,S+=n*$,U+=n*X,C+=n*V,M+=n*q,n=e[15],m+=n*I,E+=n*D,_+=n*L,O+=n*N,A+=n*Y,k+=n*F,P+=n*K,T+=n*z,j+=n*H,x+=n*G,R+=n*Z,S+=n*J,U+=n*$,C+=n*X,M+=n*V,B+=n*q,i+=38*E,u+=38*_,a+=38*O,s+=38*A,c+=38*k,f+=38*P,l+=38*T,h+=38*j,p+=38*x,y+=38*R,b+=38*S,g+=38*U,d+=38*C,v+=38*M,w+=38*B,o=1,n=i+o+65535,o=Math.floor(n/65536),i=n-65536*o,n=u+o+65535,o=Math.floor(n/65536),u=n-65536*o,n=a+o+65535,o=Math.floor(n/65536),a=n-65536*o,n=s+o+65535,o=Math.floor(n/65536),s=n-65536*o,n=c+o+65535,o=Math.floor(n/65536),c=n-65536*o,n=f+o+65535,o=Math.floor(n/65536),f=n-65536*o,n=l+o+65535,o=Math.floor(n/65536),l=n-65536*o,n=h+o+65535,o=Math.floor(n/65536),h=n-65536*o,n=p+o+65535,o=Math.floor(n/65536),p=n-65536*o,n=y+o+65535,o=Math.floor(n/65536),y=n-65536*o,n=b+o+65535,o=Math.floor(n/65536),b=n-65536*o,n=g+o+65535,o=Math.floor(n/65536),g=n-65536*o,n=d+o+65535,o=Math.floor(n/65536),d=n-65536*o,n=v+o+65535,o=Math.floor(n/65536),v=n-65536*o,n=w+o+65535,o=Math.floor(n/65536),w=n-65536*o,n=m+o+65535,o=Math.floor(n/65536),m=n-65536*o,i+=o-1+37*(o-1),o=1,n=i+o+65535,o=Math.floor(n/65536),i=n-65536*o,n=u+o+65535,o=Math.floor(n/65536),u=n-65536*o,n=a+o+65535,o=Math.floor(n/65536),a=n-65536*o,n=s+o+65535,o=Math.floor(n/65536),s=n-65536*o,n=c+o+65535,o=Math.floor(n/65536),c=n-65536*o,n=f+o+65535,o=Math.floor(n/65536),f=n-65536*o,n=l+o+65535,o=Math.floor(n/65536),l=n-65536*o,n=h+o+65535,o=Math.floor(n/65536),h=n-65536*o,n=p+o+65535,o=Math.floor(n/65536),p=n-65536*o,n=y+o+65535,o=Math.floor(n/65536),y=n-65536*o,n=b+o+65535,o=Math.floor(n/65536),b=n-65536*o,n=g+o+65535,o=Math.floor(n/65536),g=n-65536*o,n=d+o+65535,o=Math.floor(n/65536),d=n-65536*o,n=v+o+65535,o=Math.floor(n/65536),v=n-65536*o,n=w+o+65535,o=Math.floor(n/65536),w=n-65536*o,n=m+o+65535,o=Math.floor(n/65536),m=n-65536*o,i+=o-1+37*(o-1),t[0]=i,t[1]=u,t[2]=a,t[3]=s,t[4]=c,t[5]=f,t[6]=l,t[7]=h,t[8]=p,t[9]=y,t[10]=b,t[11]=g,t[12]=d;t[13]=v,t[14]=w,t[15]=m}function j(t,e){T(t,e,e)}function x(t,e){var r,n=tt();for(r=0;r<16;r++)n[r]=e[r];for(r=253;r>=0;r--)j(n,n),2!==r&&4!==r&&T(n,n,e);for(r=0;r<16;r++)t[r]=n[r]}function R(t,e){var r,n=tt();for(r=0;r<16;r++)n[r]=e[r];for(r=250;r>=0;r--)j(n,n),1!==r&&T(n,n,e);for(r=0;r<16;r++)t[r]=n[r]}function S(t,e,r){var n,o,i=new Uint8Array(32),u=new Float64Array(80),a=tt(),s=tt(),c=tt(),f=tt(),l=tt(),h=tt();for(o=0;o<31;o++)i[o]=e[o];for(i[31]=127&e[31]|64,i[0]&=248,A(u,r),o=0;o<16;o++)s[o]=u[o],f[o]=a[o]=c[o]=0;for(a[0]=f[0]=1,o=254;o>=0;--o)n=i[o>>>3]>>>(7&o)&1,m(a,s,n),m(c,f,n),k(l,a,c),P(a,a,c),k(c,s,f),P(s,s,f),j(f,l),j(h,a),T(a,c,a),T(c,s,l),k(l,a,c),P(a,a,c),j(s,a),P(c,f,h),T(a,c,ut),k(a,a,f),T(c,c,a),T(a,f,h),T(f,s,u),j(s,l),m(a,s,n),m(c,f,n);for(o=0;o<16;o++)u[o+16]=a[o],u[o+32]=c[o],u[o+48]=s[o],u[o+64]=f[o];var p=u.subarray(32),y=u.subarray(16);return x(p,p),T(y,y,p),E(t,y),0}function U(t,e){return S(t,e,nt)}function C(t,e){return et(e,32),U(t,e)}function M(t,e,r){var n=new Uint8Array(32);return S(n,r,e),c(t,rt,n,ht)}function B(t,e,r,n,o,i){var u=new Uint8Array(32);return M(u,o,i),yt(t,e,r,n,u)}function I(t,e,r,n,o,i){var u=new Uint8Array(32);return M(u,o,i),bt(t,e,r,n,u)}function D(t,e,r,n){for(var o,i,u,a,s,c,f,l,h,p,y,b,g,d,v,w,m,E,_,O,A,k,P,T,j,x,R=new Int32Array(16),S=new Int32Array(16),U=t[0],C=t[1],M=t[2],B=t[3],I=t[4],D=t[5],L=t[6],N=t[7],Y=e[0],F=e[1],K=e[2],z=e[3],H=e[4],G=e[5],Z=e[6],J=e[7],$=0;n>=128;){for(_=0;_<16;_++)O=8*_+$,R[_]=r[O+0]<<24|r[O+1]<<16|r[O+2]<<8|r[O+3],S[_]=r[O+4]<<24|r[O+5]<<16|r[O+6]<<8|r[O+7];for(_=0;_<80;_++)if(o=U,i=C,u=M,a=B,s=I,c=D,f=L,l=N,h=Y,p=F,y=K,b=z,g=H,d=G,v=Z,w=J,A=N,k=J,P=65535&k,T=k>>>16,j=65535&A,x=A>>>16,A=(I>>>14|H<<18)^(I>>>18|H<<14)^(H>>>9|I<<23),k=(H>>>14|I<<18)^(H>>>18|I<<14)^(I>>>9|H<<23),P+=65535&k,T+=k>>>16,j+=65535&A,x+=A>>>16,A=I&D^~I&L,k=H&G^~H&Z,P+=65535&k,T+=k>>>16,j+=65535&A,x+=A>>>16,A=gt[2*_],k=gt[2*_+1],P+=65535&k,T+=k>>>16,j+=65535&A,x+=A>>>16,A=R[_%16],k=S[_%16],P+=65535&k,T+=k>>>16,j+=65535&A,x+=A>>>16,T+=P>>>16,j+=T>>>16,x+=j>>>16,m=65535&j|x<<16,E=65535&P|T<<16,A=m,k=E,P=65535&k,T=k>>>16,j=65535&A,x=A>>>16,A=(U>>>28|Y<<4)^(Y>>>2|U<<30)^(Y>>>7|U<<25),k=(Y>>>28|U<<4)^(U>>>2|Y<<30)^(U>>>7|Y<<25),P+=65535&k,T+=k>>>16,j+=65535&A,x+=A>>>16,A=U&C^U&M^C&M,k=Y&F^Y&K^F&K,P+=65535&k,T+=k>>>16,j+=65535&A,x+=A>>>16,T+=P>>>16,j+=T>>>16,x+=j>>>16,l=65535&j|x<<16,w=65535&P|T<<16,A=a,k=b,P=65535&k,T=k>>>16,j=65535&A,x=A>>>16,A=m,k=E,P+=65535&k,T+=k>>>16,j+=65535&A,x+=A>>>16,T+=P>>>16,j+=T>>>16,x+=j>>>16,a=65535&j|x<<16,b=65535&P|T<<16,C=o,M=i,B=u,I=a,D=s,L=c,N=f,U=l,F=h,K=p,z=y,H=b,G=g,Z=d,J=v,Y=w,_%16==15)for(O=0;O<16;O++)A=R[O],k=S[O],P=65535&k,T=k>>>16,j=65535&A,x=A>>>16,A=R[(O+9)%16],k=S[(O+9)%16],P+=65535&k,T+=k>>>16,j+=65535&A,x+=A>>>16,m=R[(O+1)%16],E=S[(O+1)%16],A=(m>>>1|E<<31)^(m>>>8|E<<24)^m>>>7,k=(E>>>1|m<<31)^(E>>>8|m<<24)^(E>>>7|m<<25),P+=65535&k,T+=k>>>16,j+=65535&A,x+=A>>>16,m=R[(O+14)%16],E=S[(O+14)%16],A=(m>>>19|E<<13)^(E>>>29|m<<3)^m>>>6,k=(E>>>19|m<<13)^(m>>>29|E<<3)^(E>>>6|m<<26),P+=65535&k,T+=k>>>16,j+=65535&A,x+=A>>>16,T+=P>>>16,j+=T>>>16,x+=j>>>16,R[O]=65535&j|x<<16,S[O]=65535&P|T<<16;A=U,k=Y,P=65535&k,T=k>>>16,j=65535&A,x=A>>>16,A=t[0],k=e[0],P+=65535&k,T+=k>>>16,j+=65535&A,x+=A>>>16,T+=P>>>16,j+=T>>>16,x+=j>>>16,t[0]=U=65535&j|x<<16,e[0]=Y=65535&P|T<<16,A=C,k=F,P=65535&k,T=k>>>16,j=65535&A,x=A>>>16,A=t[1],k=e[1],P+=65535&k,T+=k>>>16,j+=65535&A,x+=A>>>16,T+=P>>>16,j+=T>>>16,x+=j>>>16,t[1]=C=65535&j|x<<16,e[1]=F=65535&P|T<<16,A=M,k=K,P=65535&k,T=k>>>16,j=65535&A,x=A>>>16,A=t[2],k=e[2],P+=65535&k,T+=k>>>16,j+=65535&A,x+=A>>>16,T+=P>>>16,j+=T>>>16,x+=j>>>16,t[2]=M=65535&j|x<<16,e[2]=K=65535&P|T<<16,A=B,k=z,P=65535&k,T=k>>>16,j=65535&A,x=A>>>16,A=t[3],k=e[3],P+=65535&k,T+=k>>>16,j+=65535&A,x+=A>>>16,T+=P>>>16,j+=T>>>16,x+=j>>>16,t[3]=B=65535&j|x<<16,e[3]=z=65535&P|T<<16,A=I,k=H,P=65535&k,T=k>>>16,j=65535&A,x=A>>>16,A=t[4],k=e[4],P+=65535&k,T+=k>>>16,j+=65535&A,x+=A>>>16,T+=P>>>16,j+=T>>>16,x+=j>>>16,t[4]=I=65535&j|x<<16,e[4]=H=65535&P|T<<16,A=D,k=G,P=65535&k,T=k>>>16,j=65535&A,x=A>>>16,A=t[5],k=e[5],P+=65535&k,T+=k>>>16,j+=65535&A,x+=A>>>16,T+=P>>>16,j+=T>>>16,x+=j>>>16,t[5]=D=65535&j|x<<16,e[5]=G=65535&P|T<<16,A=L,k=Z,P=65535&k,T=k>>>16,j=65535&A,x=A>>>16,A=t[6],k=e[6],P+=65535&k,T+=k>>>16,j+=65535&A,x+=A>>>16,T+=P>>>16,j+=T>>>16,x+=j>>>16,t[6]=L=65535&j|x<<16,e[6]=Z=65535&P|T<<16,A=N,k=J,P=65535&k,T=k>>>16,j=65535&A,x=A>>>16,A=t[7],k=e[7],P+=65535&k,T+=k>>>16,j+=65535&A,x+=A>>>16,T+=P>>>16,j+=T>>>16,x+=j>>>16,t[7]=N=65535&j|x<<16,e[7]=J=65535&P|T<<16,$+=128,n-=128}return n}function L(t,r,n){var o,i=new Int32Array(8),u=new Int32Array(8),a=new Uint8Array(256),s=n;for(i[0]=1779033703,i[1]=3144134277,i[2]=1013904242,i[3]=2773480762,i[4]=1359893119,i[5]=2600822924,i[6]=528734635,i[7]=1541459225,u[0]=4089235720,u[1]=2227873595,u[2]=4271175723,u[3]=1595750129,u[4]=2917565137,u[5]=725511199,u[6]=4215389547,u[7]=327033209,D(i,u,r,n),n%=128,o=0;o=0;--o)n=r[o/8|0]>>(7&o)&1,Y(t,e,n),N(e,t),N(t,t),Y(t,e,n)}function z(t,e){var r=[tt(),tt(),tt(),tt()];v(r[0],ct),v(r[1],ft),v(r[2],it),T(r[3],ct,ft),K(t,r,e)}function H(t,e,r){var n,o=new Uint8Array(64),i=[tt(),tt(),tt(),tt()];for(r||et(e,32),L(o,e,32),o[0]&=248,o[31]&=127,o[31]|=64,z(i,o),F(t,i),n=0;n<32;n++)e[n+32]=t[n];return 0}function G(t,e){var r,n,o,i;for(n=63;n>=32;--n){for(r=0,o=n-32,i=n-12;o>8,e[o]-=256*r;e[o]+=r,e[n]=0}for(r=0,o=0;o<32;o++)e[o]+=r-(e[31]>>4)*dt[o],r=e[o]>>8,e[o]&=255;for(o=0;o<32;o++)e[o]-=r*dt[o];for(n=0;n<32;n++)e[n+1]+=e[n]>>8,t[n]=255&e[n]}function Z(t){var e,r=new Float64Array(64);for(e=0;e<64;e++)r[e]=t[e];for(e=0;e<64;e++)t[e]=0;G(t,r)}function J(t,e,r,n){var o,i,u=new Uint8Array(64),a=new Uint8Array(64),s=new Uint8Array(64),c=new Float64Array(64),f=[tt(),tt(),tt(),tt()];L(u,n,32),u[0]&=248,u[31]&=127,u[31]|=64;var l=r+64;for(o=0;o>7&&P(t[0],ot,t[0]),T(t[3],t[0],t[1]),0)}function X(t,e,r,n){var o,u=new Uint8Array(32),a=new Uint8Array(64),s=[tt(),tt(),tt(),tt()],c=[tt(),tt(),tt(),tt()];if(r<64)return-1;if($(c,n))return-1;for(o=0;o>>13|r<<3),n=255&t[4]|(255&t[5])<<8,this.r[2]=7939&(r>>>10|n<<6),o=255&t[6]|(255&t[7])<<8,this.r[3]=8191&(n>>>7|o<<9),i=255&t[8]|(255&t[9])<<8,this.r[4]=255&(o>>>4|i<<12),this.r[5]=i>>>1&8190,u=255&t[10]|(255&t[11])<<8,this.r[6]=8191&(i>>>14|u<<2),a=255&t[12]|(255&t[13])<<8,this.r[7]=8065&(u>>>11|a<<5),s=255&t[14]|(255&t[15])<<8,this.r[8]=8191&(a>>>8|s<<8),this.r[9]=s>>>5&127,this.pad[0]=255&t[16]|(255&t[17])<<8,this.pad[1]=255&t[18]|(255&t[19])<<8,this.pad[2]=255&t[20]|(255&t[21])<<8,this.pad[3]=255&t[22]|(255&t[23])<<8,this.pad[4]=255&t[24]|(255&t[25])<<8,this.pad[5]=255&t[26]|(255&t[27])<<8,this.pad[6]=255&t[28]|(255&t[29])<<8,this.pad[7]=255&t[30]|(255&t[31])<<8};pt.prototype.blocks=function(t,e,r){for(var n,o,i,u,a,s,c,f,l,h,p,y,b,g,d,v,w,m,E,_=this.fin?0:2048,O=this.h[0],A=this.h[1],k=this.h[2],P=this.h[3],T=this.h[4],j=this.h[5],x=this.h[6],R=this.h[7],S=this.h[8],U=this.h[9],C=this.r[0],M=this.r[1],B=this.r[2],I=this.r[3],D=this.r[4],L=this.r[5],N=this.r[6],Y=this.r[7],F=this.r[8],K=this.r[9];r>=16;)n=255&t[e+0]|(255&t[e+1])<<8,O+=8191&n,o=255&t[e+2]|(255&t[e+3])<<8,A+=8191&(n>>>13|o<<3),i=255&t[e+4]|(255&t[e+5])<<8,k+=8191&(o>>>10|i<<6),u=255&t[e+6]|(255&t[e+7])<<8,P+=8191&(i>>>7|u<<9),a=255&t[e+8]|(255&t[e+9])<<8,T+=8191&(u>>>4|a<<12),j+=a>>>1&8191,s=255&t[e+10]|(255&t[e+11])<<8,x+=8191&(a>>>14|s<<2),c=255&t[e+12]|(255&t[e+13])<<8,R+=8191&(s>>>11|c<<5),f=255&t[e+14]|(255&t[e+15])<<8,S+=8191&(c>>>8|f<<8),U+=f>>>5|_,l=0,h=l,h+=O*C,h+=A*(5*K),h+=k*(5*F),h+=P*(5*Y),h+=T*(5*N),l=h>>>13,h&=8191,h+=j*(5*L),h+=x*(5*D),h+=R*(5*I),h+=S*(5*B),h+=U*(5*M),l+=h>>>13,h&=8191,p=l,p+=O*M,p+=A*C,p+=k*(5*K),p+=P*(5*F),p+=T*(5*Y),l=p>>>13,p&=8191,p+=j*(5*N),p+=x*(5*L),p+=R*(5*D),p+=S*(5*I),p+=U*(5*B),l+=p>>>13,p&=8191,y=l,y+=O*B,y+=A*M,y+=k*C,y+=P*(5*K),y+=T*(5*F),l=y>>>13,y&=8191,y+=j*(5*Y),y+=x*(5*N),y+=R*(5*L),y+=S*(5*D),y+=U*(5*I),l+=y>>>13,y&=8191,b=l,b+=O*I,b+=A*B,b+=k*M,b+=P*C,b+=T*(5*K),l=b>>>13,b&=8191,b+=j*(5*F),b+=x*(5*Y),b+=R*(5*N),b+=S*(5*L),b+=U*(5*D),l+=b>>>13,b&=8191,g=l,g+=O*D,g+=A*I,g+=k*B,g+=P*M,g+=T*C,l=g>>>13,g&=8191,g+=j*(5*K),g+=x*(5*F),g+=R*(5*Y),g+=S*(5*N),g+=U*(5*L),l+=g>>>13,g&=8191,d=l,d+=O*L,d+=A*D,d+=k*I,d+=P*B,d+=T*M,l=d>>>13,d&=8191,d+=j*C,d+=x*(5*K),d+=R*(5*F),d+=S*(5*Y),d+=U*(5*N),l+=d>>>13,d&=8191,v=l,v+=O*N,v+=A*L,v+=k*D,v+=P*I,v+=T*B,l=v>>>13,v&=8191,v+=j*M,v+=x*C,v+=R*(5*K),v+=S*(5*F),v+=U*(5*Y),l+=v>>>13,v&=8191,w=l,w+=O*Y,w+=A*N,w+=k*L,w+=P*D,w+=T*I,l=w>>>13,w&=8191,w+=j*B,w+=x*M,w+=R*C,w+=S*(5*K),w+=U*(5*F),l+=w>>>13,w&=8191,m=l,m+=O*F,m+=A*Y,m+=k*N,m+=P*L,m+=T*D,l=m>>>13,m&=8191,m+=j*I,m+=x*B,m+=R*M,m+=S*C,m+=U*(5*K),l+=m>>>13,m&=8191,E=l,E+=O*K,E+=A*F,E+=k*Y,E+=P*N,E+=T*L,l=E>>>13,E&=8191,E+=j*D,E+=x*I,E+=R*B,E+=S*M,E+=U*C,l+=E>>>13,E&=8191,l=(l<<2)+l|0,l=l+h|0,h=8191&l,l>>>=13,p+=l,O=h,A=p,k=y,P=b,T=g,j=d,x=v,R=w,S=m,U=E,e+=16,r-=16;this.h[0]=O,this.h[1]=A,this.h[2]=k,this.h[3]=P,this.h[4]=T,this.h[5]=j,this.h[6]=x,this.h[7]=R,this.h[8]=S,this.h[9]=U},pt.prototype.finish=function(t,e){var r,n,o,i,u=new Uint16Array(10);if(this.leftover){for(i=this.leftover,this.buffer[i++]=1;i<16;i++)this.buffer[i]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(r=this.h[1]>>>13,this.h[1]&=8191,i=2;i<10;i++)this.h[i]+=r,r=this.h[i]>>>13,this.h[i]&=8191;for(this.h[0]+=5*r,r=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=r,r=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=r,u[0]=this.h[0]+5,r=u[0]>>>13,u[0]&=8191,i=1;i<10;i++)u[i]=this.h[i]+r,r=u[i]>>>13,u[i]&=8191;for(u[9]-=8192,n=(1^r)-1,i=0;i<10;i++)u[i]&=n;for(n=~n,i=0;i<10;i++)this.h[i]=this.h[i]&n|u[i];for(this.h[0]=65535&(this.h[0]|this.h[1]<<13),this.h[1]=65535&(this.h[1]>>>3|this.h[2]<<10),this.h[2]=65535&(this.h[2]>>>6|this.h[3]<<7),this.h[3]=65535&(this.h[3]>>>9|this.h[4]<<4),this.h[4]=65535&(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14),this.h[5]=65535&(this.h[6]>>>2|this.h[7]<<11),this.h[6]=65535&(this.h[7]>>>5|this.h[8]<<8),this.h[7]=65535&(this.h[8]>>>8|this.h[9]<<5),o=this.h[0]+this.pad[0],this.h[0]=65535&o,i=1;i<8;i++)o=(this.h[i]+this.pad[i]|0)+(o>>>16)|0,this.h[i]=65535&o;t[e+0]=this.h[0]>>>0&255,t[e+1]=this.h[0]>>>8&255,t[e+2]=this.h[1]>>>0&255,t[e+3]=this.h[1]>>>8&255,t[e+4]=this.h[2]>>>0&255,t[e+5]=this.h[2]>>>8&255,t[e+6]=this.h[3]>>>0&255,t[e+7]=this.h[3]>>>8&255,t[e+8]=this.h[4]>>>0&255,t[e+9]=this.h[4]>>>8&255,t[e+10]=this.h[5]>>>0&255,t[e+11]=this.h[5]>>>8&255,t[e+12]=this.h[6]>>>0&255,t[e+13]=this.h[6]>>>8&255,t[e+14]=this.h[7]>>>0&255,t[e+15]=this.h[7]>>>8&255},pt.prototype.update=function(t,e,r){var n,o;if(this.leftover){for(o=16-this.leftover,o>r&&(o=r),n=0;n=16&&(o=r-r%16,this.blocks(t,e,o),e+=o,r-=o),r){for(n=0;n=0},t.sign.keyPair=function(){var t=new Uint8Array(32),e=new Uint8Array(64);return H(t,e),{publicKey:t,secretKey:e}},t.sign.keyPair.fromSecretKey=function(t){if(W(t),64!==t.length)throw new Error("bad secret key size");for(var e=new Uint8Array(32),r=0;r=n())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+n().toString(16)+" bytes");return 0|t}function b(t){return+t!=t&&(t=0),i.alloc(+t)}function g(t,e){if(i.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return H(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return J(t).length;default:if(n)return H(t).length;e=(""+e).toLowerCase(),n=!0}}function d(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if(r>>>=0,e>>>=0,r<=e)return"";for(t||(t="utf8");;)switch(t){case"hex":return U(this,e,r);case"utf8":case"utf-8":return j(this,e,r);case"ascii":return R(this,e,r);case"latin1":case"binary":return S(this,e,r);case"base64":return T(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function v(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function w(t,e,r,n,o){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=o?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(o)return-1;r=t.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof e&&(e=i.from(e,n)),i.isBuffer(e))return 0===e.length?-1:m(t,e,r,n,o);if("number"==typeof e)return e&=255,i.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):m(t,[e],r,n,o);throw new TypeError("val must be string, number or Buffer")}function m(t,e,r,n,o){function i(t,e){return 1===u?t[e]:t.readUInt16BE(e*u)}var u=1,a=t.length,s=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;u=2,a/=2,s/=2,r/=2}var c;if(o){var f=-1;for(c=r;ca&&(r=a-s),c=r;c>=0;c--){for(var l=!0,h=0;ho&&(n=o):n=o;var i=e.length;if(i%2!=0)throw new TypeError("Invalid hex string");n>i/2&&(n=i/2);for(var u=0;u239?4:i>223?3:i>191?2:1;if(o+a<=r){var s,c,f,l;switch(a){case 1:i<128&&(u=i);break;case 2:128==(192&(s=t[o+1]))&&(l=(31&i)<<6|63&s)>127&&(u=l);break;case 3:s=t[o+1],c=t[o+2],128==(192&s)&&128==(192&c)&&(l=(15&i)<<12|(63&s)<<6|63&c)>2047&&(l<55296||l>57343)&&(u=l);break;case 4:s=t[o+1],c=t[o+2],f=t[o+3],128==(192&s)&&128==(192&c)&&128==(192&f)&&(l=(15&i)<<18|(63&s)<<12|(63&c)<<6|63&f)>65535&&l<1114112&&(u=l)}}null===u?(u=65533,a=1):u>65535&&(u-=65536,n.push(u>>>10&1023|55296),u=56320|1023&u),n.push(u),o+=a}return x(n)}function x(t){var e=t.length;if(e<=Q)return String.fromCharCode.apply(String,t);for(var r="",n=0;nn)&&(r=n);for(var o="",i=e;ir)throw new RangeError("Trying to access beyond buffer length")}function B(t,e,r,n,o,u){if(!i.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>o||et.length)throw new RangeError("Index out of range")}function I(t,e,r,n){e<0&&(e=65535+e+1);for(var o=0,i=Math.min(t.length-r,2);o>>8*(n?o:1-o)}function D(t,e,r,n){e<0&&(e=4294967295+e+1);for(var o=0,i=Math.min(t.length-r,4);o>>8*(n?o:3-o)&255}function L(t,e,r,n,o,i){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function N(t,e,r,n,o){return o||L(t,e,r,4,3.4028234663852886e38,-3.4028234663852886e38),q.write(t,e,r,n,23,4),r+4}function Y(t,e,r,n,o){return o||L(t,e,r,8,1.7976931348623157e308,-1.7976931348623157e308),q.write(t,e,r,n,52,8),r+8}function F(t){if(t=K(t).replace(tt,""),t.length<2)return"";for(;t.length%4!=0;)t+="=";return t}function K(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function z(t){return t<16?"0"+t.toString(16):t.toString(16)}function H(t,e){e=e||1/0;for(var r,n=t.length,o=null,i=[],u=0;u55295&&r<57344){if(!o){if(r>56319){(e-=3)>-1&&i.push(239,191,189);continue}if(u+1===n){(e-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(e-=3)>-1&&i.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(e-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((e-=1)<0)break;i.push(r)}else if(r<2048){if((e-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function G(t){for(var e=[],r=0;r>8,o=r%256,i.push(o),i.push(n);return i}function J(t){return V.toByteArray(F(t))}function $(t,e,r,n){for(var o=0;o=e.length||o>=t.length);++o)e[o+r]=t[o];return o}function X(t){return t!==t}var V=r(93),q=r(94),W=r(95);e.Buffer=i,e.SlowBuffer=b,e.INSPECT_MAX_BYTES=50,i.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),e.kMaxLength=n(),i.poolSize=8192,i._augment=function(t){return t.__proto__=i.prototype,t},i.from=function(t,e,r){return u(null,t,e,r)},i.TYPED_ARRAY_SUPPORT&&(i.prototype.__proto__=Uint8Array.prototype,i.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&i[Symbol.species]===i&&Object.defineProperty(i,Symbol.species,{value:null,configurable:!0})),i.alloc=function(t,e,r){return s(null,t,e,r)},i.allocUnsafe=function(t){return c(null,t)},i.allocUnsafeSlow=function(t){return c(null,t)},i.isBuffer=function(t){return!(null==t||!t._isBuffer)},i.compare=function(t,e){if(!i.isBuffer(t)||!i.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var r=t.length,n=e.length,o=0,u=Math.min(r,n);o0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),""},i.prototype.compare=function(t,e,r,n,o){if(!i.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),e<0||r>t.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&e>=r)return 0;if(n>=o)return-1;if(e>=r)return 1;if(e>>>=0,r>>>=0,n>>>=0,o>>>=0,this===t)return 0;for(var u=o-n,a=r-e,s=Math.min(u,a),c=this.slice(n,o),f=t.slice(e,r),l=0;lo)&&(r=o),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i=!1;;)switch(n){case"hex":return E(this,t,e,r);case"utf8":case"utf-8":return _(this,t,e,r);case"ascii":return O(this,t,e,r);case"latin1":case"binary":return A(this,t,e,r);case"base64":return k(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,t,e,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},i.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Q=4096;i.prototype.slice=function(t,e){var r=this.length;t=~~t,e=void 0===e?r:~~e,t<0?(t+=r)<0&&(t=0):t>r&&(t=r),e<0?(e+=r)<0&&(e=0):e>r&&(e=r),e0&&(o*=256);)n+=this[t+--e]*o;return n},i.prototype.readUInt8=function(t,e){return e||M(t,1,this.length),this[t]},i.prototype.readUInt16LE=function(t,e){return e||M(t,2,this.length),this[t]|this[t+1]<<8},i.prototype.readUInt16BE=function(t,e){return e||M(t,2,this.length),this[t]<<8|this[t+1]},i.prototype.readUInt32LE=function(t,e){return e||M(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},i.prototype.readUInt32BE=function(t,e){return e||M(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},i.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||M(t,e,this.length);for(var n=this[t],o=1,i=0;++i=o&&(n-=Math.pow(2,8*e)),n},i.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||M(t,e,this.length);for(var n=e,o=1,i=this[t+--n];n>0&&(o*=256);)i+=this[t+--n]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*e)),i},i.prototype.readInt8=function(t,e){return e||M(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},i.prototype.readInt16LE=function(t,e){e||M(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},i.prototype.readInt16BE=function(t,e){e||M(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},i.prototype.readInt32LE=function(t,e){return e||M(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},i.prototype.readInt32BE=function(t,e){return e||M(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},i.prototype.readFloatLE=function(t,e){return e||M(t,4,this.length),q.read(this,t,!0,23,4)},i.prototype.readFloatBE=function(t,e){return e||M(t,4,this.length),q.read(this,t,!1,23,4)},i.prototype.readDoubleLE=function(t,e){return e||M(t,8,this.length),q.read(this,t,!0,52,8)},i.prototype.readDoubleBE=function(t,e){return e||M(t,8,this.length),q.read(this,t,!1,52,8)},i.prototype.writeUIntLE=function(t,e,r,n){t=+t,e|=0,r|=0,n||B(this,t,e,r,Math.pow(2,8*r)-1,0);var o=1,i=0;for(this[e]=255&t;++i=0&&(i*=256);)this[e+o]=t/i&255;return e+r},i.prototype.writeUInt8=function(t,e,r){return t=+t,e|=0,r||B(this,t,e,1,255,0),i.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},i.prototype.writeUInt16LE=function(t,e,r){return t=+t,e|=0,r||B(this,t,e,2,65535,0),i.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):I(this,t,e,!0),e+2},i.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||B(this,t,e,2,65535,0),i.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):I(this,t,e,!1),e+2},i.prototype.writeUInt32LE=function(t,e,r){return t=+t,e|=0,r||B(this,t,e,4,4294967295,0),i.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):D(this,t,e,!0),e+4},i.prototype.writeUInt32BE=function(t,e,r){return t=+t,e|=0,r||B(this,t,e,4,4294967295,0),i.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):D(this,t,e,!1),e+4},i.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e|=0,!n){var o=Math.pow(2,8*r-1);B(this,t,e,r,o-1,-o)}var i=0,u=1,a=0;for(this[e]=255&t;++i>0)-a&255;return e+r},i.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e|=0,!n){var o=Math.pow(2,8*r-1);B(this,t,e,r,o-1,-o)}var i=r-1,u=1,a=0;for(this[e+i]=255&t;--i>=0&&(u*=256);)t<0&&0===a&&0!==this[e+i+1]&&(a=1),this[e+i]=(t/u>>0)-a&255;return e+r},i.prototype.writeInt8=function(t,e,r){return t=+t,e|=0,r||B(this,t,e,1,127,-128),i.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},i.prototype.writeInt16LE=function(t,e,r){return t=+t,e|=0,r||B(this,t,e,2,32767,-32768),i.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):I(this,t,e,!0),e+2},i.prototype.writeInt16BE=function(t,e,r){return t=+t,e|=0,r||B(this,t,e,2,32767,-32768),i.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):I(this,t,e,!1),e+2},i.prototype.writeInt32LE=function(t,e,r){return t=+t,e|=0,r||B(this,t,e,4,2147483647,-2147483648),i.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):D(this,t,e,!0),e+4},i.prototype.writeInt32BE=function(t,e,r){return t=+t,e|=0,r||B(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),i.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):D(this,t,e,!1),e+4},i.prototype.writeFloatLE=function(t,e,r){return N(this,t,e,!0,r)},i.prototype.writeFloatBE=function(t,e,r){return N(this,t,e,!1,r)},i.prototype.writeDoubleLE=function(t,e,r){return Y(this,t,e,!0,r)},i.prototype.writeDoubleBE=function(t,e,r){return Y(this,t,e,!1,r)},i.prototype.copy=function(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e=0;--o)t[o+e]=this[o+r];else if(u<1e3||!i.TYPED_ARRAY_SUPPORT)for(o=0;o>>=0,r=void 0===r?this.length:r>>>0,t||(t=0);var u;if("number"==typeof t)for(u=e;u0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===t[e-2]?2:"="===t[e-1]?1:0}function o(t){return 3*t.length/4-n(t)}function i(t){var e,r,o,i,u,a=t.length;i=n(t),u=new l(3*a/4-i),r=i>0?a-4:a;var s=0;for(e=0;e>16&255,u[s++]=o>>8&255,u[s++]=255&o;return 2===i?(o=f[t.charCodeAt(e)]<<2|f[t.charCodeAt(e+1)]>>4,u[s++]=255&o):1===i&&(o=f[t.charCodeAt(e)]<<10|f[t.charCodeAt(e+1)]<<4|f[t.charCodeAt(e+2)]>>2,u[s++]=o>>8&255,u[s++]=255&o),u}function u(t){return c[t>>18&63]+c[t>>12&63]+c[t>>6&63]+c[63&t]}function a(t,e,r){for(var n,o=[],i=e;is?s:u+16383));return 1===n?(e=t[r-1],o+=c[e>>2],o+=c[e<<4&63],o+="=="):2===n&&(e=(t[r-2]<<8)+t[r-1],o+=c[e>>10],o+=c[e>>4&63],o+=c[e<<2&63],o+="="),i.push(o),i.join("")}e.byteLength=o,e.toByteArray=i,e.fromByteArray=s;for(var c=[],f=[],l="undefined"!=typeof Uint8Array?Uint8Array:Array,h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",p=0,y=h.length;p>1,f=-7,l=r?o-1:0,h=r?-1:1,p=t[e+l];for(l+=h,i=p&(1<<-f)-1,p>>=-f,f+=a;f>0;i=256*i+t[e+l],l+=h,f-=8);for(u=i&(1<<-f)-1,i>>=-f,f+=n;f>0;u=256*u+t[e+l],l+=h,f-=8);if(0===i)i=1-c;else{if(i===s)return u?NaN:1/0*(p?-1:1);u+=Math.pow(2,n),i-=c}return(p?-1:1)*u*Math.pow(2,i-n)},e.write=function(t,e,r,n,o,i){var u,a,s,c=8*i-o-1,f=(1<>1,h=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:i-1,y=n?1:-1,b=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,u=f):(u=Math.floor(Math.log(e)/Math.LN2),e*(s=Math.pow(2,-u))<1&&(u--,s*=2),e+=u+l>=1?h/s:h*Math.pow(2,1-l),e*s>=2&&(u++,s/=2),u+l>=f?(a=0,u=f):u+l>=1?(a=(e*s-1)*Math.pow(2,o),u+=l):(a=e*Math.pow(2,l-1)*Math.pow(2,o),u=0));o>=8;t[r+p]=255&a,p+=y,a/=256,o-=8);for(u=u<0;t[r+p]=255&u,p+=y,u/=256,c-=8);t[r+p-y]|=128*b}},function(t,e){var r={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==r.call(t)}}])});
\ No newline at end of file