Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

ripple-latest-min.js 1006KB

12
  1. /*! For license information please see ripple-latest-min.js.LICENSE.txt */
  2. var ripple;(()=>{var e={4419:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},s=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((n=n.apply(e,t||[])).next())}))},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.RippleAPI=void 0;const u=r(7187),c=r(1007),f=r(5130),h=a(r(3028)),l=a(r(5797)),d=a(r(5114)),p=a(r(8080)),m=a(r(4885)),g=a(r(9048)),y=a(r(6274)),b=r(2964),v=r(5210),w=a(r(2490)),_=a(r(7117)),S=a(r(2827)),M=a(r(2331)),A=a(r(3487)),E=a(r(5070)),O=a(r(8788)),x=a(r(6759)),T=a(r(4656)),P=a(r(6857)),j=a(r(4112)),k=a(r(9712)),I=a(r(2299)),R=a(r(4436)),C=a(r(5313)),B=a(r(420)),N=a(r(3963)),L=a(r(8220)),D=a(r(1655)),F=a(r(4036)),q=a(r(6250)),U=r(4780),z=r(1310),V=a(r(6773)),$=a(r(4009)),H=a(r(4371)),X=a(r(62)),K=a(r(1615)),J=o(r(6699)),Z=o(r(4377)),G=o(r(7384)),W=r(8715),Y=r(6699),Q=r(8914),ee=r(7854),te=a(r(7334));class re extends u.EventEmitter{constructor(e={}){super(),this.generateAddress=U.generateAddress,this.generateXAddress=U.generateXAddress,this.connect=f.connect,this.disconnect=f.disconnect,this.isConnected=f.isConnected,this.getServerInfo=W.getServerInfo,this.getFee=W.getFee,this.getLedgerVersion=f.getLedgerVersion,this.getTransaction=h.default,this.getTransactions=l.default,this.getTrustlines=d.default,this.getBalances=p.default,this.getBalanceSheet=m.default,this.getPaths=g.default,this.getOrderbook=b.getOrderbook,this.getOrders=y.default,this.getSettings=v.getSettings,this.getAccountInfo=w.default,this.getAccountObjects=_.default,this.getPaymentChannel=S.default,this.getLedger=X.default,this.parseAccountFlags=v.parseAccountFlags,this.preparePayment=M.default,this.prepareTrustline=A.default,this.prepareOrder=E.default,this.prepareOrderCancellation=O.default,this.prepareEscrowCreation=x.default,this.prepareEscrowExecution=T.default,this.prepareEscrowCancellation=P.default,this.preparePaymentChannelCreate=j.default,this.preparePaymentChannelFund=k.default,this.preparePaymentChannelClaim=I.default,this.prepareCheckCreate=R.default,this.prepareCheckCash=B.default,this.prepareCheckCancel=C.default,this.prepareTicketCreate=L.default,this.prepareSettings=N.default,this.sign=D.default,this.combine=F.default,this.submit=q.default,this.deriveKeypair=z.deriveKeypair,this.deriveAddress=z.deriveAddress,this.computeLedgerHash=V.default,this.signPaymentChannelClaim=$.default,this.verifyPaymentChannelClaim=H.default,this.generateFaucetWallet=te.default,this.errors=c.errors,this.xrpToDrops=c.xrpToDrops,this.dropsToXrp=c.dropsToXrp,this.rippleTimeToISO8601=c.rippleTimeToISO8601,this.iso8601ToRippleTime=c.iso8601ToRippleTime,this.txFlags=c.txFlags,this.accountSetFlags=c.constants.AccountSetFlags,this.isValidAddress=G.isValidAddress,this.isValidSecret=G.isValidSecret,c.validate.apiOptions(e),this._feeCushion=e.feeCushion||1.2,this._maxFeeXRP=e.maxFeeXRP||"2";const t=e.server;null!=t?(this.connection=new c.Connection(t,e),this.connection.on("ledgerClosed",(e=>{this.emit("ledger",f.formatLedgerClose(e))})),this.connection.on("error",((e,t,r)=>{this.emit("error",e,t,r)})),this.connection.on("connected",(()=>{this.emit("connected")})),this.connection.on("disconnected",(e=>{let t=e;1005!==t&&4e3!==t||(t=1e3),this.emit("disconnected",t)}))):this.connection=new c.Connection(null,e)}request(e,t={}){return s(this,void 0,void 0,(function*(){return this.connection.request(Object.assign(Object.assign({},t),{command:e,account:t.account?c.ensureClassicAddress(t.account):void 0}))}))}hasNextPage(e){return!!e.marker}requestNextPage(e,t={},r){return s(this,void 0,void 0,(function*(){if(!r.marker)return Promise.reject(new c.errors.NotFoundError("response does not have a next page"));const n=Object.assign({},t,{marker:r.marker});return this.request(e,n)}))}prepareTransaction(e,t={}){return s(this,void 0,void 0,(function*(){return Z.prepareTransaction(e,this,t)}))}convertStringToHex(e){return Z.convertStringToHex(e)}_requestAll(e,t={},r={}){return s(this,void 0,void 0,(function*(){const n=r.collect||function(e){switch(e){case"account_offers":case"book_offers":return"offers";case"account_lines":return"lines";default:return}}(e);if(!n)throw new c.errors.ValidationError(`no collect key for command ${e}`);const i=null!=t.limit?t.limit:1/0;let o,s=0,a=t.marker;const u=[];do{const r=Y.clamp(i-s,10,400),c=Object.assign(Object.assign({},t),{limit:r,marker:a}),f=yield this.request(e,c),h=f[n];a=f.marker,u.push(f),Array.isArray(h)?(s+=h.length,o=h.length):o=0}while(a&&s<i&&0!==o);return u}))}}t.RippleAPI=re,re._PRIVATE={validate:c.validate,RangeSet:K.default,ledgerUtils:J,schemaValidator:G},re.renameCounterpartyToIssuer=Y.renameCounterpartyToIssuer,re.formatBidsAndAsks=b.formatBidsAndAsks,re.deriveXAddress=z.deriveXAddress,re.deriveClassicAddress=z.deriveAddress,re.classicAddressToXAddress=Q.classicAddressToXAddress,re.xAddressToClassicAddress=Q.xAddressToClassicAddress,re.isValidXAddress=Q.isValidXAddress,re.isValidClassicAddress=Q.isValidClassicAddress,re.encodeSeed=Q.encodeSeed,re.decodeSeed=Q.decodeSeed,re.encodeAccountID=Q.encodeAccountID,re.decodeAccountID=Q.decodeAccountID,re.encodeNodePublic=Q.encodeNodePublic,re.decodeNodePublic=Q.decodeNodePublic,re.encodeAccountPublic=Q.encodeAccountPublic,re.decodeAccountPublic=Q.decodeAccountPublic,re.encodeXAddress=Q.encodeXAddress,re.decodeXAddress=Q.decodeXAddress,re.computeBinaryTransactionHash=ee.computeBinaryTransactionHash,re.computeTransactionHash=ee.computeTransactionHash,re.computeBinaryTransactionSigningHash=ee.computeBinaryTransactionSigningHash,re.computeAccountLedgerObjectID=ee.computeAccountLedgerObjectID,re.computeSignerListLedgerObjectID=ee.computeSignerListLedgerObjectID,re.computeOrderID=ee.computeOrderID,re.computeTrustlineHash=ee.computeTrustlineHash,re.computeTransactionTreeHash=ee.computeTransactionTreeHash,re.computeStateTreeHash=ee.computeStateTreeHash,re.computeLedgerHash=V.default,re.computeEscrowHash=ee.computeEscrowHash,re.computePaymentChannelHash=ee.computePaymentChannelHash,re.txFlags=c.txFlags,re.accountSetFlags=c.constants.AccountSetFlags},5162:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.RippleAPIBroadcast=void 0;const i=r(4419);class o extends i.RippleAPI{constructor(e,t={}){super(t),this.ledgerVersion=void 0;const r=e.map((e=>new i.RippleAPI(Object.assign({},t,{server:e}))));this._apis=r,this.getMethodNames().forEach((e=>{this[e]=function(){return Promise.race(r.map((t=>t[e](...arguments))))}})),this.connect=function(){return n(this,void 0,void 0,(function*(){yield Promise.all(r.map((e=>e.connect())))}))},this.disconnect=function(){return n(this,void 0,void 0,(function*(){yield Promise.all(r.map((e=>e.disconnect())))}))},this.isConnected=function(){return r.map((e=>e.isConnected())).every(Boolean)};const o=r[0];["sign","generateAddress","computeLedgerHash"].forEach((e=>{this[e]=o[e].bind(o)})),r.forEach((e=>{e.on("ledger",this.onLedgerEvent.bind(this)),e.on("error",((e,t,r)=>this.emit("error",e,t,r)))}))}onLedgerEvent(e){(e.ledgerVersion>this.ledgerVersion||null==this.ledgerVersion)&&(this.ledgerVersion=e.ledgerVersion,this.emit("ledger",e))}getMethodNames(){const e=[],t=this._apis[0];for(const r of Object.getOwnPropertyNames(t))"function"==typeof t[r]&&e.push(r);return e}}t.RippleAPIBroadcast=o},7902:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExponentialBackoff=void 0,t.ExponentialBackoff=class{constructor(e={}){this.factor=2,this.jitter=0,this.attempts=0,this.ms=e.min||100,this.max=e.max||1e4}duration(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),r=Math.floor(t*this.jitter*e);e=0==(1&Math.floor(10*t))?e-r:e+r}return 0|Math.min(e,this.max)}reset(){this.attempts=0}}},9783:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setPrototypeOf=t.getConstructorName=void 0,t.setPrototypeOf=function(e,t){Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t},t.getConstructorName=function(e){if(e.constructor.name)return e.constructor.name;const t=e.constructor.toString(),r=t.match(/^function\s+([^(]*)/),n=t.match(/^class\s([^\s]*)/);return r?r[1]:n[1]}},8348:function(e,t,r){"use strict";var n=r(8764).Buffer,i=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&i(t,e,r);return o(t,e),t},a=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((n=n.apply(e,t||[])).next())}))},u=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Connection=void 0;const c=s(r(6486)),f=r(7187),h=r(8575),l=u(r(9491)),d=u(r(1615)),p=r(8015),m=r(7902);class g{constructor(){this.feeBase=null,this.feeRef=null,this.latestVersion=null,this.reserveBase=null,this.availableVersions=new d.default}hasVersion(e){return this.availableVersions.containsValue(e)}hasVersions(e,t){return this.availableVersions.containsRange(e,t)}update(e){this.feeBase=e.fee_base,this.feeRef=e.fee_ref,this.latestVersion=e.ledger_index,this.reserveBase=e.reserve_base,e.validated_ledgers?(this.availableVersions.reset(),this.availableVersions.parseAndAddRanges(e.validated_ledgers)):this.availableVersions.addValue(this.latestVersion)}}class y{constructor(){this.promisesAwaitingConnection=[]}resolveAllAwaiting(){this.promisesAwaitingConnection.map((({resolve:e})=>e())),this.promisesAwaitingConnection=[]}rejectAllAwaiting(e){this.promisesAwaitingConnection.map((({reject:t})=>t(e))),this.promisesAwaitingConnection=[]}awaitConnection(){return new Promise(((e,t)=>{this.promisesAwaitingConnection.push({resolve:e,reject:t})}))}}class b{constructor(){this.nextId=0,this.promisesAwaitingResponse=[]}cancel(e){const{timer:t}=this.promisesAwaitingResponse[e];clearTimeout(t),delete this.promisesAwaitingResponse[e]}resolve(e,t){const{timer:r,resolve:n}=this.promisesAwaitingResponse[e];clearTimeout(r),n(t),delete this.promisesAwaitingResponse[e]}reject(e,t){const{timer:r,reject:n}=this.promisesAwaitingResponse[e];clearTimeout(r),n(t),delete this.promisesAwaitingResponse[e]}rejectAll(e){this.promisesAwaitingResponse.forEach(((t,r)=>{this.reject(r,e)}))}createRequest(e,t){const r=this.nextId++,n=JSON.stringify(Object.assign(Object.assign({},e),{id:r})),i=setTimeout((()=>this.reject(r,new p.TimeoutError)),t);i.unref&&i.unref();const o=new Promise(((e,t)=>{this.promisesAwaitingResponse[r]={resolve:e,reject:t,timer:i}}));return[r,n,o]}handleResponse(e){if(!Number.isInteger(e.id)||e.id<0)throw new p.ResponseFormatError("valid id not found in response",e);if(this.promisesAwaitingResponse[e.id])if("error"!==e.status)if("success"===e.status)this.resolve(e.id,e.result);else{const t=new p.ResponseFormatError(`unrecognized status: ${e.status}`,e);this.reject(e.id,t)}else{const t=new p.RippledError(e.error_message||e.error,e);this.reject(e.id,t)}}}class v extends f.EventEmitter{constructor(e,t={}){super(),this._ws=null,this._reconnectTimeoutID=null,this._heartbeatIntervalID=null,this._retryConnectionBackoff=new m.ExponentialBackoff({min:100,max:6e4}),this._trace=()=>{},this._ledger=new g,this._requestManager=new b,this._connectionManager=new y,this._clearHeartbeatInterval=()=>{clearInterval(this._heartbeatIntervalID)},this._startHeartbeatInterval=()=>{this._clearHeartbeatInterval(),this._heartbeatIntervalID=setInterval((()=>this._heartbeat()),this._config.timeout)},this._heartbeat=()=>this.request({command:"ping"}).catch((()=>this.reconnect().catch((e=>{this.emit("error","reconnect",e.message,e)})))),this._onConnectionFailed=e=>{this._ws&&(this._ws.removeAllListeners(),this._ws.on("error",(()=>{})),this._ws.close(),this._ws=null),"number"==typeof e?this._connectionManager.rejectAllAwaiting(new p.NotConnectedError(`Connection failed with code ${e}.`,{code:e})):e&&e.message?this._connectionManager.rejectAllAwaiting(new p.NotConnectedError(e.message,e)):this._connectionManager.rejectAllAwaiting(new p.NotConnectedError("Connection failed."))},this.setMaxListeners(1/0),this._url=e,this._config=Object.assign({timeout:2e4,connectionTimeout:5e3},t),"function"==typeof t.trace?this._trace=t.trace:!0===t.trace&&(this._trace=console.log)}_onMessage(e){let t;this._trace("receive",e);try{t=JSON.parse(e)}catch(t){return void this.emit("error","badMessage",t.message,e)}if(null==t.type&&t.error)this.emit("error",t.error,t.error_message,t);else if(t.type&&this.emit(t.type,t),"ledgerClosed"===t.type&&this._ledger.update(t),"response"===t.type)try{this._requestManager.handleResponse(t)}catch(t){this.emit("error","badMessage",t.message,e)}}get _state(){return this._ws?this._ws.readyState:l.default.CLOSED}get _shouldBeConnected(){return null!==this._ws}_waitForReady(){return new Promise(((e,t)=>{this._shouldBeConnected?this._state===l.default.OPEN?e():this.once("connected",(()=>e())):t(new p.NotConnectedError)}))}_subscribeToLedger(){return a(this,void 0,void 0,(function*(){const e=yield this.request({command:"subscribe",streams:["ledger"]});if(c.isEmpty(e)||!e.ledger_index)try{yield this.disconnect()}catch(e){}finally{throw new p.RippledNotInitializedError("Rippled not initialized")}this._ledger.update(e)}))}isConnected(){return this._state===l.default.OPEN}connect(){if(this.isConnected())return Promise.resolve();if(this._state===l.default.CONNECTING)return this._connectionManager.awaitConnection();if(!this._url)return Promise.reject(new p.ConnectionError("Cannot connect because no server was specified"));if(this._ws)return Promise.reject(new p.RippleError("Websocket connection never cleaned up.",{state:this._state}));const e=setTimeout((()=>{this._onConnectionFailed(new p.ConnectionError(`Error: connect() timed out after ${this._config.connectionTimeout} ms. If your internet connection is working, the rippled server may be blocked or inaccessible. You can also try setting the 'connectionTimeout' option in the RippleAPI constructor.`))}),this._config.connectionTimeout);return this._ws=function(e,t){const i={};if(null!=t.proxy){const n=h.parse(e),o=h.parse(t.proxy),s=c.omitBy({secureEndpoint:"wss:"===n.protocol,secureProxy:"https:"===o.protocol,auth:t.proxyAuthorization,ca:t.trustedCertificates,key:t.key,passphrase:t.passphrase,cert:t.certificate},(e=>null==e)),a=Object.assign({},o,s);let u;try{u=r(7158)}catch(e){throw new Error('"proxy" option is not supported in the browser')}i.agent=new u(a)}if(null!=t.authorization){const e=n.from(t.authorization).toString("base64");i.headers={Authorization:`Basic ${e}`}}const o=c.omitBy({ca:t.trustedCertificates,key:t.key,passphrase:t.passphrase,cert:t.certificate},(e=>null==e)),s=Object.assign({},i,o),a=new l.default(e,null,s);return"function"==typeof a.setMaxListeners&&a.setMaxListeners(1/0),a}(this._url,this._config),this._ws.on("error",this._onConnectionFailed),this._ws.on("error",(()=>clearTimeout(e))),this._ws.on("close",this._onConnectionFailed),this._ws.on("close",(()=>clearTimeout(e))),this._ws.once("open",(()=>a(this,void 0,void 0,(function*(){this._ws.removeAllListeners(),clearTimeout(e),this._ws.on("message",(e=>this._onMessage(e))),this._ws.on("error",(e=>this.emit("error","websocket",e.message,e))),this._ws.once("close",(e=>{if(this._clearHeartbeatInterval(),this._requestManager.rejectAll(new p.DisconnectedError("websocket was closed")),this._ws.removeAllListeners(),this._ws=null,this.emit("disconnected",e),4e3!==e){const e=this._retryConnectionBackoff.duration();this._trace("reconnect",`Retrying connection in ${e}ms.`),this.emit("reconnecting",this._retryConnectionBackoff.attempts),this._reconnectTimeoutID=setTimeout((()=>{this.reconnect().catch((e=>{this.emit("error","reconnect",e.message,e)}))}),e)}}));try{this._retryConnectionBackoff.reset(),yield this._subscribeToLedger(),this._startHeartbeatInterval(),this._connectionManager.resolveAllAwaiting(),this.emit("connected")}catch(e){this._connectionManager.rejectAllAwaiting(e),yield this.disconnect().catch((()=>{}))}})))),this._connectionManager.awaitConnection()}disconnect(){return clearTimeout(this._reconnectTimeoutID),this._reconnectTimeoutID=null,this._state!==l.default.CLOSED&&this._ws?new Promise((e=>{this._ws.once("close",(t=>e(t))),this._state!==l.default.CLOSING&&this._ws.close(4e3)})):Promise.resolve(void 0)}reconnect(){return a(this,void 0,void 0,(function*(){this.emit("reconnect"),yield this.disconnect(),yield this.connect()}))}getFeeBase(){return a(this,void 0,void 0,(function*(){return yield this._waitForReady(),this._ledger.feeBase}))}getFeeRef(){return a(this,void 0,void 0,(function*(){return yield this._waitForReady(),this._ledger.feeRef}))}getLedgerVersion(){return a(this,void 0,void 0,(function*(){return yield this._waitForReady(),this._ledger.latestVersion}))}getReserveBase(){return a(this,void 0,void 0,(function*(){return yield this._waitForReady(),this._ledger.reserveBase}))}hasLedgerVersions(e,t){return a(this,void 0,void 0,(function*(){return t?(yield this._waitForReady(),this._ledger.hasVersions(e,t)):this.hasLedgerVersion(e)}))}hasLedgerVersion(e){return a(this,void 0,void 0,(function*(){return yield this._waitForReady(),this._ledger.hasVersion(e)}))}request(e,t){return a(this,void 0,void 0,(function*(){if(!this._shouldBeConnected)throw new p.NotConnectedError;const[r,n,i]=this._requestManager.createRequest(e,t||this._config.timeout);return this._trace("send",n),function(e,t){return new Promise(((r,n)=>{e.send(t,void 0,(e=>{e?n(new p.DisconnectedError(e.message,e)):r()}))}))}(this._ws,n).catch((e=>{this._requestManager.reject(r,e)})),i}))}getUrl(){return this._url}}t.Connection=v},5303:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AccountFlags=t.AccountSetFlags=t.AccountFields=void 0;const n=r(4684);t.AccountFlags={passwordSpent:65536,requireDestinationTag:131072,requireAuthorization:262144,depositAuth:16777216,disallowIncomingXRP:524288,disableMasterKey:1048576,noFreeze:2097152,globalFreeze:4194304,defaultRipple:8388608};const i={requireDestinationTag:n.txFlagIndices.AccountSet.asfRequireDest,requireAuthorization:n.txFlagIndices.AccountSet.asfRequireAuth,depositAuth:n.txFlagIndices.AccountSet.asfDepositAuth,disallowIncomingXRP:n.txFlagIndices.AccountSet.asfDisallowXRP,disableMasterKey:n.txFlagIndices.AccountSet.asfDisableMaster,enableTransactionIDTracking:n.txFlagIndices.AccountSet.asfAccountTxnID,noFreeze:n.txFlagIndices.AccountSet.asfNoFreeze,globalFreeze:n.txFlagIndices.AccountSet.asfGlobalFreeze,defaultRipple:n.txFlagIndices.AccountSet.asfDefaultRipple};t.AccountSetFlags=i,t.AccountFields={EmailHash:{name:"emailHash",encoding:"hex",length:32,defaults:"00000000000000000000000000000000"},WalletLocator:{name:"walletLocator"},MessageKey:{name:"messageKey"},Domain:{name:"domain",encoding:"hex"},TransferRate:{name:"transferRate",defaults:0,shift:9},TickSize:{name:"tickSize",defaults:0}}},8015:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.XRPLFaucetError=t.LedgerVersionError=t.MissingLedgerHistoryError=t.PendingLedgerVersionError=t.NotFoundError=t.ValidationError=t.ResponseFormatError=t.TimeoutError=t.RippledNotInitializedError=t.DisconnectedError=t.NotConnectedError=t.RippledError=t.ConnectionError=t.UnexpectedError=t.RippleError=void 0;const s=r(9539),a=o(r(9783));class u extends Error{constructor(e="",t){super(e),this.name=a.getConstructorName(this),this.message=e,this.data=t,Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}toString(){let e="["+this.name+"("+this.message;return this.data&&(e+=", "+s.inspect(this.data)),e+=")]",e}inspect(){return this.toString()}}t.RippleError=u,t.RippledError=class extends u{},t.UnexpectedError=class extends u{},t.LedgerVersionError=class extends u{};class c extends u{}t.ConnectionError=c,t.NotConnectedError=class extends c{},t.DisconnectedError=class extends c{},t.RippledNotInitializedError=class extends c{},t.TimeoutError=class extends c{},t.ResponseFormatError=class extends c{},t.ValidationError=class extends u{},t.XRPLFaucetError=class extends u{},t.NotFoundError=class extends u{constructor(e="Not found"){super(e)}},t.MissingLedgerHistoryError=class extends u{constructor(e){super(e||"Server is missing ledger history in the specified range")}},t.PendingLedgerVersionError=class extends u{constructor(e){super(e||"maxLedgerVersion is greater than server's most recent validated ledger")}}},642:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.TRANSACTION_ID=1415073280]="TRANSACTION_ID",e[e.TRANSACTION_NODE=1397638144]="TRANSACTION_NODE",e[e.INNER_NODE=1296649728]="INNER_NODE",e[e.LEAF_NODE=1296846336]="LEAF_NODE",e[e.TRANSACTION_SIGN=1398036480]="TRANSACTION_SIGN",e[e.TRANSACTION_SIGN_TESTNET=1937012736]="TRANSACTION_SIGN_TESTNET",e[e.TRANSACTION_MULTISIGN=1397576704]="TRANSACTION_MULTISIGN",e[e.LEDGER=1280791040]="LEDGER"}(r||(r={})),t.default=r},7854:function(e,t,r){"use strict";var n=r(8764).Buffer,i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.computePaymentChannelHash=t.computeEscrowHash=t.computeLedgerHash=t.computeStateTreeHash=t.computeTransactionTreeHash=t.computeTrustlineHash=t.computeOrderID=t.computeSignerListLedgerObjectID=t.computeAccountLedgerObjectID=t.computeBinaryTransactionSigningHash=t.computeTransactionHash=t.computeBinaryTransactionHash=void 0;const o=i(r(4431)),s=r(8914),a=i(r(4877)),u=i(r(642)),c=r(6523),f=r(2353),h=i(r(4109)),l=(e,t)=>Array(t-e.length+1).join("0")+e,d=(e,t)=>l(Number(e).toString(16),2*t),p=e=>n.from(e).toString("hex"),m=e=>d(h.default[e].charCodeAt(0),2),g=e=>n.from(s.decodeAccountID(e)).toString("hex"),y=e=>{const t=e.length/2;if(t<=192)return p([t])+e;if(t<=12480){const r=t-193;return p([193+(r>>>8),255&r])+e}if(t<=918744){const r=t-12481;return p([241+(r>>>16),r>>>8&255,255&r])+e}throw new Error("Variable integer overflow.")};t.computeBinaryTransactionHash=e=>{const t=u.default.TRANSACTION_ID.toString(16).toUpperCase();return a.default(t+e)},t.computeTransactionHash=e=>t.computeBinaryTransactionHash(f.encode(e)),t.computeBinaryTransactionSigningHash=e=>{const t=u.default.TRANSACTION_SIGN.toString(16).toUpperCase();return a.default(t+e)},t.computeAccountLedgerObjectID=e=>a.default(m("account")+g(e)),t.computeSignerListLedgerObjectID=e=>a.default(m("signerList")+g(e)+"00000000"),t.computeOrderID=(e,t)=>{const r="00"+d(h.default.offer.charCodeAt(0),1);return a.default(r+g(e)+d(t,4))},t.computeTrustlineHash=(e,t,r)=>{const n=g(e),i=g(t),s=new o.default(n,16).isGreaterThan(new o.default(i,16)),u=s?i:n,c=s?n:i,f=m("rippleState");return a.default(f+u+c+(e=>{if(3===e.length){const t=new Array(21).join("0").split("").map(parseFloat);return t[12]=255&e.charCodeAt(0),t[13]=255&e.charCodeAt(1),t[14]=255&e.charCodeAt(2),p(t)}return e})(r))},t.computeTransactionTreeHash=e=>{const r=new c.SHAMap;return e.forEach((e=>{const n=f.encode(e),i=f.encode(e.metaData),o=t.computeBinaryTransactionHash(n),s=y(n)+y(i);r.addItem(o,s,c.NodeType.TRANSACTION_METADATA)})),r.hash},t.computeStateTreeHash=e=>{const t=new c.SHAMap;return e.forEach((e=>{const r=f.encode(e);t.addItem(e.index,r,c.NodeType.ACCOUNT_STATE)})),t.hash},t.computeLedgerHash=e=>{const t=u.default.LEDGER.toString(16).toUpperCase();return a.default(t+d(e.ledger_index,4)+((e,t)=>{const r=new o.default(e).toString(16);return l(r,16)})(e.total_coins)+e.parent_hash+e.transaction_hash+e.account_hash+d(e.parent_close_time,4)+d(e.close_time,4)+d(e.close_time_resolution,1)+d(e.close_flags,1))},t.computeEscrowHash=(e,t)=>a.default(m("escrow")+g(e)+d(t,4)),t.computePaymentChannelHash=(e,t,r)=>a.default(m("paychan")+g(e)+g(t)+d(r,4))},4109:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={account:"a",dirNode:"d",generatorMap:"g",rippleState:"r",offer:"o",ownerDir:"O",bookDir:"B",contract:"c",skipList:"s",escrow:"u",amendment:"f",feeSettings:"e",ticket:"T",signerList:"S",paychan:"x",check:"C",depositPreauth:"p"}},4877:(e,t,r)=>{"use strict";var n=r(8764).Buffer;Object.defineProperty(t,"__esModule",{value:!0});const i=r(5835);t.default=e=>i.createHash("sha512").update(n.from(e,"hex")).digest("hex").toUpperCase().slice(0,64)},6523:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.SHAMap=t.Leaf=t.InnerNode=t.Node=t.NodeType=void 0;const i=n(r(642)),o=n(r(4877)),s="0000000000000000000000000000000000000000000000000000000000000000";var a;!function(e){e[e.INNER=1]="INNER",e[e.TRANSACTION_NO_METADATA=2]="TRANSACTION_NO_METADATA",e[e.TRANSACTION_METADATA=3]="TRANSACTION_METADATA",e[e.ACCOUNT_STATE=4]="ACCOUNT_STATE"}(a=t.NodeType||(t.NodeType={}));class u{constructor(){}addItem(e,t){throw new Error("Called unimplemented virtual method SHAMapTreeNode#addItem.")}get hash(){throw new Error("Called unimplemented virtual method SHAMapTreeNode#hash.")}}t.Node=u;class c extends u{constructor(e=0){super(),this.leaves={},this.type=a.INNER,this.depth=e,this.empty=!0}addItem(e,t){const r=this.getNode(parseInt(e[this.depth],16));if(r){if(r instanceof c)r.addItem(e,t);else if(r instanceof f){if(r.tag===e)throw new Error("Tried to add a node to a SHAMap that was already in there.");{const n=new c(this.depth+1);n.addItem(r.tag,r),n.addItem(e,t),this.setNode(parseInt(e[this.depth],16),n)}}}else this.setNode(parseInt(e[this.depth],16),t)}setNode(e,t){if(e<0||e>15)throw new Error("Invalid slot: slot must be between 0-15.");this.leaves[e]=t,this.empty=!1}getNode(e){if(e<0||e>15)throw new Error("Invalid slot: slot must be between 0-15.");return this.leaves[e]}get hash(){if(this.empty)return s;let e="";for(let t=0;t<16;t++)e+=this.leaves[t]?this.leaves[t].hash:s;const t=i.default.INNER_NODE.toString(16);return o.default(t+e)}}t.InnerNode=c;class f extends u{constructor(e,t,r){super(),this.tag=e,this.type=r,this.data=t}get hash(){switch(this.type){case a.ACCOUNT_STATE:{const e=i.default.LEAF_NODE.toString(16);return o.default(e+this.data+this.tag)}case a.TRANSACTION_NO_METADATA:{const e=i.default.TRANSACTION_ID.toString(16);return o.default(e+this.data)}case a.TRANSACTION_METADATA:{const e=i.default.TRANSACTION_NODE.toString(16);return o.default(e+this.data+this.tag)}default:throw new Error("Tried to hash a SHAMap node of unknown type.")}}}t.Leaf=f,t.SHAMap=class{constructor(){this.root=new c(0)}addItem(e,t,r){this.root.addItem(e,new f(e,t,r))}get hash(){return this.root.hash}}},1007:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.serverInfo=t.validate=t.errors=t.constants=t.ensureClassicAddress=void 0;const s=o(r(5303));t.constants=s;const a=o(r(8015));t.errors=a;const u=o(r(6008));t.validate=u;const c=o(r(8715));t.serverInfo=c;const f=r(8914);t.ensureClassicAddress=function(e){if(f.isValidXAddress(e)){const{classicAddress:t,tag:r}=f.xAddressToClassicAddress(e);if(!1!==r)throw new Error("This command does not support the use of a tag. Use an address without a tag.");return t}return e};var h=r(4330);Object.defineProperty(t,"dropsToXrp",{enumerable:!0,get:function(){return h.dropsToXrp}}),Object.defineProperty(t,"xrpToDrops",{enumerable:!0,get:function(){return h.xrpToDrops}}),Object.defineProperty(t,"toRippledAmount",{enumerable:!0,get:function(){return h.toRippledAmount}}),Object.defineProperty(t,"removeUndefined",{enumerable:!0,get:function(){return h.removeUndefined}}),Object.defineProperty(t,"convertKeysFromSnakeCaseToCamelCase",{enumerable:!0,get:function(){return h.convertKeysFromSnakeCaseToCamelCase}}),Object.defineProperty(t,"iso8601ToRippleTime",{enumerable:!0,get:function(){return h.iso8601ToRippleTime}}),Object.defineProperty(t,"rippleTimeToISO8601",{enumerable:!0,get:function(){return h.rippleTimeToISO8601}});var l=r(8348);Object.defineProperty(t,"Connection",{enumerable:!0,get:function(){return l.Connection}});var d=r(4684);Object.defineProperty(t,"txFlags",{enumerable:!0,get:function(){return d.txFlags}})},1615:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});const s=o(r(6486)),a=o(r(9282));t.default=class{constructor(){this.reset()}reset(){this.ranges=[]}serialize(){return this.ranges.map((e=>e[0].toString()+"-"+e[1].toString())).join(",")}addRange(e,t){a.ok(e<=t,`invalid range ${e} <= ${t}`),this.ranges=function(e){const t=[[-1/0,-1/0]];return s.sortBy(e,(e=>e[0])).forEach((e=>{const r=t.pop();e[0]<=r[1]+1?t.push([r[0],Math.max(e[1],r[1])]):(t.push(r),t.push(e))})),t.slice(1)}(this.ranges.concat([[e,t]]))}addValue(e){this.addRange(e,e)}parseAndAddRanges(e){e.split(",").forEach((e=>{const t=e.split("-").map(Number);this.addRange(t[0],1===t.length?t[0]:t[1])}))}containsRange(e,t){return this.ranges.some((r=>r[0]<=e&&r[1]>=t))}containsValue(e){return this.containsRange(e,e)}}},7384:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.isValidAddress=t.isValidSecret=t.schemaValidate=void 0;const s=o(r(6486)),a=o(r(9282)),{Validator:u}=r(660),c=r(8015),f=r(8914),h=r(4330);Object.defineProperty(t,"isValidSecret",{enumerable:!0,get:function(){return h.isValidSecret}});const l=function(){const e=[r(4092),r(5592),r(1779),r(7579),r(6094),r(6433),r(3913),r(2521),r(3920),r(2324),r(6352),r(2620),r(7225),r(2699),r(7789),r(6693),r(7807),r(7263),r(1062),r(9949),r(8470),r(4727),r(8303),r(6509),r(5245),r(3383),r(417),r(2144),r(5525),r(7173),r(5330),r(6448),r(3089),r(932),r(535),r(4391),r(6387),r(6835),r(6371),r(994),r(9109),r(5711),r(393),r(759),r(8909),r(9572),r(9696),r(1125),r(7597),r(5398),r(1219),r(1343),r(9151),r(8571),r(8476),r(7655),r(9809),r(4105),r(7006),r(6220),r(985),r(2030),r(7193),r(203),r(5342),r(7571),r(8819),r(395),r(4079),r(7695),r(7707),r(9807),r(6116),r(3345),r(9810),r(4924),r(3008),r(1730),r(3529),r(8941),r(6584),r(298),r(5751),r(7482),r(8201),r(5870),r(5054),r(4526),r(5846),r(5698),r(7817),r(9848),r(4802),r(9013),r(4172),r(5168),r(350),r(4681),r(4867),r(8046),r(8428),r(4561),r(4299),r(7370),r(1767),r(782),r(6859),r(3971),r(7339),r(4882),r(1409),r(4103),r(4203),r(6462),r(8462),r(9845)],t=e.map((e=>e.title)),n=Object.keys(s.pickBy(s.countBy(t),(e=>e>1)));a.ok(0===n.length,"Duplicate schemas for: "+n);const i=new u;return i.customFormats.xAddress=function(e){return null==e||f.isValidXAddress(e)},i.customFormats.classicAddress=function(e){return null==e||d(e)},i.customFormats.secret=function(e){return null==e||h.isValidSecret(e)},e.forEach((e=>i.addSchema(e,"/"+e.title))),i}();function d(e){return f.isValidXAddress(e)||f.isValidClassicAddress(e)}t.schemaValidate=function(e,t){const r=l.getSchema("/"+e);if(null==r)throw new c.ValidationError("no schema for "+e);const n=l.validate(t,r);if(!n.valid)throw new c.ValidationError(n.errors.join())},t.isValidAddress=d},8715:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((n=n.apply(e,t||[])).next())}))},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getFee=t.getServerInfo=void 0;const o=r(4330),s=i(r(4431));function a(e,t){Object.entries(t).forEach((t=>{const[r,n]=t;e[n]=e[r],delete e[r]}))}t.getServerInfo=function(){return this.request("server_info").then((e=>{const t=o.convertKeysFromSnakeCaseToCamelCase(e.info);return a(t,{hostid:"hostID"}),t.validatedLedger&&(a(t.validatedLedger,{baseFeeXrp:"baseFeeXRP",reserveBaseXrp:"reserveBaseXRP",reserveIncXrp:"reserveIncrementXRP",seq:"ledgerVersion"}),t.validatedLedger.baseFeeXRP=t.validatedLedger.baseFeeXRP.toString(),t.validatedLedger.reserveBaseXRP=t.validatedLedger.reserveBaseXRP.toString(),t.validatedLedger.reserveIncrementXRP=t.validatedLedger.reserveIncrementXRP.toString()),t}))},t.getFee=function(e){return n(this,void 0,void 0,(function*(){null==e&&(e=this._feeCushion),null==e&&(e=1.2);const t=(yield this.request("server_info")).info,r=new s.default(t.validated_ledger.base_fee_xrp);null==t.load_factor&&(t.load_factor=1);let n=r.times(t.load_factor).times(e);return n=s.default.min(n,this._maxFeeXRP),new s.default(n.toFixed(6)).toString(10)}))}},4684:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.txFlagIndices=t.txFlags=void 0,t.txFlags={Universal:{FullyCanonicalSig:2147483648},AccountSet:{RequireDestTag:65536,OptionalDestTag:131072,RequireAuth:262144,OptionalAuth:524288,DisallowXRP:1048576,AllowXRP:2097152},TrustSet:{SetAuth:65536,NoRipple:131072,SetNoRipple:131072,ClearNoRipple:262144,SetFreeze:1048576,ClearFreeze:2097152},OfferCreate:{Passive:65536,ImmediateOrCancel:131072,FillOrKill:262144,Sell:524288},Payment:{NoRippleDirect:65536,PartialPayment:131072,LimitQuality:262144},PaymentChannelClaim:{Renew:65536,Close:131072}},t.txFlagIndices={AccountSet:{asfRequireDest:1,asfRequireAuth:2,asfDisallowXRP:3,asfDisableMaster:4,asfAccountTxnID:5,asfNoFreeze:6,asfGlobalFreeze:7,asfDefaultRipple:8,asfDepositAuth:9}}},977:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},4330:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.isValidSecret=t.iso8601ToRippleTime=t.rippleTimeToISO8601=t.removeUndefined=t.convertKeysFromSnakeCaseToCamelCase=t.toRippledAmount=t.xrpToDrops=t.dropsToXrp=void 0;const a=o(r(6486)),u=s(r(4431)),c=r(9140),f=r(8015),h=r(8914);function l(e){if("string"==typeof e){if(!e.match(/^-?[0-9]*\.?[0-9]*$/))throw new f.ValidationError(`xrpToDrops: invalid value '${e}', should be a number matching (^-?[0-9]*\\.?[0-9]*$).`);if("."===e)throw new f.ValidationError(`xrpToDrops: invalid value '${e}', should be a BigNumber or string-encoded number.`)}if(!(e=new u.default(e).toString(10)).match(/^-?[0-9.]+$/))throw new f.ValidationError(`xrpToDrops: failed sanity check - value '${e}', does not match (^-?[0-9.]+$).`);const t=e.split(".");if(t.length>2)throw new f.ValidationError(`xrpToDrops: failed sanity check - value '${e}' has too many decimal points.`);if((t[1]||"0").length>6)throw new f.ValidationError(`xrpToDrops: value '${e}' has too many decimal places.`);return new u.default(e).times(1e6).integerValue(u.default.ROUND_FLOOR).toString(10)}t.isValidSecret=function(e){try{return c.deriveKeypair(e),!0}catch(e){return!1}},t.dropsToXrp=function(e){if("string"==typeof e){if(!e.match(/^-?[0-9]*\.?[0-9]*$/))throw new f.ValidationError(`dropsToXrp: invalid value '${e}', should be a number matching (^-?[0-9]*\\.?[0-9]*$).`);if("."===e)throw new f.ValidationError(`dropsToXrp: invalid value '${e}', should be a BigNumber or string-encoded number.`)}if((e=new u.default(e).toString(10)).includes("."))throw new f.ValidationError(`dropsToXrp: value '${e}' has too many decimal places.`);if(!e.match(/^-?[0-9]+$/))throw new f.ValidationError(`dropsToXrp: failed sanity check - value '${e}', does not match (^-?[0-9]+$).`);return new u.default(e).dividedBy(1e6).toString(10)},t.xrpToDrops=l,t.toRippledAmount=function(e){if("string"==typeof e)return e;if("XRP"===e.currency)return l(e.value);if("drops"===e.currency)return e.value;let t=e.counterparty||e.issuer,r=!1;try{({classicAddress:t,tag:r}=h.xAddressToClassicAddress(t))}catch(e){}if(!1!==r)throw new f.ValidationError("Issuer X-address includes a tag");return{currency:e.currency,issuer:t,value:e.value}},t.convertKeysFromSnakeCaseToCamelCase=function e(t){if("object"==typeof t){const r=Array.isArray(t)?[]:{};let n;return Object.entries(t).reduce(((t,[r,i])=>{n=r;const o=/([a-zA-Z]_[a-zA-Z])/g;return o.test(r)&&(n=r.replace(o,(e=>e[0]+e[2].toUpperCase()))),t[n]=e(i),t}),r)}return t},t.removeUndefined=function(e){return a.omitBy(e,(e=>null==e))},t.rippleTimeToISO8601=function(e){return new Date((t=e,1e3*(t+946684800))).toISOString();var t},t.iso8601ToRippleTime=function(e){return t=Date.parse(e),Math.round(t/1e3)-946684800;var t}},6008:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.tx_json=t.instructions=t.apiOptions=t.verifyPaymentChannelClaim=t.signPaymentChannelClaim=t.generateAddress=t.computeLedgerHash=t.submit=t.combine=t.sign=t.prepareTicketCreate=t.prepareCheckCancel=t.prepareCheckCash=t.prepareCheckCreate=t.preparePaymentChannelClaim=t.preparePaymentChannelFund=t.preparePaymentChannelCreate=t.prepareEscrowExecution=t.prepareEscrowCancellation=t.prepareEscrowCreation=t.prepareSettings=t.prepareTrustline=t.prepareOrderCancellation=t.prepareOrder=t.preparePayment=t.getLedger=t.getPaymentChannel=t.getTransaction=t.getOrderbook=t.getOrders=t.getBalanceSheet=t.getBalances=t.getTrustlines=t.getAccountInfo=t.getSettings=t.getTransactions=t.getPaths=void 0;const s=o(r(6486)),a=r(8015),u=r(7384);function c(e,t){u.schemaValidate(e,t),function(e){if(null!=e&&null!=e.minLedgerVersion&&null!=e.maxLedgerVersion&&Number(e.minLedgerVersion)>Number(e.maxLedgerVersion))throw new a.ValidationError("minLedgerVersion must not be greater than maxLedgerVersion")}(t.options)}t.getPaths=s.partial(u.schemaValidate,"getPathsParameters"),t.getTransactions=s.partial(c,"getTransactionsParameters"),t.getSettings=s.partial(c,"getSettingsParameters"),t.getAccountInfo=s.partial(c,"getAccountInfoParameters"),t.getTrustlines=s.partial(c,"getTrustlinesParameters"),t.getBalances=s.partial(c,"getBalancesParameters"),t.getBalanceSheet=s.partial(c,"getBalanceSheetParameters"),t.getOrders=s.partial(c,"getOrdersParameters"),t.getOrderbook=s.partial(c,"getOrderbookParameters"),t.getTransaction=s.partial(c,"getTransactionParameters"),t.getPaymentChannel=s.partial(c,"getPaymentChannelParameters"),t.getLedger=s.partial(c,"getLedgerParameters"),t.preparePayment=s.partial(u.schemaValidate,"preparePaymentParameters"),t.prepareOrder=s.partial(u.schemaValidate,"prepareOrderParameters"),t.prepareOrderCancellation=s.partial(u.schemaValidate,"prepareOrderCancellationParameters"),t.prepareTrustline=s.partial(u.schemaValidate,"prepareTrustlineParameters"),t.prepareSettings=s.partial(u.schemaValidate,"prepareSettingsParameters"),t.prepareEscrowCreation=s.partial(u.schemaValidate,"prepareEscrowCreationParameters"),t.prepareEscrowCancellation=s.partial(u.schemaValidate,"prepareEscrowCancellationParameters"),t.prepareEscrowExecution=s.partial(u.schemaValidate,"prepareEscrowExecutionParameters"),t.preparePaymentChannelCreate=s.partial(u.schemaValidate,"preparePaymentChannelCreateParameters"),t.preparePaymentChannelFund=s.partial(u.schemaValidate,"preparePaymentChannelFundParameters"),t.preparePaymentChannelClaim=s.partial(u.schemaValidate,"preparePaymentChannelClaimParameters"),t.prepareCheckCreate=s.partial(u.schemaValidate,"prepareCheckCreateParameters"),t.prepareCheckCash=s.partial(u.schemaValidate,"prepareCheckCashParameters"),t.prepareCheckCancel=s.partial(u.schemaValidate,"prepareCheckCancelParameters"),t.prepareTicketCreate=s.partial(u.schemaValidate,"prepareTicketParameters"),t.sign=s.partial(u.schemaValidate,"signParameters"),t.combine=s.partial(u.schemaValidate,"combineParameters"),t.submit=s.partial(u.schemaValidate,"submitParameters"),t.computeLedgerHash=s.partial(u.schemaValidate,"computeLedgerHashParameters"),t.generateAddress=s.partial(u.schemaValidate,"generateAddressParameters"),t.signPaymentChannelClaim=s.partial(u.schemaValidate,"signPaymentChannelClaimParameters"),t.verifyPaymentChannelClaim=s.partial(u.schemaValidate,"verifyPaymentChannelClaimParameters"),t.apiOptions=s.partial(u.schemaValidate,"api-options"),t.instructions=s.partial(u.schemaValidate,"instructions"),t.tx_json=s.partial(u.schemaValidate,"tx-json")},9491:(e,t,r)=>{"use strict";const n=r(7187);class i extends n.EventEmitter{constructor(e,t,r){super(),this.setMaxListeners(1/0),this._ws=new WebSocket(e),this._ws.onclose=()=>{this.emit("close")},this._ws.onopen=()=>{this.emit("open")},this._ws.onerror=e=>{this.emit("error",e)},this._ws.onmessage=e=>{this.emit("message",e.data)}}close(){1===this.readyState&&this._ws.close()}send(e){this._ws.send(e)}get readyState(){return this._ws.readyState}}i.CONNECTING=0,i.OPEN=1,i.CLOSING=2,i.CLOSED=3,e.exports=i},3081:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||t.hasOwnProperty(r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(4419),t),i(r(8123),t),i(r(977),t),i(r(4780),t);var o=r(5162);Object.defineProperty(t,"RippleAPIBroadcast",{enumerable:!0,get:function(){return o.RippleAPIBroadcast}})},2490:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const i=r(1007);t.default=function(e,t={}){return n(this,void 0,void 0,(function*(){return i.validate.getAccountInfo({address:e,options:t}),e=i.ensureClassicAddress(e),function(e){const t=e.account_data;return i.removeUndefined({sequence:t.Sequence,xrpBalance:i.dropsToXrp(t.Balance),ownerCount:t.OwnerCount,previousInitiatedTransactionID:t.AccountTxnID,previousAffectingTransactionID:t.PreviousTxnID,previousAffectingTransactionLedgerVersion:t.PreviousTxnLgrSeq})}(yield this.request("account_info",{account:e,ledger_index:t.ledgerVersion||"validated"}))}))}},7117:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const i=r(1007);t.default=function(e,t={}){return n(this,void 0,void 0,(function*(){return yield this.request("account_objects",i.removeUndefined({account:e,type:t.type,ledger_hash:t.ledgerHash,ledger_index:t.ledgerIndex,limit:t.limit,marker:t.marker}))}))}},4885:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const i=r(1007),o=r(6699);t.default=function(e,t={}){return n(this,void 0,void 0,(function*(){return i.validate.getBalanceSheet({address:e,options:t}),t=yield o.ensureLedgerVersion.call(this,t),function(e){const t={};return null!=e.balances&&(t.balances=[],Object.entries(e.balances).forEach((e=>{const[r,n]=e;n.forEach((e=>{t.balances.push(Object.assign({counterparty:r},e))}))}))),null!=e.assets&&(t.assets=[],Object.entries(e.assets).forEach((([e,r])=>{r.forEach((r=>{t.assets.push(Object.assign({counterparty:e},r))}))}))),null!=e.obligations&&(t.obligations=Object.entries(e.obligations).map((([e,t])=>({currency:e,value:t})))),t}(yield this.request("gateway_balances",{account:e,strict:!0,hotwallet:t.excludeAddresses,ledger_index:t.ledgerVersion}))}))}},8080:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});const s=o(r(6699)),a=r(1007);function u(e){return{currency:e.specification.currency,counterparty:e.specification.counterparty,value:e.state.balance}}t.default=function(e,t={}){return a.validate.getTrustlines({address:e,options:t}),e=a.ensureClassicAddress(e),Promise.all([(r=this.connection,n=t.ledgerVersion,null!=n&&null!==n?Promise.resolve(n):r.getLedgerVersion()).then((t=>s.getXRPBalance(this.connection,e,t))),this.getTrustlines(e,t)]).then((e=>function(e,t){const r=t.trustlines.map(u);if(!(e.counterparty||e.currency&&"XRP"!==e.currency)){const e={currency:"XRP",value:t.xrp};r.unshift(e)}if(e.limit&&r.length>e.limit){const t=r.length-e.limit;r.splice(-t,t)}return r}(t,{xrp:e[0],trustlines:e[1]})));var r,n}},62:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const i=r(1007),o=r(6812);t.default=function(e={}){return n(this,void 0,void 0,(function*(){i.validate.getLedger({options:e});const t=yield this.request("ledger",{ledger_hash:e.ledgerHash,ledger_index:e.ledgerVersion||"validated",expand:e.includeAllData,transactions:e.includeTransactions,accounts:e.includeState});return o.parseLedger(t.ledger)}))}},2964:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},s=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((n=n.apply(e,t||[])).next())}))},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getOrderbook=t.formatBidsAndAsks=void 0;const u=o(r(6486)),c=o(r(6699)),f=r(7472),h=r(1007),l=a(r(4431));function d(e,t){return t.specification.direction===e}function p(e,t){return n=e,(r=t.specification.quantity).currency===n.currency&&r.counterparty===n.counterparty?t:function(e){const t=e.specification,r={quantity:t.totalPrice,totalPrice:t.quantity,direction:"buy"===t.direction?"sell":"buy"},n=u.merge({},t,r);return u.merge({},e,{specification:n})}(t);var r,n}function m(e,t){const r=t.sort(((e,t)=>new l.default(e.quality).comparedTo(t.quality))).map(f.parseOrderbookOrder).map(u.partial(p,e.base));return{bids:r.filter(u.partial(d,"buy")),asks:r.filter(u.partial(d,"sell"))}}function g(e,t,r,n,i){return s(this,void 0,void 0,(function*(){const o=c.renameCounterpartyToIssuerInOrder({taker_gets:n,taker_pays:i});return e._requestAll("book_offers",{taker_gets:o.taker_gets,taker_pays:o.taker_pays,ledger_index:r.ledgerVersion||"validated",limit:r.limit,taker:t})}))}t.formatBidsAndAsks=m,t.getOrderbook=function(e,t,r={}){return s(this,void 0,void 0,(function*(){h.validate.getOrderbook({address:e,orderbook:t,options:r});const[n,i]=yield Promise.all([g(this,e,r,t.base,t.counter),g(this,e,r,t.counter,t.base)]),o=u.flatMap(n,(e=>e.offers)),s=u.flatMap(i,(e=>e.offers));return m(t,[...o,...s])}))}},6274:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},s=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const a=o(r(6486)),u=r(1007),c=r(4774);t.default=function(e,t={}){return s(this,void 0,void 0,(function*(){u.validate.getOrders({address:e,options:t});const r=yield this._requestAll("account_offers",{account:e,ledger_index:t.ledgerVersion||(yield this.getLedgerVersion()),limit:t.limit});return function(e,t){let r=[];for(const n of t){const t=n.offers.map((t=>c.parseAccountOrder(e,t)));r=r.concat(t)}return a.sortBy(r,(e=>e.properties.sequence))}(e,r)}))}},9941:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});const s=o(r(9282)),a=r(1007),u=r(8914),c=r(2243);t.default=function(e){return s.ok("AccountDelete"===e.TransactionType),a.removeUndefined({memos:c.parseMemos(e),destination:e.Destination,destinationTag:e.DestinationTag,destinationXAddress:u.classicAddressToXAddress(e.Destination,null!=e.DestinationTag&&e.DestinationTag,!1)})}},4774:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.parseAccountOrder=void 0;const i=n(r(4431)),o=n(r(4257)),s=r(2243),a=r(1007),u=r(8365);t.parseAccountOrder=function(e,t){const r=0==(t.flags&u.orderFlags.Sell)?"buy":"sell",n=o.default(t.taker_gets),c=o.default(t.taker_pays),f="buy"===r?c:n,h="buy"===r?n:c,l=a.removeUndefined({direction:r,quantity:f,totalPrice:h,passive:0!=(t.flags&u.orderFlags.Passive)||void 0,expirationTime:s.parseTimestamp(t.expiration)}),d=t.quality?s.adjustQualityForXRP(t.quality.toString(),n.currency,c.currency):(p=n,m=c,new i.default(m.value).dividedBy(p.value).precision(16,i.default.ROUND_HALF_UP).toString());var p,m;return{specification:l,properties:{maker:e,sequence:t.seq,makerExchangeRate:d}}}},9030:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(2243),i=r(1007);t.default=function(e){return{specification:i.removeUndefined({limit:e.limit,currency:e.currency,counterparty:e.account,qualityIn:n.parseQuality(e.quality_in)||void 0,qualityOut:n.parseQuality(e.quality_out)||void 0,ripplingDisabled:e.no_ripple,frozen:e.freeze,authorized:e.authorized}),counterparty:i.removeUndefined({limit:e.limit_peer,ripplingDisabled:e.no_ripple_peer,frozen:e.freeze_peer,authorized:e.peer_authorized}),state:{balance:e.balance}}}},3286:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return{amendment:e.Amendment}}},4257:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});const s=o(r(1007));t.default=function(e){return"string"==typeof e?{currency:"XRP",value:s.dropsToXrp(e)}:{currency:e.currency,value:e.value,counterparty:e.issuer}}},5937:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});const s=o(r(9282)),a=r(2243);t.default=function(e){return s.ok("OfferCancel"===e.TransactionType),{memos:a.parseMemos(e),orderSequence:e.OfferSequence}}},4755:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});const s=o(r(9282)),a=r(1007),u=r(2243);t.default=function(e){return s.ok("CheckCancel"===e.TransactionType),a.removeUndefined({memos:u.parseMemos(e),checkID:e.CheckID})}},979:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=o(r(9282)),u=r(1007),c=s(r(4257)),f=r(2243);t.default=function(e){return a.ok("CheckCash"===e.TransactionType),u.removeUndefined({memos:f.parseMemos(e),checkID:e.CheckID,amount:e.Amount&&c.default(e.Amount),deliverMin:e.DeliverMin&&c.default(e.DeliverMin)})}},2619:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=o(r(9282)),u=r(2243),c=r(1007),f=s(r(4257)),h=r(2243);t.default=function(e){return a.ok("CheckCreate"===e.TransactionType),c.removeUndefined({memos:h.parseMemos(e),destination:e.Destination,sendMax:f.default(e.SendMax),destinationTag:e.DestinationTag,expiration:e.Expiration&&u.parseTimestamp(e.Expiration),invoiceID:e.InvoiceID})}},5738:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});const s=o(r(9282)),a=r(1007),u=r(2243);t.default=function(e){return s.ok("DepositPreauth"===e.TransactionType),a.removeUndefined({memos:u.parseMemos(e),authorize:e.Authorize,unauthorize:e.Unauthorize})}},9523:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});const s=o(r(9282)),a=r(2243),u=r(1007);t.default=function(e){return s.ok("EscrowCancel"===e.TransactionType),u.removeUndefined({memos:a.parseMemos(e),owner:e.Owner,escrowSequence:e.OfferSequence})}},5053:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=o(r(9282)),u=s(r(4257)),c=r(2243),f=r(1007);t.default=function(e){return a.ok("EscrowCreate"===e.TransactionType),f.removeUndefined({amount:u.default(e.Amount).value,destination:e.Destination,memos:c.parseMemos(e),condition:e.Condition,allowCancelAfter:c.parseTimestamp(e.CancelAfter),allowExecuteAfter:c.parseTimestamp(e.FinishAfter),sourceTag:e.SourceTag,destinationTag:e.DestinationTag})}},8975:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});const s=o(r(9282)),a=r(2243),u=r(1007);t.default=function(e){return s.ok("EscrowFinish"===e.TransactionType),u.removeUndefined({memos:a.parseMemos(e),owner:e.Owner,escrowSequence:e.OfferSequence,condition:e.Condition,fulfillment:e.Fulfillment})}},2685:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=n(r(4431)),o=r(1007),s=r(2243);t.default=function(e){const t=new i.default(e.BaseFee,16).toString();return{memos:s.parseMemos(e),baseFeeXRP:o.dropsToXrp(t),referenceFeeUnits:e.ReferenceFeeUnits,reserveBaseXRP:o.dropsToXrp(e.ReserveBase),reserveIncrementXRP:o.dropsToXrp(e.ReserveIncrement)}}},9218:function(e,t,r){"use strict";var n=r(8764).Buffer,i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=i(r(4431)),s=r(1007).constants.AccountFields;function a(e,t){return"hex"!==e.encoding||e.length?e.shift?new o.default(t).shiftedBy(-e.shift).toNumber():t:n.from(t,"hex").toString("ascii")}t.default=function(e){const t={};for(const r in s){const n=e[r];if(null!=n){const e=s[r];t[e.name]=a(e,n)}}return e.RegularKey&&(t.regularKey=e.RegularKey),e.signer_lists&&1===e.signer_lists.length&&(t.signers={},e.signer_lists[0].SignerQuorum&&(t.signers.threshold=e.signer_lists[0].SignerQuorum),e.signer_lists[0].SignerEntries&&(t.signers.weights=e.signer_lists[0].SignerEntries.map((e=>({address:e.SignerEntry.Account,weight:e.SignerEntry.SignerWeight}))))),t}},8365:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.trustlineFlags=t.orderFlags=void 0,t.orderFlags={Passive:65536,Sell:131072},t.trustlineFlags={LowReserve:65536,HighReserve:131072,LowAuth:262144,HighAuth:524288,LowNoRipple:1048576,HighNoRipple:2097152,LowFreeze:4194304,HighFreeze:8388608}},6812:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.parseLedger=void 0;const a=o(r(6486)),u=r(1007),c=s(r(7797));function f(e,t){const r=Object.assign({},a.omit(t,"metaData"),{meta:t.metaData,ledger_index:e}),n=c.default(r,!0);return n.outcome.ledgerVersion||(n.outcome.ledgerVersion=e),n}t.parseLedger=function(e){const t=parseInt(e.ledger_index,10);return u.removeUndefined(Object.assign({stateHash:e.account_hash,closeTime:u.rippleTimeToISO8601(e.close_time),closeTimeResolution:e.close_time_resolution,closeFlags:e.close_flags,ledgerHash:e.ledger_hash,ledgerVersion:t,parentLedgerHash:e.parent_hash,parentCloseTime:u.rippleTimeToISO8601(e.parent_close_time),totalDrops:e.total_coins,transactionHash:e.transaction_hash},function(e,t){return a.isEmpty(e)?{}:"string"==typeof e[0]?{transactionHashes:e}:{transactions:e.map(a.partial(f,t))}}(e.transactions,t),(r=e.accountState,a.isEmpty(r)?{}:"string"==typeof r[0]?{stateHashes:r}:{rawState:JSON.stringify(r)})));var r}},3832:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=o(r(9282)),u=r(2243),c=r(2243),f=s(r(4257)),h=r(1007),l=h.txFlags.OfferCreate;t.default=function(e){a.ok("OfferCreate"===e.TransactionType);const t=0==(e.Flags&l.Sell)?"buy":"sell",r=f.default(e.TakerGets),n=f.default(e.TakerPays),i="buy"===t?n:r,o="buy"===t?r:n;return h.removeUndefined({memos:c.parseMemos(e),direction:t,quantity:i,totalPrice:o,passive:0!=(e.Flags&l.Passive)||void 0,immediateOrCancel:0!=(e.Flags&l.ImmediateOrCancel)||void 0,fillOrKill:0!=(e.Flags&l.FillOrKill)||void 0,expirationTime:u.parseTimestamp(e.Expiration)})}},7472:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.parseOrderbookOrder=void 0;const a=o(r(6486)),u=r(2243),c=r(1007),f=r(8365),h=s(r(4257));t.parseOrderbookOrder=function(e){const t=0==(e.Flags&f.orderFlags.Sell)?"buy":"sell",r=h.default(e.TakerGets),n=h.default(e.TakerPays),i="buy"===t?n:r,o="buy"===t?r:n,s=c.removeUndefined({direction:t,quantity:i,totalPrice:o,passive:0!=(e.Flags&f.orderFlags.Passive)||void 0,expirationTime:u.parseTimestamp(e.Expiration)}),l={maker:e.Account,sequence:e.Sequence,makerExchangeRate:u.adjustQualityForXRP(e.quality,r.currency,n.currency)},d=e.taker_gets_funded?h.default(e.taker_gets_funded):void 0,p=e.taker_pays_funded?h.default(e.taker_pays_funded):void 0,m=c.removeUndefined({fundedAmount:d,priceOfFundedAmount:p}),g=a.isEmpty(m)?void 0:m;return c.removeUndefined({specification:s,properties:l,state:g,data:e})}},2985:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=o(r(6486)),u=s(r(4257));function c(e,t){const r=Object.keys(t)[0],n=t[r];return a.set({address:e},r,function(e,t){return t.counterparty===e?a.omit(t,"counterparty"):t}(e,n))}t.default=function(e){const t=e.source_account,r=e.destination_account,n=e.destination_amount;return e.alternatives.map((e=>function(e,t,r,n){const i=null!=n.destination_amount?{source:{amount:u.default(n.source_amount)},destination:{minAmount:u.default(n.destination_amount)}}:{source:{maxAmount:u.default(n.source_amount)},destination:{amount:u.default(r)}};return{source:c(e,i.source),destination:c(t,i.destination),paths:JSON.stringify((o=n.paths_computed,o.map((e=>e.map((e=>a.omit(e,["type","type_hex"])))))))};var o}(t,r,n,e)))}},7186:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=o(r(9282)),u=r(1007),c=s(r(4257)),f=r(2243),h=u.txFlags.PaymentChannelClaim;t.default=function(e){return a.ok("PaymentChannelClaim"===e.TransactionType),u.removeUndefined({memos:f.parseMemos(e),channel:e.Channel,balance:e.Balance&&c.default(e.Balance).value,amount:e.Amount&&c.default(e.Amount).value,signature:e.Signature,publicKey:e.PublicKey,renew:Boolean(e.Flags&h.Renew)||void 0,close:Boolean(e.Flags&h.Close)||void 0})}},8034:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=o(r(9282)),u=r(2243),c=r(1007),f=s(r(4257));t.default=function(e){return a.ok("PaymentChannelCreate"===e.TransactionType),c.removeUndefined({memos:u.parseMemos(e),amount:f.default(e.Amount).value,destination:e.Destination,settleDelay:e.SettleDelay,publicKey:e.PublicKey,cancelAfter:e.CancelAfter&&u.parseTimestamp(e.CancelAfter),sourceTag:e.SourceTag,destinationTag:e.DestinationTag})}},9340:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=o(r(9282)),u=r(2243),c=r(1007),f=s(r(4257));t.default=function(e){return a.ok("PaymentChannelFund"===e.TransactionType),c.removeUndefined({memos:u.parseMemos(e),channel:e.Channel,amount:f.default(e.Amount).value,expiration:e.Expiration&&u.parseTimestamp(e.Expiration)})}},3769:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parsePaymentChannel=void 0;const n=r(2243),i=r(1007);t.parsePaymentChannel=function(e){return i.removeUndefined({memos:n.parseMemos(e),account:e.Account,amount:i.dropsToXrp(e.Amount),balance:i.dropsToXrp(e.Balance),destination:e.Destination,publicKey:e.PublicKey,settleDelay:e.SettleDelay,expiration:n.parseTimestamp(e.Expiration),cancelAfter:n.parseTimestamp(e.CancelAfter),sourceTag:e.SourceTag,destinationTag:e.DestinationTag,previousAffectingTransactionID:e.PreviousTxnID,previousAffectingTransactionLedgerVersion:e.PreviousTxnLgrSeq})}},8267:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=o(r(6486)),u=o(r(9282)),c=o(r(2243)),f=r(1007),h=s(r(4257));function l(e){return 0!=(e.Flags&f.txFlags.Payment.NoRippleDirect)}function d(e){return 0!=(e.Flags&f.txFlags.Payment.LimitQuality)}t.default=function(e){u.ok("Payment"===e.TransactionType);const t={address:e.Account,maxAmount:(r=h.default(e.SendMax||e.Amount),n=e.Account,r.counterparty===n?a.omit(r,"counterparty"):r),tag:e.SourceTag};var r,n;const i={address:e.Destination,tag:e.DestinationTag};return f.removeUndefined({source:f.removeUndefined(t),destination:f.removeUndefined(i),memos:c.parseMemos(e),invoiceID:e.InvoiceID,paths:e.Paths?JSON.stringify(e.Paths):void 0,allowPartialPayment:c.isPartialPayment(e)||void 0,noDirectRipple:l(e)||void 0,limitQuality:d(e)||void 0})}},4570:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=o(r(6486)),u=o(r(9282)),c=r(1007).constants.AccountFlags,f=s(r(9218));t.default=function(e){const t=e.TransactionType;return u.ok("AccountSet"===t||"SetRegularKey"===t||"SignerListSet"===t),Object.assign({},function(e){const t={};if("AccountSet"!==e.TransactionType)return t;const r=function(e){const t=e.meta.AffectedNodes.filter((e=>{var t;return"AccountRoot"===(null===(t=e.ModifiedNode)||void 0===t?void 0:t.LedgerEntryType)}));return u.ok(1===t.length),t[0].ModifiedNode}(e),n=a.get(r.PreviousFields,"Flags"),i=a.get(r.FinalFields,"Flags");if(null!=n&&null!=i){const e=n^i,r=i&e,o=n&e;Object.entries(c).forEach((e=>{const[n,i]=e;r&i?t[n]=!0:o&i&&(t[n]=!1)}))}const o=a.get(r.PreviousFields,"AccountTxnID"),s=a.get(r.FinalFields,"AccountTxnID");return s&&!o?t.enableTransactionIDTracking=!0:o&&!s&&(t.enableTransactionIDTracking=!1),t}(e),f.default(e))}},6611:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});const s=o(r(9282)),a=r(1007),u=r(2243);t.default=function(e){return s.ok("TicketCreate"===e.TransactionType),a.removeUndefined({memos:u.parseMemos(e),ticketCount:e.TicketCount})}},7797:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(2243),o=r(1007),s=n(r(4570)),a=n(r(9941)),u=n(r(4755)),c=n(r(979)),f=n(r(2619)),h=n(r(5738)),l=n(r(9523)),d=n(r(5053)),p=n(r(8975)),m=n(r(5937)),g=n(r(3832)),y=n(r(8267)),b=n(r(7186)),v=n(r(8034)),w=n(r(9340)),_=n(r(6611)),S=n(r(1316)),M=n(r(3286)),A=n(r(2685));t.default=function(e,t){const r=function(e){return{AccountSet:"settings",AccountDelete:"accountDelete",CheckCancel:"checkCancel",CheckCash:"checkCash",CheckCreate:"checkCreate",DepositPreauth:"depositPreauth",EscrowCancel:"escrowCancellation",EscrowCreate:"escrowCreation",EscrowFinish:"escrowExecution",OfferCancel:"orderCancellation",OfferCreate:"order",Payment:"payment",PaymentChannelClaim:"paymentChannelClaim",PaymentChannelCreate:"paymentChannelCreate",PaymentChannelFund:"paymentChannelFund",SetRegularKey:"settings",SignerListSet:"settings",TicketCreate:"ticketCreate",TrustSet:"trustline",EnableAmendment:"amendment",SetFee:"feeUpdate"}[e]||null}(e.TransactionType),n={settings:s.default,accountDelete:a.default,checkCancel:u.default,checkCash:c.default,checkCreate:f.default,depositPreauth:h.default,escrowCancellation:l.default,escrowCreation:d.default,escrowExecution:p.default,orderCancellation:m.default,order:g.default,payment:y.default,paymentChannelClaim:b.default,paymentChannelCreate:v.default,paymentChannelFund:w.default,ticketCreate:_.default,trustline:S.default,amendment:M.default,feeUpdate:A.default}[r],E=n?n(e):{UNAVAILABLE:"Unrecognized transaction type.",SEE_RAW_TRANSACTION:"Since this type is unrecognized, `rawTransaction` is included in this response."};n||(t=!0);const O=i.parseOutcome(e);return o.removeUndefined({type:r,address:e.Account,sequence:e.Sequence,id:e.hash,specification:o.removeUndefined(E),outcome:O?o.removeUndefined(O):void 0,rawTransaction:t?JSON.stringify(e):void 0})}},1316:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});const s=o(r(9282)),a=r(2243),u=r(1007),c=u.txFlags.TrustSet;function f(e,t,r){return!!(e&t)||!(e&r)&&void 0}t.default=function(e){return s.ok("TrustSet"===e.TransactionType),u.removeUndefined({limit:e.LimitAmount.value,currency:e.LimitAmount.currency,counterparty:e.LimitAmount.issuer,memos:a.parseMemos(e),qualityIn:a.parseQuality(e.QualityIn),qualityOut:a.parseQuality(e.QualityOut),ripplingDisabled:f(e.Flags,c.SetNoRipple,c.ClearNoRipple),frozen:f(e.Flags,c.SetFreeze,c.ClearFreeze),authorized:f(e.Flags,c.SetAuth,0)})}},2243:function(e,t,r){"use strict";var n=r(8764).Buffer,i=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&i(t,e,r);return o(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.isPartialPayment=t.adjustQualityForXRP=t.parseTimestamp=t.hexToString=t.parseMemos=t.parseOutcome=t.parseQuality=void 0;const u=a(r(654)),c=a(r(4431)),f=s(r(1007)),h=a(r(4257));function l(e){if("number"==typeof e)return f.rippleTimeToISO8601(e)}function d(e){""===e.counterparty&&delete e.counterparty}function p(e){return 0!=(e.Flags&f.txFlags.Payment.PartialPayment)}function m(e){if("Payment"===e.TransactionType&&"tesSUCCESS"===e.meta.TransactionResult&&(!e.meta.delivered_amount||"unavailable"!==e.meta.delivered_amount))return e.meta.delivered_amount?h.default(e.meta.delivered_amount):e.meta.DeliveredAmount?h.default(e.meta.DeliveredAmount):e.Amount&&!p(e)||e.Amount&&e.ledger_index>4594094?h.default(e.Amount):void 0}function g(e){return e?n.from(e,"hex").toString("utf-8"):void 0}t.adjustQualityForXRP=function(e,t,r){const n=("XRP"===r?-6:0)-("XRP"===t?-6:0);return 0===n?e:new c.default(e).shiftedBy(n).toString()},t.parseQuality=function(e){if("number"==typeof e)return new c.default(e).shiftedBy(-9).toNumber()},t.parseTimestamp=l,t.isPartialPayment=p,t.parseOutcome=function(e){const t=e.meta||e.metaData;if(!t)return;const r=u.default.parseBalanceChanges(t),n=u.default.parseOrderbookChanges(t),i=u.default.parseChannelChanges(t);return function(e){Object.entries(e).forEach((([e,t])=>{t.forEach(d)}))}(r),function(e){Object.entries(e).forEach((([e,t])=>{t.forEach((e=>{Object.entries(e).forEach(d)}))}))}(n),f.removeUndefined({result:e.meta.TransactionResult,timestamp:l(e.date),fee:f.dropsToXrp(e.Fee),balanceChanges:r,orderbookChanges:n,channelChanges:i,ledgerVersion:e.ledger_index,indexInLedger:e.meta.TransactionIndex,deliveredAmount:m(e)})},t.hexToString=g,t.parseMemos=function(e){if(Array.isArray(e.Memos)&&0!==e.Memos.length)return e.Memos.map((e=>f.removeUndefined({type:e.Memo.parsed_memo_type||g(e.Memo.MemoType),format:e.Memo.parsed_memo_format||g(e.Memo.MemoFormat),data:e.Memo.parsed_memo_data||g(e.Memo.MemoData)})))}},9048:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=o(r(6486)),u=s(r(4431)),c=r(6699),f=r(1007),h=s(r(2985)),l=f.errors.NotFoundError,d=f.errors.ValidationError;t.default=function(e){f.validate.getPaths({pathfind:e});const t=e.source.address;return function(e,t){const r=Object.assign({value:"XRP"===t.destination.amount.currency?f.dropsToXrp("-1"):"-1"},t.destination.amount),n={command:"ripple_path_find",source_account:t.source.address,destination_account:t.destination.address,destination_amount:f.toRippledAmount(r)};if("object"!=typeof n.destination_amount||n.destination_amount.issuer||(n.destination_amount.issuer=n.destination_account),t.source.currencies&&t.source.currencies.length>0&&(n.source_currencies=t.source.currencies.map((e=>c.renameCounterpartyToIssuer(e)))),t.source.amount){if(null!=t.destination.amount.value)throw new d("Cannot specify both source.amount and destination.amount.value in getPaths");n.send_max=f.toRippledAmount(t.source.amount),"string"==typeof n.send_max||n.send_max.issuer||(n.send_max.issuer=t.source.address)}return e.request(n).then((e=>function(e,t){return a.defaults(Object.assign({},t,{source_account:e.source_account,source_currencies:e.source_currencies}),{destination_amount:e.destination_amount})}(n,e)))}(this.connection,e).then((e=>function(e,t,r){return"object"==typeof(n=r.destination_amount)&&n.currency&&"XRP"!==n.currency||!r.destination_currencies.includes("XRP")?Promise.resolve(r):c.getXRPBalance(e,t,void 0).then((e=>function(e,t){const r=e.destination_amount;return new u.default(t).isGreaterThanOrEqualTo(r)&&e.alternatives.unshift({paths_computed:[],source_amount:e.destination_amount}),e}(r,e)));var n}(this.connection,t,e))).then((t=>function(e,t){return e.source.amount&&null==e.destination.amount.value&&t.alternatives&&(t.alternatives=t.alternatives.filter((t=>{if(!t.source_amount)return!1;const r=new u.default("XRP"===e.source.amount.currency?f.xrpToDrops(e.source.amount.value):e.source.amount.value);return new u.default("string"==typeof t.source_amount?t.source_amount:t.source_amount.value).eq(r)}))),t}(e,t))).then((t=>function(e,t){if(t.alternatives&&t.alternatives.length>0)return h.default(t);throw null==t.destination_currencies||t.destination_currencies.includes(e.destination.amount.currency)?t.source_currencies&&t.source_currencies.length>0?new l("No paths found. Please ensure that the source_account has sufficient funds to execute the payment in one of the specified source_currencies. If it does there may be insufficient liquidity in the network to execute this payment right now"):new l("No paths found. Please ensure that the source_account has sufficient funds to execute the payment. If it does there may be insufficient liquidity in the network to execute this payment right now"):new l("No paths found. The destination_account does not accept "+e.destination.amount.currency+", they only accept: "+t.destination_currencies.join(", "))}(e,t)))}},2827:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const i=r(3769),o=r(1007),s=o.errors.NotFoundError;t.default=function(e){return n(this,void 0,void 0,(function*(){return o.validate.getPaymentChannel({id:e}),function(e){if(null==e.node||"PayChannel"!==e.node.LedgerEntryType)throw new s("Payment channel ledger entry not found");return i.parsePaymentChannel(e.node)}(yield this.request("ledger_entry",{index:e,binary:!1,ledger_index:"validated"}))}))}},5210:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((n=n.apply(e,t||[])).next())}))},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getSettings=t.parseAccountFlags=void 0;const o=i(r(9218)),s=r(1007),a=s.constants.AccountFlags;function u(e,t={}){const r={};for(const n in a)e&a[n]?r[n]=!0:t.excludeFalse||(r[n]=!1);return r}t.parseAccountFlags=u,t.getSettings=function(e,t={}){return n(this,void 0,void 0,(function*(){return s.validate.getSettings({address:e,options:t}),e=s.ensureClassicAddress(e),function(e){const t=e.account_data,r=u(t.Flags,{excludeFalse:!0}),n=o.default(t);return Object.assign({},r,n)}(yield this.request("account_info",{account:e,ledger_index:t.ledgerVersion||"validated",signer_lists:!0}))}))}},3028:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},s=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((n=n.apply(e,t||[])).next())}))},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const u=o(r(6699)),c=a(r(7797)),f=r(1007);t.default=function(e,t={}){return s(this,void 0,void 0,(function*(){f.validate.getTransaction({id:e,options:t});const r=yield u.ensureLedgerVersion.call(this,t);try{const t=yield this.request("tx",{transaction:e,binary:!1});return function(e,t){if(!0!==t.validated||!function(e,t){return(!t.minLedgerVersion||e.ledger_index>=t.minLedgerVersion)&&(!t.maxLedgerVersion||e.ledger_index<=t.maxLedgerVersion)}(t,e))throw new f.errors.NotFoundError("Transaction not found");return c.default(t,e.includeRawTransaction)}(r,yield function(e,t){if(t.date)return Promise.resolve(t);const r=t.ledger_index||t.LedgerSequence;if(!r)return new Promise((()=>{const e=new f.errors.NotFoundError("Transaction has not been validated yet; try again later");throw e.data={details:"(ledger_index and LedgerSequence not found in tx)"},e}));const n={command:"ledger",ledger_index:r};return e.request(n).then((e=>{if("number"==typeof e.ledger.close_time)return Object.assign({date:e.ledger.close_time},t);throw new f.errors.UnexpectedError("Ledger missing close_time")})).catch((e=>{if(e instanceof f.errors.UnexpectedError)throw e;throw new f.errors.NotFoundError("Transaction ledger not found")}))}(this.connection,t))}catch(e){throw yield function(e,t,r){let n=!1;(r.data&&"txnNotFound"===r.data.error||"txnNotFound"===r.message)&&(n=!0);const i=n?new f.errors.NotFoundError("Transaction not found"):r;return i instanceof f.errors.NotFoundError?u.hasCompleteLedgerRange(e,t.minLedgerVersion,t.maxLedgerVersion).then((r=>r?i:u.isPendingLedgerVersion(e,t.maxLedgerVersion).then((e=>e?new f.errors.PendingLedgerVersionError:new f.errors.MissingLedgerHistoryError)))):Promise.resolve(i)}(this.connection,r,e)}}))}},5797:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=o(r(6486)),u=s(r(2353)),c=r(7854),f=o(r(6699)),h=s(r(7797)),l=s(r(3028)),d=r(1007);function p(e,t,r){return!(t.excludeFailures&&"tesSUCCESS"!==r.outcome.result||t.types&&!t.types.includes(r.type)||!0===t.initiated&&r.address!==e||!1===t.initiated&&r.address===e||t.counterparty&&!function(e,t){if(t.address===e.counterparty)return!0;const r=t.specification;return!(!r||!(r.destination&&r.destination.address===e.counterparty||r.counterparty===e.counterparty))}(t,r))}function m(e,t){return!e.startTx||(e.earliestFirst?f.compareTransactions(t,e.startTx)>0:f.compareTransactions(t,e.startTx)<0)}function g(e,t,r,n,i){const o={command:"account_tx",account:t,ledger_index_min:r.minLedgerVersion||-1,ledger_index_max:r.maxLedgerVersion||-1,forward:r.earliestFirst,binary:r.binary,limit:f.clamp(i,10,400),marker:n};return e.request(o).then((e=>function(e,t,r){return{marker:r.marker,results:r.transactions.filter((e=>e.validated)).map((e=>function(e,t){const r=e.tx_blob?function(e){const t=u.default.decode(e.tx_blob);return t.hash=c.computeTransactionHash(t),t.ledger_index=e.ledger_index,{tx:t,meta:u.default.decode(e.meta),validated:e.validated}}(e):e;return h.default(Object.assign({},r.tx,{meta:r.meta,validated:r.validated}),t)}(e,t.includeRawTransactions))).filter(a.partial(p,e,t)).filter(a.partial(m,t))}}(t,r,e)))}function y(e,t,r){const n=t.earliestFirst?r.sort(f.compareTransactions):r.sort(f.compareTransactions).reverse();return function(e,t,r){let{minLedgerVersion:n,maxLedgerVersion:i}=t;return t.limit&&r.length===t.limit&&(t.earliestFirst?i=r[r.length-1].outcome.ledgerVersion:n=r[r.length-1].outcome.ledgerVersion),f.hasCompleteLedgerRange(e,n,i).then((e=>{if(!e)throw new d.errors.MissingLedgerHistoryError}))}(e,t,n).then((()=>n))}function b(e,t,r){const n=a.partial(g,e,t,r),i=a.partial(y,e,r);return f.getRecursive(n,r.limit).then(i)}t.default=function(e,t={}){d.validate.getTransactions({address:e,options:t}),e=d.ensureClassicAddress(e);const r={maxLedgerVersion:-1};if(t.start)return l.default.call(this,t.start).then((n=>{const i=n.outcome.ledgerVersion,o=t.earliestFirst?{minLedgerVersion:i}:{maxLedgerVersion:i},s=Object.assign({},r,t,{startTx:n},o);return b(this.connection,e,s)}));const n=Object.assign({},r,t);return b(this.connection,e,n)}},5114:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},s=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((n=n.apply(e,t||[])).next())}))},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const u=o(r(6486)),c=r(1007),f=a(r(9030));t.default=function(e,t={}){var r;return s(this,void 0,void 0,(function*(){c.validate.getTrustlines({address:e,options:t}),e=c.ensureClassicAddress(e);const n=yield this._requestAll("account_lines",{account:e,ledger_index:null!==(r=t.ledgerVersion)&&void 0!==r?r:yield this.getLedgerVersion(),limit:t.limit,peer:t.counterparty});return u.flatMap(n,(e=>e.lines)).map(f.default).filter((e=>function(e,t){return null===e||t.specification.currency===e}(t.currency||null,e)))}))}},6699:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.common=t.clamp=t.isPendingLedgerVersion=t.hasCompleteLedgerRange=t.getRecursive=t.renameCounterpartyToIssuerInOrder=t.renameCounterpartyToIssuer=t.compareTransactions=t.ensureLedgerVersion=t.getXRPBalance=void 0;const s=o(r(6486)),a=o(r(9282)),u=o(r(1007));function c(e,t,r){return e(t,r).then((t=>{const n=r-t.results.length;return n>0&&null!=t.marker?c(e,t.marker,n).then((e=>t.results.concat(e))):t.results.slice(0,r)}))}function f(e){const t=null!=e.counterparty?e.counterparty:null!=e.issuer?e.issuer:void 0,r=Object.assign({},e,{issuer:t});return delete r.counterparty,r}t.common=u,t.clamp=function(e,t,r){return a.ok(t<=r,"Illegal clamp bounds"),Math.min(Math.max(e,t),r)},t.getXRPBalance=function(e,t,r){const n={command:"account_info",account:t,ledger_index:r};return e.request(n).then((e=>u.dropsToXrp(e.account_data.Balance)))},t.getRecursive=function(e,t){return c(e,void 0,t||1/0)},t.renameCounterpartyToIssuer=f,t.renameCounterpartyToIssuerInOrder=function(e){const t={taker_gets:f(e.taker_gets),taker_pays:f(e.taker_pays)};return Object.assign({},e,s.omitBy(t,(e=>null==e)))},t.compareTransactions=function(e,t){return e.outcome&&t.outcome?e.outcome.ledgerVersion===t.outcome.ledgerVersion?0==(r=e.outcome.indexInLedger-t.outcome.indexInLedger)?0:r>0?1:-1:e.outcome.ledgerVersion<t.outcome.ledgerVersion?-1:1:0;var r},t.hasCompleteLedgerRange=function(e,t,r){return e.hasLedgerVersions(t||32570,r)},t.isPendingLedgerVersion=function(e,t){return e.getLedgerVersion().then((e=>e<(t||0)))},t.ensureLedgerVersion=function(e){return Boolean(e)&&null!=e.ledgerVersion&&null!==e.ledgerVersion?Promise.resolve(e):this.getLedgerVersion().then((t=>Object.assign({},e,{ledgerVersion:t})))}},1310:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.deriveXAddress=t.deriveAddress=t.deriveKeypair=void 0;const n=r(9140);Object.defineProperty(t,"deriveKeypair",{enumerable:!0,get:function(){return n.deriveKeypair}}),Object.defineProperty(t,"deriveAddress",{enumerable:!0,get:function(){return n.deriveAddress}});const i=r(8914);t.deriveXAddress=function(e){const t=n.deriveAddress(e.publicKey);return i.classicAddressToXAddress(t,e.tag,e.test)}},2247:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.generateAddressAPI=void 0;const i=r(8914),o=n(r(9140)),s=r(1007);t.generateAddressAPI=function(e={}){s.validate.generateAddress({options:e});try{const t={algorithm:e.algorithm};e.entropy&&(t.entropy=Uint8Array.from(e.entropy));const r=o.default.generateSeed(t),n=o.default.deriveKeypair(r),s=o.default.deriveAddress(n.publicKey),a={xAddress:i.classicAddressToXAddress(s,!1,e&&e.test),secret:r};return e.includeClassicAddress&&(a.classicAddress=s,a.address=s),a}catch(e){throw new s.errors.UnexpectedError(e.message)}}},6773:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});const s=o(r(6486)),a=r(7854),u=o(r(1007));function c(e,t){let r;if(e.rawTransactions)r=JSON.parse(e.rawTransactions);else{if(!e.transactions){if(t.computeTreeHashes)throw new u.errors.ValidationError("transactions property is missing from the ledger");return e.transactionHash}try{r=e.transactions.map((e=>JSON.parse(e.rawTransaction)))}catch(e){if("SyntaxError: Unexpected token u in JSON at position 0"===e.toString())throw new u.errors.ValidationError("ledger is missing raw transactions")}}const n=r.map((e=>{const t=Object.assign({},s.omit(e,"tx"),e.tx||{});return Object.assign({},s.omit(t,"meta"),e.meta?{metaData:e.meta}:{})})),i=a.computeTransactionTreeHash(n);if(null!=e.transactionHash&&e.transactionHash!==i)throw new u.errors.ValidationError("transactionHash in header does not match computed hash of transactions",{transactionHashInHeader:e.transactionHash,computedHashOfTransactions:i});return i}function f(e,t){if(null==e.rawState){if(t.computeTreeHashes)throw new u.errors.ValidationError("rawState property is missing from the ledger");return e.stateHash}const r=JSON.parse(e.rawState),n=a.computeStateTreeHash(r);if(null!=e.stateHash&&e.stateHash!==n)throw new u.errors.ValidationError("stateHash in header does not match computed hash of state");return n}t.default=function(e,t={}){const r={transactionHash:c(e,t),stateHash:f(e,t)};return function(e){const t=function(e){return{account_hash:e.stateHash,close_time:u.iso8601ToRippleTime(e.closeTime),close_time_resolution:e.closeTimeResolution,close_flags:e.closeFlags,hash:e.ledgerHash,ledger_hash:e.ledgerHash,ledger_index:e.ledgerVersion.toString(),parent_hash:e.parentLedgerHash,parent_close_time:u.iso8601ToRippleTime(e.parentCloseTime),total_coins:e.totalDrops,transaction_hash:e.transactionHash}}(e);return a.computeLedgerHash(t)}(Object.assign({},e,r))}},4009:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=o(r(1007)),u=s(r(9140)),c=s(r(2353)),{validate:f,xrpToDrops:h}=a;t.default=function(e,t,r){f.signPaymentChannelClaim({channel:e,amount:t,privateKey:r});const n=c.default.encodeForSigningClaim({channel:e,amount:h(t)});return u.default.sign(n,r)}},4780:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.verifyPaymentChannelClaim=t.signPaymentChannelClaim=t.deriveXAddress=t.deriveAddress=t.deriveKeypair=t.generateXAddress=t.generateAddress=t.computePaymentChannelHash=t.computeEscrowHash=t.computeLedgerHash=t.computeStateTreeHash=t.computeTransactionTreeHash=t.computeTrustlineHash=t.computeOrderID=t.computeSignerListLedgerObjectID=t.computeAccountLedgerObjectID=t.computeBinaryTransactionSigningHash=t.computeTransactionHash=t.computeBinaryTransactionHash=t.isValidSecret=t.iso8601ToRippleTime=t.rippleTimeToISO8601=t.removeUndefined=t.convertKeysFromSnakeCaseToCamelCase=t.toRippledAmount=t.xrpToDrops=t.dropsToXrp=t.computeLedgerHeaderHash=void 0;const i=r(1310);Object.defineProperty(t,"deriveKeypair",{enumerable:!0,get:function(){return i.deriveKeypair}}),Object.defineProperty(t,"deriveAddress",{enumerable:!0,get:function(){return i.deriveAddress}}),Object.defineProperty(t,"deriveXAddress",{enumerable:!0,get:function(){return i.deriveXAddress}});const o=n(r(6773));t.computeLedgerHeaderHash=o.default;const s=n(r(4009));t.signPaymentChannelClaim=s.default;const a=n(r(4371));t.verifyPaymentChannelClaim=a.default;const u=r(4330);Object.defineProperty(t,"dropsToXrp",{enumerable:!0,get:function(){return u.dropsToXrp}}),Object.defineProperty(t,"xrpToDrops",{enumerable:!0,get:function(){return u.xrpToDrops}}),Object.defineProperty(t,"toRippledAmount",{enumerable:!0,get:function(){return u.toRippledAmount}}),Object.defineProperty(t,"convertKeysFromSnakeCaseToCamelCase",{enumerable:!0,get:function(){return u.convertKeysFromSnakeCaseToCamelCase}}),Object.defineProperty(t,"removeUndefined",{enumerable:!0,get:function(){return u.removeUndefined}}),Object.defineProperty(t,"rippleTimeToISO8601",{enumerable:!0,get:function(){return u.rippleTimeToISO8601}}),Object.defineProperty(t,"iso8601ToRippleTime",{enumerable:!0,get:function(){return u.iso8601ToRippleTime}}),Object.defineProperty(t,"isValidSecret",{enumerable:!0,get:function(){return u.isValidSecret}});const c=r(7854);Object.defineProperty(t,"computeBinaryTransactionHash",{enumerable:!0,get:function(){return c.computeBinaryTransactionHash}}),Object.defineProperty(t,"computeTransactionHash",{enumerable:!0,get:function(){return c.computeTransactionHash}}),Object.defineProperty(t,"computeBinaryTransactionSigningHash",{enumerable:!0,get:function(){return c.computeBinaryTransactionSigningHash}}),Object.defineProperty(t,"computeAccountLedgerObjectID",{enumerable:!0,get:function(){return c.computeAccountLedgerObjectID}}),Object.defineProperty(t,"computeSignerListLedgerObjectID",{enumerable:!0,get:function(){return c.computeSignerListLedgerObjectID}}),Object.defineProperty(t,"computeOrderID",{enumerable:!0,get:function(){return c.computeOrderID}}),Object.defineProperty(t,"computeTrustlineHash",{enumerable:!0,get:function(){return c.computeTrustlineHash}}),Object.defineProperty(t,"computeTransactionTreeHash",{enumerable:!0,get:function(){return c.computeTransactionTreeHash}}),Object.defineProperty(t,"computeStateTreeHash",{enumerable:!0,get:function(){return c.computeStateTreeHash}}),Object.defineProperty(t,"computeLedgerHash",{enumerable:!0,get:function(){return c.computeLedgerHash}}),Object.defineProperty(t,"computeEscrowHash",{enumerable:!0,get:function(){return c.computeEscrowHash}}),Object.defineProperty(t,"computePaymentChannelHash",{enumerable:!0,get:function(){return c.computePaymentChannelHash}});const f=r(2247);Object.defineProperty(t,"generateXAddress",{enumerable:!0,get:function(){return f.generateAddressAPI}}),t.generateAddress=(e={})=>f.generateAddressAPI(Object.assign(Object.assign({},e),{includeClassicAddress:!0}))},4371:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=n(r(9140)),o=n(r(2353)),s=r(1007);t.default=function(e,t,r,n){s.validate.verifyPaymentChannelClaim({channel:e,amount:t,signature:r,publicKey:n});const a=o.default.encodeForSigningClaim({channel:e,amount:s.xrpToDrops(t)});return i.default.verify(a,r,n)}},5130:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},s=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.formatLedgerClose=t.getLedgerVersion=t.isConnected=t.disconnect=t.connect=void 0;const a=o(r(1007));t.isConnected=function(){return this.connection.isConnected()},t.getLedgerVersion=function(){return this.connection.getLedgerVersion()},t.connect=function(){return s(this,void 0,void 0,(function*(){return this.connection.connect()}))},t.disconnect=function(){return s(this,void 0,void 0,(function*(){yield this.connection.disconnect()}))},t.formatLedgerClose=function(e){return{baseFeeXRP:a.dropsToXrp(e.fee_base),ledgerHash:e.ledger_hash,ledgerVersion:e.ledger_index,ledgerTimestamp:a.rippleTimeToISO8601(e.ledger_time),reserveBaseXRP:a.dropsToXrp(e.reserve_base),reserveIncrementXRP:a.dropsToXrp(e.reserve_inc),transactionCount:e.txn_count,validatedLedgerVersions:e.validated_ledgers}}},5313:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(4377),i=r(1007);t.default=function(e,t,r={}){try{i.validate.prepareCheckCancel({address:e,checkCancel:t,instructions:r});const o={Account:e,TransactionType:"CheckCancel",CheckID:t.checkID};return n.prepareTransaction(o,this,r)}catch(e){return Promise.reject(e)}}},420:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});const s=o(r(4377)),a=s.common.errors.ValidationError,u=s.common.toRippledAmount,c=r(1007);t.default=function(e,t,r={}){try{c.validate.prepareCheckCash({address:e,checkCash:t,instructions:r});const n=function(e,t){if(t.amount&&t.deliverMin)throw new a('"amount" and "deliverMin" properties on CheckCash are mutually exclusive');const r={Account:e,TransactionType:"CheckCash",CheckID:t.checkID};return null!=t.amount&&(r.Amount=u(t.amount)),null!=t.deliverMin&&(r.DeliverMin=u(t.deliverMin)),r}(e,t);return s.prepareTransaction(n,this,r)}catch(e){return Promise.reject(e)}}},4436:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});const s=o(r(4377)),a=s.common.toRippledAmount,u=r(1007);t.default=function(e,t,r={}){try{u.validate.prepareCheckCreate({address:e,checkCreate:t,instructions:r});const n=function(e,t){const r={Account:e,TransactionType:"CheckCreate",Destination:t.destination,SendMax:a(t.sendMax)};return null!=t.destinationTag&&(r.DestinationTag=t.destinationTag),null!=t.expiration&&(r.Expiration=u.iso8601ToRippleTime(t.expiration)),null!=t.invoiceID&&(r.InvoiceID=t.invoiceID),r}(e,t);return s.prepareTransaction(n,this,r)}catch(e){return Promise.reject(e)}}},4036:function(e,t,r){"use strict";var n=r(8764).Buffer,i=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&i(t,e,r);return o(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const u=s(r(6486)),c=a(r(2353)),f=a(r(4431)),h=r(8015),l=r(8914),d=r(1007),p=r(7854);function m(e){const t=n.from(l.decodeAccountID(e)).toString("hex");return new f.default(t,16)}function g(e,t){return m(e.Signer.Account).comparedTo(m(t.Signer.Account))}t.default=function(e){d.validate.combine({signedTransactions:e});const t=e.map(c.default.decode);!function(e){const t=JSON.stringify(Object.assign(Object.assign({},e[0]),{Signers:null}));if(e.slice(1).some((e=>JSON.stringify(Object.assign(Object.assign({},e),{Signers:null}))!==t)))throw new h.ValidationError("txJSON is not the same for all signedTransactions")}(t);const r=c.default.encode(function(e){const t=u.flatMap(e,(e=>e.Signers)).filter((e=>e)).sort(g);return Object.assign(Object.assign({},e[0]),{Signers:t})}(t));return{signedTransaction:r,id:p.computeBinaryTransactionHash(r)}}},6857:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});const s=o(r(4377)),a=s.common.validate;t.default=function(e,t,r={}){a.prepareEscrowCancellation({address:e,escrowCancellation:t,instructions:r});const n=function(e,t){const r={TransactionType:"EscrowCancel",Account:e,Owner:t.owner,OfferSequence:t.escrowSequence};return null!=t.memos&&(r.Memos=t.memos.map(s.convertMemo)),r}(e,t);return s.prepareTransaction(n,this,r)}},6759:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});const s=o(r(4377)),a=r(1007),u=s.common.errors.ValidationError;t.default=function(e,t,r={}){try{a.validate.prepareEscrowCreation({address:e,escrowCreation:t,instructions:r});const n=function(e,t){const r={TransactionType:"EscrowCreate",Account:e,Destination:t.destination,Amount:a.xrpToDrops(t.amount)};if(null!=t.condition&&(r.Condition=t.condition),null!=t.allowCancelAfter&&(r.CancelAfter=a.iso8601ToRippleTime(t.allowCancelAfter)),null!=t.allowExecuteAfter&&(r.FinishAfter=a.iso8601ToRippleTime(t.allowExecuteAfter)),null!=t.sourceTag&&(r.SourceTag=t.sourceTag),null!=t.destinationTag&&(r.DestinationTag=t.destinationTag),null!=t.memos&&(r.Memos=t.memos.map(s.convertMemo)),Boolean(t.allowCancelAfter)&&Boolean(t.allowExecuteAfter)&&r.CancelAfter<=r.FinishAfter)throw new u('prepareEscrowCreation: "allowCancelAfter" must be after "allowExecuteAfter"');return r}(e,t);return s.prepareTransaction(n,this,r)}catch(e){return Promise.reject(e)}}},4656:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});const s=o(r(4377)),a=s.common.validate,u=s.common.errors.ValidationError;t.default=function(e,t,r={}){try{a.prepareEscrowExecution({address:e,escrowExecution:t,instructions:r});const n=function(e,t){const r={TransactionType:"EscrowFinish",Account:e,Owner:t.owner,OfferSequence:t.escrowSequence};if(Boolean(t.condition)!==Boolean(t.fulfillment))throw new u('"condition" and "fulfillment" fields on EscrowFinish must only be specified together.');return null!=t.condition&&(r.Condition=t.condition),null!=t.fulfillment&&(r.Fulfillment=t.fulfillment),null!=t.memos&&(r.Memos=t.memos.map(s.convertMemo)),r}(e,t);return s.prepareTransaction(n,this,r)}catch(e){return Promise.reject(e)}}},5070:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});const s=o(r(4377)),a=s.common.txFlags.OfferCreate,u=r(1007);t.default=function(e,t,r={}){try{u.validate.prepareOrder({address:e,order:t,instructions:r});const n=function(e,t){const r=u.toRippledAmount("buy"===t.direction?t.quantity:t.totalPrice),n={TransactionType:"OfferCreate",Account:e,TakerGets:u.toRippledAmount("buy"===t.direction?t.totalPrice:t.quantity),TakerPays:r,Flags:0};return"sell"===t.direction&&(n.Flags|=a.Sell),!0===t.passive&&(n.Flags|=a.Passive),!0===t.immediateOrCancel&&(n.Flags|=a.ImmediateOrCancel),!0===t.fillOrKill&&(n.Flags|=a.FillOrKill),null!=t.expirationTime&&(n.Expiration=u.iso8601ToRippleTime(t.expirationTime)),null!=t.orderToReplace&&(n.OfferSequence=t.orderToReplace),null!=t.memos&&(n.Memos=t.memos.map(s.convertMemo)),n}(e,t);return s.prepareTransaction(n,this,r)}catch(e){return Promise.reject(e)}}},8788:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});const s=o(r(4377)),a=s.common.validate;t.default=function(e,t,r={}){try{a.prepareOrderCancellation({address:e,orderCancellation:t,instructions:r});const n=function(e,t){const r={TransactionType:"OfferCancel",Account:e,OfferSequence:t.orderSequence};return null!=t.memos&&(r.Memos=t.memos.map(s.convertMemo)),r}(e,t);return s.prepareTransaction(n,this,r)}catch(e){return Promise.reject(e)}}},2299:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});const s=o(r(4377)),a=s.common.errors.ValidationError,u=s.common.txFlags.PaymentChannelClaim,c=r(1007);t.default=function(e,t,r={}){try{c.validate.preparePaymentChannelClaim({address:e,paymentChannelClaim:t,instructions:r});const n=function(e,t){const r={Account:e,TransactionType:"PaymentChannelClaim",Channel:t.channel,Flags:0};if(null!=t.balance&&(r.Balance=c.xrpToDrops(t.balance)),null!=t.amount&&(r.Amount=c.xrpToDrops(t.amount)),Boolean(t.signature)!==Boolean(t.publicKey))throw new a('"signature" and "publicKey" fields on PaymentChannelClaim must only be specified together.');if(null!=t.signature&&(r.Signature=t.signature),null!=t.publicKey&&(r.PublicKey=t.publicKey),!0===t.renew&&!0===t.close)throw new a('"renew" and "close" flags on PaymentChannelClaim are mutually exclusive');return!0===t.renew&&(r.Flags|=u.Renew),!0===t.close&&(r.Flags|=u.Close),r}(e,t);return s.prepareTransaction(n,this,r)}catch(e){return Promise.reject(e)}}},4112:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});const s=o(r(4377)),a=r(1007);t.default=function(e,t,r={}){try{a.validate.preparePaymentChannelCreate({address:e,paymentChannelCreate:t,instructions:r});const n=function(e,t){const r={Account:e,TransactionType:"PaymentChannelCreate",Amount:a.xrpToDrops(t.amount),Destination:t.destination,SettleDelay:t.settleDelay,PublicKey:t.publicKey.toUpperCase()};return null!=t.cancelAfter&&(r.CancelAfter=a.iso8601ToRippleTime(t.cancelAfter)),null!=t.sourceTag&&(r.SourceTag=t.sourceTag),null!=t.destinationTag&&(r.DestinationTag=t.destinationTag),r}(e,t);return s.prepareTransaction(n,this,r)}catch(e){return Promise.reject(e)}}},9712:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});const s=o(r(4377)),a=r(1007);t.default=function(e,t,r={}){try{a.validate.preparePaymentChannelFund({address:e,paymentChannelFund:t,instructions:r});const n=function(e,t){const r={Account:e,TransactionType:"PaymentChannelFund",Channel:t.channel,Amount:a.xrpToDrops(t.amount)};return null!=t.expiration&&(r.Expiration=a.iso8601ToRippleTime(t.expiration)),r}(e,t);return s.prepareTransaction(n,this,r)}catch(e){return Promise.reject(e)}}},2331:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});const s=o(r(6486)),a=o(r(4377)),u=a.common.validate,c=a.common.txFlags.Payment,f=a.common.errors.ValidationError,h=r(1007),l=r(4377);function d(e){return null!=e.maxAmount}function p(e){return null!=e.minAmount}function m(e){const{source:t,destination:r}=e,n=d(t)?t.maxAmount.currency:t.amount.currency,i=p(r)?r.minAmount.currency:r.amount.currency;return!("XRP"!==n&&"drops"!==n||"XRP"!==i&&"drops"!==i)}function g(e,t){const r=l.getClassicAccountAndTag(e,t);return r.tag=!1===r.tag?void 0:r.tag,r}t.default=function(e,t,r={}){try{u.preparePayment({address:e,payment:t,instructions:r});const n=function(e,t){const r=s.cloneDeep(t);!function(e){[e.source,e.destination].forEach((e=>{["amount","minAmount","maxAmount"].forEach((t=>{var r;(r=e[t])&&"XRP"!==r.currency&&"drops"!==r.currency&&null==r.counterparty&&(e[t].counterparty=e.address)}))}))}(r);const n=g(r.source.address,r.source.tag),i=g(e,void 0);if(i.classicAccount!==n.classicAccount)throw new f("address must match payment.source.address");if(null!=i.tag&&null!=n.tag&&i.tag!==n.tag)throw new f("address includes a tag that does not match payment.source.tag");const o=g(r.destination.address,r.destination.tag);if(d(r.source)&&p(r.destination)||!d(r.source)&&!p(r.destination))throw new f("payment must specify either (source.maxAmount and destination.amount) or (source.amount and destination.minAmount)");const u=p(r.destination)?r.destination.minAmount:r.destination.amount,l=d(r.source)?r.source.maxAmount:r.source.amount,y=p(r.destination)&&!m(r)?function(e){const t="100000000000";let r;return r="XRP"===e.currency?t:"drops"===e.currency?h.xrpToDrops(t):"999999999999999900000000000000000000000000000000000000000000000000000000000000000000000000000000",Object.assign({},e,{value:r})}(u):u,b={TransactionType:"Payment",Account:n.classicAccount,Destination:o.classicAccount,Amount:h.toRippledAmount(y),Flags:0};if(null!=r.invoiceID&&(b.InvoiceID=r.invoiceID),null!=n.tag&&(b.SourceTag=n.tag),null!=o.tag&&(b.DestinationTag=o.tag),null!=r.memos&&(b.Memos=r.memos.map(a.convertMemo)),!0===r.noDirectRipple&&(b.Flags|=c.NoRippleDirect),!0===r.limitQuality&&(b.Flags|=c.LimitQuality),m(r)){if(!0===r.allowPartialPayment)throw new f("XRP to XRP payments cannot be partial payments")}else(r.allowPartialPayment||p(r.destination))&&(b.Flags|=c.PartialPayment),b.SendMax=h.toRippledAmount(l),p(r.destination)&&(b.DeliverMin=h.toRippledAmount(u)),null!=r.paths&&(b.Paths=JSON.parse(r.paths));return b}(e,t);return a.prepareTransaction(n,this,r)}catch(e){return Promise.reject(e)}}},3963:function(e,t,r){"use strict";var n=r(8764).Buffer,i=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&i(t,e,r);return o(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const u=s(r(9282)),c=a(r(4431)),f=s(r(4377)),h=f.common.validate,l=f.common.constants.AccountSetFlags,d=f.common.constants.AccountFields;function p(e){return{SignerEntry:{Account:e.address,SignerWeight:e.weight}}}t.default=function(e,t,r={}){try{h.prepareSettings({address:e,settings:t,instructions:r});const i=function(e,t){const r=function(e,t){if(void 0!==t.regularKey){const r={TransactionType:"SetRegularKey",Account:e};return null===t.regularKey?r:Object.assign({},r,{RegularKey:t.regularKey})}if(null!=t.signers){const r={TransactionType:"SignerListSet",Account:e,SignerEntries:[],SignerQuorum:t.signers.threshold};return null!=t.signers.weights&&(r.SignerEntries=t.signers.weights.map(p)),r}const r={TransactionType:"AccountSet",Account:e},i=Object.assign({},t);var o;return delete i.memos,function(e,t){const r=Object.keys(t).filter((e=>null!=l[e]));u.ok(r.length<=1,"ERROR: can only set one setting per transaction");const n=r[0],i=t[n],o=l[n];null!=o&&(i?e.SetFlag=o:e.ClearFlag=o)}(r,i),function(e,t){const r=d;for(const i in r){const o=r[i];let s=t[o.name];void 0!==s&&(null===s&&o.hasOwnProperty("defaults")&&(s=o.defaults),"hex"!==o.encoding||o.length||(s=n.from(s,"ascii").toString("hex").toUpperCase()),e[i]=s)}}(r,t),null!=r.TransferRate&&(r.TransferRate=(o=r.TransferRate,new c.default(o).shiftedBy(9).toNumber())),r}(e,t);return null!=t.memos&&(r.Memos=t.memos.map(f.convertMemo)),r}(e,t);return f.prepareTransaction(i,this,r)}catch(e){return Promise.reject(e)}}},1655:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=s(r(6486)),u=o(r(4377)),c=s(r(9140)),f=s(r(2353)),h=r(7854),l=s(r(4431)),d=r(1007),p=u.common.validate;function m(e,t,r){const n=r?f.default.encodeForMultisigning(e,r):f.default.encodeForSigning(e);return c.default.sign(n,t)}function g(e,t,r,n={signAs:""}){p.sign({txJSON:t,keypair:r});const i=JSON.parse(t);if(i.TxnSignature||i.Signers)throw new u.common.errors.ValidationError('txJSON must not contain "TxnSignature" or "Signers" properties');!function(e,t){const r=new l.default(t),n=d.xrpToDrops(e._maxFeeXRP);if(r.isGreaterThan(n))throw new u.common.errors.ValidationError(`"Fee" should not exceed "${n}". To use a higher fee, set \`maxFeeXRP\` in the RippleAPI constructor.`)}(e,i.Fee);const o=Object.assign({},i);if(o.SigningPubKey=n.signAs?"":r.publicKey,n.signAs){const e={Account:n.signAs,SigningPubKey:r.publicKey,TxnSignature:m(o,r.privateKey,n.signAs)};o.Signers=[{Signer:e}]}else o.TxnSignature=m(o,r.privateKey);const s=f.default.encode(o);return function(e,t){var r;const n=f.default.decode(e);if(!n.TxnSignature&&!n.Signers)throw new u.common.errors.ValidationError("Serialized transaction must have a TxnSignature or Signers property");if(delete n.TxnSignature,delete n.Signers,t.SigningPubKey||delete n.SigningPubKey,null===(r=t.Memos)||void 0===r||r.map((e=>{var t,r,n;return(null===(t=null==e?void 0:e.Memo)||void 0===t?void 0:t.MemoData)&&(e.Memo.MemoData=e.Memo.MemoData.toUpperCase()),(null===(r=null==e?void 0:e.Memo)||void 0===r?void 0:r.MemoType)&&(e.Memo.MemoType=e.Memo.MemoType.toUpperCase()),(null===(n=null==e?void 0:e.Memo)||void 0===n?void 0:n.MemoFormat)&&(e.Memo.MemoFormat=e.Memo.MemoFormat.toUpperCase()),e})),!a.default.isEqual(n,t)){const e=new u.common.errors.ValidationError("Serialized transaction does not match original txJSON. See `error.data`");throw e.data={decoded:n,tx:t,diff:y(t,n)},e}}(s,i),{signedTransaction:s,id:h.computeBinaryTransactionHash(s)}}function y(e,t){const r={},n=function(e,t,n){const i=Object.prototype.toString.call(e),o=Object.prototype.toString.call(t);if("[object Undefined]"!==o)if(i===o)if("[object Object]"!==i)"[object Array]"!==i?"[object Function]"!==i?e!==t&&(r[n]=t):e.toString()!==t.toString()&&(r[n]=t):a.default.isEqual(e,t)||(r[n]=t);else{const i=y(e,t);Object.keys(i).length>0&&(r[n]=i)}else r[n]=t;else r[n]=null};for(const r in e)e.hasOwnProperty(r)&&n(e[r],t[r],r);for(const n in t)t.hasOwnProperty(n)&&(e[n]||e[n]===t[n]||(r[n]=t[n]));return r}t.default=function(e,t,r,n){if("string"==typeof t)return p.sign({txJSON:e,secret:t}),g(this,e,c.default.deriveKeypair(t),r);if(!n&&!t)throw new u.common.errors.ValidationError("sign: Missing secret or keypair.");return g(this,e,n||t,r)}},6250:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},s=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const a=o(r(4377)),u=r(1007);t.default=function(e,t){return s(this,void 0,void 0,(function*(){return u.validate.submit({signedTransaction:e}),function(e){const t={resultCode:e.engine_result,resultMessage:e.engine_result_message,engine_result:e.engine_result,engine_result_code:e.engine_result_code,engine_result_message:e.engine_result_message,tx_blob:e.tx_blob,tx_json:e.tx_json};if(e.engine_result.startsWith("tem"))throw new a.common.errors.RippledError("Submit failed",t);return t}(yield this.request("submit",Object.assign({tx_blob:e},t?{fail_hard:t}:{})))}))}},8220:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});const s=o(r(4377)),a=s.common.validate,u=s.common.errors.ValidationError;t.default=function(e,t,r={}){try{a.prepareTicketCreate({address:e,ticketCount:t,instructions:r});const n=function(e,t){if(!t||0===t)throw new u("Ticket count must be greater than 0.");return{TransactionType:"TicketCreate",Account:e,TicketCount:t}}(e,t);return s.prepareTransaction(n,this,r)}catch(e){return Promise.reject(e)}}},3487:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=s(r(4431)),u=o(r(4377)),c=u.common.validate,f=u.common.txFlags.TrustSet;function h(e){return new a.default(e).shiftedBy(9).integerValue(a.default.ROUND_DOWN).toNumber()}t.default=function(e,t,r={}){try{c.prepareTrustline({address:e,trustline:t,instructions:r});const n=function(e,t){const r={TransactionType:"TrustSet",Account:e,LimitAmount:{currency:t.currency,issuer:t.counterparty,value:t.limit},Flags:0};return null!=t.qualityIn&&(r.QualityIn=h(t.qualityIn)),null!=t.qualityOut&&(r.QualityOut=h(t.qualityOut)),!0===t.authorized&&(r.Flags|=f.SetAuth),null!=t.ripplingDisabled&&(r.Flags|=t.ripplingDisabled?f.NoRipple:f.ClearNoRipple),null!=t.frozen&&(r.Flags|=t.frozen?f.SetFreeze:f.ClearFreeze),null!=t.memos&&(r.Memos=t.memos.map(u.convertMemo)),r}(e,t);return u.prepareTransaction(n,this,r)}catch(e){return Promise.reject(e)}}},8123:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},4377:function(e,t,r){"use strict";var n=r(8764).Buffer,i=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&i(t,e,r);return o(t,e),t},a=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((n=n.apply(e,t||[])).next())}))},u=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getClassicAccountAndTag=t.setCanonicalFlag=t.common=t.prepareTransaction=t.convertMemo=t.convertStringToHex=void 0;const c=u(r(4431)),f=s(r(1007));t.common=f;const h=r(1007),l=r(8015),d=r(8914),p=f.txFlags,m=["Payment","CheckCreate","EscrowCreate","PaymentChannelCreate"];function g(e){e.Flags|=p.Universal.FullyCanonicalSig,e.Flags=e.Flags>>>0}function y(e,t,r=0){return new c.default(e).times(t).plus(r).toString()}function b(e,t){if(d.isValidXAddress(e)){const r=d.xAddressToClassicAddress(e);if(null!=t&&r.tag!==t)throw new l.ValidationError("address includes a tag that does not match the tag specified in the transaction");return{classicAccount:r.classicAddress,tag:r.tag}}return{classicAccount:e,tag:t}}function v(e){return n.from(e,"utf8").toString("hex").toUpperCase()}t.setCanonicalFlag=g,t.getClassicAccountAndTag=b,t.prepareTransaction=function(e,t,r){if(f.validate.instructions(r),f.validate.tx_json(e),null!=r.sequence&&0===r.sequence)return Promise.reject(new l.ValidationError("`sequence` cannot be 0"));const i=["maxLedgerVersion","maxLedgerVersionOffset","fee","sequence","ticketSequence"].filter((t=>e[t]));if(i.length)return Promise.reject(new l.ValidationError('txJSON additionalProperty "'+i[0]+'" exists in instance when not allowed'));const o=Object.assign({},e);0===e.SignerQuorum&&delete o.SignerEntries;const{classicAccount:s,tag:u}=b(e.Account);if(o.Account=s,null!=u){if(e.SourceTag&&e.SourceTag!==u)return Promise.reject(new l.ValidationError("The `SourceTag`, if present, must match the tag of the `Account` X-address"));u&&(o.SourceTag=u)}if("string"==typeof e.Destination){const{classicAccount:t,tag:r}=b(e.Destination);if(o.Destination=t,null!=r&&m.includes(e.TransactionType)){if(e.DestinationTag&&e.DestinationTag!==r)return Promise.reject(new l.ValidationError("The Payment `DestinationTag`, if present, must match the tag of the `Destination` X-address"));r&&(o.DestinationTag=r)}}function d(t){const r=e[t];if("string"==typeof r){const{classicAccount:e}=b(r);o[t]=e}}function p(t){const r=e[t];"number"==typeof r||r instanceof Array||null==r||(o[t]=h.toRippledAmount(r))}return d("Authorize"),d("Unauthorize"),d("Owner"),d("RegularKey"),p("Amount"),p("SendMax"),p("DeliverMin"),p("TakerPays"),p("TakerGets"),p("LimitAmount"),g(o),Promise.all([function(){if(o.LastLedgerSequence&&r.maxLedgerVersion)return Promise.reject(new l.ValidationError("`LastLedgerSequence` in txJSON and `maxLedgerVersion` in `instructions` cannot both be set"));if(o.LastLedgerSequence&&r.maxLedgerVersionOffset)return Promise.reject(new l.ValidationError("`LastLedgerSequence` in txJSON and `maxLedgerVersionOffset` in `instructions` cannot both be set"));if(o.LastLedgerSequence)return Promise.resolve();if(void 0!==r.maxLedgerVersion)return null!==r.maxLedgerVersion&&(o.LastLedgerSequence=r.maxLedgerVersion),Promise.resolve();const e=null!=r.maxLedgerVersionOffset?r.maxLedgerVersionOffset:3;return t.connection.getLedgerVersion().then((t=>{o.LastLedgerSequence=t+e}))}(),function(){if(o.Fee&&r.fee)return Promise.reject(new l.ValidationError("`Fee` in txJSON and `fee` in `instructions` cannot both be set"));if(o.Fee)return Promise.resolve();const e=null==r.signersCount?1:r.signersCount+1;if(null!=r.fee){const n=new c.default(r.fee);return n.isGreaterThan(t._maxFeeXRP)?Promise.reject(new l.ValidationError(`Fee of ${n.toString(10)} XRP exceeds max of ${t._maxFeeXRP} XRP. To use this fee, increase \`maxFeeXRP\` in the RippleAPI constructor.`)):(o.Fee=y(f.xrpToDrops(r.fee),e),Promise.resolve())}const i=t._feeCushion;return t.getFee(i).then((s=>t.connection.getFeeRef().then((a=>{const u="EscrowFinish"!==o.TransactionType||null==o.Fulfillment?0:i*a*(32+Math.floor(n.from(o.Fulfillment,"hex").length/16)),h=f.xrpToDrops(s),l=r.maxFee?c.default.min(t._maxFeeXRP,r.maxFee):t._maxFeeXRP,d=f.xrpToDrops(l),p=y(h,e,u);o.Fee=c.default.min(p,d).toString(10)}))))}(),function(){return a(this,void 0,void 0,(function*(){if(null!=r.sequence)return null==o.Sequence||r.sequence===o.Sequence?(o.Sequence=r.sequence,Promise.resolve()):Promise.reject(new l.ValidationError("`Sequence` in txJSON must match `sequence` in `instructions`"));if(null!=o.Sequence)return Promise.resolve();if(null!=r.ticketSequence)return o.Sequence=0,o.TicketSequence=r.ticketSequence,Promise.resolve();try{const e=yield t.request("account_info",{account:s,ledger_index:"current"});return o.Sequence=e.account_data.Sequence,Promise.resolve()}catch(e){return Promise.reject(e)}}))}()]).then((()=>function(e){const t={fee:f.dropsToXrp(e.Fee),maxLedgerVersion:null==e.LastLedgerSequence?null:e.LastLedgerSequence};return null!=e.TicketSequence?t.ticketSequence=e.TicketSequence:t.sequence=e.Sequence,{txJSON:JSON.stringify(e),instructions:t}}(o)))},t.convertStringToHex=v,t.convertMemo=function(e){return{Memo:f.removeUndefined({MemoData:e.data?v(e.data):void 0,MemoType:e.type?v(e.type):void 0,MemoFormat:e.format?v(e.format):void 0})}}},7334:function(e,t,r){"use strict";var n=r(8764).Buffer,i=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.getFaucetUrl=t.FaucetNetwork=void 0;const o=r(9267),s=r(1007),a=r(7384),u=r(8015);var c;function f(e,t){return i(this,void 0,void 0,(function*(){try{return(yield e.getBalances(t)).filter((e=>"XRP"===e.currency.toUpperCase()))[0].value}catch(e){return`Unable to retrieve ${t} balance. Error: ${e}`}}))}function h(e){const t=e.connection.getUrl();return t.includes("altnet")||t.includes("testnet")?c.Testnet:t.includes("devnet")?c.Devnet:void 0}!function(e){e.Testnet="faucet.altnet.rippletest.net",e.Devnet="faucet.devnet.rippletest.net"}(c=t.FaucetNetwork||(t.FaucetNetwork={})),t.getFaucetUrl=h,t.default=function(e){return i(this,void 0,void 0,(function*(){if(!this.isConnected())throw new u.RippledError("RippleAPI not connected, cannot call faucet");let t,r=0,c=h(this);if(e&&a.isValidAddress(e)){t=(new TextEncoder).encode(JSON.stringify({destination:e}));const n=yield f(this,e);r=n&&!isNaN(+n)?+n:0}const l={hostname:c,port:443,path:"/accounts",method:"POST",headers:{"Content-Type":"application/json","Content-Length":t?t.length:0}};return new Promise(((e,a)=>{const u=o.request(l,(t=>{const o=[];t.on("data",(e=>{o.push(e)})),t.on("end",(()=>i(this,void 0,void 0,(function*(){const u=n.concat(o).toString();if(t.headers["content-type"].startsWith("application/json")){const t=JSON.parse(u),n=t.account.classicAddress;if(n)try{(yield function(e,t,r){return i(this,void 0,void 0,(function*(){return new Promise(((n,o)=>{let a=20;const u=setInterval((()=>i(this,void 0,void 0,(function*(){a<0?(clearInterval(u),n(!1)):a--;try{+(yield f(e,t))>r&&(clearInterval(u),n(!0))}catch(e){clearInterval(u),o(new s.errors.XRPLFaucetError(`Unable to check if the address ${t} balance has increased. Error: ${e}`))}}))),1e3)}))}))}(this,n,r))?e(t):a(new s.errors.XRPLFaucetError("Unable to fund address with faucet after waiting 20 seconds"))}catch(e){a(new s.errors.XRPLFaucetError(e))}else a(new s.errors.XRPLFaucetError("The faucet account classic address is undefined"))}else a({statusCode:t.statusCode,contentType:t.headers["content-type"],body:u})}))))}));u.write(t||""),u.on("error",(e=>{a(e)})),u.end()}))}))}},7824:(e,t,r)=>{"use strict";const n=t;n.bignum=r(3550),n.define=r(2500).define,n.base=r(1979),n.constants=r(6826),n.decoders=r(8307),n.encoders=r(6579)},2500:(e,t,r)=>{"use strict";const n=r(6579),i=r(8307),o=r(5717);function s(e,t){this.name=e,this.body=t,this.decoders={},this.encoders={}}t.define=function(e,t){return new s(e,t)},s.prototype._createNamed=function(e){const t=this.name;function r(e){this._initNamed(e,t)}return o(r,e),r.prototype._initNamed=function(t,r){e.call(this,t,r)},new r(this)},s.prototype._getDecoder=function(e){return e=e||"der",this.decoders.hasOwnProperty(e)||(this.decoders[e]=this._createNamed(i[e])),this.decoders[e]},s.prototype.decode=function(e,t,r){return this._getDecoder(t).decode(e,r)},s.prototype._getEncoder=function(e){return e=e||"der",this.encoders.hasOwnProperty(e)||(this.encoders[e]=this._createNamed(n[e])),this.encoders[e]},s.prototype.encode=function(e,t,r){return this._getEncoder(t).encode(e,r)}},6625:(e,t,r)=>{"use strict";const n=r(5717),i=r(8465).b,o=r(2399).Buffer;function s(e,t){i.call(this,t),o.isBuffer(e)?(this.base=e,this.offset=0,this.length=e.length):this.error("Input not Buffer")}function a(e,t){if(Array.isArray(e))this.length=0,this.value=e.map((function(e){return a.isEncoderBuffer(e)||(e=new a(e,t)),this.length+=e.length,e}),this);else if("number"==typeof e){if(!(0<=e&&e<=255))return t.error("non-byte EncoderBuffer value");this.value=e,this.length=1}else if("string"==typeof e)this.value=e,this.length=o.byteLength(e);else{if(!o.isBuffer(e))return t.error("Unsupported type: "+typeof e);this.value=e,this.length=e.length}}n(s,i),t.C=s,s.isDecoderBuffer=function(e){return e instanceof s||"object"==typeof e&&o.isBuffer(e.base)&&"DecoderBuffer"===e.constructor.name&&"number"==typeof e.offset&&"number"==typeof e.length&&"function"==typeof e.save&&"function"==typeof e.restore&&"function"==typeof e.isEmpty&&"function"==typeof e.readUInt8&&"function"==typeof e.skip&&"function"==typeof e.raw},s.prototype.save=function(){return{offset:this.offset,reporter:i.prototype.save.call(this)}},s.prototype.restore=function(e){const t=new s(this.base);return t.offset=e.offset,t.length=this.offset,this.offset=e.offset,i.prototype.restore.call(this,e.reporter),t},s.prototype.isEmpty=function(){return this.offset===this.length},s.prototype.readUInt8=function(e){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(e||"DecoderBuffer overrun")},s.prototype.skip=function(e,t){if(!(this.offset+e<=this.length))return this.error(t||"DecoderBuffer overrun");const r=new s(this.base);return r._reporterState=this._reporterState,r.offset=this.offset,r.length=this.offset+e,this.offset+=e,r},s.prototype.raw=function(e){return this.base.slice(e?e.offset:this.offset,this.length)},t.R=a,a.isEncoderBuffer=function(e){return e instanceof a||"object"==typeof e&&"EncoderBuffer"===e.constructor.name&&"number"==typeof e.length&&"function"==typeof e.join},a.prototype.join=function(e,t){return e||(e=o.alloc(this.length)),t||(t=0),0===this.length||(Array.isArray(this.value)?this.value.forEach((function(r){r.join(e,t),t+=r.length})):("number"==typeof this.value?e[t]=this.value:"string"==typeof this.value?e.write(this.value,t):o.isBuffer(this.value)&&this.value.copy(e,t),t+=this.length)),e}},1979:(e,t,r)=>{"use strict";const n=t;n.Reporter=r(8465).b,n.DecoderBuffer=r(6625).C,n.EncoderBuffer=r(6625).R,n.Node=r(1949)},1949:(e,t,r)=>{"use strict";const n=r(8465).b,i=r(6625).R,o=r(6625).C,s=r(9746),a=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],u=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(a);function c(e,t,r){const n={};this._baseState=n,n.name=r,n.enc=e,n.parent=t||null,n.children=null,n.tag=null,n.args=null,n.reverseArgs=null,n.choice=null,n.optional=!1,n.any=!1,n.obj=!1,n.use=null,n.useDecoder=null,n.key=null,n.default=null,n.explicit=null,n.implicit=null,n.contains=null,n.parent||(n.children=[],this._wrap())}e.exports=c;const f=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];c.prototype.clone=function(){const e=this._baseState,t={};f.forEach((function(r){t[r]=e[r]}));const r=new this.constructor(t.parent);return r._baseState=t,r},c.prototype._wrap=function(){const e=this._baseState;u.forEach((function(t){this[t]=function(){const r=new this.constructor(this);return e.children.push(r),r[t].apply(r,arguments)}}),this)},c.prototype._init=function(e){const t=this._baseState;s(null===t.parent),e.call(this),t.children=t.children.filter((function(e){return e._baseState.parent===this}),this),s.equal(t.children.length,1,"Root node can have only one child")},c.prototype._useArgs=function(e){const t=this._baseState,r=e.filter((function(e){return e instanceof this.constructor}),this);e=e.filter((function(e){return!(e instanceof this.constructor)}),this),0!==r.length&&(s(null===t.children),t.children=r,r.forEach((function(e){e._baseState.parent=this}),this)),0!==e.length&&(s(null===t.args),t.args=e,t.reverseArgs=e.map((function(e){if("object"!=typeof e||e.constructor!==Object)return e;const t={};return Object.keys(e).forEach((function(r){r==(0|r)&&(r|=0);const n=e[r];t[n]=r})),t})))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach((function(e){c.prototype[e]=function(){const t=this._baseState;throw new Error(e+" not implemented for encoding: "+t.enc)}})),a.forEach((function(e){c.prototype[e]=function(){const t=this._baseState,r=Array.prototype.slice.call(arguments);return s(null===t.tag),t.tag=e,this._useArgs(r),this}})),c.prototype.use=function(e){s(e);const t=this._baseState;return s(null===t.use),t.use=e,this},c.prototype.optional=function(){return this._baseState.optional=!0,this},c.prototype.def=function(e){const t=this._baseState;return s(null===t.default),t.default=e,t.optional=!0,this},c.prototype.explicit=function(e){const t=this._baseState;return s(null===t.explicit&&null===t.implicit),t.explicit=e,this},c.prototype.implicit=function(e){const t=this._baseState;return s(null===t.explicit&&null===t.implicit),t.implicit=e,this},c.prototype.obj=function(){const e=this._baseState,t=Array.prototype.slice.call(arguments);return e.obj=!0,0!==t.length&&this._useArgs(t),this},c.prototype.key=function(e){const t=this._baseState;return s(null===t.key),t.key=e,this},c.prototype.any=function(){return this._baseState.any=!0,this},c.prototype.choice=function(e){const t=this._baseState;return s(null===t.choice),t.choice=e,this._useArgs(Object.keys(e).map((function(t){return e[t]}))),this},c.prototype.contains=function(e){const t=this._baseState;return s(null===t.use),t.contains=e,this},c.prototype._decode=function(e,t){const r=this._baseState;if(null===r.parent)return e.wrapResult(r.children[0]._decode(e,t));let n,i=r.default,s=!0,a=null;if(null!==r.key&&(a=e.enterKey(r.key)),r.optional){let n=null;if(null!==r.explicit?n=r.explicit:null!==r.implicit?n=r.implicit:null!==r.tag&&(n=r.tag),null!==n||r.any){if(s=this._peekTag(e,n,r.any),e.isError(s))return s}else{const n=e.save();try{null===r.choice?this._decodeGeneric(r.tag,e,t):this._decodeChoice(e,t),s=!0}catch(e){s=!1}e.restore(n)}}if(r.obj&&s&&(n=e.enterObject()),s){if(null!==r.explicit){const t=this._decodeTag(e,r.explicit);if(e.isError(t))return t;e=t}const n=e.offset;if(null===r.use&&null===r.choice){let t;r.any&&(t=e.save());const n=this._decodeTag(e,null!==r.implicit?r.implicit:r.tag,r.any);if(e.isError(n))return n;r.any?i=e.raw(t):e=n}if(t&&t.track&&null!==r.tag&&t.track(e.path(),n,e.length,"tagged"),t&&t.track&&null!==r.tag&&t.track(e.path(),e.offset,e.length,"content"),r.any||(i=null===r.choice?this._decodeGeneric(r.tag,e,t):this._decodeChoice(e,t)),e.isError(i))return i;if(r.any||null!==r.choice||null===r.children||r.children.forEach((function(r){r._decode(e,t)})),r.contains&&("octstr"===r.tag||"bitstr"===r.tag)){const n=new o(i);i=this._getUse(r.contains,e._reporterState.obj)._decode(n,t)}}return r.obj&&s&&(i=e.leaveObject(n)),null===r.key||null===i&&!0!==s?null!==a&&e.exitKey(a):e.leaveKey(a,r.key,i),i},c.prototype._decodeGeneric=function(e,t,r){const n=this._baseState;return"seq"===e||"set"===e?null:"seqof"===e||"setof"===e?this._decodeList(t,e,n.args[0],r):/str$/.test(e)?this._decodeStr(t,e,r):"objid"===e&&n.args?this._decodeObjid(t,n.args[0],n.args[1],r):"objid"===e?this._decodeObjid(t,null,null,r):"gentime"===e||"utctime"===e?this._decodeTime(t,e,r):"null_"===e?this._decodeNull(t,r):"bool"===e?this._decodeBool(t,r):"objDesc"===e?this._decodeStr(t,e,r):"int"===e||"enum"===e?this._decodeInt(t,n.args&&n.args[0],r):null!==n.use?this._getUse(n.use,t._reporterState.obj)._decode(t,r):t.error("unknown tag: "+e)},c.prototype._getUse=function(e,t){const r=this._baseState;return r.useDecoder=this._use(e,t),s(null===r.useDecoder._baseState.parent),r.useDecoder=r.useDecoder._baseState.children[0],r.implicit!==r.useDecoder._baseState.implicit&&(r.useDecoder=r.useDecoder.clone(),r.useDecoder._baseState.implicit=r.implicit),r.useDecoder},c.prototype._decodeChoice=function(e,t){const r=this._baseState;let n=null,i=!1;return Object.keys(r.choice).some((function(o){const s=e.save(),a=r.choice[o];try{const r=a._decode(e,t);if(e.isError(r))return!1;n={type:o,value:r},i=!0}catch(t){return e.restore(s),!1}return!0}),this),i?n:e.error("Choice not matched")},c.prototype._createEncoderBuffer=function(e){return new i(e,this.reporter)},c.prototype._encode=function(e,t,r){const n=this._baseState;if(null!==n.default&&n.default===e)return;const i=this._encodeValue(e,t,r);return void 0===i||this._skipDefault(i,t,r)?void 0:i},c.prototype._encodeValue=function(e,t,r){const i=this._baseState;if(null===i.parent)return i.children[0]._encode(e,t||new n);let o=null;if(this.reporter=t,i.optional&&void 0===e){if(null===i.default)return;e=i.default}let s=null,a=!1;if(i.any)o=this._createEncoderBuffer(e);else if(i.choice)o=this._encodeChoice(e,t);else if(i.contains)s=this._getUse(i.contains,r)._encode(e,t),a=!0;else if(i.children)s=i.children.map((function(r){if("null_"===r._baseState.tag)return r._encode(null,t,e);if(null===r._baseState.key)return t.error("Child should have a key");const n=t.enterKey(r._baseState.key);if("object"!=typeof e)return t.error("Child expected, but input is not object");const i=r._encode(e[r._baseState.key],t,e);return t.leaveKey(n),i}),this).filter((function(e){return e})),s=this._createEncoderBuffer(s);else if("seqof"===i.tag||"setof"===i.tag){if(!i.args||1!==i.args.length)return t.error("Too many args for : "+i.tag);if(!Array.isArray(e))return t.error("seqof/setof, but data is not Array");const r=this.clone();r._baseState.implicit=null,s=this._createEncoderBuffer(e.map((function(r){const n=this._baseState;return this._getUse(n.args[0],e)._encode(r,t)}),r))}else null!==i.use?o=this._getUse(i.use,r)._encode(e,t):(s=this._encodePrimitive(i.tag,e),a=!0);if(!i.any&&null===i.choice){const e=null!==i.implicit?i.implicit:i.tag,r=null===i.implicit?"universal":"context";null===e?null===i.use&&t.error("Tag could be omitted only for .use()"):null===i.use&&(o=this._encodeComposite(e,a,r,s))}return null!==i.explicit&&(o=this._encodeComposite(i.explicit,!1,"context",o)),o},c.prototype._encodeChoice=function(e,t){const r=this._baseState,n=r.choice[e.type];return n||s(!1,e.type+" not found in "+JSON.stringify(Object.keys(r.choice))),n._encode(e.value,t)},c.prototype._encodePrimitive=function(e,t){const r=this._baseState;if(/str$/.test(e))return this._encodeStr(t,e);if("objid"===e&&r.args)return this._encodeObjid(t,r.reverseArgs[0],r.args[1]);if("objid"===e)return this._encodeObjid(t,null,null);if("gentime"===e||"utctime"===e)return this._encodeTime(t,e);if("null_"===e)return this._encodeNull();if("int"===e||"enum"===e)return this._encodeInt(t,r.args&&r.reverseArgs[0]);if("bool"===e)return this._encodeBool(t);if("objDesc"===e)return this._encodeStr(t,e);throw new Error("Unsupported tag: "+e)},c.prototype._isNumstr=function(e){return/^[0-9 ]*$/.test(e)},c.prototype._isPrintstr=function(e){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(e)}},8465:(e,t,r)=>{"use strict";const n=r(5717);function i(e){this._reporterState={obj:null,path:[],options:e||{},errors:[]}}function o(e,t){this.path=e,this.rethrow(t)}t.b=i,i.prototype.isError=function(e){return e instanceof o},i.prototype.save=function(){const e=this._reporterState;return{obj:e.obj,pathLen:e.path.length}},i.prototype.restore=function(e){const t=this._reporterState;t.obj=e.obj,t.path=t.path.slice(0,e.pathLen)},i.prototype.enterKey=function(e){return this._reporterState.path.push(e)},i.prototype.exitKey=function(e){const t=this._reporterState;t.path=t.path.slice(0,e-1)},i.prototype.leaveKey=function(e,t,r){const n=this._reporterState;this.exitKey(e),null!==n.obj&&(n.obj[t]=r)},i.prototype.path=function(){return this._reporterState.path.join("/")},i.prototype.enterObject=function(){const e=this._reporterState,t=e.obj;return e.obj={},t},i.prototype.leaveObject=function(e){const t=this._reporterState,r=t.obj;return t.obj=e,r},i.prototype.error=function(e){let t;const r=this._reporterState,n=e instanceof o;if(t=n?e:new o(r.path.map((function(e){return"["+JSON.stringify(e)+"]"})).join(""),e.message||e,e.stack),!r.options.partial)throw t;return n||r.errors.push(t),t},i.prototype.wrapResult=function(e){const t=this._reporterState;return t.options.partial?{result:this.isError(e)?null:e,errors:t.errors}:e},n(o,Error),o.prototype.rethrow=function(e){if(this.message=e+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,o),!this.stack)try{throw new Error(this.message)}catch(e){this.stack=e.stack}return this}},160:(e,t)=>{"use strict";function r(e){const t={};return Object.keys(e).forEach((function(r){(0|r)==r&&(r|=0);const n=e[r];t[n]=r})),t}t.tagClass={0:"universal",1:"application",2:"context",3:"private"},t.tagClassByName=r(t.tagClass),t.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},t.tagByName=r(t.tag)},6826:(e,t,r)=>{"use strict";const n=t;n._reverse=function(e){const t={};return Object.keys(e).forEach((function(r){(0|r)==r&&(r|=0);const n=e[r];t[n]=r})),t},n.der=r(160)},1671:(e,t,r)=>{"use strict";const n=r(5717),i=r(3550),o=r(6625).C,s=r(1949),a=r(160);function u(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new c,this.tree._init(e.body)}function c(e){s.call(this,"der",e)}function f(e,t){let r=e.readUInt8(t);if(e.isError(r))return r;const n=a.tagClass[r>>6],i=0==(32&r);if(31==(31&r)){let n=r;for(r=0;128==(128&n);){if(n=e.readUInt8(t),e.isError(n))return n;r<<=7,r|=127&n}}else r&=31;return{cls:n,primitive:i,tag:r,tagStr:a.tag[r]}}function h(e,t,r){let n=e.readUInt8(r);if(e.isError(n))return n;if(!t&&128===n)return null;if(0==(128&n))return n;const i=127&n;if(i>4)return e.error("length octect is too long");n=0;for(let t=0;t<i;t++){n<<=8;const t=e.readUInt8(r);if(e.isError(t))return t;n|=t}return n}e.exports=u,u.prototype.decode=function(e,t){return o.isDecoderBuffer(e)||(e=new o(e,t)),this.tree._decode(e,t)},n(c,s),c.prototype._peekTag=function(e,t,r){if(e.isEmpty())return!1;const n=e.save(),i=f(e,'Failed to peek tag: "'+t+'"');return e.isError(i)?i:(e.restore(n),i.tag===t||i.tagStr===t||i.tagStr+"of"===t||r)},c.prototype._decodeTag=function(e,t,r){const n=f(e,'Failed to decode tag of "'+t+'"');if(e.isError(n))return n;let i=h(e,n.primitive,'Failed to get length of "'+t+'"');if(e.isError(i))return i;if(!r&&n.tag!==t&&n.tagStr!==t&&n.tagStr+"of"!==t)return e.error('Failed to match tag: "'+t+'"');if(n.primitive||null!==i)return e.skip(i,'Failed to match body of: "'+t+'"');const o=e.save(),s=this._skipUntilEnd(e,'Failed to skip indefinite length body: "'+this.tag+'"');return e.isError(s)?s:(i=e.offset-o.offset,e.restore(o),e.skip(i,'Failed to match body of: "'+t+'"'))},c.prototype._skipUntilEnd=function(e,t){for(;;){const r=f(e,t);if(e.isError(r))return r;const n=h(e,r.primitive,t);if(e.isError(n))return n;let i;if(i=r.primitive||null!==n?e.skip(n):this._skipUntilEnd(e,t),e.isError(i))return i;if("end"===r.tagStr)break}},c.prototype._decodeList=function(e,t,r,n){const i=[];for(;!e.isEmpty();){const t=this._peekTag(e,"end");if(e.isError(t))return t;const o=r.decode(e,"der",n);if(e.isError(o)&&t)break;i.push(o)}return i},c.prototype._decodeStr=function(e,t){if("bitstr"===t){const t=e.readUInt8();return e.isError(t)?t:{unused:t,data:e.raw()}}if("bmpstr"===t){const t=e.raw();if(t.length%2==1)return e.error("Decoding of string type: bmpstr length mismatch");let r="";for(let e=0;e<t.length/2;e++)r+=String.fromCharCode(t.readUInt16BE(2*e));return r}if("numstr"===t){const t=e.raw().toString("ascii");return this._isNumstr(t)?t:e.error("Decoding of string type: numstr unsupported characters")}if("octstr"===t)return e.raw();if("objDesc"===t)return e.raw();if("printstr"===t){const t=e.raw().toString("ascii");return this._isPrintstr(t)?t:e.error("Decoding of string type: printstr unsupported characters")}return/str$/.test(t)?e.raw().toString():e.error("Decoding of string type: "+t+" unsupported")},c.prototype._decodeObjid=function(e,t,r){let n;const i=[];let o=0,s=0;for(;!e.isEmpty();)s=e.readUInt8(),o<<=7,o|=127&s,0==(128&s)&&(i.push(o),o=0);128&s&&i.push(o);const a=i[0]/40|0,u=i[0]%40;if(n=r?i:[a,u].concat(i.slice(1)),t){let e=t[n.join(" ")];void 0===e&&(e=t[n.join(".")]),void 0!==e&&(n=e)}return n},c.prototype._decodeTime=function(e,t){const r=e.raw().toString();let n,i,o,s,a,u;if("gentime"===t)n=0|r.slice(0,4),i=0|r.slice(4,6),o=0|r.slice(6,8),s=0|r.slice(8,10),a=0|r.slice(10,12),u=0|r.slice(12,14);else{if("utctime"!==t)return e.error("Decoding "+t+" time is not supported yet");n=0|r.slice(0,2),i=0|r.slice(2,4),o=0|r.slice(4,6),s=0|r.slice(6,8),a=0|r.slice(8,10),u=0|r.slice(10,12),n=n<70?2e3+n:1900+n}return Date.UTC(n,i-1,o,s,a,u,0)},c.prototype._decodeNull=function(){return null},c.prototype._decodeBool=function(e){const t=e.readUInt8();return e.isError(t)?t:0!==t},c.prototype._decodeInt=function(e,t){const r=e.raw();let n=new i(r);return t&&(n=t[n.toString(10)]||n),n},c.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getDecoder("der").tree}},8307:(e,t,r)=>{"use strict";const n=t;n.der=r(1671),n.pem=r(9631)},9631:(e,t,r)=>{"use strict";const n=r(5717),i=r(2399).Buffer,o=r(1671);function s(e){o.call(this,e),this.enc="pem"}n(s,o),e.exports=s,s.prototype.decode=function(e,t){const r=e.toString().split(/[\r\n]+/g),n=t.label.toUpperCase(),s=/^-----(BEGIN|END) ([^-]+)-----$/;let a=-1,u=-1;for(let e=0;e<r.length;e++){const t=r[e].match(s);if(null!==t&&t[2]===n){if(-1!==a){if("END"!==t[1])break;u=e;break}if("BEGIN"!==t[1])break;a=e}}if(-1===a||-1===u)throw new Error("PEM section not found for: "+n);const c=r.slice(a+1,u).join("");c.replace(/[^a-z0-9+/=]+/gi,"");const f=i.from(c,"base64");return o.prototype.decode.call(this,f,t)}},6984:(e,t,r)=>{"use strict";const n=r(5717),i=r(2399).Buffer,o=r(1949),s=r(160);function a(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new u,this.tree._init(e.body)}function u(e){o.call(this,"der",e)}function c(e){return e<10?"0"+e:e}e.exports=a,a.prototype.encode=function(e,t){return this.tree._encode(e,t).join()},n(u,o),u.prototype._encodeComposite=function(e,t,r,n){const o=function(e,t,r,n){let i;if("seqof"===e?e="seq":"setof"===e&&(e="set"),s.tagByName.hasOwnProperty(e))i=s.tagByName[e];else{if("number"!=typeof e||(0|e)!==e)return n.error("Unknown tag: "+e);i=e}return i>=31?n.error("Multi-octet tag encoding unsupported"):(t||(i|=32),i|=s.tagClassByName[r||"universal"]<<6,i)}(e,t,r,this.reporter);if(n.length<128){const e=i.alloc(2);return e[0]=o,e[1]=n.length,this._createEncoderBuffer([e,n])}let a=1;for(let e=n.length;e>=256;e>>=8)a++;const u=i.alloc(2+a);u[0]=o,u[1]=128|a;for(let e=1+a,t=n.length;t>0;e--,t>>=8)u[e]=255&t;return this._createEncoderBuffer([u,n])},u.prototype._encodeStr=function(e,t){if("bitstr"===t)return this._createEncoderBuffer([0|e.unused,e.data]);if("bmpstr"===t){const t=i.alloc(2*e.length);for(let r=0;r<e.length;r++)t.writeUInt16BE(e.charCodeAt(r),2*r);return this._createEncoderBuffer(t)}return"numstr"===t?this._isNumstr(e)?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: numstr supports only digits and space"):"printstr"===t?this._isPrintstr(e)?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark"):/str$/.test(t)||"objDesc"===t?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: "+t+" unsupported")},u.prototype._encodeObjid=function(e,t,r){if("string"==typeof e){if(!t)return this.reporter.error("string objid given, but no values map found");if(!t.hasOwnProperty(e))return this.reporter.error("objid not found in values map");e=t[e].split(/[\s.]+/g);for(let t=0;t<e.length;t++)e[t]|=0}else if(Array.isArray(e)){e=e.slice();for(let t=0;t<e.length;t++)e[t]|=0}if(!Array.isArray(e))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(e));if(!r){if(e[1]>=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,40*e[0]+e[1])}let n=0;for(let t=0;t<e.length;t++){let r=e[t];for(n++;r>=128;r>>=7)n++}const o=i.alloc(n);let s=o.length-1;for(let t=e.length-1;t>=0;t--){let r=e[t];for(o[s--]=127&r;(r>>=7)>0;)o[s--]=128|127&r}return this._createEncoderBuffer(o)},u.prototype._encodeTime=function(e,t){let r;const n=new Date(e);return"gentime"===t?r=[c(n.getUTCFullYear()),c(n.getUTCMonth()+1),c(n.getUTCDate()),c(n.getUTCHours()),c(n.getUTCMinutes()),c(n.getUTCSeconds()),"Z"].join(""):"utctime"===t?r=[c(n.getUTCFullYear()%100),c(n.getUTCMonth()+1),c(n.getUTCDate()),c(n.getUTCHours()),c(n.getUTCMinutes()),c(n.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+t+" time is not supported yet"),this._encodeStr(r,"octstr")},u.prototype._encodeNull=function(){return this._createEncoderBuffer("")},u.prototype._encodeInt=function(e,t){if("string"==typeof e){if(!t)return this.reporter.error("String int or enum given, but no values map");if(!t.hasOwnProperty(e))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(e));e=t[e]}if("number"!=typeof e&&!i.isBuffer(e)){const t=e.toArray();!e.sign&&128&t[0]&&t.unshift(0),e=i.from(t)}if(i.isBuffer(e)){let t=e.length;0===e.length&&t++;const r=i.alloc(t);return e.copy(r),0===e.length&&(r[0]=0),this._createEncoderBuffer(r)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);let r=1;for(let t=e;t>=256;t>>=8)r++;const n=new Array(r);for(let t=n.length-1;t>=0;t--)n[t]=255&e,e>>=8;return 128&n[0]&&n.unshift(0),this._createEncoderBuffer(i.from(n))},u.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)},u.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getEncoder("der").tree},u.prototype._skipDefault=function(e,t,r){const n=this._baseState;let i;if(null===n.default)return!1;const o=e.join();if(void 0===n.defaultBuffer&&(n.defaultBuffer=this._encodeValue(n.default,t,r).join()),o.length!==n.defaultBuffer.length)return!1;for(i=0;i<o.length;i++)if(o[i]!==n.defaultBuffer[i])return!1;return!0}},6579:(e,t,r)=>{"use strict";const n=t;n.der=r(6984),n.pem=r(2883)},2883:(e,t,r)=>{"use strict";const n=r(5717),i=r(6984);function o(e){i.call(this,e),this.enc="pem"}n(o,i),e.exports=o,o.prototype.encode=function(e,t){const r=i.prototype.encode.call(this,e).toString("base64"),n=["-----BEGIN "+t.label+"-----"];for(let e=0;e<r.length;e+=64)n.push(r.slice(e,e+64));return n.push("-----END "+t.label+"-----"),n.join("\n")}},9282:(e,t,r)=>{"use strict";var n=r(4155);function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o,s,a=r(2136).codes,u=a.ERR_AMBIGUOUS_ARGUMENT,c=a.ERR_INVALID_ARG_TYPE,f=a.ERR_INVALID_ARG_VALUE,h=a.ERR_INVALID_RETURN_VALUE,l=a.ERR_MISSING_ARGS,d=r(5961),p=r(9539).inspect,m=r(9539).types,g=m.isPromise,y=m.isRegExp,b=Object.assign?Object.assign:r(8091).assign,v=Object.is?Object.is:r(609);function w(){var e=r(9158);o=e.isDeepEqual,s=e.isDeepStrictEqual}new Map;var _=!1,S=e.exports=O,M={};function A(e){if(e.message instanceof Error)throw e.message;throw new d(e)}function E(e,t,r,n){if(!r){var i=!1;if(0===t)i=!0,n="No value argument passed to `assert.ok()`";else if(n instanceof Error)throw n;var o=new d({actual:r,expected:!0,message:n,operator:"==",stackStartFn:e});throw o.generatedMessage=i,o}}function O(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];E.apply(void 0,[O,t.length].concat(t))}S.fail=function e(t,r,i,o,s){var a,u=arguments.length;if(0===u)a="Failed";else if(1===u)i=t,t=void 0;else{if(!1===_){_=!0;var c=n.emitWarning?n.emitWarning:console.warn.bind(console);c("assert.fail() with more than one argument is deprecated. Please use assert.strictEqual() instead or only pass a message.","DeprecationWarning","DEP0094")}2===u&&(o="!=")}if(i instanceof Error)throw i;var f={actual:t,expected:r,operator:void 0===o?"fail":o,stackStartFn:s||e};void 0!==i&&(f.message=i);var h=new d(f);throw a&&(h.message=a,h.generatedMessage=!0),h},S.AssertionError=d,S.ok=O,S.equal=function e(t,r,n){if(arguments.length<2)throw new l("actual","expected");t!=r&&A({actual:t,expected:r,message:n,operator:"==",stackStartFn:e})},S.notEqual=function e(t,r,n){if(arguments.length<2)throw new l("actual","expected");t==r&&A({actual:t,expected:r,message:n,operator:"!=",stackStartFn:e})},S.deepEqual=function e(t,r,n){if(arguments.length<2)throw new l("actual","expected");void 0===o&&w(),o(t,r)||A({actual:t,expected:r,message:n,operator:"deepEqual",stackStartFn:e})},S.notDeepEqual=function e(t,r,n){if(arguments.length<2)throw new l("actual","expected");void 0===o&&w(),o(t,r)&&A({actual:t,expected:r,message:n,operator:"notDeepEqual",stackStartFn:e})},S.deepStrictEqual=function e(t,r,n){if(arguments.length<2)throw new l("actual","expected");void 0===o&&w(),s(t,r)||A({actual:t,expected:r,message:n,operator:"deepStrictEqual",stackStartFn:e})},S.notDeepStrictEqual=function e(t,r,n){if(arguments.length<2)throw new l("actual","expected");void 0===o&&w(),s(t,r)&&A({actual:t,expected:r,message:n,operator:"notDeepStrictEqual",stackStartFn:e})},S.strictEqual=function e(t,r,n){if(arguments.length<2)throw new l("actual","expected");v(t,r)||A({actual:t,expected:r,message:n,operator:"strictEqual",stackStartFn:e})},S.notStrictEqual=function e(t,r,n){if(arguments.length<2)throw new l("actual","expected");v(t,r)&&A({actual:t,expected:r,message:n,operator:"notStrictEqual",stackStartFn:e})};var x=function e(t,r,n){var i=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),r.forEach((function(e){e in t&&(void 0!==n&&"string"==typeof n[e]&&y(t[e])&&t[e].test(n[e])?i[e]=n[e]:i[e]=t[e])}))};function T(e,t,r,n,i,o){if(!(r in e)||!s(e[r],t[r])){if(!n){var a=new x(e,i),u=new x(t,i,e),c=new d({actual:a,expected:u,operator:"deepStrictEqual",stackStartFn:o});throw c.actual=e,c.expected=t,c.operator=o.name,c}A({actual:e,expected:t,message:n,operator:o.name,stackStartFn:o})}}function P(e,t,r,n){if("function"!=typeof t){if(y(t))return t.test(e);if(2===arguments.length)throw new c("expected",["Function","RegExp"],t);if("object"!==i(e)||null===e){var s=new d({actual:e,expected:t,message:r,operator:"deepStrictEqual",stackStartFn:n});throw s.operator=n.name,s}var a=Object.keys(t);if(t instanceof Error)a.push("name","message");else if(0===a.length)throw new f("error",t,"may not be an empty object");return void 0===o&&w(),a.forEach((function(i){"string"==typeof e[i]&&y(t[i])&&t[i].test(e[i])||T(e,t,i,r,a,n)})),!0}return void 0!==t.prototype&&e instanceof t||!Error.isPrototypeOf(t)&&!0===t.call({},e)}function j(e){if("function"!=typeof e)throw new c("fn","Function",e);try{e()}catch(e){return e}return M}function k(e){return g(e)||null!==e&&"object"===i(e)&&"function"==typeof e.then&&"function"==typeof e.catch}function I(e){return Promise.resolve().then((function(){var t;if("function"==typeof e){if(!k(t=e()))throw new h("instance of Promise","promiseFn",t)}else{if(!k(e))throw new c("promiseFn",["Function","Promise"],e);t=e}return Promise.resolve().then((function(){return t})).then((function(){return M})).catch((function(e){return e}))}))}function R(e,t,r,n){if("string"==typeof r){if(4===arguments.length)throw new c("error",["Object","Error","Function","RegExp"],r);if("object"===i(t)&&null!==t){if(t.message===r)throw new u("error/message",'The error message "'.concat(t.message,'" is identical to the message.'))}else if(t===r)throw new u("error/message",'The error "'.concat(t,'" is identical to the message.'));n=r,r=void 0}else if(null!=r&&"object"!==i(r)&&"function"!=typeof r)throw new c("error",["Object","Error","Function","RegExp"],r);if(t===M){var o="";r&&r.name&&(o+=" (".concat(r.name,")")),o+=n?": ".concat(n):".";var s="rejects"===e.name?"rejection":"exception";A({actual:void 0,expected:r,operator:e.name,message:"Missing expected ".concat(s).concat(o),stackStartFn:e})}if(r&&!P(t,r,n,e))throw t}function C(e,t,r,n){if(t!==M){if("string"==typeof r&&(n=r,r=void 0),!r||P(t,r)){var i=n?": ".concat(n):".",o="doesNotReject"===e.name?"rejection":"exception";A({actual:t,expected:r,operator:e.name,message:"Got unwanted ".concat(o).concat(i,"\n")+'Actual message: "'.concat(t&&t.message,'"'),stackStartFn:e})}throw t}}function B(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];E.apply(void 0,[B,t.length].concat(t))}S.throws=function e(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];R.apply(void 0,[e,j(t)].concat(n))},S.rejects=function e(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return I(t).then((function(t){return R.apply(void 0,[e,t].concat(n))}))},S.doesNotThrow=function e(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];C.apply(void 0,[e,j(t)].concat(n))},S.doesNotReject=function e(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return I(t).then((function(t){return C.apply(void 0,[e,t].concat(n))}))},S.ifError=function e(t){if(null!=t){var r="ifError got unwanted exception: ";"object"===i(t)&&"string"==typeof t.message?0===t.message.length&&t.constructor?r+=t.constructor.name:r+=t.message:r+=p(t);var n=new d({actual:t,expected:null,operator:"ifError",message:r,stackStartFn:e}),o=t.stack;if("string"==typeof o){var s=o.split("\n");s.shift();for(var a=n.stack.split("\n"),u=0;u<s.length;u++){var c=a.indexOf(s[u]);if(-1!==c){a=a.slice(0,c);break}}n.stack="".concat(a.join("\n"),"\n").concat(s.join("\n"))}throw n}},S.strict=b(B,S,{equal:S.strictEqual,deepEqual:S.deepStrictEqual,notEqual:S.notStrictEqual,notDeepEqual:S.notDeepStrictEqual}),S.strict.strict=S.strict},5961:(e,t,r)=>{"use strict";var n=r(4155);function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function s(e,t){return!t||"object"!==d(t)&&"function"!=typeof t?a(e):t}function a(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function u(e){var t="function"==typeof Map?new Map:void 0;return(u=function(e){if(null===e||(r=e,-1===Function.toString.call(r).indexOf("[native code]")))return e;var r;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return f(e,arguments,l(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),h(n,e)})(e)}function c(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function f(e,t,r){return(f=c()?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var i=new(Function.bind.apply(e,n));return r&&h(i,r.prototype),i}).apply(null,arguments)}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function d(e){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var p=r(9539).inspect,m=r(2136).codes.ERR_INVALID_ARG_TYPE;function g(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}var y="",b="",v="",w="",_={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function S(e){var t=Object.keys(e),r=Object.create(Object.getPrototypeOf(e));return t.forEach((function(t){r[t]=e[t]})),Object.defineProperty(r,"message",{value:e.message}),r}function M(e){return p(e,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}var A=function(e){function t(e){var r;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),"object"!==d(e)||null===e)throw new m("options","Object",e);var i=e.message,o=e.operator,u=e.stackStartFn,c=e.actual,f=e.expected,h=Error.stackTraceLimit;if(Error.stackTraceLimit=0,null!=i)r=s(this,l(t).call(this,String(i)));else if(n.stderr&&n.stderr.isTTY&&(n.stderr&&n.stderr.getColorDepth&&1!==n.stderr.getColorDepth()?(y="",b="",w="",v=""):(y="",b="",w="",v="")),"object"===d(c)&&null!==c&&"object"===d(f)&&null!==f&&"stack"in c&&c instanceof Error&&"stack"in f&&f instanceof Error&&(c=S(c),f=S(f)),"deepStrictEqual"===o||"strictEqual"===o)r=s(this,l(t).call(this,function(e,t,r){var i="",o="",s=0,a="",u=!1,c=M(e),f=c.split("\n"),h=M(t).split("\n"),l=0,p="";if("strictEqual"===r&&"object"===d(e)&&"object"===d(t)&&null!==e&&null!==t&&(r="strictEqualObject"),1===f.length&&1===h.length&&f[0]!==h[0]){var m=f[0].length+h[0].length;if(m<=10){if(!("object"===d(e)&&null!==e||"object"===d(t)&&null!==t||0===e&&0===t))return"".concat(_[r],"\n\n")+"".concat(f[0]," !== ").concat(h[0],"\n")}else if("strictEqualObject"!==r&&m<(n.stderr&&n.stderr.isTTY?n.stderr.columns:80)){for(;f[0][l]===h[0][l];)l++;l>2&&(p="\n ".concat(function(e,t){if(t=Math.floor(t),0==e.length||0==t)return"";var r=e.length*t;for(t=Math.floor(Math.log(t)/Math.log(2));t;)e+=e,t--;return e+e.substring(0,r-e.length)}(" ",l),"^"),l=0)}}for(var S=f[f.length-1],A=h[h.length-1];S===A&&(l++<2?a="\n ".concat(S).concat(a):i=S,f.pop(),h.pop(),0!==f.length&&0!==h.length);)S=f[f.length-1],A=h[h.length-1];var E=Math.max(f.length,h.length);if(0===E){var O=c.split("\n");if(O.length>30)for(O[26]="".concat(y,"...").concat(w);O.length>27;)O.pop();return"".concat(_.notIdentical,"\n\n").concat(O.join("\n"),"\n")}l>3&&(a="\n".concat(y,"...").concat(w).concat(a),u=!0),""!==i&&(a="\n ".concat(i).concat(a),i="");var x=0,T=_[r]+"\n".concat(b,"+ actual").concat(w," ").concat(v,"- expected").concat(w),P=" ".concat(y,"...").concat(w," Lines skipped");for(l=0;l<E;l++){var j=l-s;if(f.length<l+1)j>1&&l>2&&(j>4?(o+="\n".concat(y,"...").concat(w),u=!0):j>3&&(o+="\n ".concat(h[l-2]),x++),o+="\n ".concat(h[l-1]),x++),s=l,i+="\n".concat(v,"-").concat(w," ").concat(h[l]),x++;else if(h.length<l+1)j>1&&l>2&&(j>4?(o+="\n".concat(y,"...").concat(w),u=!0):j>3&&(o+="\n ".concat(f[l-2]),x++),o+="\n ".concat(f[l-1]),x++),s=l,o+="\n".concat(b,"+").concat(w," ").concat(f[l]),x++;else{var k=h[l],I=f[l],R=I!==k&&(!g(I,",")||I.slice(0,-1)!==k);R&&g(k,",")&&k.slice(0,-1)===I&&(R=!1,I+=","),R?(j>1&&l>2&&(j>4?(o+="\n".concat(y,"...").concat(w),u=!0):j>3&&(o+="\n ".concat(f[l-2]),x++),o+="\n ".concat(f[l-1]),x++),s=l,o+="\n".concat(b,"+").concat(w," ").concat(I),i+="\n".concat(v,"-").concat(w," ").concat(k),x+=2):(o+=i,i="",1!==j&&0!==l||(o+="\n ".concat(I),x++))}if(x>20&&l<E-2)return"".concat(T).concat(P,"\n").concat(o,"\n").concat(y,"...").concat(w).concat(i,"\n")+"".concat(y,"...").concat(w)}return"".concat(T).concat(u?P:"","\n").concat(o).concat(i).concat(a).concat(p)}(c,f,o)));else if("notDeepStrictEqual"===o||"notStrictEqual"===o){var p=_[o],A=M(c).split("\n");if("notStrictEqual"===o&&"object"===d(c)&&null!==c&&(p=_.notStrictEqualObject),A.length>30)for(A[26]="".concat(y,"...").concat(w);A.length>27;)A.pop();r=1===A.length?s(this,l(t).call(this,"".concat(p," ").concat(A[0]))):s(this,l(t).call(this,"".concat(p,"\n\n").concat(A.join("\n"),"\n")))}else{var E=M(c),O="",x=_[o];"notDeepEqual"===o||"notEqual"===o?(E="".concat(_[o],"\n\n").concat(E)).length>1024&&(E="".concat(E.slice(0,1021),"...")):(O="".concat(M(f)),E.length>512&&(E="".concat(E.slice(0,509),"...")),O.length>512&&(O="".concat(O.slice(0,509),"...")),"deepEqual"===o||"equal"===o?E="".concat(x,"\n\n").concat(E,"\n\nshould equal\n\n"):O=" ".concat(o," ").concat(O)),r=s(this,l(t).call(this,"".concat(E).concat(O)))}return Error.stackTraceLimit=h,r.generatedMessage=!i,Object.defineProperty(a(r),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),r.code="ERR_ASSERTION",r.actual=c,r.expected=f,r.operator=o,Error.captureStackTrace&&Error.captureStackTrace(a(r),u),r.stack,r.name="AssertionError",s(r)}var r,u;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&h(e,t)}(t,e),r=t,(u=[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:p.custom,value:function(e,t){return p(this,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){i(e,t,r[t])}))}return e}({},t,{customInspect:!1,depth:0}))}}])&&o(r.prototype,u),t}(u(Error));e.exports=A},2136:(e,t,r)=>{"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e){return(i=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function o(e,t){return(o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var s,a,u={};function c(e,t,r){r||(r=Error);var s=function(r){function s(r,o,a){var u;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),(u=function(e,t){return!t||"object"!==n(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}(this,i(s).call(this,function(e,r,n){return"string"==typeof t?t:t(e,r,n)}(r,o,a)))).code=e,u}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&o(e,t)}(s,r),s}(r);u[e]=s}function f(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map((function(e){return String(e)})),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}c("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),c("ERR_INVALID_ARG_TYPE",(function(e,t,i){var o,a,u,c,h;if(void 0===s&&(s=r(9282)),s("string"==typeof e,"'name' must be a string"),"string"==typeof t&&(a="not ",t.substr(0,a.length)===a)?(o="must not be",t=t.replace(/^not /,"")):o="must be",function(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}(e," argument"))u="The ".concat(e," ").concat(o," ").concat(f(t,"type"));else{var l=("number"!=typeof h&&(h=0),h+".".length>(c=e).length||-1===c.indexOf(".",h)?"argument":"property");u='The "'.concat(e,'" ').concat(l," ").concat(o," ").concat(f(t,"type"))}return u+". Received type ".concat(n(i))}),TypeError),c("ERR_INVALID_ARG_VALUE",(function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"is invalid";void 0===a&&(a=r(9539));var i=a.inspect(t);return i.length>128&&(i="".concat(i.slice(0,128),"...")),"The argument '".concat(e,"' ").concat(n,". Received ").concat(i)}),TypeError,RangeError),c("ERR_INVALID_RETURN_VALUE",(function(e,t,r){var i;return i=r&&r.constructor&&r.constructor.name?"instance of ".concat(r.constructor.name):"type ".concat(n(r)),"Expected ".concat(e,' to be returned from the "').concat(t,'"')+" function but got ".concat(i,".")}),TypeError),c("ERR_MISSING_ARGS",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];void 0===s&&(s=r(9282)),s(t.length>0,"At least one arg needs to be specified");var i="The ",o=t.length;switch(t=t.map((function(e){return'"'.concat(e,'"')})),o){case 1:i+="".concat(t[0]," argument");break;case 2:i+="".concat(t[0]," and ").concat(t[1]," arguments");break;default:i+=t.slice(0,o-1).join(", "),i+=", and ".concat(t[o-1]," arguments")}return"".concat(i," must be specified")}),TypeError),e.exports.codes=u},9158:(e,t,r)=>{"use strict";function n(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=[],n=!0,i=!1,o=void 0;try{for(var s,a=e[Symbol.iterator]();!(n=(s=a.next()).done)&&(r.push(s.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(i)throw o}}return r}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o=void 0!==/a/g.flags,s=function(e){var t=[];return e.forEach((function(e){return t.push(e)})),t},a=function(e){var t=[];return e.forEach((function(e,r){return t.push([r,e])})),t},u=Object.is?Object.is:r(609),c=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols:function(){return[]},f=Number.isNaN?Number.isNaN:r(360);function h(e){return e.call.bind(e)}var l=h(Object.prototype.hasOwnProperty),d=h(Object.prototype.propertyIsEnumerable),p=h(Object.prototype.toString),m=r(9539).types,g=m.isAnyArrayBuffer,y=m.isArrayBufferView,b=m.isDate,v=m.isMap,w=m.isRegExp,_=m.isSet,S=m.isNativeError,M=m.isBoxedPrimitive,A=m.isNumberObject,E=m.isStringObject,O=m.isBooleanObject,x=m.isBigIntObject,T=m.isSymbolObject,P=m.isFloat32Array,j=m.isFloat64Array;function k(e){if(0===e.length||e.length>10)return!0;for(var t=0;t<e.length;t++){var r=e.charCodeAt(t);if(r<48||r>57)return!0}return 10===e.length&&e>=Math.pow(2,32)}function I(e){return Object.keys(e).filter(k).concat(c(e).filter(Object.prototype.propertyIsEnumerable.bind(e)))}function R(e,t){if(e===t)return 0;for(var r=e.length,n=t.length,i=0,o=Math.min(r,n);i<o;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0}function C(e,t,r,n){if(e===t)return 0!==e||!r||u(e,t);if(r){if("object"!==i(e))return"number"==typeof e&&f(e)&&f(t);if("object"!==i(t)||null===e||null===t)return!1;if(Object.getPrototypeOf(e)!==Object.getPrototypeOf(t))return!1}else{if(null===e||"object"!==i(e))return(null===t||"object"!==i(t))&&e==t;if(null===t||"object"!==i(t))return!1}var s,a,c,h,l=p(e);if(l!==p(t))return!1;if(Array.isArray(e)){if(e.length!==t.length)return!1;var d=I(e),m=I(t);return d.length===m.length&&N(e,t,r,n,1,d)}if("[object Object]"===l&&(!v(e)&&v(t)||!_(e)&&_(t)))return!1;if(b(e)){if(!b(t)||Date.prototype.getTime.call(e)!==Date.prototype.getTime.call(t))return!1}else if(w(e)){if(!w(t)||(c=e,h=t,!(o?c.source===h.source&&c.flags===h.flags:RegExp.prototype.toString.call(c)===RegExp.prototype.toString.call(h))))return!1}else if(S(e)||e instanceof Error){if(e.message!==t.message||e.name!==t.name)return!1}else{if(y(e)){if(r||!P(e)&&!j(e)){if(!function(e,t){return e.byteLength===t.byteLength&&0===R(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}(e,t))return!1}else if(!function(e,t){if(e.byteLength!==t.byteLength)return!1;for(var r=0;r<e.byteLength;r++)if(e[r]!==t[r])return!1;return!0}(e,t))return!1;var k=I(e),C=I(t);return k.length===C.length&&N(e,t,r,n,0,k)}if(_(e))return!(!_(t)||e.size!==t.size)&&N(e,t,r,n,2);if(v(e))return!(!v(t)||e.size!==t.size)&&N(e,t,r,n,3);if(g(e)){if(a=t,(s=e).byteLength!==a.byteLength||0!==R(new Uint8Array(s),new Uint8Array(a)))return!1}else if(M(e)&&!function(e,t){return A(e)?A(t)&&u(Number.prototype.valueOf.call(e),Number.prototype.valueOf.call(t)):E(e)?E(t)&&String.prototype.valueOf.call(e)===String.prototype.valueOf.call(t):O(e)?O(t)&&Boolean.prototype.valueOf.call(e)===Boolean.prototype.valueOf.call(t):x(e)?x(t)&&BigInt.prototype.valueOf.call(e)===BigInt.prototype.valueOf.call(t):T(t)&&Symbol.prototype.valueOf.call(e)===Symbol.prototype.valueOf.call(t)}(e,t))return!1}return N(e,t,r,n,0)}function B(e,t){return t.filter((function(t){return d(e,t)}))}function N(e,t,r,n,i,o){if(5===arguments.length){o=Object.keys(e);var s=Object.keys(t);if(o.length!==s.length)return!1}for(var a=0;a<o.length;a++)if(!l(t,o[a]))return!1;if(r&&5===arguments.length){var u=c(e);if(0!==u.length){var f=0;for(a=0;a<u.length;a++){var h=u[a];if(d(e,h)){if(!d(t,h))return!1;o.push(h),f++}else if(d(t,h))return!1}var p=c(t);if(u.length!==p.length&&B(t,p).length!==f)return!1}else{var m=c(t);if(0!==m.length&&0!==B(t,m).length)return!1}}if(0===o.length&&(0===i||1===i&&0===e.length||0===e.size))return!0;if(void 0===n)n={val1:new Map,val2:new Map,position:0};else{var g=n.val1.get(e);if(void 0!==g){var y=n.val2.get(t);if(void 0!==y)return g===y}n.position++}n.val1.set(e,n.position),n.val2.set(t,n.position);var b=z(e,t,r,o,n,i);return n.val1.delete(e),n.val2.delete(t),b}function L(e,t,r,n){for(var i=s(e),o=0;o<i.length;o++){var a=i[o];if(C(t,a,r,n))return e.delete(a),!0}return!1}function D(e){switch(i(e)){case"undefined":return null;case"object":return;case"symbol":return!1;case"string":e=+e;case"number":if(f(e))return!1}return!0}function F(e,t,r){var n=D(r);return null!=n?n:t.has(n)&&!e.has(n)}function q(e,t,r,n,i){var o=D(r);if(null!=o)return o;var s=t.get(o);return!(void 0===s&&!t.has(o)||!C(n,s,!1,i))&&!e.has(o)&&C(n,s,!1,i)}function U(e,t,r,n,i,o){for(var a=s(e),u=0;u<a.length;u++){var c=a[u];if(C(r,c,i,o)&&C(n,t.get(c),i,o))return e.delete(c),!0}return!1}function z(e,t,r,o,u,c){var f=0;if(2===c){if(!function(e,t,r,n){for(var o=null,a=s(e),u=0;u<a.length;u++){var c=a[u];if("object"===i(c)&&null!==c)null===o&&(o=new Set),o.add(c);else if(!t.has(c)){if(r)return!1;if(!F(e,t,c))return!1;null===o&&(o=new Set),o.add(c)}}if(null!==o){for(var f=s(t),h=0;h<f.length;h++){var l=f[h];if("object"===i(l)&&null!==l){if(!L(o,l,r,n))return!1}else if(!r&&!e.has(l)&&!L(o,l,r,n))return!1}return 0===o.size}return!0}(e,t,r,u))return!1}else if(3===c){if(!function(e,t,r,o){for(var s=null,u=a(e),c=0;c<u.length;c++){var f=n(u[c],2),h=f[0],l=f[1];if("object"===i(h)&&null!==h)null===s&&(s=new Set),s.add(h);else{var d=t.get(h);if(void 0===d&&!t.has(h)||!C(l,d,r,o)){if(r)return!1;if(!q(e,t,h,l,o))return!1;null===s&&(s=new Set),s.add(h)}}}if(null!==s){for(var p=a(t),m=0;m<p.length;m++){var g=n(p[m],2),y=(h=g[0],g[1]);if("object"===i(h)&&null!==h){if(!U(s,e,h,y,r,o))return!1}else if(!(r||e.has(h)&&C(e.get(h),y,!1,o)||U(s,e,h,y,!1,o)))return!1}return 0===s.size}return!0}(e,t,r,u))return!1}else if(1===c)for(;f<e.length;f++){if(!l(e,f)){if(l(t,f))return!1;for(var h=Object.keys(e);f<h.length;f++){var d=h[f];if(!l(t,d)||!C(e[d],t[d],r,u))return!1}return h.length===Object.keys(t).length}if(!l(t,f)||!C(e[f],t[f],r,u))return!1}for(f=0;f<o.length;f++){var p=o[f];if(!C(e[p],t[p],r,u))return!1}return!0}e.exports={isDeepEqual:function(e,t){return C(e,t,!1)},isDeepStrictEqual:function(e,t){return C(e,t,!0)}}},8162:(e,t,r)=>{"use strict";var n=r(9509).Buffer;e.exports=function(e){if(e.length>=255)throw new TypeError("Alphabet too long");for(var t=new Uint8Array(256),r=0;r<t.length;r++)t[r]=255;for(var i=0;i<e.length;i++){var o=e.charAt(i),s=o.charCodeAt(0);if(255!==t[s])throw new TypeError(o+" is ambiguous");t[s]=i}var a=e.length,u=e.charAt(0),c=Math.log(a)/Math.log(256),f=Math.log(256)/Math.log(a);function h(e){if("string"!=typeof e)throw new TypeError("Expected String");if(0===e.length)return n.alloc(0);var r=0;if(" "!==e[r]){for(var i=0,o=0;e[r]===u;)i++,r++;for(var s=(e.length-r)*c+1>>>0,f=new Uint8Array(s);e[r];){var h=t[e.charCodeAt(r)];if(255===h)return;for(var l=0,d=s-1;(0!==h||l<o)&&-1!==d;d--,l++)h+=a*f[d]>>>0,f[d]=h%256>>>0,h=h/256>>>0;if(0!==h)throw new Error("Non-zero carry");o=l,r++}if(" "!==e[r]){for(var p=s-o;p!==s&&0===f[p];)p++;var m=n.allocUnsafe(i+(s-p));m.fill(0,0,i);for(var g=i;p!==s;)m[g++]=f[p++];return m}}}return{encode:function(t){if((Array.isArray(t)||t instanceof Uint8Array)&&(t=n.from(t)),!n.isBuffer(t))throw new TypeError("Expected Buffer");if(0===t.length)return"";for(var r=0,i=0,o=0,s=t.length;o!==s&&0===t[o];)o++,r++;for(var c=(s-o)*f+1>>>0,h=new Uint8Array(c);o!==s;){for(var l=t[o],d=0,p=c-1;(0!==l||d<i)&&-1!==p;p--,d++)l+=256*h[p]>>>0,h[p]=l%a>>>0,l=l/a>>>0;if(0!==l)throw new Error("Non-zero carry");i=d,o++}for(var m=c-i;m!==c&&0===h[m];)m++;for(var g=u.repeat(r);m<c;++m)g+=e.charAt(h[m]);return g},decodeUnsafe:h,decode:function(e){var t=h(e);if(t)return t;throw new Error("Non-base"+a+" character")}}}},9742:(e,t)=>{"use strict";t.byteLength=function(e){var t=u(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,o=u(e),s=o[0],a=o[1],c=new i(function(e,t,r){return 3*(t+r)/4-r}(0,s,a)),f=0,h=a>0?s-4:s;for(r=0;r<h;r+=4)t=n[e.charCodeAt(r)]<<18|n[e.charCodeAt(r+1)]<<12|n[e.charCodeAt(r+2)]<<6|n[e.charCodeAt(r+3)],c[f++]=t>>16&255,c[f++]=t>>8&255,c[f++]=255&t;return 2===a&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,c[f++]=255&t),1===a&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,c[f++]=t>>8&255,c[f++]=255&t),c},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],s=16383,a=0,u=n-i;a<u;a+=s)o.push(c(e,a,a+s>u?u:a+s));return 1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),o.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,a=o.length;s<a;++s)r[s]=o[s],n[o.charCodeAt(s)]=s;function u(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function c(e,t,n){for(var i,o,s=[],a=t;a<n;a+=3)i=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),s.push(r[(o=i)>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return s.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},4736:(e,t,r)=>{var n;e=r.nmd(e);var i=function(e){"use strict";var t=1e7,r=9007199254740992,n=l(r),o="0123456789abcdefghijklmnopqrstuvwxyz",s="function"==typeof BigInt;function a(e,t,r,n){return void 0===e?a[0]:void 0===t||10==+t&&!r?Z(e):$(e,t,r,n)}function u(e,t){this.value=e,this.sign=t,this.isSmall=!1}function c(e){this.value=e,this.sign=e<0,this.isSmall=!0}function f(e){this.value=e}function h(e){return-r<e&&e<r}function l(e){return e<1e7?[e]:e<1e14?[e%1e7,Math.floor(e/1e7)]:[e%1e7,Math.floor(e/1e7)%1e7,Math.floor(e/1e14)]}function d(e){p(e);var r=e.length;if(r<4&&j(e,n)<0)switch(r){case 0:return 0;case 1:return e[0];case 2:return e[0]+e[1]*t;default:return e[0]+(e[1]+e[2]*t)*t}return e}function p(e){for(var t=e.length;0===e[--t];);e.length=t+1}function m(e){for(var t=new Array(e),r=-1;++r<e;)t[r]=0;return t}function g(e){return e>0?Math.floor(e):Math.ceil(e)}function y(e,r){var n,i,o=e.length,s=r.length,a=new Array(o),u=0,c=t;for(i=0;i<s;i++)u=(n=e[i]+r[i]+u)>=c?1:0,a[i]=n-u*c;for(;i<o;)u=(n=e[i]+u)===c?1:0,a[i++]=n-u*c;return u>0&&a.push(u),a}function b(e,t){return e.length>=t.length?y(e,t):y(t,e)}function v(e,r){var n,i,o=e.length,s=new Array(o),a=t;for(i=0;i<o;i++)n=e[i]-a+r,r=Math.floor(n/a),s[i]=n-r*a,r+=1;for(;r>0;)s[i++]=r%a,r=Math.floor(r/a);return s}function w(e,r){var n,i,o=e.length,s=r.length,a=new Array(o),u=0,c=t;for(n=0;n<s;n++)(i=e[n]-u-r[n])<0?(i+=c,u=1):u=0,a[n]=i;for(n=s;n<o;n++){if(!((i=e[n]-u)<0)){a[n++]=i;break}i+=c,a[n]=i}for(;n<o;n++)a[n]=e[n];return p(a),a}function _(e,r,n){var i,o,s=e.length,a=new Array(s),f=-r,h=t;for(i=0;i<s;i++)o=e[i]+f,f=Math.floor(o/h),o%=h,a[i]=o<0?o+h:o;return"number"==typeof(a=d(a))?(n&&(a=-a),new c(a)):new u(a,n)}function S(e,r){var n,i,o,s,a=e.length,u=r.length,c=m(a+u),f=t;for(o=0;o<a;++o){s=e[o];for(var h=0;h<u;++h)n=s*r[h]+c[o+h],i=Math.floor(n/f),c[o+h]=n-i*f,c[o+h+1]+=i}return p(c),c}function M(e,r){var n,i,o=e.length,s=new Array(o),a=t,u=0;for(i=0;i<o;i++)n=e[i]*r+u,u=Math.floor(n/a),s[i]=n-u*a;for(;u>0;)s[i++]=u%a,u=Math.floor(u/a);return s}function A(e,t){for(var r=[];t-- >0;)r.push(0);return r.concat(e)}function E(e,t){var r=Math.max(e.length,t.length);if(r<=30)return S(e,t);r=Math.ceil(r/2);var n=e.slice(r),i=e.slice(0,r),o=t.slice(r),s=t.slice(0,r),a=E(i,s),u=E(n,o),c=E(b(i,n),b(s,o)),f=b(b(a,A(w(w(c,a),u),r)),A(u,2*r));return p(f),f}function O(e,r,n){return new u(e<t?M(r,e):S(r,l(e)),n)}function x(e){var r,n,i,o,s=e.length,a=m(s+s),u=t;for(i=0;i<s;i++){n=0-(o=e[i])*o;for(var c=i;c<s;c++)r=o*e[c]*2+a[i+c]+n,n=Math.floor(r/u),a[i+c]=r-n*u;a[i+s]=n}return p(a),a}function T(e,t){var r,n,i,o,s=e.length,a=m(s);for(i=0,r=s-1;r>=0;--r)i=(o=1e7*i+e[r])-(n=g(o/t))*t,a[r]=0|n;return[a,0|i]}function P(e,r){var n,i=Z(r);if(s)return[new f(e.value/i.value),new f(e.value%i.value)];var o,h=e.value,y=i.value;if(0===y)throw new Error("Cannot divide by zero");if(e.isSmall)return i.isSmall?[new c(g(h/y)),new c(h%y)]:[a[0],e];if(i.isSmall){if(1===y)return[e,a[0]];if(-1==y)return[e.negate(),a[0]];var b=Math.abs(y);if(b<t){o=d((n=T(h,b))[0]);var v=n[1];return e.sign&&(v=-v),"number"==typeof o?(e.sign!==i.sign&&(o=-o),[new c(o),new c(v)]):[new u(o,e.sign!==i.sign),new c(v)]}y=l(b)}var _=j(h,y);if(-1===_)return[a[0],e];if(0===_)return[a[e.sign===i.sign?1:-1],a[0]];o=(n=h.length+y.length<=200?function(e,r){var n,i,o,s,a,u,c,f=e.length,h=r.length,l=t,p=m(r.length),g=r[h-1],y=Math.ceil(l/(2*g)),b=M(e,y),v=M(r,y);for(b.length<=f&&b.push(0),v.push(0),g=v[h-1],i=f-h;i>=0;i--){for(n=l-1,b[i+h]!==g&&(n=Math.floor((b[i+h]*l+b[i+h-1])/g)),o=0,s=0,u=v.length,a=0;a<u;a++)o+=n*v[a],c=Math.floor(o/l),s+=b[i+a]-(o-c*l),o=c,s<0?(b[i+a]=s+l,s=-1):(b[i+a]=s,s=0);for(;0!==s;){for(n-=1,o=0,a=0;a<u;a++)(o+=b[i+a]-l+v[a])<0?(b[i+a]=o+l,o=0):(b[i+a]=o,o=1);s+=o}p[i]=n}return b=T(b,y)[0],[d(p),d(b)]}(h,y):function(e,r){for(var n,i,o,s,a,u=e.length,c=r.length,f=[],h=[],l=t;u;)if(h.unshift(e[--u]),p(h),j(h,r)<0)f.push(0);else{o=h[(i=h.length)-1]*l+h[i-2],s=r[c-1]*l+r[c-2],i>c&&(o=(o+1)*l),n=Math.ceil(o/s);do{if(j(a=M(r,n),h)<=0)break;n--}while(n);f.push(n),h=w(h,a)}return f.reverse(),[d(f),d(h)]}(h,y))[0];var S=e.sign!==i.sign,A=n[1],E=e.sign;return"number"==typeof o?(S&&(o=-o),o=new c(o)):o=new u(o,S),"number"==typeof A?(E&&(A=-A),A=new c(A)):A=new u(A,E),[o,A]}function j(e,t){if(e.length!==t.length)return e.length>t.length?1:-1;for(var r=e.length-1;r>=0;r--)if(e[r]!==t[r])return e[r]>t[r]?1:-1;return 0}function k(e){var t=e.abs();return!t.isUnit()&&(!!(t.equals(2)||t.equals(3)||t.equals(5))||!(t.isEven()||t.isDivisibleBy(3)||t.isDivisibleBy(5))&&(!!t.lesser(49)||void 0))}function I(e,t){for(var r,n,o,s=e.prev(),a=s,u=0;a.isEven();)a=a.divide(2),u++;e:for(n=0;n<t.length;n++)if(!e.lesser(t[n])&&!(o=i(t[n]).modPow(a,e)).isUnit()&&!o.equals(s)){for(r=u-1;0!=r;r--){if((o=o.square().mod(e)).isUnit())return!1;if(o.equals(s))continue e}return!1}return!0}u.prototype=Object.create(a.prototype),c.prototype=Object.create(a.prototype),f.prototype=Object.create(a.prototype),u.prototype.add=function(e){var t=Z(e);if(this.sign!==t.sign)return this.subtract(t.negate());var r=this.value,n=t.value;return t.isSmall?new u(v(r,Math.abs(n)),this.sign):new u(b(r,n),this.sign)},u.prototype.plus=u.prototype.add,c.prototype.add=function(e){var t=Z(e),r=this.value;if(r<0!==t.sign)return this.subtract(t.negate());var n=t.value;if(t.isSmall){if(h(r+n))return new c(r+n);n=l(Math.abs(n))}return new u(v(n,Math.abs(r)),r<0)},c.prototype.plus=c.prototype.add,f.prototype.add=function(e){return new f(this.value+Z(e).value)},f.prototype.plus=f.prototype.add,u.prototype.subtract=function(e){var t=Z(e);if(this.sign!==t.sign)return this.add(t.negate());var r=this.value,n=t.value;return t.isSmall?_(r,Math.abs(n),this.sign):function(e,t,r){var n;return j(e,t)>=0?n=w(e,t):(n=w(t,e),r=!r),"number"==typeof(n=d(n))?(r&&(n=-n),new c(n)):new u(n,r)}(r,n,this.sign)},u.prototype.minus=u.prototype.subtract,c.prototype.subtract=function(e){var t=Z(e),r=this.value;if(r<0!==t.sign)return this.add(t.negate());var n=t.value;return t.isSmall?new c(r-n):_(n,Math.abs(r),r>=0)},c.prototype.minus=c.prototype.subtract,f.prototype.subtract=function(e){return new f(this.value-Z(e).value)},f.prototype.minus=f.prototype.subtract,u.prototype.negate=function(){return new u(this.value,!this.sign)},c.prototype.negate=function(){var e=this.sign,t=new c(-this.value);return t.sign=!e,t},f.prototype.negate=function(){return new f(-this.value)},u.prototype.abs=function(){return new u(this.value,!1)},c.prototype.abs=function(){return new c(Math.abs(this.value))},f.prototype.abs=function(){return new f(this.value>=0?this.value:-this.value)},u.prototype.multiply=function(e){var r,n,i,o=Z(e),s=this.value,c=o.value,f=this.sign!==o.sign;if(o.isSmall){if(0===c)return a[0];if(1===c)return this;if(-1===c)return this.negate();if((r=Math.abs(c))<t)return new u(M(s,r),f);c=l(r)}return new u(-.012*(n=s.length)-.012*(i=c.length)+15e-6*n*i>0?E(s,c):S(s,c),f)},u.prototype.times=u.prototype.multiply,c.prototype._multiplyBySmall=function(e){return h(e.value*this.value)?new c(e.value*this.value):O(Math.abs(e.value),l(Math.abs(this.value)),this.sign!==e.sign)},u.prototype._multiplyBySmall=function(e){return 0===e.value?a[0]:1===e.value?this:-1===e.value?this.negate():O(Math.abs(e.value),this.value,this.sign!==e.sign)},c.prototype.multiply=function(e){return Z(e)._multiplyBySmall(this)},c.prototype.times=c.prototype.multiply,f.prototype.multiply=function(e){return new f(this.value*Z(e).value)},f.prototype.times=f.prototype.multiply,u.prototype.square=function(){return new u(x(this.value),!1)},c.prototype.square=function(){var e=this.value*this.value;return h(e)?new c(e):new u(x(l(Math.abs(this.value))),!1)},f.prototype.square=function(e){return new f(this.value*this.value)},u.prototype.divmod=function(e){var t=P(this,e);return{quotient:t[0],remainder:t[1]}},f.prototype.divmod=c.prototype.divmod=u.prototype.divmod,u.prototype.divide=function(e){return P(this,e)[0]},f.prototype.over=f.prototype.divide=function(e){return new f(this.value/Z(e).value)},c.prototype.over=c.prototype.divide=u.prototype.over=u.prototype.divide,u.prototype.mod=function(e){return P(this,e)[1]},f.prototype.mod=f.prototype.remainder=function(e){return new f(this.value%Z(e).value)},c.prototype.remainder=c.prototype.mod=u.prototype.remainder=u.prototype.mod,u.prototype.pow=function(e){var t,r,n,i=Z(e),o=this.value,s=i.value;if(0===s)return a[1];if(0===o)return a[0];if(1===o)return a[1];if(-1===o)return i.isEven()?a[1]:a[-1];if(i.sign)return a[0];if(!i.isSmall)throw new Error("The exponent "+i.toString()+" is too large.");if(this.isSmall&&h(t=Math.pow(o,s)))return new c(g(t));for(r=this,n=a[1];!0&s&&(n=n.times(r),--s),0!==s;)s/=2,r=r.square();return n},c.prototype.pow=u.prototype.pow,f.prototype.pow=function(e){var t=Z(e),r=this.value,n=t.value,i=BigInt(0),o=BigInt(1),s=BigInt(2);if(n===i)return a[1];if(r===i)return a[0];if(r===o)return a[1];if(r===BigInt(-1))return t.isEven()?a[1]:a[-1];if(t.isNegative())return new f(i);for(var u=this,c=a[1];(n&o)===o&&(c=c.times(u),--n),n!==i;)n/=s,u=u.square();return c},u.prototype.modPow=function(e,t){if(e=Z(e),(t=Z(t)).isZero())throw new Error("Cannot take modPow with modulus 0");var r=a[1],n=this.mod(t);for(e.isNegative()&&(e=e.multiply(a[-1]),n=n.modInv(t));e.isPositive();){if(n.isZero())return a[0];e.isOdd()&&(r=r.multiply(n).mod(t)),e=e.divide(2),n=n.square().mod(t)}return r},f.prototype.modPow=c.prototype.modPow=u.prototype.modPow,u.prototype.compareAbs=function(e){var t=Z(e),r=this.value,n=t.value;return t.isSmall?1:j(r,n)},c.prototype.compareAbs=function(e){var t=Z(e),r=Math.abs(this.value),n=t.value;return t.isSmall?r===(n=Math.abs(n))?0:r>n?1:-1:-1},f.prototype.compareAbs=function(e){var t=this.value,r=Z(e).value;return(t=t>=0?t:-t)===(r=r>=0?r:-r)?0:t>r?1:-1},u.prototype.compare=function(e){if(e===1/0)return-1;if(e===-1/0)return 1;var t=Z(e),r=this.value,n=t.value;return this.sign!==t.sign?t.sign?1:-1:t.isSmall?this.sign?-1:1:j(r,n)*(this.sign?-1:1)},u.prototype.compareTo=u.prototype.compare,c.prototype.compare=function(e){if(e===1/0)return-1;if(e===-1/0)return 1;var t=Z(e),r=this.value,n=t.value;return t.isSmall?r==n?0:r>n?1:-1:r<0!==t.sign?r<0?-1:1:r<0?1:-1},c.prototype.compareTo=c.prototype.compare,f.prototype.compare=function(e){if(e===1/0)return-1;if(e===-1/0)return 1;var t=this.value,r=Z(e).value;return t===r?0:t>r?1:-1},f.prototype.compareTo=f.prototype.compare,u.prototype.equals=function(e){return 0===this.compare(e)},f.prototype.eq=f.prototype.equals=c.prototype.eq=c.prototype.equals=u.prototype.eq=u.prototype.equals,u.prototype.notEquals=function(e){return 0!==this.compare(e)},f.prototype.neq=f.prototype.notEquals=c.prototype.neq=c.prototype.notEquals=u.prototype.neq=u.prototype.notEquals,u.prototype.greater=function(e){return this.compare(e)>0},f.prototype.gt=f.prototype.greater=c.prototype.gt=c.prototype.greater=u.prototype.gt=u.prototype.greater,u.prototype.lesser=function(e){return this.compare(e)<0},f.prototype.lt=f.prototype.lesser=c.prototype.lt=c.prototype.lesser=u.prototype.lt=u.prototype.lesser,u.prototype.greaterOrEquals=function(e){return this.compare(e)>=0},f.prototype.geq=f.prototype.greaterOrEquals=c.prototype.geq=c.prototype.greaterOrEquals=u.prototype.geq=u.prototype.greaterOrEquals,u.prototype.lesserOrEquals=function(e){return this.compare(e)<=0},f.prototype.leq=f.prototype.lesserOrEquals=c.prototype.leq=c.prototype.lesserOrEquals=u.prototype.leq=u.prototype.lesserOrEquals,u.prototype.isEven=function(){return 0==(1&this.value[0])},c.prototype.isEven=function(){return 0==(1&this.value)},f.prototype.isEven=function(){return(this.value&BigInt(1))===BigInt(0)},u.prototype.isOdd=function(){return 1==(1&this.value[0])},c.prototype.isOdd=function(){return 1==(1&this.value)},f.prototype.isOdd=function(){return(this.value&BigInt(1))===BigInt(1)},u.prototype.isPositive=function(){return!this.sign},c.prototype.isPositive=function(){return this.value>0},f.prototype.isPositive=c.prototype.isPositive,u.prototype.isNegative=function(){return this.sign},c.prototype.isNegative=function(){return this.value<0},f.prototype.isNegative=c.prototype.isNegative,u.prototype.isUnit=function(){return!1},c.prototype.isUnit=function(){return 1===Math.abs(this.value)},f.prototype.isUnit=function(){return this.abs().value===BigInt(1)},u.prototype.isZero=function(){return!1},c.prototype.isZero=function(){return 0===this.value},f.prototype.isZero=function(){return this.value===BigInt(0)},u.prototype.isDivisibleBy=function(e){var t=Z(e);return!t.isZero()&&(!!t.isUnit()||(0===t.compareAbs(2)?this.isEven():this.mod(t).isZero()))},f.prototype.isDivisibleBy=c.prototype.isDivisibleBy=u.prototype.isDivisibleBy,u.prototype.isPrime=function(t){var r=k(this);if(r!==e)return r;var n=this.abs(),o=n.bitLength();if(o<=64)return I(n,[2,3,5,7,11,13,17,19,23,29,31,37]);for(var s=Math.log(2)*o.toJSNumber(),a=Math.ceil(!0===t?2*Math.pow(s,2):s),u=[],c=0;c<a;c++)u.push(i(c+2));return I(n,u)},f.prototype.isPrime=c.prototype.isPrime=u.prototype.isPrime,u.prototype.isProbablePrime=function(t,r){var n=k(this);if(n!==e)return n;for(var o=this.abs(),s=t===e?5:t,a=[],u=0;u<s;u++)a.push(i.randBetween(2,o.minus(2),r));return I(o,a)},f.prototype.isProbablePrime=c.prototype.isProbablePrime=u.prototype.isProbablePrime,u.prototype.modInv=function(e){for(var t,r,n,o=i.zero,s=i.one,a=Z(e),u=this.abs();!u.isZero();)t=a.divide(u),r=o,n=a,o=s,a=u,s=r.subtract(t.multiply(s)),u=n.subtract(t.multiply(u));if(!a.isUnit())throw new Error(this.toString()+" and "+e.toString()+" are not co-prime");return-1===o.compare(0)&&(o=o.add(e)),this.isNegative()?o.negate():o},f.prototype.modInv=c.prototype.modInv=u.prototype.modInv,u.prototype.next=function(){var e=this.value;return this.sign?_(e,1,this.sign):new u(v(e,1),this.sign)},c.prototype.next=function(){var e=this.value;return e+1<r?new c(e+1):new u(n,!1)},f.prototype.next=function(){return new f(this.value+BigInt(1))},u.prototype.prev=function(){var e=this.value;return this.sign?new u(v(e,1),!0):_(e,1,this.sign)},c.prototype.prev=function(){var e=this.value;return e-1>-r?new c(e-1):new u(n,!0)},f.prototype.prev=function(){return new f(this.value-BigInt(1))};for(var R=[1];2*R[R.length-1]<=t;)R.push(2*R[R.length-1]);var C=R.length,B=R[C-1];function N(e){return Math.abs(e)<=t}function L(e,t,r){t=Z(t);for(var n=e.isNegative(),o=t.isNegative(),s=n?e.not():e,a=o?t.not():t,u=0,c=0,f=null,h=null,l=[];!s.isZero()||!a.isZero();)u=(f=P(s,B))[1].toJSNumber(),n&&(u=B-1-u),c=(h=P(a,B))[1].toJSNumber(),o&&(c=B-1-c),s=f[0],a=h[0],l.push(r(u,c));for(var d=0!==r(n?1:0,o?1:0)?i(-1):i(0),p=l.length-1;p>=0;p-=1)d=d.multiply(B).add(i(l[p]));return d}u.prototype.shiftLeft=function(e){var t=Z(e).toJSNumber();if(!N(t))throw new Error(String(t)+" is too large for shifting.");if(t<0)return this.shiftRight(-t);var r=this;if(r.isZero())return r;for(;t>=C;)r=r.multiply(B),t-=C-1;return r.multiply(R[t])},f.prototype.shiftLeft=c.prototype.shiftLeft=u.prototype.shiftLeft,u.prototype.shiftRight=function(e){var t,r=Z(e).toJSNumber();if(!N(r))throw new Error(String(r)+" is too large for shifting.");if(r<0)return this.shiftLeft(-r);for(var n=this;r>=C;){if(n.isZero()||n.isNegative()&&n.isUnit())return n;n=(t=P(n,B))[1].isNegative()?t[0].prev():t[0],r-=C-1}return(t=P(n,R[r]))[1].isNegative()?t[0].prev():t[0]},f.prototype.shiftRight=c.prototype.shiftRight=u.prototype.shiftRight,u.prototype.not=function(){return this.negate().prev()},f.prototype.not=c.prototype.not=u.prototype.not,u.prototype.and=function(e){return L(this,e,(function(e,t){return e&t}))},f.prototype.and=c.prototype.and=u.prototype.and,u.prototype.or=function(e){return L(this,e,(function(e,t){return e|t}))},f.prototype.or=c.prototype.or=u.prototype.or,u.prototype.xor=function(e){return L(this,e,(function(e,t){return e^t}))},f.prototype.xor=c.prototype.xor=u.prototype.xor;var D=1<<30;function F(e){var r=e.value,n="number"==typeof r?r|D:"bigint"==typeof r?r|BigInt(D):r[0]+r[1]*t|1073758208;return n&-n}function q(e,t){if(t.compareTo(e)<=0){var r=q(e,t.square(t)),n=r.p,o=r.e,s=n.multiply(t);return s.compareTo(e)<=0?{p:s,e:2*o+1}:{p:n,e:2*o}}return{p:i(1),e:0}}function U(e,t){return e=Z(e),t=Z(t),e.greater(t)?e:t}function z(e,t){return e=Z(e),t=Z(t),e.lesser(t)?e:t}function V(e,t){if(e=Z(e).abs(),t=Z(t).abs(),e.equals(t))return e;if(e.isZero())return t;if(t.isZero())return e;for(var r,n,i=a[1];e.isEven()&&t.isEven();)r=z(F(e),F(t)),e=e.divide(r),t=t.divide(r),i=i.multiply(r);for(;e.isEven();)e=e.divide(F(e));do{for(;t.isEven();)t=t.divide(F(t));e.greater(t)&&(n=t,t=e,e=n),t=t.subtract(e)}while(!t.isZero());return i.isUnit()?e:e.multiply(i)}u.prototype.bitLength=function(){var e=this;return e.compareTo(i(0))<0&&(e=e.negate().subtract(i(1))),0===e.compareTo(i(0))?i(0):i(q(e,i(2)).e).add(i(1))},f.prototype.bitLength=c.prototype.bitLength=u.prototype.bitLength;var $=function(e,t,r,n){r=r||o,e=String(e),n||(e=e.toLowerCase(),r=r.toLowerCase());var i,s=e.length,a=Math.abs(t),u={};for(i=0;i<r.length;i++)u[r[i]]=i;for(i=0;i<s;i++)if("-"!==(h=e[i])&&h in u&&u[h]>=a){if("1"===h&&1===a)continue;throw new Error(h+" is not a valid digit in base "+t+".")}t=Z(t);var c=[],f="-"===e[0];for(i=f?1:0;i<e.length;i++){var h;if((h=e[i])in u)c.push(Z(u[h]));else{if("<"!==h)throw new Error(h+" is not a valid character");var l=i;do{i++}while(">"!==e[i]&&i<e.length);c.push(Z(e.slice(l+1,i)))}}return H(c,t,f)};function H(e,t,r){var n,i=a[0],o=a[1];for(n=e.length-1;n>=0;n--)i=i.add(e[n].times(o)),o=o.times(t);return r?i.negate():i}function X(e,t){if((t=i(t)).isZero()){if(e.isZero())return{value:[0],isNegative:!1};throw new Error("Cannot convert nonzero numbers to base 0.")}if(t.equals(-1)){if(e.isZero())return{value:[0],isNegative:!1};if(e.isNegative())return{value:[].concat.apply([],Array.apply(null,Array(-e.toJSNumber())).map(Array.prototype.valueOf,[1,0])),isNegative:!1};var r=Array.apply(null,Array(e.toJSNumber()-1)).map(Array.prototype.valueOf,[0,1]);return r.unshift([1]),{value:[].concat.apply([],r),isNegative:!1}}var n=!1;if(e.isNegative()&&t.isPositive()&&(n=!0,e=e.abs()),t.isUnit())return e.isZero()?{value:[0],isNegative:!1}:{value:Array.apply(null,Array(e.toJSNumber())).map(Number.prototype.valueOf,1),isNegative:n};for(var o,s=[],a=e;a.isNegative()||a.compareAbs(t)>=0;){o=a.divmod(t),a=o.quotient;var u=o.remainder;u.isNegative()&&(u=t.minus(u).abs(),a=a.next()),s.push(u.toJSNumber())}return s.push(a.toJSNumber()),{value:s.reverse(),isNegative:n}}function K(e,t,r){var n=X(e,t);return(n.isNegative?"-":"")+n.value.map((function(e){return function(e,t){return e<(t=t||o).length?t[e]:"<"+e+">"}(e,r)})).join("")}function J(e){if(h(+e)){var t=+e;if(t===g(t))return s?new f(BigInt(t)):new c(t);throw new Error("Invalid integer: "+e)}var r="-"===e[0];r&&(e=e.slice(1));var n=e.split(/e/i);if(n.length>2)throw new Error("Invalid integer: "+n.join("e"));if(2===n.length){var i=n[1];if("+"===i[0]&&(i=i.slice(1)),(i=+i)!==g(i)||!h(i))throw new Error("Invalid integer: "+i+" is not a valid exponent.");var o=n[0],a=o.indexOf(".");if(a>=0&&(i-=o.length-a-1,o=o.slice(0,a)+o.slice(a+1)),i<0)throw new Error("Cannot include negative exponent part for integers");e=o+=new Array(i+1).join("0")}if(!/^([0-9][0-9]*)$/.test(e))throw new Error("Invalid integer: "+e);if(s)return new f(BigInt(r?"-"+e:e));for(var l=[],d=e.length,m=d-7;d>0;)l.push(+e.slice(m,d)),(m-=7)<0&&(m=0),d-=7;return p(l),new u(l,r)}function Z(e){return"number"==typeof e?function(e){if(s)return new f(BigInt(e));if(h(e)){if(e!==g(e))throw new Error(e+" is not an integer.");return new c(e)}return J(e.toString())}(e):"string"==typeof e?J(e):"bigint"==typeof e?new f(e):e}u.prototype.toArray=function(e){return X(this,e)},c.prototype.toArray=function(e){return X(this,e)},f.prototype.toArray=function(e){return X(this,e)},u.prototype.toString=function(t,r){if(t===e&&(t=10),10!==t)return K(this,t,r);for(var n,i=this.value,o=i.length,s=String(i[--o]);--o>=0;)n=String(i[o]),s+="0000000".slice(n.length)+n;return(this.sign?"-":"")+s},c.prototype.toString=function(t,r){return t===e&&(t=10),10!=t?K(this,t,r):String(this.value)},f.prototype.toString=c.prototype.toString,f.prototype.toJSON=u.prototype.toJSON=c.prototype.toJSON=function(){return this.toString()},u.prototype.valueOf=function(){return parseInt(this.toString(),10)},u.prototype.toJSNumber=u.prototype.valueOf,c.prototype.valueOf=function(){return this.value},c.prototype.toJSNumber=c.prototype.valueOf,f.prototype.valueOf=f.prototype.toJSNumber=function(){return parseInt(this.toString(),10)};for(var G=0;G<1e3;G++)a[G]=Z(G),G>0&&(a[-G]=Z(-G));return a.one=a[1],a.zero=a[0],a.minusOne=a[-1],a.max=U,a.min=z,a.gcd=V,a.lcm=function(e,t){return e=Z(e).abs(),t=Z(t).abs(),e.divide(V(e,t)).multiply(t)},a.isInstance=function(e){return e instanceof u||e instanceof c||e instanceof f},a.randBetween=function(e,r,n){e=Z(e),r=Z(r);var i=n||Math.random,o=z(e,r),s=U(e,r).subtract(o).add(1);if(s.isSmall)return o.add(Math.floor(i()*s));for(var u=X(s,t).value,c=[],f=!0,h=0;h<u.length;h++){var l=f?u[h]:t,d=g(i()*l);c.push(d),d<l&&(f=!1)}return o.add(a.fromArray(c,t,!1))},a.fromArray=function(e,t,r){return H(e.map(Z),Z(t||10),r)},a}();e.hasOwnProperty("exports")&&(e.exports=i),void 0===(n=function(){return i}.call(t,r,t,e))||(e.exports=n)},4431:function(e,t,r){var n;!function(i){"use strict";var o,s=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,a=Math.ceil,u=Math.floor,c="[BigNumber Error] ",f=c+"Number primitive has more than 15 significant digits: ",h=1e14,l=14,d=9007199254740991,p=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],m=1e7,g=1e9;function y(e){var t=0|e;return e>0||e===t?t:t-1}function b(e){for(var t,r,n=1,i=e.length,o=e[0]+"";n<i;){for(t=e[n++]+"",r=l-t.length;r--;t="0"+t);o+=t}for(i=o.length;48===o.charCodeAt(--i););return o.slice(0,i+1||1)}function v(e,t){var r,n,i=e.c,o=t.c,s=e.s,a=t.s,u=e.e,c=t.e;if(!s||!a)return null;if(r=i&&!i[0],n=o&&!o[0],r||n)return r?n?0:-a:s;if(s!=a)return s;if(r=s<0,n=u==c,!i||!o)return n?0:!i^r?1:-1;if(!n)return u>c^r?1:-1;for(a=(u=i.length)<(c=o.length)?u:c,s=0;s<a;s++)if(i[s]!=o[s])return i[s]>o[s]^r?1:-1;return u==c?0:u>c^r?1:-1}function w(e,t,r,n){if(e<t||e>r||e!==u(e))throw Error(c+(n||"Argument")+("number"==typeof e?e<t||e>r?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function _(e){var t=e.c.length-1;return y(e.e/l)==t&&e.c[t]%2!=0}function S(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function M(e,t,r){var n,i;if(t<0){for(i=r+".";++t;i+=r);e=i+e}else if(++t>(n=e.length)){for(i=r,t-=n;--t;i+=r);e+=i}else t<n&&(e=e.slice(0,t)+"."+e.slice(t));return e}(o=function e(t){var r,n,i,o,A,E,O,x,T,P,j=V.prototype={constructor:V,toString:null,valueOf:null},k=new V(1),I=20,R=4,C=-7,B=21,N=-1e7,L=1e7,D=!1,F=1,q=0,U={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},z="0123456789abcdefghijklmnopqrstuvwxyz";function V(e,t){var r,o,a,c,h,p,m,g,y=this;if(!(y instanceof V))return new V(e,t);if(null==t){if(e&&!0===e._isBigNumber)return y.s=e.s,void(!e.c||e.e>L?y.c=y.e=null:e.e<N?y.c=[y.e=0]:(y.e=e.e,y.c=e.c.slice()));if((p="number"==typeof e)&&0*e==0){if(y.s=1/e<0?(e=-e,-1):1,e===~~e){for(c=0,h=e;h>=10;h/=10,c++);return void(c>L?y.c=y.e=null:(y.e=c,y.c=[e]))}g=String(e)}else{if(!s.test(g=String(e)))return i(y,g,p);y.s=45==g.charCodeAt(0)?(g=g.slice(1),-1):1}(c=g.indexOf("."))>-1&&(g=g.replace(".","")),(h=g.search(/e/i))>0?(c<0&&(c=h),c+=+g.slice(h+1),g=g.substring(0,h)):c<0&&(c=g.length)}else{if(w(t,2,z.length,"Base"),10==t)return K(y=new V(e),I+y.e+1,R);if(g=String(e),p="number"==typeof e){if(0*e!=0)return i(y,g,p,t);if(y.s=1/e<0?(g=g.slice(1),-1):1,V.DEBUG&&g.replace(/^0\.0*|\./,"").length>15)throw Error(f+e)}else y.s=45===g.charCodeAt(0)?(g=g.slice(1),-1):1;for(r=z.slice(0,t),c=h=0,m=g.length;h<m;h++)if(r.indexOf(o=g.charAt(h))<0){if("."==o){if(h>c){c=m;continue}}else if(!a&&(g==g.toUpperCase()&&(g=g.toLowerCase())||g==g.toLowerCase()&&(g=g.toUpperCase()))){a=!0,h=-1,c=0;continue}return i(y,String(e),p,t)}p=!1,(c=(g=n(g,t,10,y.s)).indexOf("."))>-1?g=g.replace(".",""):c=g.length}for(h=0;48===g.charCodeAt(h);h++);for(m=g.length;48===g.charCodeAt(--m););if(g=g.slice(h,++m)){if(m-=h,p&&V.DEBUG&&m>15&&(e>d||e!==u(e)))throw Error(f+y.s*e);if((c=c-h-1)>L)y.c=y.e=null;else if(c<N)y.c=[y.e=0];else{if(y.e=c,y.c=[],h=(c+1)%l,c<0&&(h+=l),h<m){for(h&&y.c.push(+g.slice(0,h)),m-=l;h<m;)y.c.push(+g.slice(h,h+=l));h=l-(g=g.slice(h)).length}else h-=m;for(;h--;g+="0");y.c.push(+g)}}else y.c=[y.e=0]}function $(e,t,r,n){var i,o,s,a,u;if(null==r?r=R:w(r,0,8),!e.c)return e.toString();if(i=e.c[0],s=e.e,null==t)u=b(e.c),u=1==n||2==n&&(s<=C||s>=B)?S(u,s):M(u,s,"0");else if(o=(e=K(new V(e),t,r)).e,a=(u=b(e.c)).length,1==n||2==n&&(t<=o||o<=C)){for(;a<t;u+="0",a++);u=S(u,o)}else if(t-=s,u=M(u,o,"0"),o+1>a){if(--t>0)for(u+=".";t--;u+="0");}else if((t+=o-a)>0)for(o+1==a&&(u+=".");t--;u+="0");return e.s<0&&i?"-"+u:u}function H(e,t){for(var r,n=1,i=new V(e[0]);n<e.length;n++){if(!(r=new V(e[n])).s){i=r;break}t.call(i,r)&&(i=r)}return i}function X(e,t,r){for(var n=1,i=t.length;!t[--i];t.pop());for(i=t[0];i>=10;i/=10,n++);return(r=n+r*l-1)>L?e.c=e.e=null:r<N?e.c=[e.e=0]:(e.e=r,e.c=t),e}function K(e,t,r,n){var i,o,s,c,f,d,m,g=e.c,y=p;if(g){e:{for(i=1,c=g[0];c>=10;c/=10,i++);if((o=t-i)<0)o+=l,s=t,m=(f=g[d=0])/y[i-s-1]%10|0;else if((d=a((o+1)/l))>=g.length){if(!n)break e;for(;g.length<=d;g.push(0));f=m=0,i=1,s=(o%=l)-l+1}else{for(f=c=g[d],i=1;c>=10;c/=10,i++);m=(s=(o%=l)-l+i)<0?0:f/y[i-s-1]%10|0}if(n=n||t<0||null!=g[d+1]||(s<0?f:f%y[i-s-1]),n=r<4?(m||n)&&(0==r||r==(e.s<0?3:2)):m>5||5==m&&(4==r||n||6==r&&(o>0?s>0?f/y[i-s]:0:g[d-1])%10&1||r==(e.s<0?8:7)),t<1||!g[0])return g.length=0,n?(t-=e.e+1,g[0]=y[(l-t%l)%l],e.e=-t||0):g[0]=e.e=0,e;if(0==o?(g.length=d,c=1,d--):(g.length=d+1,c=y[l-o],g[d]=s>0?u(f/y[i-s]%y[s])*c:0),n)for(;;){if(0==d){for(o=1,s=g[0];s>=10;s/=10,o++);for(s=g[0]+=c,c=1;s>=10;s/=10,c++);o!=c&&(e.e++,g[0]==h&&(g[0]=1));break}if(g[d]+=c,g[d]!=h)break;g[d--]=0,c=1}for(o=g.length;0===g[--o];g.pop());}e.e>L?e.c=e.e=null:e.e<N&&(e.c=[e.e=0])}return e}function J(e){var t,r=e.e;return null===r?e.toString():(t=b(e.c),t=r<=C||r>=B?S(t,r):M(t,r,"0"),e.s<0?"-"+t:t)}return V.clone=e,V.ROUND_UP=0,V.ROUND_DOWN=1,V.ROUND_CEIL=2,V.ROUND_FLOOR=3,V.ROUND_HALF_UP=4,V.ROUND_HALF_DOWN=5,V.ROUND_HALF_EVEN=6,V.ROUND_HALF_CEIL=7,V.ROUND_HALF_FLOOR=8,V.EUCLID=9,V.config=V.set=function(e){var t,r;if(null!=e){if("object"!=typeof e)throw Error(c+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(w(r=e[t],0,g,t),I=r),e.hasOwnProperty(t="ROUNDING_MODE")&&(w(r=e[t],0,8,t),R=r),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((r=e[t])&&r.pop?(w(r[0],-g,0,t),w(r[1],0,g,t),C=r[0],B=r[1]):(w(r,-g,g,t),C=-(B=r<0?-r:r))),e.hasOwnProperty(t="RANGE"))if((r=e[t])&&r.pop)w(r[0],-g,-1,t),w(r[1],1,g,t),N=r[0],L=r[1];else{if(w(r,-g,g,t),!r)throw Error(c+t+" cannot be zero: "+r);N=-(L=r<0?-r:r)}if(e.hasOwnProperty(t="CRYPTO")){if((r=e[t])!==!!r)throw Error(c+t+" not true or false: "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw D=!r,Error(c+"crypto unavailable");D=r}else D=r}if(e.hasOwnProperty(t="MODULO_MODE")&&(w(r=e[t],0,9,t),F=r),e.hasOwnProperty(t="POW_PRECISION")&&(w(r=e[t],0,g,t),q=r),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(r=e[t]))throw Error(c+t+" not an object: "+r);U=r}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(r=e[t])||/^.?$|[+\-.\s]|(.).*\1/.test(r))throw Error(c+t+" invalid: "+r);z=r}}return{DECIMAL_PLACES:I,ROUNDING_MODE:R,EXPONENTIAL_AT:[C,B],RANGE:[N,L],CRYPTO:D,MODULO_MODE:F,POW_PRECISION:q,FORMAT:U,ALPHABET:z}},V.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!V.DEBUG)return!0;var t,r,n=e.c,i=e.e,o=e.s;e:if("[object Array]"=={}.toString.call(n)){if((1===o||-1===o)&&i>=-g&&i<=g&&i===u(i)){if(0===n[0]){if(0===i&&1===n.length)return!0;break e}if((t=(i+1)%l)<1&&(t+=l),String(n[0]).length==t){for(t=0;t<n.length;t++)if((r=n[t])<0||r>=h||r!==u(r))break e;if(0!==r)return!0}}}else if(null===n&&null===i&&(null===o||1===o||-1===o))return!0;throw Error(c+"Invalid BigNumber: "+e)},V.maximum=V.max=function(){return H(arguments,j.lt)},V.minimum=V.min=function(){return H(arguments,j.gt)},V.random=(o=9007199254740992,A=Math.random()*o&2097151?function(){return u(Math.random()*o)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,r,n,i,o,s=0,f=[],h=new V(k);if(null==e?e=I:w(e,0,g),i=a(e/l),D)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(i*=2));s<i;)(o=131072*t[s]+(t[s+1]>>>11))>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),t[s]=r[0],t[s+1]=r[1]):(f.push(o%1e14),s+=2);s=i/2}else{if(!crypto.randomBytes)throw D=!1,Error(c+"crypto unavailable");for(t=crypto.randomBytes(i*=7);s<i;)(o=281474976710656*(31&t[s])+1099511627776*t[s+1]+4294967296*t[s+2]+16777216*t[s+3]+(t[s+4]<<16)+(t[s+5]<<8)+t[s+6])>=9e15?crypto.randomBytes(7).copy(t,s):(f.push(o%1e14),s+=7);s=i/7}if(!D)for(;s<i;)(o=A())<9e15&&(f[s++]=o%1e14);for(i=f[--s],e%=l,i&&e&&(o=p[l-e],f[s]=u(i/o)*o);0===f[s];f.pop(),s--);if(s<0)f=[n=0];else{for(n=-1;0===f[0];f.splice(0,1),n-=l);for(s=1,o=f[0];o>=10;o/=10,s++);s<l&&(n-=l-s)}return h.e=n,h.c=f,h}),V.sum=function(){for(var e=1,t=arguments,r=new V(t[0]);e<t.length;)r=r.plus(t[e++]);return r},n=function(){var e="0123456789";function t(e,t,r,n){for(var i,o,s=[0],a=0,u=e.length;a<u;){for(o=s.length;o--;s[o]*=t);for(s[0]+=n.indexOf(e.charAt(a++)),i=0;i<s.length;i++)s[i]>r-1&&(null==s[i+1]&&(s[i+1]=0),s[i+1]+=s[i]/r|0,s[i]%=r)}return s.reverse()}return function(n,i,o,s,a){var u,c,f,h,l,d,p,m,g=n.indexOf("."),y=I,v=R;for(g>=0&&(h=q,q=0,n=n.replace(".",""),d=(m=new V(i)).pow(n.length-g),q=h,m.c=t(M(b(d.c),d.e,"0"),10,o,e),m.e=m.c.length),f=h=(p=t(n,i,o,a?(u=z,e):(u=e,z))).length;0==p[--h];p.pop());if(!p[0])return u.charAt(0);if(g<0?--f:(d.c=p,d.e=f,d.s=s,p=(d=r(d,m,y,v,o)).c,l=d.r,f=d.e),g=p[c=f+y+1],h=o/2,l=l||c<0||null!=p[c+1],l=v<4?(null!=g||l)&&(0==v||v==(d.s<0?3:2)):g>h||g==h&&(4==v||l||6==v&&1&p[c-1]||v==(d.s<0?8:7)),c<1||!p[0])n=l?M(u.charAt(1),-y,u.charAt(0)):u.charAt(0);else{if(p.length=c,l)for(--o;++p[--c]>o;)p[c]=0,c||(++f,p=[1].concat(p));for(h=p.length;!p[--h];);for(g=0,n="";g<=h;n+=u.charAt(p[g++]));n=M(n,f,u.charAt(0))}return n}}(),r=function(){function e(e,t,r){var n,i,o,s,a=0,u=e.length,c=t%m,f=t/m|0;for(e=e.slice();u--;)a=((i=c*(o=e[u]%m)+(n=f*o+(s=e[u]/m|0)*c)%m*m+a)/r|0)+(n/m|0)+f*s,e[u]=i%r;return a&&(e=[a].concat(e)),e}function t(e,t,r,n){var i,o;if(r!=n)o=r>n?1:-1;else for(i=o=0;i<r;i++)if(e[i]!=t[i]){o=e[i]>t[i]?1:-1;break}return o}function r(e,t,r,n){for(var i=0;r--;)e[r]-=i,i=e[r]<t[r]?1:0,e[r]=i*n+e[r]-t[r];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(n,i,o,s,a){var c,f,d,p,m,g,b,v,w,_,S,M,A,E,O,x,T,P=n.s==i.s?1:-1,j=n.c,k=i.c;if(!(j&&j[0]&&k&&k[0]))return new V(n.s&&i.s&&(j?!k||j[0]!=k[0]:k)?j&&0==j[0]||!k?0*P:P/0:NaN);for(w=(v=new V(P)).c=[],P=o+(f=n.e-i.e)+1,a||(a=h,f=y(n.e/l)-y(i.e/l),P=P/l|0),d=0;k[d]==(j[d]||0);d++);if(k[d]>(j[d]||0)&&f--,P<0)w.push(1),p=!0;else{for(E=j.length,x=k.length,d=0,P+=2,(m=u(a/(k[0]+1)))>1&&(k=e(k,m,a),j=e(j,m,a),x=k.length,E=j.length),A=x,S=(_=j.slice(0,x)).length;S<x;_[S++]=0);T=k.slice(),T=[0].concat(T),O=k[0],k[1]>=a/2&&O++;do{if(m=0,(c=t(k,_,x,S))<0){if(M=_[0],x!=S&&(M=M*a+(_[1]||0)),(m=u(M/O))>1)for(m>=a&&(m=a-1),b=(g=e(k,m,a)).length,S=_.length;1==t(g,_,b,S);)m--,r(g,x<b?T:k,b,a),b=g.length,c=1;else 0==m&&(c=m=1),b=(g=k.slice()).length;if(b<S&&(g=[0].concat(g)),r(_,g,S,a),S=_.length,-1==c)for(;t(k,_,x,S)<1;)m++,r(_,x<S?T:k,S,a),S=_.length}else 0===c&&(m++,_=[0]);w[d++]=m,_[0]?_[S++]=j[A]||0:(_=[j[A]],S=1)}while((A++<E||null!=_[0])&&P--);p=null!=_[0],w[0]||w.splice(0,1)}if(a==h){for(d=1,P=w[0];P>=10;P/=10,d++);K(v,o+(v.e=d+f*l-1)+1,s,p)}else v.e=f,v.r=+p;return v}}(),E=/^(-?)0([xbo])(?=\w[\w.]*$)/i,O=/^([^.]+)\.$/,x=/^\.([^.]+)$/,T=/^-?(Infinity|NaN)$/,P=/^\s*\+(?=[\w.])|^\s+|\s+$/g,i=function(e,t,r,n){var i,o=r?t:t.replace(P,"");if(T.test(o))e.s=isNaN(o)?null:o<0?-1:1;else{if(!r&&(o=o.replace(E,(function(e,t,r){return i="x"==(r=r.toLowerCase())?16:"b"==r?2:8,n&&n!=i?e:t})),n&&(i=n,o=o.replace(O,"$1").replace(x,"0.$1")),t!=o))return new V(o,i);if(V.DEBUG)throw Error(c+"Not a"+(n?" base "+n:"")+" number: "+t);e.s=null}e.c=e.e=null},j.absoluteValue=j.abs=function(){var e=new V(this);return e.s<0&&(e.s=1),e},j.comparedTo=function(e,t){return v(this,new V(e,t))},j.decimalPlaces=j.dp=function(e,t){var r,n,i,o=this;if(null!=e)return w(e,0,g),null==t?t=R:w(t,0,8),K(new V(o),e+o.e+1,t);if(!(r=o.c))return null;if(n=((i=r.length-1)-y(this.e/l))*l,i=r[i])for(;i%10==0;i/=10,n--);return n<0&&(n=0),n},j.dividedBy=j.div=function(e,t){return r(this,new V(e,t),I,R)},j.dividedToIntegerBy=j.idiv=function(e,t){return r(this,new V(e,t),0,1)},j.exponentiatedBy=j.pow=function(e,t){var r,n,i,o,s,f,h,d,p=this;if((e=new V(e)).c&&!e.isInteger())throw Error(c+"Exponent not an integer: "+J(e));if(null!=t&&(t=new V(t)),s=e.e>14,!p.c||!p.c[0]||1==p.c[0]&&!p.e&&1==p.c.length||!e.c||!e.c[0])return d=new V(Math.pow(+J(p),s?2-_(e):+J(e))),t?d.mod(t):d;if(f=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new V(NaN);(n=!f&&p.isInteger()&&t.isInteger())&&(p=p.mod(t))}else{if(e.e>9&&(p.e>0||p.e<-1||(0==p.e?p.c[0]>1||s&&p.c[1]>=24e7:p.c[0]<8e13||s&&p.c[0]<=9999975e7)))return o=p.s<0&&_(e)?-0:0,p.e>-1&&(o=1/o),new V(f?1/o:o);q&&(o=a(q/l+2))}for(s?(r=new V(.5),f&&(e.s=1),h=_(e)):h=(i=Math.abs(+J(e)))%2,d=new V(k);;){if(h){if(!(d=d.times(p)).c)break;o?d.c.length>o&&(d.c.length=o):n&&(d=d.mod(t))}if(i){if(0===(i=u(i/2)))break;h=i%2}else if(K(e=e.times(r),e.e+1,1),e.e>14)h=_(e);else{if(0==(i=+J(e)))break;h=i%2}p=p.times(p),o?p.c&&p.c.length>o&&(p.c.length=o):n&&(p=p.mod(t))}return n?d:(f&&(d=k.div(d)),t?d.mod(t):o?K(d,q,R,void 0):d)},j.integerValue=function(e){var t=new V(this);return null==e?e=R:w(e,0,8),K(t,t.e+1,e)},j.isEqualTo=j.eq=function(e,t){return 0===v(this,new V(e,t))},j.isFinite=function(){return!!this.c},j.isGreaterThan=j.gt=function(e,t){return v(this,new V(e,t))>0},j.isGreaterThanOrEqualTo=j.gte=function(e,t){return 1===(t=v(this,new V(e,t)))||0===t},j.isInteger=function(){return!!this.c&&y(this.e/l)>this.c.length-2},j.isLessThan=j.lt=function(e,t){return v(this,new V(e,t))<0},j.isLessThanOrEqualTo=j.lte=function(e,t){return-1===(t=v(this,new V(e,t)))||0===t},j.isNaN=function(){return!this.s},j.isNegative=function(){return this.s<0},j.isPositive=function(){return this.s>0},j.isZero=function(){return!!this.c&&0==this.c[0]},j.minus=function(e,t){var r,n,i,o,s=this,a=s.s;if(t=(e=new V(e,t)).s,!a||!t)return new V(NaN);if(a!=t)return e.s=-t,s.plus(e);var u=s.e/l,c=e.e/l,f=s.c,d=e.c;if(!u||!c){if(!f||!d)return f?(e.s=-t,e):new V(d?s:NaN);if(!f[0]||!d[0])return d[0]?(e.s=-t,e):new V(f[0]?s:3==R?-0:0)}if(u=y(u),c=y(c),f=f.slice(),a=u-c){for((o=a<0)?(a=-a,i=f):(c=u,i=d),i.reverse(),t=a;t--;i.push(0));i.reverse()}else for(n=(o=(a=f.length)<(t=d.length))?a:t,a=t=0;t<n;t++)if(f[t]!=d[t]){o=f[t]<d[t];break}if(o&&(i=f,f=d,d=i,e.s=-e.s),(t=(n=d.length)-(r=f.length))>0)for(;t--;f[r++]=0);for(t=h-1;n>a;){if(f[--n]<d[n]){for(r=n;r&&!f[--r];f[r]=t);--f[r],f[n]+=h}f[n]-=d[n]}for(;0==f[0];f.splice(0,1),--c);return f[0]?X(e,f,c):(e.s=3==R?-1:1,e.c=[e.e=0],e)},j.modulo=j.mod=function(e,t){var n,i,o=this;return e=new V(e,t),!o.c||!e.s||e.c&&!e.c[0]?new V(NaN):!e.c||o.c&&!o.c[0]?new V(o):(9==F?(i=e.s,e.s=1,n=r(o,e,0,3),e.s=i,n.s*=i):n=r(o,e,0,F),(e=o.minus(n.times(e))).c[0]||1!=F||(e.s=o.s),e)},j.multipliedBy=j.times=function(e,t){var r,n,i,o,s,a,u,c,f,d,p,g,b,v,w,_=this,S=_.c,M=(e=new V(e,t)).c;if(!(S&&M&&S[0]&&M[0]))return!_.s||!e.s||S&&!S[0]&&!M||M&&!M[0]&&!S?e.c=e.e=e.s=null:(e.s*=_.s,S&&M?(e.c=[0],e.e=0):e.c=e.e=null),e;for(n=y(_.e/l)+y(e.e/l),e.s*=_.s,(u=S.length)<(d=M.length)&&(b=S,S=M,M=b,i=u,u=d,d=i),i=u+d,b=[];i--;b.push(0));for(v=h,w=m,i=d;--i>=0;){for(r=0,p=M[i]%w,g=M[i]/w|0,o=i+(s=u);o>i;)r=((c=p*(c=S[--s]%w)+(a=g*c+(f=S[s]/w|0)*p)%w*w+b[o]+r)/v|0)+(a/w|0)+g*f,b[o--]=c%v;b[o]=r}return r?++n:b.splice(0,1),X(e,b,n)},j.negated=function(){var e=new V(this);return e.s=-e.s||null,e},j.plus=function(e,t){var r,n=this,i=n.s;if(t=(e=new V(e,t)).s,!i||!t)return new V(NaN);if(i!=t)return e.s=-t,n.minus(e);var o=n.e/l,s=e.e/l,a=n.c,u=e.c;if(!o||!s){if(!a||!u)return new V(i/0);if(!a[0]||!u[0])return u[0]?e:new V(a[0]?n:0*i)}if(o=y(o),s=y(s),a=a.slice(),i=o-s){for(i>0?(s=o,r=u):(i=-i,r=a),r.reverse();i--;r.push(0));r.reverse()}for((i=a.length)-(t=u.length)<0&&(r=u,u=a,a=r,t=i),i=0;t;)i=(a[--t]=a[t]+u[t]+i)/h|0,a[t]=h===a[t]?0:a[t]%h;return i&&(a=[i].concat(a),++s),X(e,a,s)},j.precision=j.sd=function(e,t){var r,n,i,o=this;if(null!=e&&e!==!!e)return w(e,1,g),null==t?t=R:w(t,0,8),K(new V(o),e,t);if(!(r=o.c))return null;if(n=(i=r.length-1)*l+1,i=r[i]){for(;i%10==0;i/=10,n--);for(i=r[0];i>=10;i/=10,n++);}return e&&o.e+1>n&&(n=o.e+1),n},j.shiftedBy=function(e){return w(e,-9007199254740991,d),this.times("1e"+e)},j.squareRoot=j.sqrt=function(){var e,t,n,i,o,s=this,a=s.c,u=s.s,c=s.e,f=I+4,h=new V("0.5");if(1!==u||!a||!a[0])return new V(!u||u<0&&(!a||a[0])?NaN:a?s:1/0);if(0==(u=Math.sqrt(+J(s)))||u==1/0?(((t=b(a)).length+c)%2==0&&(t+="0"),u=Math.sqrt(+t),c=y((c+1)/2)-(c<0||c%2),n=new V(t=u==1/0?"5e"+c:(t=u.toExponential()).slice(0,t.indexOf("e")+1)+c)):n=new V(u+""),n.c[0])for((u=(c=n.e)+f)<3&&(u=0);;)if(o=n,n=h.times(o.plus(r(s,o,f,1))),b(o.c).slice(0,u)===(t=b(n.c)).slice(0,u)){if(n.e<c&&--u,"9999"!=(t=t.slice(u-3,u+1))&&(i||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(K(n,n.e+I+2,1),e=!n.times(n).eq(s));break}if(!i&&(K(o,o.e+I+2,0),o.times(o).eq(s))){n=o;break}f+=4,u+=4,i=1}return K(n,n.e+I+1,R,e)},j.toExponential=function(e,t){return null!=e&&(w(e,0,g),e++),$(this,e,t,1)},j.toFixed=function(e,t){return null!=e&&(w(e,0,g),e=e+this.e+1),$(this,e,t)},j.toFormat=function(e,t,r){var n,i=this;if(null==r)null!=e&&t&&"object"==typeof t?(r=t,t=null):e&&"object"==typeof e?(r=e,e=t=null):r=U;else if("object"!=typeof r)throw Error(c+"Argument not an object: "+r);if(n=i.toFixed(e,t),i.c){var o,s=n.split("."),a=+r.groupSize,u=+r.secondaryGroupSize,f=r.groupSeparator||"",h=s[0],l=s[1],d=i.s<0,p=d?h.slice(1):h,m=p.length;if(u&&(o=a,a=u,u=o,m-=o),a>0&&m>0){for(o=m%a||a,h=p.substr(0,o);o<m;o+=a)h+=f+p.substr(o,a);u>0&&(h+=f+p.slice(o)),d&&(h="-"+h)}n=l?h+(r.decimalSeparator||"")+((u=+r.fractionGroupSize)?l.replace(new RegExp("\\d{"+u+"}\\B","g"),"$&"+(r.fractionGroupSeparator||"")):l):h}return(r.prefix||"")+n+(r.suffix||"")},j.toFraction=function(e){var t,n,i,o,s,a,u,f,h,d,m,g,y=this,v=y.c;if(null!=e&&(!(u=new V(e)).isInteger()&&(u.c||1!==u.s)||u.lt(k)))throw Error(c+"Argument "+(u.isInteger()?"out of range: ":"not an integer: ")+J(u));if(!v)return new V(y);for(t=new V(k),h=n=new V(k),i=f=new V(k),g=b(v),s=t.e=g.length-y.e-1,t.c[0]=p[(a=s%l)<0?l+a:a],e=!e||u.comparedTo(t)>0?s>0?t:h:u,a=L,L=1/0,u=new V(g),f.c[0]=0;d=r(u,t,0,1),1!=(o=n.plus(d.times(i))).comparedTo(e);)n=i,i=o,h=f.plus(d.times(o=h)),f=o,t=u.minus(d.times(o=t)),u=o;return o=r(e.minus(n),i,0,1),f=f.plus(o.times(h)),n=n.plus(o.times(i)),f.s=h.s=y.s,m=r(h,i,s*=2,R).minus(y).abs().comparedTo(r(f,n,s,R).minus(y).abs())<1?[h,i]:[f,n],L=a,m},j.toNumber=function(){return+J(this)},j.toPrecision=function(e,t){return null!=e&&w(e,1,g),$(this,e,t,2)},j.toString=function(e){var t,r=this,i=r.s,o=r.e;return null===o?i?(t="Infinity",i<0&&(t="-"+t)):t="NaN":(null==e?t=o<=C||o>=B?S(b(r.c),o):M(b(r.c),o,"0"):10===e?t=M(b((r=K(new V(r),I+o+1,R)).c),r.e,"0"):(w(e,2,z.length,"Base"),t=n(M(b(r.c),o,"0"),10,e,i,!0)),i<0&&r.c[0]&&(t="-"+t)),t},j.valueOf=j.toJSON=function(){return J(this)},j._isBigNumber=!0,null!=t&&V.set(t),V}()).default=o.BigNumber=o,void 0===(n=function(){return o}.call(t,r,t,e))||(e.exports=n)}()},3550:function(e,t,r){!function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function o(e,t,r){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var s;"object"==typeof e?e.exports=o:t.BN=o,o.BN=o,o.wordSize=26;try{s="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(6601).Buffer}catch(e){}function a(e,t){var r=e.charCodeAt(t);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function u(e,t,r){var n=a(e,r);return r-1>=t&&(n|=a(e,r-1)<<4),n}function c(e,t,r,n){for(var i=0,o=Math.min(e.length,r),s=t;s<o;s++){var a=e.charCodeAt(s)-48;i*=n,i+=a>=49?a-49+10:a>=17?a-17+10:a}return i}o.isBN=function(e){return e instanceof o||null!==e&&"object"==typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<e.length&&(16===t?this._parseHex(e,i,r):(this._parseBase(e,t,i),"le"===r&&this._initArray(this.toArray(),t,r)))},o.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},o.prototype._initArray=function(e,t,r){if(n("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var o,s,a=0;if("be"===r)for(i=e.length-1,o=0;i>=0;i-=3)s=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===r)for(i=0,o=0;i<e.length;i+=3)s=e[i]|e[i+1]<<8|e[i+2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this.strip()},o.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var i,o=0,s=0;if("be"===r)for(n=e.length-1;n>=t;n-=2)i=u(e,t,n)<<o,this.words[s]|=67108863&i,o>=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;else for(n=(e.length-t)%2==0?t+1:t;n<e.length;n+=2)i=u(e,t,n)<<o,this.words[s]|=67108863&i,o>=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;this.strip()},o.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var o=e.length-r,s=o%n,a=Math.min(o,o-s)+r,u=0,f=r;f<a;f+=n)u=c(e,f,f+n,t),this.imuln(i),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==s){var h=1;for(u=c(e,f,e.length,t),f=0;f<s;f++)h*=t;this.imuln(h),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this.strip()},o.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},o.prototype.clone=function(){var e=new o(null);return this.copy(e),e},o.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},o.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var f=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],h=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],l=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function d(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],o=0|t.words[0],s=i*o,a=67108863&s,u=s/67108864|0;r.words[0]=a;for(var c=1;c<n;c++){for(var f=u>>>26,h=67108863&u,l=Math.min(c,t.length-1),d=Math.max(0,c-e.length+1);d<=l;d++){var p=c-d|0;f+=(s=(i=0|e.words[p])*(o=0|t.words[d])+h)/67108864|0,h=67108863&s}r.words[c]=0|h,u=0|f}return 0!==u?r.words[c]=0|u:r.length--,r.strip()}o.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,o=0,s=0;s<this.length;s++){var a=this.words[s],u=(16777215&(a<<i|o)).toString(16);r=0!=(o=a>>>24-i&16777215)||s!==this.length-1?f[6-u.length]+u+r:u+r,(i+=2)>=26&&(i-=26,s--)}for(0!==o&&(r=o.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var c=h[e],d=l[e];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(d).toString(e);r=(p=p.idivn(d)).isZero()?m+r:f[c-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(e,t){return n(void 0!==s),this.toArrayLike(s,e,t)},o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},o.prototype.toArrayLike=function(e,t,r){var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0"),this.strip();var s,a,u="le"===t,c=new e(o),f=this.clone();if(u){for(a=0;!f.isZero();a++)s=f.andln(255),f.iushrn(8),c[a]=s;for(;a<o;a++)c[a]=0}else{for(a=0;a<o-i;a++)c[a]=0;for(a=0;!f.isZero();a++)s=f.andln(255),f.iushrn(8),c[o-a-1]=s}return c},Math.clz32?o.prototype._countBits=function(e){return 32-Math.clz32(e)}:o.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0==(8191&t)&&(r+=13,t>>>=13),0==(127&t)&&(r+=7,t>>>=7),0==(15&t)&&(r+=4,t>>>=4),0==(3&t)&&(r+=2,t>>>=2),0==(1&t)&&r++,r},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var r=this._zeroBits(this.words[t]);if(e+=r,26!==r)break}return e},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},o.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.strip()},o.prototype.ior=function(e){return n(0==(this.negative|e.negative)),this.iuor(e)},o.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;r<t.length;r++)this.words[r]=this.words[r]&e.words[r];return this.length=t.length,this.strip()},o.prototype.iand=function(e){return n(0==(this.negative|e.negative)),this.iuand(e)},o.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;n<r.length;n++)this.words[n]=t.words[n]^r.words[n];if(this!==t)for(;n<t.length;n++)this.words[n]=t.words[n];return this.length=t.length,this.strip()},o.prototype.ixor=function(e){return n(0==(this.negative|e.negative)),this.iuxor(e)},o.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<<i:this.words[r]&~(1<<i),this.strip()},o.prototype.iadd=function(e){var t,r,n;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(r=this,n=e):(r=e,n=this);for(var i=0,o=0;o<n.length;o++)t=(0|r.words[o])+(0|n.words[o])+i,this.words[o]=67108863&t,i=t>>>26;for(;0!==i&&o<r.length;o++)t=(0|r.words[o])+i,this.words[o]=67108863&t,i=t>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},o.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var o=0,s=0;s<n.length;s++)o=(t=(0|r.words[s])-(0|n.words[s])+o)>>26,this.words[s]=67108863&t;for(;0!==o&&s<r.length;s++)o=(t=(0|r.words[s])+o)>>26,this.words[s]=67108863&t;if(0===o&&s<r.length&&r!==this)for(;s<r.length;s++)this.words[s]=r.words[s];return this.length=Math.max(this.length,s),r!==this&&(this.negative=1),this.strip()},o.prototype.sub=function(e){return this.clone().isub(e)};var p=function(e,t,r){var n,i,o,s=e.words,a=t.words,u=r.words,c=0,f=0|s[0],h=8191&f,l=f>>>13,d=0|s[1],p=8191&d,m=d>>>13,g=0|s[2],y=8191&g,b=g>>>13,v=0|s[3],w=8191&v,_=v>>>13,S=0|s[4],M=8191&S,A=S>>>13,E=0|s[5],O=8191&E,x=E>>>13,T=0|s[6],P=8191&T,j=T>>>13,k=0|s[7],I=8191&k,R=k>>>13,C=0|s[8],B=8191&C,N=C>>>13,L=0|s[9],D=8191&L,F=L>>>13,q=0|a[0],U=8191&q,z=q>>>13,V=0|a[1],$=8191&V,H=V>>>13,X=0|a[2],K=8191&X,J=X>>>13,Z=0|a[3],G=8191&Z,W=Z>>>13,Y=0|a[4],Q=8191&Y,ee=Y>>>13,te=0|a[5],re=8191&te,ne=te>>>13,ie=0|a[6],oe=8191&ie,se=ie>>>13,ae=0|a[7],ue=8191&ae,ce=ae>>>13,fe=0|a[8],he=8191&fe,le=fe>>>13,de=0|a[9],pe=8191&de,me=de>>>13;r.negative=e.negative^t.negative,r.length=19;var ge=(c+(n=Math.imul(h,U))|0)+((8191&(i=(i=Math.imul(h,z))+Math.imul(l,U)|0))<<13)|0;c=((o=Math.imul(l,z))+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(p,U),i=(i=Math.imul(p,z))+Math.imul(m,U)|0,o=Math.imul(m,z);var ye=(c+(n=n+Math.imul(h,$)|0)|0)+((8191&(i=(i=i+Math.imul(h,H)|0)+Math.imul(l,$)|0))<<13)|0;c=((o=o+Math.imul(l,H)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(y,U),i=(i=Math.imul(y,z))+Math.imul(b,U)|0,o=Math.imul(b,z),n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,H)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,H)|0;var be=(c+(n=n+Math.imul(h,K)|0)|0)+((8191&(i=(i=i+Math.imul(h,J)|0)+Math.imul(l,K)|0))<<13)|0;c=((o=o+Math.imul(l,J)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(w,U),i=(i=Math.imul(w,z))+Math.imul(_,U)|0,o=Math.imul(_,z),n=n+Math.imul(y,$)|0,i=(i=i+Math.imul(y,H)|0)+Math.imul(b,$)|0,o=o+Math.imul(b,H)|0,n=n+Math.imul(p,K)|0,i=(i=i+Math.imul(p,J)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,J)|0;var ve=(c+(n=n+Math.imul(h,G)|0)|0)+((8191&(i=(i=i+Math.imul(h,W)|0)+Math.imul(l,G)|0))<<13)|0;c=((o=o+Math.imul(l,W)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(M,U),i=(i=Math.imul(M,z))+Math.imul(A,U)|0,o=Math.imul(A,z),n=n+Math.imul(w,$)|0,i=(i=i+Math.imul(w,H)|0)+Math.imul(_,$)|0,o=o+Math.imul(_,H)|0,n=n+Math.imul(y,K)|0,i=(i=i+Math.imul(y,J)|0)+Math.imul(b,K)|0,o=o+Math.imul(b,J)|0,n=n+Math.imul(p,G)|0,i=(i=i+Math.imul(p,W)|0)+Math.imul(m,G)|0,o=o+Math.imul(m,W)|0;var we=(c+(n=n+Math.imul(h,Q)|0)|0)+((8191&(i=(i=i+Math.imul(h,ee)|0)+Math.imul(l,Q)|0))<<13)|0;c=((o=o+Math.imul(l,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(O,U),i=(i=Math.imul(O,z))+Math.imul(x,U)|0,o=Math.imul(x,z),n=n+Math.imul(M,$)|0,i=(i=i+Math.imul(M,H)|0)+Math.imul(A,$)|0,o=o+Math.imul(A,H)|0,n=n+Math.imul(w,K)|0,i=(i=i+Math.imul(w,J)|0)+Math.imul(_,K)|0,o=o+Math.imul(_,J)|0,n=n+Math.imul(y,G)|0,i=(i=i+Math.imul(y,W)|0)+Math.imul(b,G)|0,o=o+Math.imul(b,W)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,ee)|0;var _e=(c+(n=n+Math.imul(h,re)|0)|0)+((8191&(i=(i=i+Math.imul(h,ne)|0)+Math.imul(l,re)|0))<<13)|0;c=((o=o+Math.imul(l,ne)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(P,U),i=(i=Math.imul(P,z))+Math.imul(j,U)|0,o=Math.imul(j,z),n=n+Math.imul(O,$)|0,i=(i=i+Math.imul(O,H)|0)+Math.imul(x,$)|0,o=o+Math.imul(x,H)|0,n=n+Math.imul(M,K)|0,i=(i=i+Math.imul(M,J)|0)+Math.imul(A,K)|0,o=o+Math.imul(A,J)|0,n=n+Math.imul(w,G)|0,i=(i=i+Math.imul(w,W)|0)+Math.imul(_,G)|0,o=o+Math.imul(_,W)|0,n=n+Math.imul(y,Q)|0,i=(i=i+Math.imul(y,ee)|0)+Math.imul(b,Q)|0,o=o+Math.imul(b,ee)|0,n=n+Math.imul(p,re)|0,i=(i=i+Math.imul(p,ne)|0)+Math.imul(m,re)|0,o=o+Math.imul(m,ne)|0;var Se=(c+(n=n+Math.imul(h,oe)|0)|0)+((8191&(i=(i=i+Math.imul(h,se)|0)+Math.imul(l,oe)|0))<<13)|0;c=((o=o+Math.imul(l,se)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(I,U),i=(i=Math.imul(I,z))+Math.imul(R,U)|0,o=Math.imul(R,z),n=n+Math.imul(P,$)|0,i=(i=i+Math.imul(P,H)|0)+Math.imul(j,$)|0,o=o+Math.imul(j,H)|0,n=n+Math.imul(O,K)|0,i=(i=i+Math.imul(O,J)|0)+Math.imul(x,K)|0,o=o+Math.imul(x,J)|0,n=n+Math.imul(M,G)|0,i=(i=i+Math.imul(M,W)|0)+Math.imul(A,G)|0,o=o+Math.imul(A,W)|0,n=n+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,ee)|0,n=n+Math.imul(y,re)|0,i=(i=i+Math.imul(y,ne)|0)+Math.imul(b,re)|0,o=o+Math.imul(b,ne)|0,n=n+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,se)|0)+Math.imul(m,oe)|0,o=o+Math.imul(m,se)|0;var Me=(c+(n=n+Math.imul(h,ue)|0)|0)+((8191&(i=(i=i+Math.imul(h,ce)|0)+Math.imul(l,ue)|0))<<13)|0;c=((o=o+Math.imul(l,ce)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(B,U),i=(i=Math.imul(B,z))+Math.imul(N,U)|0,o=Math.imul(N,z),n=n+Math.imul(I,$)|0,i=(i=i+Math.imul(I,H)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,H)|0,n=n+Math.imul(P,K)|0,i=(i=i+Math.imul(P,J)|0)+Math.imul(j,K)|0,o=o+Math.imul(j,J)|0,n=n+Math.imul(O,G)|0,i=(i=i+Math.imul(O,W)|0)+Math.imul(x,G)|0,o=o+Math.imul(x,W)|0,n=n+Math.imul(M,Q)|0,i=(i=i+Math.imul(M,ee)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,ee)|0,n=n+Math.imul(w,re)|0,i=(i=i+Math.imul(w,ne)|0)+Math.imul(_,re)|0,o=o+Math.imul(_,ne)|0,n=n+Math.imul(y,oe)|0,i=(i=i+Math.imul(y,se)|0)+Math.imul(b,oe)|0,o=o+Math.imul(b,se)|0,n=n+Math.imul(p,ue)|0,i=(i=i+Math.imul(p,ce)|0)+Math.imul(m,ue)|0,o=o+Math.imul(m,ce)|0;var Ae=(c+(n=n+Math.imul(h,he)|0)|0)+((8191&(i=(i=i+Math.imul(h,le)|0)+Math.imul(l,he)|0))<<13)|0;c=((o=o+Math.imul(l,le)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(D,U),i=(i=Math.imul(D,z))+Math.imul(F,U)|0,o=Math.imul(F,z),n=n+Math.imul(B,$)|0,i=(i=i+Math.imul(B,H)|0)+Math.imul(N,$)|0,o=o+Math.imul(N,H)|0,n=n+Math.imul(I,K)|0,i=(i=i+Math.imul(I,J)|0)+Math.imul(R,K)|0,o=o+Math.imul(R,J)|0,n=n+Math.imul(P,G)|0,i=(i=i+Math.imul(P,W)|0)+Math.imul(j,G)|0,o=o+Math.imul(j,W)|0,n=n+Math.imul(O,Q)|0,i=(i=i+Math.imul(O,ee)|0)+Math.imul(x,Q)|0,o=o+Math.imul(x,ee)|0,n=n+Math.imul(M,re)|0,i=(i=i+Math.imul(M,ne)|0)+Math.imul(A,re)|0,o=o+Math.imul(A,ne)|0,n=n+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,se)|0)+Math.imul(_,oe)|0,o=o+Math.imul(_,se)|0,n=n+Math.imul(y,ue)|0,i=(i=i+Math.imul(y,ce)|0)+Math.imul(b,ue)|0,o=o+Math.imul(b,ce)|0,n=n+Math.imul(p,he)|0,i=(i=i+Math.imul(p,le)|0)+Math.imul(m,he)|0,o=o+Math.imul(m,le)|0;var Ee=(c+(n=n+Math.imul(h,pe)|0)|0)+((8191&(i=(i=i+Math.imul(h,me)|0)+Math.imul(l,pe)|0))<<13)|0;c=((o=o+Math.imul(l,me)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(D,$),i=(i=Math.imul(D,H))+Math.imul(F,$)|0,o=Math.imul(F,H),n=n+Math.imul(B,K)|0,i=(i=i+Math.imul(B,J)|0)+Math.imul(N,K)|0,o=o+Math.imul(N,J)|0,n=n+Math.imul(I,G)|0,i=(i=i+Math.imul(I,W)|0)+Math.imul(R,G)|0,o=o+Math.imul(R,W)|0,n=n+Math.imul(P,Q)|0,i=(i=i+Math.imul(P,ee)|0)+Math.imul(j,Q)|0,o=o+Math.imul(j,ee)|0,n=n+Math.imul(O,re)|0,i=(i=i+Math.imul(O,ne)|0)+Math.imul(x,re)|0,o=o+Math.imul(x,ne)|0,n=n+Math.imul(M,oe)|0,i=(i=i+Math.imul(M,se)|0)+Math.imul(A,oe)|0,o=o+Math.imul(A,se)|0,n=n+Math.imul(w,ue)|0,i=(i=i+Math.imul(w,ce)|0)+Math.imul(_,ue)|0,o=o+Math.imul(_,ce)|0,n=n+Math.imul(y,he)|0,i=(i=i+Math.imul(y,le)|0)+Math.imul(b,he)|0,o=o+Math.imul(b,le)|0;var Oe=(c+(n=n+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,me)|0)+Math.imul(m,pe)|0))<<13)|0;c=((o=o+Math.imul(m,me)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(D,K),i=(i=Math.imul(D,J))+Math.imul(F,K)|0,o=Math.imul(F,J),n=n+Math.imul(B,G)|0,i=(i=i+Math.imul(B,W)|0)+Math.imul(N,G)|0,o=o+Math.imul(N,W)|0,n=n+Math.imul(I,Q)|0,i=(i=i+Math.imul(I,ee)|0)+Math.imul(R,Q)|0,o=o+Math.imul(R,ee)|0,n=n+Math.imul(P,re)|0,i=(i=i+Math.imul(P,ne)|0)+Math.imul(j,re)|0,o=o+Math.imul(j,ne)|0,n=n+Math.imul(O,oe)|0,i=(i=i+Math.imul(O,se)|0)+Math.imul(x,oe)|0,o=o+Math.imul(x,se)|0,n=n+Math.imul(M,ue)|0,i=(i=i+Math.imul(M,ce)|0)+Math.imul(A,ue)|0,o=o+Math.imul(A,ce)|0,n=n+Math.imul(w,he)|0,i=(i=i+Math.imul(w,le)|0)+Math.imul(_,he)|0,o=o+Math.imul(_,le)|0;var xe=(c+(n=n+Math.imul(y,pe)|0)|0)+((8191&(i=(i=i+Math.imul(y,me)|0)+Math.imul(b,pe)|0))<<13)|0;c=((o=o+Math.imul(b,me)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(D,G),i=(i=Math.imul(D,W))+Math.imul(F,G)|0,o=Math.imul(F,W),n=n+Math.imul(B,Q)|0,i=(i=i+Math.imul(B,ee)|0)+Math.imul(N,Q)|0,o=o+Math.imul(N,ee)|0,n=n+Math.imul(I,re)|0,i=(i=i+Math.imul(I,ne)|0)+Math.imul(R,re)|0,o=o+Math.imul(R,ne)|0,n=n+Math.imul(P,oe)|0,i=(i=i+Math.imul(P,se)|0)+Math.imul(j,oe)|0,o=o+Math.imul(j,se)|0,n=n+Math.imul(O,ue)|0,i=(i=i+Math.imul(O,ce)|0)+Math.imul(x,ue)|0,o=o+Math.imul(x,ce)|0,n=n+Math.imul(M,he)|0,i=(i=i+Math.imul(M,le)|0)+Math.imul(A,he)|0,o=o+Math.imul(A,le)|0;var Te=(c+(n=n+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,me)|0)+Math.imul(_,pe)|0))<<13)|0;c=((o=o+Math.imul(_,me)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(D,Q),i=(i=Math.imul(D,ee))+Math.imul(F,Q)|0,o=Math.imul(F,ee),n=n+Math.imul(B,re)|0,i=(i=i+Math.imul(B,ne)|0)+Math.imul(N,re)|0,o=o+Math.imul(N,ne)|0,n=n+Math.imul(I,oe)|0,i=(i=i+Math.imul(I,se)|0)+Math.imul(R,oe)|0,o=o+Math.imul(R,se)|0,n=n+Math.imul(P,ue)|0,i=(i=i+Math.imul(P,ce)|0)+Math.imul(j,ue)|0,o=o+Math.imul(j,ce)|0,n=n+Math.imul(O,he)|0,i=(i=i+Math.imul(O,le)|0)+Math.imul(x,he)|0,o=o+Math.imul(x,le)|0;var Pe=(c+(n=n+Math.imul(M,pe)|0)|0)+((8191&(i=(i=i+Math.imul(M,me)|0)+Math.imul(A,pe)|0))<<13)|0;c=((o=o+Math.imul(A,me)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(D,re),i=(i=Math.imul(D,ne))+Math.imul(F,re)|0,o=Math.imul(F,ne),n=n+Math.imul(B,oe)|0,i=(i=i+Math.imul(B,se)|0)+Math.imul(N,oe)|0,o=o+Math.imul(N,se)|0,n=n+Math.imul(I,ue)|0,i=(i=i+Math.imul(I,ce)|0)+Math.imul(R,ue)|0,o=o+Math.imul(R,ce)|0,n=n+Math.imul(P,he)|0,i=(i=i+Math.imul(P,le)|0)+Math.imul(j,he)|0,o=o+Math.imul(j,le)|0;var je=(c+(n=n+Math.imul(O,pe)|0)|0)+((8191&(i=(i=i+Math.imul(O,me)|0)+Math.imul(x,pe)|0))<<13)|0;c=((o=o+Math.imul(x,me)|0)+(i>>>13)|0)+(je>>>26)|0,je&=67108863,n=Math.imul(D,oe),i=(i=Math.imul(D,se))+Math.imul(F,oe)|0,o=Math.imul(F,se),n=n+Math.imul(B,ue)|0,i=(i=i+Math.imul(B,ce)|0)+Math.imul(N,ue)|0,o=o+Math.imul(N,ce)|0,n=n+Math.imul(I,he)|0,i=(i=i+Math.imul(I,le)|0)+Math.imul(R,he)|0,o=o+Math.imul(R,le)|0;var ke=(c+(n=n+Math.imul(P,pe)|0)|0)+((8191&(i=(i=i+Math.imul(P,me)|0)+Math.imul(j,pe)|0))<<13)|0;c=((o=o+Math.imul(j,me)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(D,ue),i=(i=Math.imul(D,ce))+Math.imul(F,ue)|0,o=Math.imul(F,ce),n=n+Math.imul(B,he)|0,i=(i=i+Math.imul(B,le)|0)+Math.imul(N,he)|0,o=o+Math.imul(N,le)|0;var Ie=(c+(n=n+Math.imul(I,pe)|0)|0)+((8191&(i=(i=i+Math.imul(I,me)|0)+Math.imul(R,pe)|0))<<13)|0;c=((o=o+Math.imul(R,me)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(D,he),i=(i=Math.imul(D,le))+Math.imul(F,he)|0,o=Math.imul(F,le);var Re=(c+(n=n+Math.imul(B,pe)|0)|0)+((8191&(i=(i=i+Math.imul(B,me)|0)+Math.imul(N,pe)|0))<<13)|0;c=((o=o+Math.imul(N,me)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863;var Ce=(c+(n=Math.imul(D,pe))|0)+((8191&(i=(i=Math.imul(D,me))+Math.imul(F,pe)|0))<<13)|0;return c=((o=Math.imul(F,me))+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,u[0]=ge,u[1]=ye,u[2]=be,u[3]=ve,u[4]=we,u[5]=_e,u[6]=Se,u[7]=Me,u[8]=Ae,u[9]=Ee,u[10]=Oe,u[11]=xe,u[12]=Te,u[13]=Pe,u[14]=je,u[15]=ke,u[16]=Ie,u[17]=Re,u[18]=Ce,0!==c&&(u[19]=c,r.length++),r};function m(e,t,r){return(new g).mulp(e,t,r)}function g(e,t){this.x=e,this.y=t}Math.imul||(p=d),o.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?p(this,e,t):r<63?d(this,e,t):r<1024?function(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,o=0;o<r.length-1;o++){var s=i;i=0;for(var a=67108863&n,u=Math.min(o,t.length-1),c=Math.max(0,o-e.length+1);c<=u;c++){var f=o-c,h=(0|e.words[f])*(0|t.words[c]),l=67108863&h;a=67108863&(l=l+a|0),i+=(s=(s=s+(h/67108864|0)|0)+(l>>>26)|0)>>>26,s&=67108863}r.words[o]=a,n=s,s=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,e,t):m(this,e,t)},g.prototype.makeRBT=function(e){for(var t=new Array(e),r=o.prototype._countBits(e)-1,n=0;n<e;n++)t[n]=this.revBin(n,r,e);return t},g.prototype.revBin=function(e,t,r){if(0===e||e===r-1)return e;for(var n=0,i=0;i<t;i++)n|=(1&e)<<t-i-1,e>>=1;return n},g.prototype.permute=function(e,t,r,n,i,o){for(var s=0;s<o;s++)n[s]=t[e[s]],i[s]=r[e[s]]},g.prototype.transform=function(e,t,r,n,i,o){this.permute(o,e,t,r,n,i);for(var s=1;s<i;s<<=1)for(var a=s<<1,u=Math.cos(2*Math.PI/a),c=Math.sin(2*Math.PI/a),f=0;f<i;f+=a)for(var h=u,l=c,d=0;d<s;d++){var p=r[f+d],m=n[f+d],g=r[f+d+s],y=n[f+d+s],b=h*g-l*y;y=h*y+l*g,g=b,r[f+d]=p+g,n[f+d]=m+y,r[f+d+s]=p-g,n[f+d+s]=m-y,d!==a&&(b=u*h-c*l,l=u*l+c*h,h=b)}},g.prototype.guessLen13b=function(e,t){var r=1|Math.max(t,e),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},g.prototype.conjugate=function(e,t,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=e[n];e[n]=e[r-n-1],e[r-n-1]=i,i=t[n],t[n]=-t[r-n-1],t[r-n-1]=-i}},g.prototype.normalize13b=function(e,t){for(var r=0,n=0;n<t/2;n++){var i=8192*Math.round(e[2*n+1]/t)+Math.round(e[2*n]/t)+r;e[n]=67108863&i,r=i<67108864?0:i/67108864|0}return e},g.prototype.convert13b=function(e,t,r,i){for(var o=0,s=0;s<t;s++)o+=0|e[s],r[2*s]=8191&o,o>>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*t;s<i;++s)r[s]=0;n(0===o),n(0==(-8192&o))},g.prototype.stub=function(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=0;return t},g.prototype.mulp=function(e,t,r){var n=2*this.guessLen13b(e.length,t.length),i=this.makeRBT(n),o=this.stub(n),s=new Array(n),a=new Array(n),u=new Array(n),c=new Array(n),f=new Array(n),h=new Array(n),l=r.words;l.length=n,this.convert13b(e.words,e.length,s,n),this.convert13b(t.words,t.length,c,n),this.transform(s,o,a,u,n,i),this.transform(c,o,f,h,n,i);for(var d=0;d<n;d++){var p=a[d]*f[d]-u[d]*h[d];u[d]=a[d]*h[d]+u[d]*f[d],a[d]=p}return this.conjugate(a,u,n),this.transform(a,u,l,o,n,i),this.conjugate(l,o,n),this.normalize13b(l,n),r.negative=e.negative^t.negative,r.length=e.length+t.length,r.strip()},o.prototype.mul=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},o.prototype.mulf=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),m(this,e,t)},o.prototype.imul=function(e){return this.clone().mulTo(e,this)},o.prototype.imuln=function(e){n("number"==typeof e),n(e<67108864);for(var t=0,r=0;r<this.length;r++){var i=(0|this.words[r])*e,o=(67108863&i)+(67108863&t);t>>=26,t+=i/67108864|0,t+=o>>>26,this.words[r]=67108863&o}return 0!==t&&(this.words[r]=t,this.length++),this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r<t.length;r++){var n=r/26|0,i=r%26;t[r]=(e.words[n]&1<<i)>>>i}return t}(e);if(0===t.length)return new o(1);for(var r=this,n=0;n<t.length&&0===t[n];n++,r=r.sqr());if(++n<t.length)for(var i=r.sqr();n<t.length;n++,i=i.sqr())0!==t[n]&&(r=r.mul(i));return r},o.prototype.iushln=function(e){n("number"==typeof e&&e>=0);var t,r=e%26,i=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(t=0;t<this.length;t++){var a=this.words[t]&o,u=(0|this.words[t])-a<<r;this.words[t]=u|s,s=a>>>26-r}s&&(this.words[t]=s,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this.strip()},o.prototype.ishln=function(e){return n(0===this.negative),this.iushln(e)},o.prototype.iushrn=function(e,t,r){var i;n("number"==typeof e&&e>=0),i=t?(t-t%26)/26:0;var o=e%26,s=Math.min((e-o)/26,this.length),a=67108863^67108863>>>o<<o,u=r;if(i-=s,i=Math.max(0,i),u){for(var c=0;c<s;c++)u.words[c]=this.words[c];u.length=s}if(0===s);else if(this.length>s)for(this.length-=s,c=0;c<this.length;c++)this.words[c]=this.words[c+s];else this.words[0]=0,this.length=1;var f=0;for(c=this.length-1;c>=0&&(0!==f||c>=i);c--){var h=0|this.words[c];this.words[c]=f<<26-o|h>>>o,f=h&a}return u&&0!==f&&(u.words[u.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<<t;return!(this.length<=r||!(this.words[r]&i))},o.prototype.imaskn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this.strip()},o.prototype.maskn=function(e){return this.clone().imaskn(e)},o.prototype.iaddn=function(e){return n("number"==typeof e),n(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},o.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},o.prototype.addn=function(e){return this.clone().iaddn(e)},o.prototype.subn=function(e){return this.clone().isubn(e)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(e,t,r){var i,o,s=e.length+r;this._expand(s);var a=0;for(i=0;i<e.length;i++){o=(0|this.words[i+r])+a;var u=(0|e.words[i])*t;a=((o-=67108863&u)>>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i<this.length-r;i++)a=(o=(0|this.words[i+r])+a)>>26,this.words[i+r]=67108863&o;if(0===a)return this.strip();for(n(-1===a),a=0,i=0;i<this.length;i++)a=(o=-(0|this.words[i])+a)>>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),i=e,s=0|i.words[i.length-1];0!=(r=26-this._countBits(s))&&(i=i.ushln(r),n.iushln(r),s=0|i.words[i.length-1]);var a,u=n.length-i.length;if("mod"!==t){(a=new o(null)).length=u+1,a.words=new Array(a.length);for(var c=0;c<a.length;c++)a.words[c]=0}var f=n.clone()._ishlnsubmul(i,1,u);0===f.negative&&(n=f,a&&(a.words[u]=1));for(var h=u-1;h>=0;h--){var l=67108864*(0|n.words[i.length+h])+(0|n.words[i.length+h-1]);for(l=Math.min(l/s|0,67108863),n._ishlnsubmul(i,l,h);0!==n.negative;)l--,n.negative=0,n._ishlnsubmul(i,1,h),n.isZero()||(n.negative^=1);a&&(a.words[h]=l)}return a&&a.strip(),n.strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:a||null,mod:n}},o.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(i=a.div.neg()),"div"!==t&&(s=a.mod.neg(),r&&0!==s.negative&&s.iadd(e)),{div:i,mod:s}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(i=a.div.neg()),{div:i,mod:a.mod}):0!=(this.negative&e.negative)?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(s=a.mod.neg(),r&&0!==s.negative&&s.isub(e)),{div:a.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modn(e.words[0]))}:this._wordDiv(e,t);var i,s,a},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,r=0,i=this.length-1;i>=0;i--)r=(t*r+(0|this.words[i]))%e;return r},o.prototype.idivn=function(e){n(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*t;this.words[r]=i/e|0,t=i%e}return this.strip()},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),s=new o(0),a=new o(0),u=new o(1),c=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++c;for(var f=r.clone(),h=t.clone();!t.isZero();){for(var l=0,d=1;0==(t.words[0]&d)&&l<26;++l,d<<=1);if(l>0)for(t.iushrn(l);l-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(f),s.isub(h)),i.iushrn(1),s.iushrn(1);for(var p=0,m=1;0==(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(a.isOdd()||u.isOdd())&&(a.iadd(f),u.isub(h)),a.iushrn(1),u.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(a),s.isub(u)):(r.isub(t),a.isub(i),u.isub(s))}return{a,b:u,gcd:r.iushln(c)}},o.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,s=new o(1),a=new o(0),u=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,f=1;0==(t.words[0]&f)&&c<26;++c,f<<=1);if(c>0)for(t.iushrn(c);c-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var h=0,l=1;0==(r.words[0]&l)&&h<26;++h,l<<=1);if(h>0)for(r.iushrn(h);h-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);t.cmp(r)>=0?(t.isub(r),s.isub(a)):(r.isub(t),a.isub(s))}return(i=0===t.cmpn(1)?s:a).cmpn(0)<0&&i.iadd(e),i},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var o=t;t=r,r=o}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<<t;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var o=i,s=r;0!==o&&s<this.length;s++){var a=0|this.words[s];o=(a+=o)>>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},o.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},o.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){n<i?t=-1:n>i&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new M(e)},o.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var y={k256:null,p224:null,p192:null,p25519:null};function b(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function v(){b.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){b.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){b.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function S(){b.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function M(e){if("string"==typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function A(e){M.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}b.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},b.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},b.prototype.split=function(e,t){e.iushrn(this.n,0,t)},b.prototype.imulK=function(e){return e.imul(this.k)},i(v,b),v.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),i=0;i<n;i++)t.words[i]=e.words[i];if(t.length=n,e.length<=9)return e.words[0]=0,void(e.length=1);var o=e.words[9];for(t.words[t.length++]=o&r,i=10;i<e.length;i++){var s=0|e.words[i];e.words[i-10]=(s&r)<<4|o>>>22,o=s}o>>>=22,e.words[i-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},v.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r<e.length;r++){var n=0|e.words[r];t+=977*n,e.words[r]=67108863&t,t=64*n+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},i(w,b),i(_,b),i(S,b),S.prototype.imulK=function(e){for(var t=0,r=0;r<e.length;r++){var n=19*(0|e.words[r])+t,i=67108863&n;n>>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(y[e])return y[e];var t;if("k256"===e)t=new v;else if("p224"===e)t=new w;else if("p192"===e)t=new _;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new S}return y[e]=t,t},M.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},M.prototype._verify2=function(e,t){n(0==(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},M.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},M.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},M.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},M.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},M.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},M.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},M.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},M.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},M.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},M.prototype.isqr=function(e){return this.imul(e,e.clone())},M.prototype.sqr=function(e){return this.mul(e,e)},M.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new o(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);n(!i.isZero());var a=new o(1).toRed(this),u=a.redNeg(),c=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new o(2*f*f).toRed(this);0!==this.pow(f,c).cmp(u);)f.redIAdd(u);for(var h=this.pow(f,i),l=this.pow(e,i.addn(1).iushrn(1)),d=this.pow(e,i),p=s;0!==d.cmp(a);){for(var m=d,g=0;0!==m.cmp(a);g++)m=m.redSqr();n(g<p);var y=this.pow(h,new o(1).iushln(p-g-1));l=l.redMul(y),h=y.redSqr(),d=d.redMul(h),p=g}return l},M.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},M.prototype.pow=function(e,t){if(t.isZero())return new o(1).toRed(this);if(0===t.cmpn(1))return e.clone();var r=new Array(16);r[0]=new o(1).toRed(this),r[1]=e;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],e);var i=r[0],s=0,a=0,u=t.bitLength()%26;for(0===u&&(u=26),n=t.length-1;n>=0;n--){for(var c=t.words[n],f=u-1;f>=0;f--){var h=c>>f&1;i!==r[0]&&(i=this.sqr(i)),0!==h||0!==s?(s<<=1,s|=h,(4==++a||0===n&&0===f)&&(i=this.mul(i,r[s]),a=0,s=0)):a=0}u=26}return i},M.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},M.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new A(e)},i(A,M),A.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},A.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},A.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},A.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},A.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=r.nmd(e),this)},9931:(e,t,r)=>{var n;function i(e){this.rand=e}if(e.exports=function(e){return n||(n=new i(null)),n.generate(e)},e.exports.Rand=i,i.prototype.generate=function(e){return this._rand(e)},i.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),r=0;r<t.length;r++)t[r]=this.rand.getByte();return t},"object"==typeof self)self.crypto&&self.crypto.getRandomValues?i.prototype._rand=function(e){var t=new Uint8Array(e);return self.crypto.getRandomValues(t),t}:self.msCrypto&&self.msCrypto.getRandomValues?i.prototype._rand=function(e){var t=new Uint8Array(e);return self.msCrypto.getRandomValues(t),t}:"object"==typeof window&&(i.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var o=r(9214);if("function"!=typeof o.randomBytes)throw new Error("Not supported");i.prototype._rand=function(e){return o.randomBytes(e)}}catch(e){}},4497:(e,t,r)=>{var n=r(9509).Buffer;function i(e){n.isBuffer(e)||(e=n.from(e));for(var t=e.length/4|0,r=new Array(t),i=0;i<t;i++)r[i]=e.readUInt32BE(4*i);return r}function o(e){for(;0<e.length;e++)e[0]=0}function s(e,t,r,n,i){for(var o,s,a,u,c=r[0],f=r[1],h=r[2],l=r[3],d=e[0]^t[0],p=e[1]^t[1],m=e[2]^t[2],g=e[3]^t[3],y=4,b=1;b<i;b++)o=c[d>>>24]^f[p>>>16&255]^h[m>>>8&255]^l[255&g]^t[y++],s=c[p>>>24]^f[m>>>16&255]^h[g>>>8&255]^l[255&d]^t[y++],a=c[m>>>24]^f[g>>>16&255]^h[d>>>8&255]^l[255&p]^t[y++],u=c[g>>>24]^f[d>>>16&255]^h[p>>>8&255]^l[255&m]^t[y++],d=o,p=s,m=a,g=u;return o=(n[d>>>24]<<24|n[p>>>16&255]<<16|n[m>>>8&255]<<8|n[255&g])^t[y++],s=(n[p>>>24]<<24|n[m>>>16&255]<<16|n[g>>>8&255]<<8|n[255&d])^t[y++],a=(n[m>>>24]<<24|n[g>>>16&255]<<16|n[d>>>8&255]<<8|n[255&p])^t[y++],u=(n[g>>>24]<<24|n[d>>>16&255]<<16|n[p>>>8&255]<<8|n[255&m])^t[y++],[o>>>=0,s>>>=0,a>>>=0,u>>>=0]}var a=[0,1,2,4,8,16,32,64,128,27,54],u=function(){for(var e=new Array(256),t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;for(var r=[],n=[],i=[[],[],[],[]],o=[[],[],[],[]],s=0,a=0,u=0;u<256;++u){var c=a^a<<1^a<<2^a<<3^a<<4;c=c>>>8^255&c^99,r[s]=c,n[c]=s;var f=e[s],h=e[f],l=e[h],d=257*e[c]^16843008*c;i[0][s]=d<<24|d>>>8,i[1][s]=d<<16|d>>>16,i[2][s]=d<<8|d>>>24,i[3][s]=d,d=16843009*l^65537*h^257*f^16843008*s,o[0][c]=d<<24|d>>>8,o[1][c]=d<<16|d>>>16,o[2][c]=d<<8|d>>>24,o[3][c]=d,0===s?s=a=1:(s=f^e[e[e[l^f]]],a^=e[e[a]])}return{SBOX:r,INV_SBOX:n,SUB_MIX:i,INV_SUB_MIX:o}}();function c(e){this._key=i(e),this._reset()}c.blockSize=16,c.keySize=32,c.prototype.blockSize=c.blockSize,c.prototype.keySize=c.keySize,c.prototype._reset=function(){for(var e=this._key,t=e.length,r=t+6,n=4*(r+1),i=[],o=0;o<t;o++)i[o]=e[o];for(o=t;o<n;o++){var s=i[o-1];o%t==0?(s=s<<8|s>>>24,s=u.SBOX[s>>>24]<<24|u.SBOX[s>>>16&255]<<16|u.SBOX[s>>>8&255]<<8|u.SBOX[255&s],s^=a[o/t|0]<<24):t>6&&o%t==4&&(s=u.SBOX[s>>>24]<<24|u.SBOX[s>>>16&255]<<16|u.SBOX[s>>>8&255]<<8|u.SBOX[255&s]),i[o]=i[o-t]^s}for(var c=[],f=0;f<n;f++){var h=n-f,l=i[h-(f%4?0:4)];c[f]=f<4||h<=4?l:u.INV_SUB_MIX[0][u.SBOX[l>>>24]]^u.INV_SUB_MIX[1][u.SBOX[l>>>16&255]]^u.INV_SUB_MIX[2][u.SBOX[l>>>8&255]]^u.INV_SUB_MIX[3][u.SBOX[255&l]]}this._nRounds=r,this._keySchedule=i,this._invKeySchedule=c},c.prototype.encryptBlockRaw=function(e){return s(e=i(e),this._keySchedule,u.SUB_MIX,u.SBOX,this._nRounds)},c.prototype.encryptBlock=function(e){var t=this.encryptBlockRaw(e),r=n.allocUnsafe(16);return r.writeUInt32BE(t[0],0),r.writeUInt32BE(t[1],4),r.writeUInt32BE(t[2],8),r.writeUInt32BE(t[3],12),r},c.prototype.decryptBlock=function(e){var t=(e=i(e))[1];e[1]=e[3],e[3]=t;var r=s(e,this._invKeySchedule,u.INV_SUB_MIX,u.INV_SBOX,this._nRounds),o=n.allocUnsafe(16);return o.writeUInt32BE(r[0],0),o.writeUInt32BE(r[3],4),o.writeUInt32BE(r[2],8),o.writeUInt32BE(r[1],12),o},c.prototype.scrub=function(){o(this._keySchedule),o(this._invKeySchedule),o(this._key)},e.exports.AES=c},2422:(e,t,r)=>{var n=r(4497),i=r(9509).Buffer,o=r(1027),s=r(5717),a=r(3288),u=r(7295),c=r(685);function f(e,t,r,s){o.call(this);var u=i.alloc(4,0);this._cipher=new n.AES(t);var f=this._cipher.encryptBlock(u);this._ghash=new a(f),r=function(e,t,r){if(12===t.length)return e._finID=i.concat([t,i.from([0,0,0,1])]),i.concat([t,i.from([0,0,0,2])]);var n=new a(r),o=t.length,s=o%16;n.update(t),s&&(s=16-s,n.update(i.alloc(s,0))),n.update(i.alloc(8,0));var u=8*o,f=i.alloc(8);f.writeUIntBE(u,0,8),n.update(f),e._finID=n.state;var h=i.from(e._finID);return c(h),h}(this,r,f),this._prev=i.from(r),this._cache=i.allocUnsafe(0),this._secCache=i.allocUnsafe(0),this._decrypt=s,this._alen=0,this._len=0,this._mode=e,this._authTag=null,this._called=!1}s(f,o),f.prototype._update=function(e){if(!this._called&&this._alen){var t=16-this._alen%16;t<16&&(t=i.alloc(t,0),this._ghash.update(t))}this._called=!0;var r=this._mode.encrypt(this,e);return this._decrypt?this._ghash.update(e):this._ghash.update(r),this._len+=e.length,r},f.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var e=u(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(e,t){var r=0;e.length!==t.length&&r++;for(var n=Math.min(e.length,t.length),i=0;i<n;++i)r+=e[i]^t[i];return r}(e,this._authTag))throw new Error("Unsupported state or unable to authenticate data");this._authTag=e,this._cipher.scrub()},f.prototype.getAuthTag=function(){if(this._decrypt||!i.isBuffer(this._authTag))throw new Error("Attempting to get auth tag in unsupported state");return this._authTag},f.prototype.setAuthTag=function(e){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=e},f.prototype.setAAD=function(e){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(e),this._alen+=e.length},e.exports=f},4696:(e,t,r)=>{var n=r(1494),i=r(6193),o=r(4946);t.createCipher=t.Cipher=n.createCipher,t.createCipheriv=t.Cipheriv=n.createCipheriv,t.createDecipher=t.Decipher=i.createDecipher,t.createDecipheriv=t.Decipheriv=i.createDecipheriv,t.listCiphers=t.getCiphers=function(){return Object.keys(o)}},6193:(e,t,r)=>{var n=r(2422),i=r(9509).Buffer,o=r(45),s=r(5969),a=r(1027),u=r(4497),c=r(3048);function f(e,t,r){a.call(this),this._cache=new h,this._last=void 0,this._cipher=new u.AES(t),this._prev=i.from(r),this._mode=e,this._autopadding=!0}function h(){this.cache=i.allocUnsafe(0)}function l(e,t,r){var a=o[e.toLowerCase()];if(!a)throw new TypeError("invalid suite type");if("string"==typeof r&&(r=i.from(r)),"GCM"!==a.mode&&r.length!==a.iv)throw new TypeError("invalid iv length "+r.length);if("string"==typeof t&&(t=i.from(t)),t.length!==a.key/8)throw new TypeError("invalid key length "+t.length);return"stream"===a.type?new s(a.module,t,r,!0):"auth"===a.type?new n(a.module,t,r,!0):new f(a.module,t,r)}r(5717)(f,a),f.prototype._update=function(e){var t,r;this._cache.add(e);for(var n=[];t=this._cache.get(this._autopadding);)r=this._mode.decrypt(this,t),n.push(r);return i.concat(n)},f.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return function(e){var t=e[15];if(t<1||t>16)throw new Error("unable to decrypt data");for(var r=-1;++r<t;)if(e[r+(16-t)]!==t)throw new Error("unable to decrypt data");if(16!==t)return e.slice(0,16-t)}(this._mode.decrypt(this,e));if(e)throw new Error("data not multiple of block length")},f.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},h.prototype.add=function(e){this.cache=i.concat([this.cache,e])},h.prototype.get=function(e){var t;if(e){if(this.cache.length>16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t}else if(this.cache.length>=16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t;return null},h.prototype.flush=function(){if(this.cache.length)return this.cache},t.createDecipher=function(e,t){var r=o[e.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var n=c(t,!1,r.key,r.iv);return l(e,n.key,n.iv)},t.createDecipheriv=l},1494:(e,t,r)=>{var n=r(45),i=r(2422),o=r(9509).Buffer,s=r(5969),a=r(1027),u=r(4497),c=r(3048);function f(e,t,r){a.call(this),this._cache=new l,this._cipher=new u.AES(t),this._prev=o.from(r),this._mode=e,this._autopadding=!0}r(5717)(f,a),f.prototype._update=function(e){var t,r;this._cache.add(e);for(var n=[];t=this._cache.get();)r=this._mode.encrypt(this,t),n.push(r);return o.concat(n)};var h=o.alloc(16,16);function l(){this.cache=o.allocUnsafe(0)}function d(e,t,r){var a=n[e.toLowerCase()];if(!a)throw new TypeError("invalid suite type");if("string"==typeof t&&(t=o.from(t)),t.length!==a.key/8)throw new TypeError("invalid key length "+t.length);if("string"==typeof r&&(r=o.from(r)),"GCM"!==a.mode&&r.length!==a.iv)throw new TypeError("invalid iv length "+r.length);return"stream"===a.type?new s(a.module,t,r):"auth"===a.type?new i(a.module,t,r):new f(a.module,t,r)}f.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return e=this._mode.encrypt(this,e),this._cipher.scrub(),e;if(!e.equals(h))throw this._cipher.scrub(),new Error("data not multiple of block length")},f.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},l.prototype.add=function(e){this.cache=o.concat([this.cache,e])},l.prototype.get=function(){if(this.cache.length>15){var e=this.cache.slice(0,16);return this.cache=this.cache.slice(16),e}return null},l.prototype.flush=function(){for(var e=16-this.cache.length,t=o.allocUnsafe(e),r=-1;++r<e;)t.writeUInt8(e,r);return o.concat([this.cache,t])},t.createCipheriv=d,t.createCipher=function(e,t){var r=n[e.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var i=c(t,!1,r.key,r.iv);return d(e,i.key,i.iv)}},3288:(e,t,r)=>{var n=r(9509).Buffer,i=n.alloc(16,0);function o(e){var t=n.allocUnsafe(16);return t.writeUInt32BE(e[0]>>>0,0),t.writeUInt32BE(e[1]>>>0,4),t.writeUInt32BE(e[2]>>>0,8),t.writeUInt32BE(e[3]>>>0,12),t}function s(e){this.h=e,this.state=n.alloc(16,0),this.cache=n.allocUnsafe(0)}s.prototype.ghash=function(e){for(var t=-1;++t<e.length;)this.state[t]^=e[t];this._multiply()},s.prototype._multiply=function(){for(var e,t,r,n=[(e=this.h).readUInt32BE(0),e.readUInt32BE(4),e.readUInt32BE(8),e.readUInt32BE(12)],i=[0,0,0,0],s=-1;++s<128;){for(0!=(this.state[~~(s/8)]&1<<7-s%8)&&(i[0]^=n[0],i[1]^=n[1],i[2]^=n[2],i[3]^=n[3]),r=0!=(1&n[3]),t=3;t>0;t--)n[t]=n[t]>>>1|(1&n[t-1])<<31;n[0]=n[0]>>>1,r&&(n[0]=n[0]^225<<24)}this.state=o(i)},s.prototype.update=function(e){var t;for(this.cache=n.concat([this.cache,e]);this.cache.length>=16;)t=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(t)},s.prototype.final=function(e,t){return this.cache.length&&this.ghash(n.concat([this.cache,i],16)),this.ghash(o([0,e,0,t])),this.state},e.exports=s},685:e=>{e.exports=function(e){for(var t,r=e.length;r--;){if(255!==(t=e.readUInt8(r))){t++,e.writeUInt8(t,r);break}e.writeUInt8(0,r)}}},5292:(e,t,r)=>{var n=r(7295);t.encrypt=function(e,t){var r=n(t,e._prev);return e._prev=e._cipher.encryptBlock(r),e._prev},t.decrypt=function(e,t){var r=e._prev;e._prev=t;var i=e._cipher.decryptBlock(t);return n(i,r)}},6311:(e,t,r)=>{var n=r(9509).Buffer,i=r(7295);function o(e,t,r){var o=t.length,s=i(t,e._cache);return e._cache=e._cache.slice(o),e._prev=n.concat([e._prev,r?t:s]),s}t.encrypt=function(e,t,r){for(var i,s=n.allocUnsafe(0);t.length;){if(0===e._cache.length&&(e._cache=e._cipher.encryptBlock(e._prev),e._prev=n.allocUnsafe(0)),!(e._cache.length<=t.length)){s=n.concat([s,o(e,t,r)]);break}i=e._cache.length,s=n.concat([s,o(e,t.slice(0,i),r)]),t=t.slice(i)}return s}},1510:(e,t,r)=>{var n=r(9509).Buffer;function i(e,t,r){for(var n,i,s=-1,a=0;++s<8;)n=t&1<<7-s?128:0,a+=(128&(i=e._cipher.encryptBlock(e._prev)[0]^n))>>s%8,e._prev=o(e._prev,r?n:i);return a}function o(e,t){var r=e.length,i=-1,o=n.allocUnsafe(e.length);for(e=n.concat([e,n.from([t])]);++i<r;)o[i]=e[i]<<1|e[i+1]>>7;return o}t.encrypt=function(e,t,r){for(var o=t.length,s=n.allocUnsafe(o),a=-1;++a<o;)s[a]=i(e,t[a],r);return s}},1964:(e,t,r)=>{var n=r(9509).Buffer;function i(e,t,r){var i=e._cipher.encryptBlock(e._prev)[0]^t;return e._prev=n.concat([e._prev.slice(1),n.from([r?t:i])]),i}t.encrypt=function(e,t,r){for(var o=t.length,s=n.allocUnsafe(o),a=-1;++a<o;)s[a]=i(e,t[a],r);return s}},6009:(e,t,r)=>{var n=r(7295),i=r(9509).Buffer,o=r(685);function s(e){var t=e._cipher.encryptBlockRaw(e._prev);return o(e._prev),t}t.encrypt=function(e,t){var r=Math.ceil(t.length/16),o=e._cache.length;e._cache=i.concat([e._cache,i.allocUnsafe(16*r)]);for(var a=0;a<r;a++){var u=s(e),c=o+16*a;e._cache.writeUInt32BE(u[0],c+0),e._cache.writeUInt32BE(u[1],c+4),e._cache.writeUInt32BE(u[2],c+8),e._cache.writeUInt32BE(u[3],c+12)}var f=e._cache.slice(0,t.length);return e._cache=e._cache.slice(t.length),n(t,f)}},1084:(e,t)=>{t.encrypt=function(e,t){return e._cipher.encryptBlock(t)},t.decrypt=function(e,t){return e._cipher.decryptBlock(t)}},45:(e,t,r)=>{var n={ECB:r(1084),CBC:r(5292),CFB:r(6311),CFB8:r(1964),CFB1:r(1510),OFB:r(8861),CTR:r(6009),GCM:r(6009)},i=r(4946);for(var o in i)i[o].module=n[i[o].mode];e.exports=i},8861:(e,t,r)=>{var n=r(8764).Buffer,i=r(7295);function o(e){return e._prev=e._cipher.encryptBlock(e._prev),e._prev}t.encrypt=function(e,t){for(;e._cache.length<t.length;)e._cache=n.concat([e._cache,o(e)]);var r=e._cache.slice(0,t.length);return e._cache=e._cache.slice(t.length),i(t,r)}},5969:(e,t,r)=>{var n=r(4497),i=r(9509).Buffer,o=r(1027);function s(e,t,r,s){o.call(this),this._cipher=new n.AES(t),this._prev=i.from(r),this._cache=i.allocUnsafe(0),this._secCache=i.allocUnsafe(0),this._decrypt=s,this._mode=e}r(5717)(s,o),s.prototype._update=function(e){return this._mode.encrypt(this,e,this._decrypt)},s.prototype._final=function(){this._cipher.scrub()},e.exports=s},3614:(e,t,r)=>{var n=r(7667),i=r(4696),o=r(45),s=r(9715),a=r(3048);function u(e,t,r){if(e=e.toLowerCase(),o[e])return i.createCipheriv(e,t,r);if(s[e])return new n({key:t,iv:r,mode:e});throw new TypeError("invalid suite type")}function c(e,t,r){if(e=e.toLowerCase(),o[e])return i.createDecipheriv(e,t,r);if(s[e])return new n({key:t,iv:r,mode:e,decrypt:!0});throw new TypeError("invalid suite type")}t.createCipher=t.Cipher=function(e,t){var r,n;if(e=e.toLowerCase(),o[e])r=o[e].key,n=o[e].iv;else{if(!s[e])throw new TypeError("invalid suite type");r=8*s[e].key,n=s[e].iv}var i=a(t,!1,r,n);return u(e,i.key,i.iv)},t.createCipheriv=t.Cipheriv=u,t.createDecipher=t.Decipher=function(e,t){var r,n;if(e=e.toLowerCase(),o[e])r=o[e].key,n=o[e].iv;else{if(!s[e])throw new TypeError("invalid suite type");r=8*s[e].key,n=s[e].iv}var i=a(t,!1,r,n);return c(e,i.key,i.iv)},t.createDecipheriv=t.Decipheriv=c,t.listCiphers=t.getCiphers=function(){return Object.keys(s).concat(i.getCiphers())}},7667:(e,t,r)=>{var n=r(1027),i=r(5251),o=r(5717),s=r(9509).Buffer,a={"des-ede3-cbc":i.CBC.instantiate(i.EDE),"des-ede3":i.EDE,"des-ede-cbc":i.CBC.instantiate(i.EDE),"des-ede":i.EDE,"des-cbc":i.CBC.instantiate(i.DES),"des-ecb":i.DES};function u(e){n.call(this);var t,r=e.mode.toLowerCase(),i=a[r];t=e.decrypt?"decrypt":"encrypt";var o=e.key;s.isBuffer(o)||(o=s.from(o)),"des-ede"!==r&&"des-ede-cbc"!==r||(o=s.concat([o,o.slice(0,8)]));var u=e.iv;s.isBuffer(u)||(u=s.from(u)),this._des=i.create({key:o,iv:u,type:t})}a.des=a["des-cbc"],a.des3=a["des-ede3-cbc"],e.exports=u,o(u,n),u.prototype._update=function(e){return s.from(this._des.update(e))},u.prototype._final=function(){return s.from(this._des.final())}},9715:(e,t)=>{t["des-ecb"]={key:8,iv:0},t["des-cbc"]=t.des={key:8,iv:8},t["des-ede3-cbc"]=t.des3={key:24,iv:8},t["des-ede3"]={key:24,iv:0},t["des-ede-cbc"]={key:16,iv:8},t["des-ede"]={key:16,iv:0}},3663:(e,t,r)=>{var n=r(8764).Buffer,i=r(3982),o=r(1798);function s(e){var t,r=e.modulus.byteLength();do{t=new i(o(r))}while(t.cmp(e.modulus)>=0||!t.umod(e.prime1)||!t.umod(e.prime2));return t}function a(e,t){var r=function(e){var t=s(e);return{blinder:t.toRed(i.mont(e.modulus)).redPow(new i(e.publicExponent)).fromRed(),unblinder:t.invm(e.modulus)}}(t),o=t.modulus.byteLength(),a=new i(e).mul(r.blinder).umod(t.modulus),u=a.toRed(i.mont(t.prime1)),c=a.toRed(i.mont(t.prime2)),f=t.coefficient,h=t.prime1,l=t.prime2,d=u.redPow(t.exponent1).fromRed(),p=c.redPow(t.exponent2).fromRed(),m=d.isub(p).imul(f).umod(h).imul(l);return p.iadd(m).imul(r.unblinder).umod(t.modulus).toArrayLike(n,"be",o)}a.getr=s,e.exports=a},3982:function(e,t,r){!function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function o(e,t,r){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var s;"object"==typeof e?e.exports=o:t.BN=o,o.BN=o,o.wordSize=26;try{s="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(1922).Buffer}catch(e){}function a(e,t){var r=e.charCodeAt(t);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void n(!1,"Invalid character in "+e)}function u(e,t,r){var n=a(e,r);return r-1>=t&&(n|=a(e,r-1)<<4),n}function c(e,t,r,i){for(var o=0,s=0,a=Math.min(e.length,r),u=t;u<a;u++){var c=e.charCodeAt(u)-48;o*=i,s=c>=49?c-49+10:c>=17?c-17+10:c,n(c>=0&&s<i,"Invalid character"),o+=s}return o}function f(e,t){e.words=t.words,e.length=t.length,e.negative=t.negative,e.red=t.red}if(o.isBN=function(e){return e instanceof o||null!==e&&"object"==typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<e.length&&(16===t?this._parseHex(e,i,r):(this._parseBase(e,t,i),"le"===r&&this._initArray(this.toArray(),t,r)))},o.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},o.prototype._initArray=function(e,t,r){if(n("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var o,s,a=0;if("be"===r)for(i=e.length-1,o=0;i>=0;i-=3)s=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===r)for(i=0,o=0;i<e.length;i+=3)s=e[i]|e[i+1]<<8|e[i+2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this._strip()},o.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var i,o=0,s=0;if("be"===r)for(n=e.length-1;n>=t;n-=2)i=u(e,t,n)<<o,this.words[s]|=67108863&i,o>=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;else for(n=(e.length-t)%2==0?t+1:t;n<e.length;n+=2)i=u(e,t,n)<<o,this.words[s]|=67108863&i,o>=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;this._strip()},o.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var o=e.length-r,s=o%n,a=Math.min(o,o-s)+r,u=0,f=r;f<a;f+=n)u=c(e,f,f+n,t),this.imuln(i),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==s){var h=1;for(u=c(e,f,e.length,t),f=0;f<s;f++)h*=t;this.imuln(h),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this._strip()},o.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},o.prototype._move=function(e){f(e,this)},o.prototype.clone=function(){var e=new o(null);return this.copy(e),e},o.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},o.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=h}catch(e){o.prototype.inspect=h}else o.prototype.inspect=h;function h(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var l=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],d=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],p=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function m(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],o=0|t.words[0],s=i*o,a=67108863&s,u=s/67108864|0;r.words[0]=a;for(var c=1;c<n;c++){for(var f=u>>>26,h=67108863&u,l=Math.min(c,t.length-1),d=Math.max(0,c-e.length+1);d<=l;d++){var p=c-d|0;f+=(s=(i=0|e.words[p])*(o=0|t.words[d])+h)/67108864|0,h=67108863&s}r.words[c]=0|h,u=0|f}return 0!==u?r.words[c]=0|u:r.length--,r._strip()}o.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,o=0,s=0;s<this.length;s++){var a=this.words[s],u=(16777215&(a<<i|o)).toString(16);r=0!=(o=a>>>24-i&16777215)||s!==this.length-1?l[6-u.length]+u+r:u+r,(i+=2)>=26&&(i-=26,s--)}for(0!==o&&(r=o.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var c=d[e],f=p[e];r="";var h=this.clone();for(h.negative=0;!h.isZero();){var m=h.modrn(f).toString(e);r=(h=h.idivn(f)).isZero()?m+r:l[c-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16,2)},s&&(o.prototype.toBuffer=function(e,t){return this.toArrayLike(s,e,t)}),o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},o.prototype.toArrayLike=function(e,t,r){this._strip();var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0");var s=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,o);return this["_toArrayLike"+("le"===t?"LE":"BE")](s,i),s},o.prototype._toArrayLikeLE=function(e,t){for(var r=0,n=0,i=0,o=0;i<this.length;i++){var s=this.words[i]<<o|n;e[r++]=255&s,r<e.length&&(e[r++]=s>>8&255),r<e.length&&(e[r++]=s>>16&255),6===o?(r<e.length&&(e[r++]=s>>24&255),n=0,o=0):(n=s>>>24,o+=2)}if(r<e.length)for(e[r++]=n;r<e.length;)e[r++]=0},o.prototype._toArrayLikeBE=function(e,t){for(var r=e.length-1,n=0,i=0,o=0;i<this.length;i++){var s=this.words[i]<<o|n;e[r--]=255&s,r>=0&&(e[r--]=s>>8&255),r>=0&&(e[r--]=s>>16&255),6===o?(r>=0&&(e[r--]=s>>24&255),n=0,o=0):(n=s>>>24,o+=2)}if(r>=0)for(e[r--]=n;r>=0;)e[r--]=0},Math.clz32?o.prototype._countBits=function(e){return 32-Math.clz32(e)}:o.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0==(8191&t)&&(r+=13,t>>>=13),0==(127&t)&&(r+=7,t>>>=7),0==(15&t)&&(r+=4,t>>>=4),0==(3&t)&&(r+=2,t>>>=2),0==(1&t)&&r++,r},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var r=this._zeroBits(this.words[t]);if(e+=r,26!==r)break}return e},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},o.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this._strip()},o.prototype.ior=function(e){return n(0==(this.negative|e.negative)),this.iuor(e)},o.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;r<t.length;r++)this.words[r]=this.words[r]&e.words[r];return this.length=t.length,this._strip()},o.prototype.iand=function(e){return n(0==(this.negative|e.negative)),this.iuand(e)},o.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;n<r.length;n++)this.words[n]=t.words[n]^r.words[n];if(this!==t)for(;n<t.length;n++)this.words[n]=t.words[n];return this.length=t.length,this._strip()},o.prototype.ixor=function(e){return n(0==(this.negative|e.negative)),this.iuxor(e)},o.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this._strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<<i:this.words[r]&~(1<<i),this._strip()},o.prototype.iadd=function(e){var t,r,n;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(r=this,n=e):(r=e,n=this);for(var i=0,o=0;o<n.length;o++)t=(0|r.words[o])+(0|n.words[o])+i,this.words[o]=67108863&t,i=t>>>26;for(;0!==i&&o<r.length;o++)t=(0|r.words[o])+i,this.words[o]=67108863&t,i=t>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},o.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var o=0,s=0;s<n.length;s++)o=(t=(0|r.words[s])-(0|n.words[s])+o)>>26,this.words[s]=67108863&t;for(;0!==o&&s<r.length;s++)o=(t=(0|r.words[s])+o)>>26,this.words[s]=67108863&t;if(0===o&&s<r.length&&r!==this)for(;s<r.length;s++)this.words[s]=r.words[s];return this.length=Math.max(this.length,s),r!==this&&(this.negative=1),this._strip()},o.prototype.sub=function(e){return this.clone().isub(e)};var g=function(e,t,r){var n,i,o,s=e.words,a=t.words,u=r.words,c=0,f=0|s[0],h=8191&f,l=f>>>13,d=0|s[1],p=8191&d,m=d>>>13,g=0|s[2],y=8191&g,b=g>>>13,v=0|s[3],w=8191&v,_=v>>>13,S=0|s[4],M=8191&S,A=S>>>13,E=0|s[5],O=8191&E,x=E>>>13,T=0|s[6],P=8191&T,j=T>>>13,k=0|s[7],I=8191&k,R=k>>>13,C=0|s[8],B=8191&C,N=C>>>13,L=0|s[9],D=8191&L,F=L>>>13,q=0|a[0],U=8191&q,z=q>>>13,V=0|a[1],$=8191&V,H=V>>>13,X=0|a[2],K=8191&X,J=X>>>13,Z=0|a[3],G=8191&Z,W=Z>>>13,Y=0|a[4],Q=8191&Y,ee=Y>>>13,te=0|a[5],re=8191&te,ne=te>>>13,ie=0|a[6],oe=8191&ie,se=ie>>>13,ae=0|a[7],ue=8191&ae,ce=ae>>>13,fe=0|a[8],he=8191&fe,le=fe>>>13,de=0|a[9],pe=8191&de,me=de>>>13;r.negative=e.negative^t.negative,r.length=19;var ge=(c+(n=Math.imul(h,U))|0)+((8191&(i=(i=Math.imul(h,z))+Math.imul(l,U)|0))<<13)|0;c=((o=Math.imul(l,z))+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(p,U),i=(i=Math.imul(p,z))+Math.imul(m,U)|0,o=Math.imul(m,z);var ye=(c+(n=n+Math.imul(h,$)|0)|0)+((8191&(i=(i=i+Math.imul(h,H)|0)+Math.imul(l,$)|0))<<13)|0;c=((o=o+Math.imul(l,H)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(y,U),i=(i=Math.imul(y,z))+Math.imul(b,U)|0,o=Math.imul(b,z),n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,H)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,H)|0;var be=(c+(n=n+Math.imul(h,K)|0)|0)+((8191&(i=(i=i+Math.imul(h,J)|0)+Math.imul(l,K)|0))<<13)|0;c=((o=o+Math.imul(l,J)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(w,U),i=(i=Math.imul(w,z))+Math.imul(_,U)|0,o=Math.imul(_,z),n=n+Math.imul(y,$)|0,i=(i=i+Math.imul(y,H)|0)+Math.imul(b,$)|0,o=o+Math.imul(b,H)|0,n=n+Math.imul(p,K)|0,i=(i=i+Math.imul(p,J)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,J)|0;var ve=(c+(n=n+Math.imul(h,G)|0)|0)+((8191&(i=(i=i+Math.imul(h,W)|0)+Math.imul(l,G)|0))<<13)|0;c=((o=o+Math.imul(l,W)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(M,U),i=(i=Math.imul(M,z))+Math.imul(A,U)|0,o=Math.imul(A,z),n=n+Math.imul(w,$)|0,i=(i=i+Math.imul(w,H)|0)+Math.imul(_,$)|0,o=o+Math.imul(_,H)|0,n=n+Math.imul(y,K)|0,i=(i=i+Math.imul(y,J)|0)+Math.imul(b,K)|0,o=o+Math.imul(b,J)|0,n=n+Math.imul(p,G)|0,i=(i=i+Math.imul(p,W)|0)+Math.imul(m,G)|0,o=o+Math.imul(m,W)|0;var we=(c+(n=n+Math.imul(h,Q)|0)|0)+((8191&(i=(i=i+Math.imul(h,ee)|0)+Math.imul(l,Q)|0))<<13)|0;c=((o=o+Math.imul(l,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(O,U),i=(i=Math.imul(O,z))+Math.imul(x,U)|0,o=Math.imul(x,z),n=n+Math.imul(M,$)|0,i=(i=i+Math.imul(M,H)|0)+Math.imul(A,$)|0,o=o+Math.imul(A,H)|0,n=n+Math.imul(w,K)|0,i=(i=i+Math.imul(w,J)|0)+Math.imul(_,K)|0,o=o+Math.imul(_,J)|0,n=n+Math.imul(y,G)|0,i=(i=i+Math.imul(y,W)|0)+Math.imul(b,G)|0,o=o+Math.imul(b,W)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,ee)|0;var _e=(c+(n=n+Math.imul(h,re)|0)|0)+((8191&(i=(i=i+Math.imul(h,ne)|0)+Math.imul(l,re)|0))<<13)|0;c=((o=o+Math.imul(l,ne)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(P,U),i=(i=Math.imul(P,z))+Math.imul(j,U)|0,o=Math.imul(j,z),n=n+Math.imul(O,$)|0,i=(i=i+Math.imul(O,H)|0)+Math.imul(x,$)|0,o=o+Math.imul(x,H)|0,n=n+Math.imul(M,K)|0,i=(i=i+Math.imul(M,J)|0)+Math.imul(A,K)|0,o=o+Math.imul(A,J)|0,n=n+Math.imul(w,G)|0,i=(i=i+Math.imul(w,W)|0)+Math.imul(_,G)|0,o=o+Math.imul(_,W)|0,n=n+Math.imul(y,Q)|0,i=(i=i+Math.imul(y,ee)|0)+Math.imul(b,Q)|0,o=o+Math.imul(b,ee)|0,n=n+Math.imul(p,re)|0,i=(i=i+Math.imul(p,ne)|0)+Math.imul(m,re)|0,o=o+Math.imul(m,ne)|0;var Se=(c+(n=n+Math.imul(h,oe)|0)|0)+((8191&(i=(i=i+Math.imul(h,se)|0)+Math.imul(l,oe)|0))<<13)|0;c=((o=o+Math.imul(l,se)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(I,U),i=(i=Math.imul(I,z))+Math.imul(R,U)|0,o=Math.imul(R,z),n=n+Math.imul(P,$)|0,i=(i=i+Math.imul(P,H)|0)+Math.imul(j,$)|0,o=o+Math.imul(j,H)|0,n=n+Math.imul(O,K)|0,i=(i=i+Math.imul(O,J)|0)+Math.imul(x,K)|0,o=o+Math.imul(x,J)|0,n=n+Math.imul(M,G)|0,i=(i=i+Math.imul(M,W)|0)+Math.imul(A,G)|0,o=o+Math.imul(A,W)|0,n=n+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,ee)|0,n=n+Math.imul(y,re)|0,i=(i=i+Math.imul(y,ne)|0)+Math.imul(b,re)|0,o=o+Math.imul(b,ne)|0,n=n+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,se)|0)+Math.imul(m,oe)|0,o=o+Math.imul(m,se)|0;var Me=(c+(n=n+Math.imul(h,ue)|0)|0)+((8191&(i=(i=i+Math.imul(h,ce)|0)+Math.imul(l,ue)|0))<<13)|0;c=((o=o+Math.imul(l,ce)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(B,U),i=(i=Math.imul(B,z))+Math.imul(N,U)|0,o=Math.imul(N,z),n=n+Math.imul(I,$)|0,i=(i=i+Math.imul(I,H)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,H)|0,n=n+Math.imul(P,K)|0,i=(i=i+Math.imul(P,J)|0)+Math.imul(j,K)|0,o=o+Math.imul(j,J)|0,n=n+Math.imul(O,G)|0,i=(i=i+Math.imul(O,W)|0)+Math.imul(x,G)|0,o=o+Math.imul(x,W)|0,n=n+Math.imul(M,Q)|0,i=(i=i+Math.imul(M,ee)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,ee)|0,n=n+Math.imul(w,re)|0,i=(i=i+Math.imul(w,ne)|0)+Math.imul(_,re)|0,o=o+Math.imul(_,ne)|0,n=n+Math.imul(y,oe)|0,i=(i=i+Math.imul(y,se)|0)+Math.imul(b,oe)|0,o=o+Math.imul(b,se)|0,n=n+Math.imul(p,ue)|0,i=(i=i+Math.imul(p,ce)|0)+Math.imul(m,ue)|0,o=o+Math.imul(m,ce)|0;var Ae=(c+(n=n+Math.imul(h,he)|0)|0)+((8191&(i=(i=i+Math.imul(h,le)|0)+Math.imul(l,he)|0))<<13)|0;c=((o=o+Math.imul(l,le)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(D,U),i=(i=Math.imul(D,z))+Math.imul(F,U)|0,o=Math.imul(F,z),n=n+Math.imul(B,$)|0,i=(i=i+Math.imul(B,H)|0)+Math.imul(N,$)|0,o=o+Math.imul(N,H)|0,n=n+Math.imul(I,K)|0,i=(i=i+Math.imul(I,J)|0)+Math.imul(R,K)|0,o=o+Math.imul(R,J)|0,n=n+Math.imul(P,G)|0,i=(i=i+Math.imul(P,W)|0)+Math.imul(j,G)|0,o=o+Math.imul(j,W)|0,n=n+Math.imul(O,Q)|0,i=(i=i+Math.imul(O,ee)|0)+Math.imul(x,Q)|0,o=o+Math.imul(x,ee)|0,n=n+Math.imul(M,re)|0,i=(i=i+Math.imul(M,ne)|0)+Math.imul(A,re)|0,o=o+Math.imul(A,ne)|0,n=n+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,se)|0)+Math.imul(_,oe)|0,o=o+Math.imul(_,se)|0,n=n+Math.imul(y,ue)|0,i=(i=i+Math.imul(y,ce)|0)+Math.imul(b,ue)|0,o=o+Math.imul(b,ce)|0,n=n+Math.imul(p,he)|0,i=(i=i+Math.imul(p,le)|0)+Math.imul(m,he)|0,o=o+Math.imul(m,le)|0;var Ee=(c+(n=n+Math.imul(h,pe)|0)|0)+((8191&(i=(i=i+Math.imul(h,me)|0)+Math.imul(l,pe)|0))<<13)|0;c=((o=o+Math.imul(l,me)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(D,$),i=(i=Math.imul(D,H))+Math.imul(F,$)|0,o=Math.imul(F,H),n=n+Math.imul(B,K)|0,i=(i=i+Math.imul(B,J)|0)+Math.imul(N,K)|0,o=o+Math.imul(N,J)|0,n=n+Math.imul(I,G)|0,i=(i=i+Math.imul(I,W)|0)+Math.imul(R,G)|0,o=o+Math.imul(R,W)|0,n=n+Math.imul(P,Q)|0,i=(i=i+Math.imul(P,ee)|0)+Math.imul(j,Q)|0,o=o+Math.imul(j,ee)|0,n=n+Math.imul(O,re)|0,i=(i=i+Math.imul(O,ne)|0)+Math.imul(x,re)|0,o=o+Math.imul(x,ne)|0,n=n+Math.imul(M,oe)|0,i=(i=i+Math.imul(M,se)|0)+Math.imul(A,oe)|0,o=o+Math.imul(A,se)|0,n=n+Math.imul(w,ue)|0,i=(i=i+Math.imul(w,ce)|0)+Math.imul(_,ue)|0,o=o+Math.imul(_,ce)|0,n=n+Math.imul(y,he)|0,i=(i=i+Math.imul(y,le)|0)+Math.imul(b,he)|0,o=o+Math.imul(b,le)|0;var Oe=(c+(n=n+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,me)|0)+Math.imul(m,pe)|0))<<13)|0;c=((o=o+Math.imul(m,me)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(D,K),i=(i=Math.imul(D,J))+Math.imul(F,K)|0,o=Math.imul(F,J),n=n+Math.imul(B,G)|0,i=(i=i+Math.imul(B,W)|0)+Math.imul(N,G)|0,o=o+Math.imul(N,W)|0,n=n+Math.imul(I,Q)|0,i=(i=i+Math.imul(I,ee)|0)+Math.imul(R,Q)|0,o=o+Math.imul(R,ee)|0,n=n+Math.imul(P,re)|0,i=(i=i+Math.imul(P,ne)|0)+Math.imul(j,re)|0,o=o+Math.imul(j,ne)|0,n=n+Math.imul(O,oe)|0,i=(i=i+Math.imul(O,se)|0)+Math.imul(x,oe)|0,o=o+Math.imul(x,se)|0,n=n+Math.imul(M,ue)|0,i=(i=i+Math.imul(M,ce)|0)+Math.imul(A,ue)|0,o=o+Math.imul(A,ce)|0,n=n+Math.imul(w,he)|0,i=(i=i+Math.imul(w,le)|0)+Math.imul(_,he)|0,o=o+Math.imul(_,le)|0;var xe=(c+(n=n+Math.imul(y,pe)|0)|0)+((8191&(i=(i=i+Math.imul(y,me)|0)+Math.imul(b,pe)|0))<<13)|0;c=((o=o+Math.imul(b,me)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(D,G),i=(i=Math.imul(D,W))+Math.imul(F,G)|0,o=Math.imul(F,W),n=n+Math.imul(B,Q)|0,i=(i=i+Math.imul(B,ee)|0)+Math.imul(N,Q)|0,o=o+Math.imul(N,ee)|0,n=n+Math.imul(I,re)|0,i=(i=i+Math.imul(I,ne)|0)+Math.imul(R,re)|0,o=o+Math.imul(R,ne)|0,n=n+Math.imul(P,oe)|0,i=(i=i+Math.imul(P,se)|0)+Math.imul(j,oe)|0,o=o+Math.imul(j,se)|0,n=n+Math.imul(O,ue)|0,i=(i=i+Math.imul(O,ce)|0)+Math.imul(x,ue)|0,o=o+Math.imul(x,ce)|0,n=n+Math.imul(M,he)|0,i=(i=i+Math.imul(M,le)|0)+Math.imul(A,he)|0,o=o+Math.imul(A,le)|0;var Te=(c+(n=n+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,me)|0)+Math.imul(_,pe)|0))<<13)|0;c=((o=o+Math.imul(_,me)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(D,Q),i=(i=Math.imul(D,ee))+Math.imul(F,Q)|0,o=Math.imul(F,ee),n=n+Math.imul(B,re)|0,i=(i=i+Math.imul(B,ne)|0)+Math.imul(N,re)|0,o=o+Math.imul(N,ne)|0,n=n+Math.imul(I,oe)|0,i=(i=i+Math.imul(I,se)|0)+Math.imul(R,oe)|0,o=o+Math.imul(R,se)|0,n=n+Math.imul(P,ue)|0,i=(i=i+Math.imul(P,ce)|0)+Math.imul(j,ue)|0,o=o+Math.imul(j,ce)|0,n=n+Math.imul(O,he)|0,i=(i=i+Math.imul(O,le)|0)+Math.imul(x,he)|0,o=o+Math.imul(x,le)|0;var Pe=(c+(n=n+Math.imul(M,pe)|0)|0)+((8191&(i=(i=i+Math.imul(M,me)|0)+Math.imul(A,pe)|0))<<13)|0;c=((o=o+Math.imul(A,me)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(D,re),i=(i=Math.imul(D,ne))+Math.imul(F,re)|0,o=Math.imul(F,ne),n=n+Math.imul(B,oe)|0,i=(i=i+Math.imul(B,se)|0)+Math.imul(N,oe)|0,o=o+Math.imul(N,se)|0,n=n+Math.imul(I,ue)|0,i=(i=i+Math.imul(I,ce)|0)+Math.imul(R,ue)|0,o=o+Math.imul(R,ce)|0,n=n+Math.imul(P,he)|0,i=(i=i+Math.imul(P,le)|0)+Math.imul(j,he)|0,o=o+Math.imul(j,le)|0;var je=(c+(n=n+Math.imul(O,pe)|0)|0)+((8191&(i=(i=i+Math.imul(O,me)|0)+Math.imul(x,pe)|0))<<13)|0;c=((o=o+Math.imul(x,me)|0)+(i>>>13)|0)+(je>>>26)|0,je&=67108863,n=Math.imul(D,oe),i=(i=Math.imul(D,se))+Math.imul(F,oe)|0,o=Math.imul(F,se),n=n+Math.imul(B,ue)|0,i=(i=i+Math.imul(B,ce)|0)+Math.imul(N,ue)|0,o=o+Math.imul(N,ce)|0,n=n+Math.imul(I,he)|0,i=(i=i+Math.imul(I,le)|0)+Math.imul(R,he)|0,o=o+Math.imul(R,le)|0;var ke=(c+(n=n+Math.imul(P,pe)|0)|0)+((8191&(i=(i=i+Math.imul(P,me)|0)+Math.imul(j,pe)|0))<<13)|0;c=((o=o+Math.imul(j,me)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(D,ue),i=(i=Math.imul(D,ce))+Math.imul(F,ue)|0,o=Math.imul(F,ce),n=n+Math.imul(B,he)|0,i=(i=i+Math.imul(B,le)|0)+Math.imul(N,he)|0,o=o+Math.imul(N,le)|0;var Ie=(c+(n=n+Math.imul(I,pe)|0)|0)+((8191&(i=(i=i+Math.imul(I,me)|0)+Math.imul(R,pe)|0))<<13)|0;c=((o=o+Math.imul(R,me)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(D,he),i=(i=Math.imul(D,le))+Math.imul(F,he)|0,o=Math.imul(F,le);var Re=(c+(n=n+Math.imul(B,pe)|0)|0)+((8191&(i=(i=i+Math.imul(B,me)|0)+Math.imul(N,pe)|0))<<13)|0;c=((o=o+Math.imul(N,me)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863;var Ce=(c+(n=Math.imul(D,pe))|0)+((8191&(i=(i=Math.imul(D,me))+Math.imul(F,pe)|0))<<13)|0;return c=((o=Math.imul(F,me))+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,u[0]=ge,u[1]=ye,u[2]=be,u[3]=ve,u[4]=we,u[5]=_e,u[6]=Se,u[7]=Me,u[8]=Ae,u[9]=Ee,u[10]=Oe,u[11]=xe,u[12]=Te,u[13]=Pe,u[14]=je,u[15]=ke,u[16]=Ie,u[17]=Re,u[18]=Ce,0!==c&&(u[19]=c,r.length++),r};function y(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,o=0;o<r.length-1;o++){var s=i;i=0;for(var a=67108863&n,u=Math.min(o,t.length-1),c=Math.max(0,o-e.length+1);c<=u;c++){var f=o-c,h=(0|e.words[f])*(0|t.words[c]),l=67108863&h;a=67108863&(l=l+a|0),i+=(s=(s=s+(h/67108864|0)|0)+(l>>>26)|0)>>>26,s&=67108863}r.words[o]=a,n=s,s=i}return 0!==n?r.words[o]=n:r.length--,r._strip()}function b(e,t,r){return y(e,t,r)}function v(e,t){this.x=e,this.y=t}Math.imul||(g=m),o.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?g(this,e,t):r<63?m(this,e,t):r<1024?y(this,e,t):b(this,e,t)},v.prototype.makeRBT=function(e){for(var t=new Array(e),r=o.prototype._countBits(e)-1,n=0;n<e;n++)t[n]=this.revBin(n,r,e);return t},v.prototype.revBin=function(e,t,r){if(0===e||e===r-1)return e;for(var n=0,i=0;i<t;i++)n|=(1&e)<<t-i-1,e>>=1;return n},v.prototype.permute=function(e,t,r,n,i,o){for(var s=0;s<o;s++)n[s]=t[e[s]],i[s]=r[e[s]]},v.prototype.transform=function(e,t,r,n,i,o){this.permute(o,e,t,r,n,i);for(var s=1;s<i;s<<=1)for(var a=s<<1,u=Math.cos(2*Math.PI/a),c=Math.sin(2*Math.PI/a),f=0;f<i;f+=a)for(var h=u,l=c,d=0;d<s;d++){var p=r[f+d],m=n[f+d],g=r[f+d+s],y=n[f+d+s],b=h*g-l*y;y=h*y+l*g,g=b,r[f+d]=p+g,n[f+d]=m+y,r[f+d+s]=p-g,n[f+d+s]=m-y,d!==a&&(b=u*h-c*l,l=u*l+c*h,h=b)}},v.prototype.guessLen13b=function(e,t){var r=1|Math.max(t,e),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},v.prototype.conjugate=function(e,t,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=e[n];e[n]=e[r-n-1],e[r-n-1]=i,i=t[n],t[n]=-t[r-n-1],t[r-n-1]=-i}},v.prototype.normalize13b=function(e,t){for(var r=0,n=0;n<t/2;n++){var i=8192*Math.round(e[2*n+1]/t)+Math.round(e[2*n]/t)+r;e[n]=67108863&i,r=i<67108864?0:i/67108864|0}return e},v.prototype.convert13b=function(e,t,r,i){for(var o=0,s=0;s<t;s++)o+=0|e[s],r[2*s]=8191&o,o>>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*t;s<i;++s)r[s]=0;n(0===o),n(0==(-8192&o))},v.prototype.stub=function(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=0;return t},v.prototype.mulp=function(e,t,r){var n=2*this.guessLen13b(e.length,t.length),i=this.makeRBT(n),o=this.stub(n),s=new Array(n),a=new Array(n),u=new Array(n),c=new Array(n),f=new Array(n),h=new Array(n),l=r.words;l.length=n,this.convert13b(e.words,e.length,s,n),this.convert13b(t.words,t.length,c,n),this.transform(s,o,a,u,n,i),this.transform(c,o,f,h,n,i);for(var d=0;d<n;d++){var p=a[d]*f[d]-u[d]*h[d];u[d]=a[d]*h[d]+u[d]*f[d],a[d]=p}return this.conjugate(a,u,n),this.transform(a,u,l,o,n,i),this.conjugate(l,o,n),this.normalize13b(l,n),r.negative=e.negative^t.negative,r.length=e.length+t.length,r._strip()},o.prototype.mul=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},o.prototype.mulf=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),b(this,e,t)},o.prototype.imul=function(e){return this.clone().mulTo(e,this)},o.prototype.imuln=function(e){var t=e<0;t&&(e=-e),n("number"==typeof e),n(e<67108864);for(var r=0,i=0;i<this.length;i++){var o=(0|this.words[i])*e,s=(67108863&o)+(67108863&r);r>>=26,r+=o/67108864|0,r+=s>>>26,this.words[i]=67108863&s}return 0!==r&&(this.words[i]=r,this.length++),t?this.ineg():this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r<t.length;r++){var n=r/26|0,i=r%26;t[r]=e.words[n]>>>i&1}return t}(e);if(0===t.length)return new o(1);for(var r=this,n=0;n<t.length&&0===t[n];n++,r=r.sqr());if(++n<t.length)for(var i=r.sqr();n<t.length;n++,i=i.sqr())0!==t[n]&&(r=r.mul(i));return r},o.prototype.iushln=function(e){n("number"==typeof e&&e>=0);var t,r=e%26,i=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(t=0;t<this.length;t++){var a=this.words[t]&o,u=(0|this.words[t])-a<<r;this.words[t]=u|s,s=a>>>26-r}s&&(this.words[t]=s,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this._strip()},o.prototype.ishln=function(e){return n(0===this.negative),this.iushln(e)},o.prototype.iushrn=function(e,t,r){var i;n("number"==typeof e&&e>=0),i=t?(t-t%26)/26:0;var o=e%26,s=Math.min((e-o)/26,this.length),a=67108863^67108863>>>o<<o,u=r;if(i-=s,i=Math.max(0,i),u){for(var c=0;c<s;c++)u.words[c]=this.words[c];u.length=s}if(0===s);else if(this.length>s)for(this.length-=s,c=0;c<this.length;c++)this.words[c]=this.words[c+s];else this.words[0]=0,this.length=1;var f=0;for(c=this.length-1;c>=0&&(0!==f||c>=i);c--){var h=0|this.words[c];this.words[c]=f<<26-o|h>>>o,f=h&a}return u&&0!==f&&(u.words[u.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<<t;return!(this.length<=r||!(this.words[r]&i))},o.prototype.imaskn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this._strip()},o.prototype.maskn=function(e){return this.clone().imaskn(e)},o.prototype.iaddn=function(e){return n("number"==typeof e),n(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<=e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},o.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this._strip()},o.prototype.addn=function(e){return this.clone().iaddn(e)},o.prototype.subn=function(e){return this.clone().isubn(e)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(e,t,r){var i,o,s=e.length+r;this._expand(s);var a=0;for(i=0;i<e.length;i++){o=(0|this.words[i+r])+a;var u=(0|e.words[i])*t;a=((o-=67108863&u)>>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i<this.length-r;i++)a=(o=(0|this.words[i+r])+a)>>26,this.words[i+r]=67108863&o;if(0===a)return this._strip();for(n(-1===a),a=0,i=0;i<this.length;i++)a=(o=-(0|this.words[i])+a)>>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),i=e,s=0|i.words[i.length-1];0!=(r=26-this._countBits(s))&&(i=i.ushln(r),n.iushln(r),s=0|i.words[i.length-1]);var a,u=n.length-i.length;if("mod"!==t){(a=new o(null)).length=u+1,a.words=new Array(a.length);for(var c=0;c<a.length;c++)a.words[c]=0}var f=n.clone()._ishlnsubmul(i,1,u);0===f.negative&&(n=f,a&&(a.words[u]=1));for(var h=u-1;h>=0;h--){var l=67108864*(0|n.words[i.length+h])+(0|n.words[i.length+h-1]);for(l=Math.min(l/s|0,67108863),n._ishlnsubmul(i,l,h);0!==n.negative;)l--,n.negative=0,n._ishlnsubmul(i,1,h),n.isZero()||(n.negative^=1);a&&(a.words[h]=l)}return a&&a._strip(),n._strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:a||null,mod:n}},o.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(i=a.div.neg()),"div"!==t&&(s=a.mod.neg(),r&&0!==s.negative&&s.iadd(e)),{div:i,mod:s}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(i=a.div.neg()),{div:i,mod:a.mod}):0!=(this.negative&e.negative)?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(s=a.mod.neg(),r&&0!==s.negative&&s.isub(e)),{div:a.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modrn(e.words[0]))}:this._wordDiv(e,t);var i,s,a},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modrn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=(1<<26)%e,i=0,o=this.length-1;o>=0;o--)i=(r*i+(0|this.words[o]))%e;return t?-i:i},o.prototype.modn=function(e){return this.modrn(e)},o.prototype.idivn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*r;this.words[i]=o/e|0,r=o%e}return this._strip(),t?this.ineg():this},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),s=new o(0),a=new o(0),u=new o(1),c=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++c;for(var f=r.clone(),h=t.clone();!t.isZero();){for(var l=0,d=1;0==(t.words[0]&d)&&l<26;++l,d<<=1);if(l>0)for(t.iushrn(l);l-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(f),s.isub(h)),i.iushrn(1),s.iushrn(1);for(var p=0,m=1;0==(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(a.isOdd()||u.isOdd())&&(a.iadd(f),u.isub(h)),a.iushrn(1),u.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(a),s.isub(u)):(r.isub(t),a.isub(i),u.isub(s))}return{a,b:u,gcd:r.iushln(c)}},o.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,s=new o(1),a=new o(0),u=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,f=1;0==(t.words[0]&f)&&c<26;++c,f<<=1);if(c>0)for(t.iushrn(c);c-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var h=0,l=1;0==(r.words[0]&l)&&h<26;++h,l<<=1);if(h>0)for(r.iushrn(h);h-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);t.cmp(r)>=0?(t.isub(r),s.isub(a)):(r.isub(t),a.isub(s))}return(i=0===t.cmpn(1)?s:a).cmpn(0)<0&&i.iadd(e),i},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var o=t;t=r,r=o}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<<t;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var o=i,s=r;0!==o&&s<this.length;s++){var a=0|this.words[s];o=(a+=o)>>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},o.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},o.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){n<i?t=-1:n>i&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new O(e)},o.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var w={k256:null,p224:null,p192:null,p25519:null};function _(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function S(){_.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function M(){_.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function A(){_.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function E(){_.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function O(e){if("string"==typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function x(e){O.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}_.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},_.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},_.prototype.split=function(e,t){e.iushrn(this.n,0,t)},_.prototype.imulK=function(e){return e.imul(this.k)},i(S,_),S.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),i=0;i<n;i++)t.words[i]=e.words[i];if(t.length=n,e.length<=9)return e.words[0]=0,void(e.length=1);var o=e.words[9];for(t.words[t.length++]=o&r,i=10;i<e.length;i++){var s=0|e.words[i];e.words[i-10]=(s&r)<<4|o>>>22,o=s}o>>>=22,e.words[i-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},S.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r<e.length;r++){var n=0|e.words[r];t+=977*n,e.words[r]=67108863&t,t=64*n+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},i(M,_),i(A,_),i(E,_),E.prototype.imulK=function(e){for(var t=0,r=0;r<e.length;r++){var n=19*(0|e.words[r])+t,i=67108863&n;n>>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(w[e])return w[e];var t;if("k256"===e)t=new S;else if("p224"===e)t=new M;else if("p192"===e)t=new A;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new E}return w[e]=t,t},O.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},O.prototype._verify2=function(e,t){n(0==(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},O.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(f(e,e.umod(this.m)._forceRed(this)),e)},O.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},O.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},O.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},O.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},O.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},O.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},O.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},O.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},O.prototype.isqr=function(e){return this.imul(e,e.clone())},O.prototype.sqr=function(e){return this.mul(e,e)},O.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new o(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);n(!i.isZero());var a=new o(1).toRed(this),u=a.redNeg(),c=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new o(2*f*f).toRed(this);0!==this.pow(f,c).cmp(u);)f.redIAdd(u);for(var h=this.pow(f,i),l=this.pow(e,i.addn(1).iushrn(1)),d=this.pow(e,i),p=s;0!==d.cmp(a);){for(var m=d,g=0;0!==m.cmp(a);g++)m=m.redSqr();n(g<p);var y=this.pow(h,new o(1).iushln(p-g-1));l=l.redMul(y),h=y.redSqr(),d=d.redMul(h),p=g}return l},O.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},O.prototype.pow=function(e,t){if(t.isZero())return new o(1).toRed(this);if(0===t.cmpn(1))return e.clone();var r=new Array(16);r[0]=new o(1).toRed(this),r[1]=e;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],e);var i=r[0],s=0,a=0,u=t.bitLength()%26;for(0===u&&(u=26),n=t.length-1;n>=0;n--){for(var c=t.words[n],f=u-1;f>=0;f--){var h=c>>f&1;i!==r[0]&&(i=this.sqr(i)),0!==h||0!==s?(s<<=1,s|=h,(4==++a||0===n&&0===f)&&(i=this.mul(i,r[s]),a=0,s=0)):a=0}u=26}return i},O.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},O.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new x(e)},i(x,O),x.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},x.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},x.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},x.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},x.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=r.nmd(e),this)},6042:(e,t,r)=>{e.exports=r(5207)},4743:(e,t,r)=>{var n=r(9509).Buffer,i=r(3482),o=r(8473),s=r(5717),a=r(2957),u=r(7753),c=r(5207);function f(e){o.Writable.call(this);var t=c[e];if(!t)throw new Error("Unknown message digest");this._hashType=t.hash,this._hash=i(t.hash),this._tag=t.id,this._signType=t.sign}function h(e){o.Writable.call(this);var t=c[e];if(!t)throw new Error("Unknown message digest");this._hash=i(t.hash),this._tag=t.id,this._signType=t.sign}function l(e){return new f(e)}function d(e){return new h(e)}Object.keys(c).forEach((function(e){c[e].id=n.from(c[e].id,"hex"),c[e.toLowerCase()]=c[e]})),s(f,o.Writable),f.prototype._write=function(e,t,r){this._hash.update(e),r()},f.prototype.update=function(e,t){return"string"==typeof e&&(e=n.from(e,t)),this._hash.update(e),this},f.prototype.sign=function(e,t){this.end();var r=this._hash.digest(),n=a(r,e,this._hashType,this._signType,this._tag);return t?n.toString(t):n},s(h,o.Writable),h.prototype._write=function(e,t,r){this._hash.update(e),r()},h.prototype.update=function(e,t){return"string"==typeof e&&(e=n.from(e,t)),this._hash.update(e),this},h.prototype.verify=function(e,t,r){"string"==typeof t&&(t=n.from(t,r)),this.end();var i=this._hash.digest();return u(t,i,e,this._signType,this._tag)},e.exports={Sign:l,Verify:d,createSign:l,createVerify:d}},2957:(e,t,r)=>{var n=r(9509).Buffer,i=r(8355),o=r(3663),s=r(6266).ec,a=r(8815),u=r(980),c=r(1308);function f(e,t,r,o){if((e=n.from(e.toArray())).length<t.byteLength()){var s=n.alloc(t.byteLength()-e.length);e=n.concat([s,e])}var a=r.length,u=function(e,t){e=(e=h(e,t)).mod(t);var r=n.from(e.toArray());if(r.length<t.byteLength()){var i=n.alloc(t.byteLength()-r.length);r=n.concat([i,r])}return r}(r,t),c=n.alloc(a);c.fill(1);var f=n.alloc(a);return f=i(o,f).update(c).update(n.from([0])).update(e).update(u).digest(),c=i(o,f).update(c).digest(),{k:f=i(o,f).update(c).update(n.from([1])).update(e).update(u).digest(),v:c=i(o,f).update(c).digest()}}function h(e,t){var r=new a(e),n=(e.length<<3)-t.bitLength();return n>0&&r.ishrn(n),r}function l(e,t,r){var o,s;do{for(o=n.alloc(0);8*o.length<e.bitLength();)t.v=i(r,t.k).update(t.v).digest(),o=n.concat([o,t.v]);s=h(o,e),t.k=i(r,t.k).update(t.v).update(n.from([0])).digest(),t.v=i(r,t.k).update(t.v).digest()}while(-1!==s.cmp(e));return s}function d(e,t,r,n){return e.toRed(a.mont(r)).redPow(t).fromRed().mod(n)}e.exports=function(e,t,r,i,p){var m=u(t);if(m.curve){if("ecdsa"!==i&&"ecdsa/rsa"!==i)throw new Error("wrong private key type");return function(e,t){var r=c[t.curve.join(".")];if(!r)throw new Error("unknown curve "+t.curve.join("."));var i=new s(r).keyFromPrivate(t.privateKey).sign(e);return n.from(i.toDER())}(e,m)}if("dsa"===m.type){if("dsa"!==i)throw new Error("wrong private key type");return function(e,t,r){for(var i,o=t.params.priv_key,s=t.params.p,u=t.params.q,c=t.params.g,p=new a(0),m=h(e,u).mod(u),g=!1,y=f(o,u,e,r);!1===g;)p=d(c,i=l(u,y,r),s,u),0===(g=i.invm(u).imul(m.add(o.mul(p))).mod(u)).cmpn(0)&&(g=!1,p=new a(0));return function(e,t){e=e.toArray(),t=t.toArray(),128&e[0]&&(e=[0].concat(e)),128&t[0]&&(t=[0].concat(t));var r=[48,e.length+t.length+4,2,e.length];return r=r.concat(e,[2,t.length],t),n.from(r)}(p,g)}(e,m,r)}if("rsa"!==i&&"ecdsa/rsa"!==i)throw new Error("wrong private key type");e=n.concat([p,e]);for(var g=m.modulus.byteLength(),y=[0,1];e.length+y.length+1<g;)y.push(255);y.push(0);for(var b=-1;++b<e.length;)y.push(e[b]);return o(y,m)},e.exports.getKey=f,e.exports.makeKey=l},7753:(e,t,r)=>{var n=r(9509).Buffer,i=r(8815),o=r(6266).ec,s=r(980),a=r(1308);function u(e,t){if(e.cmpn(0)<=0)throw new Error("invalid sig");if(e.cmp(t)>=t)throw new Error("invalid sig")}e.exports=function(e,t,r,c,f){var h=s(r);if("ec"===h.type){if("ecdsa"!==c&&"ecdsa/rsa"!==c)throw new Error("wrong public key type");return function(e,t,r){var n=a[r.data.algorithm.curve.join(".")];if(!n)throw new Error("unknown curve "+r.data.algorithm.curve.join("."));var i=new o(n),s=r.data.subjectPrivateKey.data;return i.verify(t,e,s)}(e,t,h)}if("dsa"===h.type){if("dsa"!==c)throw new Error("wrong public key type");return function(e,t,r){var n=r.data.p,o=r.data.q,a=r.data.g,c=r.data.pub_key,f=s.signature.decode(e,"der"),h=f.s,l=f.r;u(h,o),u(l,o);var d=i.mont(n),p=h.invm(o);return 0===a.toRed(d).redPow(new i(t).mul(p).mod(o)).fromRed().mul(c.toRed(d).redPow(l.mul(p).mod(o)).fromRed()).mod(n).mod(o).cmp(l)}(e,t,h)}if("rsa"!==c&&"ecdsa/rsa"!==c)throw new Error("wrong public key type");t=n.concat([f,t]);for(var l=h.modulus.byteLength(),d=[1],p=0;t.length+d.length+2<l;)d.push(255),p++;d.push(0);for(var m=-1;++m<t.length;)d.push(t[m]);d=n.from(d);var g=i.mont(h.modulus);e=(e=new i(e).toRed(g)).redPow(new i(h.publicExponent)),e=n.from(e.fromRed().toArray());var y=p<8?1:0;for(l=Math.min(e.length,d.length),e.length!==d.length&&(y=1),m=-1;++m<l;)y|=e[m]^d[m];return 0===y}},8815:function(e,t,r){!function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function o(e,t,r){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var s;"object"==typeof e?e.exports=o:t.BN=o,o.BN=o,o.wordSize=26;try{s="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(2363).Buffer}catch(e){}function a(e,t){var r=e.charCodeAt(t);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void n(!1,"Invalid character in "+e)}function u(e,t,r){var n=a(e,r);return r-1>=t&&(n|=a(e,r-1)<<4),n}function c(e,t,r,i){for(var o=0,s=0,a=Math.min(e.length,r),u=t;u<a;u++){var c=e.charCodeAt(u)-48;o*=i,s=c>=49?c-49+10:c>=17?c-17+10:c,n(c>=0&&s<i,"Invalid character"),o+=s}return o}function f(e,t){e.words=t.words,e.length=t.length,e.negative=t.negative,e.red=t.red}if(o.isBN=function(e){return e instanceof o||null!==e&&"object"==typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<e.length&&(16===t?this._parseHex(e,i,r):(this._parseBase(e,t,i),"le"===r&&this._initArray(this.toArray(),t,r)))},o.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},o.prototype._initArray=function(e,t,r){if(n("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var o,s,a=0;if("be"===r)for(i=e.length-1,o=0;i>=0;i-=3)s=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===r)for(i=0,o=0;i<e.length;i+=3)s=e[i]|e[i+1]<<8|e[i+2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this._strip()},o.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var i,o=0,s=0;if("be"===r)for(n=e.length-1;n>=t;n-=2)i=u(e,t,n)<<o,this.words[s]|=67108863&i,o>=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;else for(n=(e.length-t)%2==0?t+1:t;n<e.length;n+=2)i=u(e,t,n)<<o,this.words[s]|=67108863&i,o>=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;this._strip()},o.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var o=e.length-r,s=o%n,a=Math.min(o,o-s)+r,u=0,f=r;f<a;f+=n)u=c(e,f,f+n,t),this.imuln(i),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==s){var h=1;for(u=c(e,f,e.length,t),f=0;f<s;f++)h*=t;this.imuln(h),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this._strip()},o.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},o.prototype._move=function(e){f(e,this)},o.prototype.clone=function(){var e=new o(null);return this.copy(e),e},o.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},o.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=h}catch(e){o.prototype.inspect=h}else o.prototype.inspect=h;function h(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var l=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],d=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],p=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function m(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],o=0|t.words[0],s=i*o,a=67108863&s,u=s/67108864|0;r.words[0]=a;for(var c=1;c<n;c++){for(var f=u>>>26,h=67108863&u,l=Math.min(c,t.length-1),d=Math.max(0,c-e.length+1);d<=l;d++){var p=c-d|0;f+=(s=(i=0|e.words[p])*(o=0|t.words[d])+h)/67108864|0,h=67108863&s}r.words[c]=0|h,u=0|f}return 0!==u?r.words[c]=0|u:r.length--,r._strip()}o.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,o=0,s=0;s<this.length;s++){var a=this.words[s],u=(16777215&(a<<i|o)).toString(16);r=0!=(o=a>>>24-i&16777215)||s!==this.length-1?l[6-u.length]+u+r:u+r,(i+=2)>=26&&(i-=26,s--)}for(0!==o&&(r=o.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var c=d[e],f=p[e];r="";var h=this.clone();for(h.negative=0;!h.isZero();){var m=h.modrn(f).toString(e);r=(h=h.idivn(f)).isZero()?m+r:l[c-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16,2)},s&&(o.prototype.toBuffer=function(e,t){return this.toArrayLike(s,e,t)}),o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},o.prototype.toArrayLike=function(e,t,r){this._strip();var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0");var s=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,o);return this["_toArrayLike"+("le"===t?"LE":"BE")](s,i),s},o.prototype._toArrayLikeLE=function(e,t){for(var r=0,n=0,i=0,o=0;i<this.length;i++){var s=this.words[i]<<o|n;e[r++]=255&s,r<e.length&&(e[r++]=s>>8&255),r<e.length&&(e[r++]=s>>16&255),6===o?(r<e.length&&(e[r++]=s>>24&255),n=0,o=0):(n=s>>>24,o+=2)}if(r<e.length)for(e[r++]=n;r<e.length;)e[r++]=0},o.prototype._toArrayLikeBE=function(e,t){for(var r=e.length-1,n=0,i=0,o=0;i<this.length;i++){var s=this.words[i]<<o|n;e[r--]=255&s,r>=0&&(e[r--]=s>>8&255),r>=0&&(e[r--]=s>>16&255),6===o?(r>=0&&(e[r--]=s>>24&255),n=0,o=0):(n=s>>>24,o+=2)}if(r>=0)for(e[r--]=n;r>=0;)e[r--]=0},Math.clz32?o.prototype._countBits=function(e){return 32-Math.clz32(e)}:o.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0==(8191&t)&&(r+=13,t>>>=13),0==(127&t)&&(r+=7,t>>>=7),0==(15&t)&&(r+=4,t>>>=4),0==(3&t)&&(r+=2,t>>>=2),0==(1&t)&&r++,r},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var r=this._zeroBits(this.words[t]);if(e+=r,26!==r)break}return e},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},o.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this._strip()},o.prototype.ior=function(e){return n(0==(this.negative|e.negative)),this.iuor(e)},o.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;r<t.length;r++)this.words[r]=this.words[r]&e.words[r];return this.length=t.length,this._strip()},o.prototype.iand=function(e){return n(0==(this.negative|e.negative)),this.iuand(e)},o.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;n<r.length;n++)this.words[n]=t.words[n]^r.words[n];if(this!==t)for(;n<t.length;n++)this.words[n]=t.words[n];return this.length=t.length,this._strip()},o.prototype.ixor=function(e){return n(0==(this.negative|e.negative)),this.iuxor(e)},o.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this._strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<<i:this.words[r]&~(1<<i),this._strip()},o.prototype.iadd=function(e){var t,r,n;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(r=this,n=e):(r=e,n=this);for(var i=0,o=0;o<n.length;o++)t=(0|r.words[o])+(0|n.words[o])+i,this.words[o]=67108863&t,i=t>>>26;for(;0!==i&&o<r.length;o++)t=(0|r.words[o])+i,this.words[o]=67108863&t,i=t>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},o.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var o=0,s=0;s<n.length;s++)o=(t=(0|r.words[s])-(0|n.words[s])+o)>>26,this.words[s]=67108863&t;for(;0!==o&&s<r.length;s++)o=(t=(0|r.words[s])+o)>>26,this.words[s]=67108863&t;if(0===o&&s<r.length&&r!==this)for(;s<r.length;s++)this.words[s]=r.words[s];return this.length=Math.max(this.length,s),r!==this&&(this.negative=1),this._strip()},o.prototype.sub=function(e){return this.clone().isub(e)};var g=function(e,t,r){var n,i,o,s=e.words,a=t.words,u=r.words,c=0,f=0|s[0],h=8191&f,l=f>>>13,d=0|s[1],p=8191&d,m=d>>>13,g=0|s[2],y=8191&g,b=g>>>13,v=0|s[3],w=8191&v,_=v>>>13,S=0|s[4],M=8191&S,A=S>>>13,E=0|s[5],O=8191&E,x=E>>>13,T=0|s[6],P=8191&T,j=T>>>13,k=0|s[7],I=8191&k,R=k>>>13,C=0|s[8],B=8191&C,N=C>>>13,L=0|s[9],D=8191&L,F=L>>>13,q=0|a[0],U=8191&q,z=q>>>13,V=0|a[1],$=8191&V,H=V>>>13,X=0|a[2],K=8191&X,J=X>>>13,Z=0|a[3],G=8191&Z,W=Z>>>13,Y=0|a[4],Q=8191&Y,ee=Y>>>13,te=0|a[5],re=8191&te,ne=te>>>13,ie=0|a[6],oe=8191&ie,se=ie>>>13,ae=0|a[7],ue=8191&ae,ce=ae>>>13,fe=0|a[8],he=8191&fe,le=fe>>>13,de=0|a[9],pe=8191&de,me=de>>>13;r.negative=e.negative^t.negative,r.length=19;var ge=(c+(n=Math.imul(h,U))|0)+((8191&(i=(i=Math.imul(h,z))+Math.imul(l,U)|0))<<13)|0;c=((o=Math.imul(l,z))+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(p,U),i=(i=Math.imul(p,z))+Math.imul(m,U)|0,o=Math.imul(m,z);var ye=(c+(n=n+Math.imul(h,$)|0)|0)+((8191&(i=(i=i+Math.imul(h,H)|0)+Math.imul(l,$)|0))<<13)|0;c=((o=o+Math.imul(l,H)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(y,U),i=(i=Math.imul(y,z))+Math.imul(b,U)|0,o=Math.imul(b,z),n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,H)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,H)|0;var be=(c+(n=n+Math.imul(h,K)|0)|0)+((8191&(i=(i=i+Math.imul(h,J)|0)+Math.imul(l,K)|0))<<13)|0;c=((o=o+Math.imul(l,J)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(w,U),i=(i=Math.imul(w,z))+Math.imul(_,U)|0,o=Math.imul(_,z),n=n+Math.imul(y,$)|0,i=(i=i+Math.imul(y,H)|0)+Math.imul(b,$)|0,o=o+Math.imul(b,H)|0,n=n+Math.imul(p,K)|0,i=(i=i+Math.imul(p,J)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,J)|0;var ve=(c+(n=n+Math.imul(h,G)|0)|0)+((8191&(i=(i=i+Math.imul(h,W)|0)+Math.imul(l,G)|0))<<13)|0;c=((o=o+Math.imul(l,W)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(M,U),i=(i=Math.imul(M,z))+Math.imul(A,U)|0,o=Math.imul(A,z),n=n+Math.imul(w,$)|0,i=(i=i+Math.imul(w,H)|0)+Math.imul(_,$)|0,o=o+Math.imul(_,H)|0,n=n+Math.imul(y,K)|0,i=(i=i+Math.imul(y,J)|0)+Math.imul(b,K)|0,o=o+Math.imul(b,J)|0,n=n+Math.imul(p,G)|0,i=(i=i+Math.imul(p,W)|0)+Math.imul(m,G)|0,o=o+Math.imul(m,W)|0;var we=(c+(n=n+Math.imul(h,Q)|0)|0)+((8191&(i=(i=i+Math.imul(h,ee)|0)+Math.imul(l,Q)|0))<<13)|0;c=((o=o+Math.imul(l,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(O,U),i=(i=Math.imul(O,z))+Math.imul(x,U)|0,o=Math.imul(x,z),n=n+Math.imul(M,$)|0,i=(i=i+Math.imul(M,H)|0)+Math.imul(A,$)|0,o=o+Math.imul(A,H)|0,n=n+Math.imul(w,K)|0,i=(i=i+Math.imul(w,J)|0)+Math.imul(_,K)|0,o=o+Math.imul(_,J)|0,n=n+Math.imul(y,G)|0,i=(i=i+Math.imul(y,W)|0)+Math.imul(b,G)|0,o=o+Math.imul(b,W)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,ee)|0;var _e=(c+(n=n+Math.imul(h,re)|0)|0)+((8191&(i=(i=i+Math.imul(h,ne)|0)+Math.imul(l,re)|0))<<13)|0;c=((o=o+Math.imul(l,ne)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(P,U),i=(i=Math.imul(P,z))+Math.imul(j,U)|0,o=Math.imul(j,z),n=n+Math.imul(O,$)|0,i=(i=i+Math.imul(O,H)|0)+Math.imul(x,$)|0,o=o+Math.imul(x,H)|0,n=n+Math.imul(M,K)|0,i=(i=i+Math.imul(M,J)|0)+Math.imul(A,K)|0,o=o+Math.imul(A,J)|0,n=n+Math.imul(w,G)|0,i=(i=i+Math.imul(w,W)|0)+Math.imul(_,G)|0,o=o+Math.imul(_,W)|0,n=n+Math.imul(y,Q)|0,i=(i=i+Math.imul(y,ee)|0)+Math.imul(b,Q)|0,o=o+Math.imul(b,ee)|0,n=n+Math.imul(p,re)|0,i=(i=i+Math.imul(p,ne)|0)+Math.imul(m,re)|0,o=o+Math.imul(m,ne)|0;var Se=(c+(n=n+Math.imul(h,oe)|0)|0)+((8191&(i=(i=i+Math.imul(h,se)|0)+Math.imul(l,oe)|0))<<13)|0;c=((o=o+Math.imul(l,se)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(I,U),i=(i=Math.imul(I,z))+Math.imul(R,U)|0,o=Math.imul(R,z),n=n+Math.imul(P,$)|0,i=(i=i+Math.imul(P,H)|0)+Math.imul(j,$)|0,o=o+Math.imul(j,H)|0,n=n+Math.imul(O,K)|0,i=(i=i+Math.imul(O,J)|0)+Math.imul(x,K)|0,o=o+Math.imul(x,J)|0,n=n+Math.imul(M,G)|0,i=(i=i+Math.imul(M,W)|0)+Math.imul(A,G)|0,o=o+Math.imul(A,W)|0,n=n+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,ee)|0,n=n+Math.imul(y,re)|0,i=(i=i+Math.imul(y,ne)|0)+Math.imul(b,re)|0,o=o+Math.imul(b,ne)|0,n=n+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,se)|0)+Math.imul(m,oe)|0,o=o+Math.imul(m,se)|0;var Me=(c+(n=n+Math.imul(h,ue)|0)|0)+((8191&(i=(i=i+Math.imul(h,ce)|0)+Math.imul(l,ue)|0))<<13)|0;c=((o=o+Math.imul(l,ce)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(B,U),i=(i=Math.imul(B,z))+Math.imul(N,U)|0,o=Math.imul(N,z),n=n+Math.imul(I,$)|0,i=(i=i+Math.imul(I,H)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,H)|0,n=n+Math.imul(P,K)|0,i=(i=i+Math.imul(P,J)|0)+Math.imul(j,K)|0,o=o+Math.imul(j,J)|0,n=n+Math.imul(O,G)|0,i=(i=i+Math.imul(O,W)|0)+Math.imul(x,G)|0,o=o+Math.imul(x,W)|0,n=n+Math.imul(M,Q)|0,i=(i=i+Math.imul(M,ee)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,ee)|0,n=n+Math.imul(w,re)|0,i=(i=i+Math.imul(w,ne)|0)+Math.imul(_,re)|0,o=o+Math.imul(_,ne)|0,n=n+Math.imul(y,oe)|0,i=(i=i+Math.imul(y,se)|0)+Math.imul(b,oe)|0,o=o+Math.imul(b,se)|0,n=n+Math.imul(p,ue)|0,i=(i=i+Math.imul(p,ce)|0)+Math.imul(m,ue)|0,o=o+Math.imul(m,ce)|0;var Ae=(c+(n=n+Math.imul(h,he)|0)|0)+((8191&(i=(i=i+Math.imul(h,le)|0)+Math.imul(l,he)|0))<<13)|0;c=((o=o+Math.imul(l,le)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(D,U),i=(i=Math.imul(D,z))+Math.imul(F,U)|0,o=Math.imul(F,z),n=n+Math.imul(B,$)|0,i=(i=i+Math.imul(B,H)|0)+Math.imul(N,$)|0,o=o+Math.imul(N,H)|0,n=n+Math.imul(I,K)|0,i=(i=i+Math.imul(I,J)|0)+Math.imul(R,K)|0,o=o+Math.imul(R,J)|0,n=n+Math.imul(P,G)|0,i=(i=i+Math.imul(P,W)|0)+Math.imul(j,G)|0,o=o+Math.imul(j,W)|0,n=n+Math.imul(O,Q)|0,i=(i=i+Math.imul(O,ee)|0)+Math.imul(x,Q)|0,o=o+Math.imul(x,ee)|0,n=n+Math.imul(M,re)|0,i=(i=i+Math.imul(M,ne)|0)+Math.imul(A,re)|0,o=o+Math.imul(A,ne)|0,n=n+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,se)|0)+Math.imul(_,oe)|0,o=o+Math.imul(_,se)|0,n=n+Math.imul(y,ue)|0,i=(i=i+Math.imul(y,ce)|0)+Math.imul(b,ue)|0,o=o+Math.imul(b,ce)|0,n=n+Math.imul(p,he)|0,i=(i=i+Math.imul(p,le)|0)+Math.imul(m,he)|0,o=o+Math.imul(m,le)|0;var Ee=(c+(n=n+Math.imul(h,pe)|0)|0)+((8191&(i=(i=i+Math.imul(h,me)|0)+Math.imul(l,pe)|0))<<13)|0;c=((o=o+Math.imul(l,me)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(D,$),i=(i=Math.imul(D,H))+Math.imul(F,$)|0,o=Math.imul(F,H),n=n+Math.imul(B,K)|0,i=(i=i+Math.imul(B,J)|0)+Math.imul(N,K)|0,o=o+Math.imul(N,J)|0,n=n+Math.imul(I,G)|0,i=(i=i+Math.imul(I,W)|0)+Math.imul(R,G)|0,o=o+Math.imul(R,W)|0,n=n+Math.imul(P,Q)|0,i=(i=i+Math.imul(P,ee)|0)+Math.imul(j,Q)|0,o=o+Math.imul(j,ee)|0,n=n+Math.imul(O,re)|0,i=(i=i+Math.imul(O,ne)|0)+Math.imul(x,re)|0,o=o+Math.imul(x,ne)|0,n=n+Math.imul(M,oe)|0,i=(i=i+Math.imul(M,se)|0)+Math.imul(A,oe)|0,o=o+Math.imul(A,se)|0,n=n+Math.imul(w,ue)|0,i=(i=i+Math.imul(w,ce)|0)+Math.imul(_,ue)|0,o=o+Math.imul(_,ce)|0,n=n+Math.imul(y,he)|0,i=(i=i+Math.imul(y,le)|0)+Math.imul(b,he)|0,o=o+Math.imul(b,le)|0;var Oe=(c+(n=n+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,me)|0)+Math.imul(m,pe)|0))<<13)|0;c=((o=o+Math.imul(m,me)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(D,K),i=(i=Math.imul(D,J))+Math.imul(F,K)|0,o=Math.imul(F,J),n=n+Math.imul(B,G)|0,i=(i=i+Math.imul(B,W)|0)+Math.imul(N,G)|0,o=o+Math.imul(N,W)|0,n=n+Math.imul(I,Q)|0,i=(i=i+Math.imul(I,ee)|0)+Math.imul(R,Q)|0,o=o+Math.imul(R,ee)|0,n=n+Math.imul(P,re)|0,i=(i=i+Math.imul(P,ne)|0)+Math.imul(j,re)|0,o=o+Math.imul(j,ne)|0,n=n+Math.imul(O,oe)|0,i=(i=i+Math.imul(O,se)|0)+Math.imul(x,oe)|0,o=o+Math.imul(x,se)|0,n=n+Math.imul(M,ue)|0,i=(i=i+Math.imul(M,ce)|0)+Math.imul(A,ue)|0,o=o+Math.imul(A,ce)|0,n=n+Math.imul(w,he)|0,i=(i=i+Math.imul(w,le)|0)+Math.imul(_,he)|0,o=o+Math.imul(_,le)|0;var xe=(c+(n=n+Math.imul(y,pe)|0)|0)+((8191&(i=(i=i+Math.imul(y,me)|0)+Math.imul(b,pe)|0))<<13)|0;c=((o=o+Math.imul(b,me)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(D,G),i=(i=Math.imul(D,W))+Math.imul(F,G)|0,o=Math.imul(F,W),n=n+Math.imul(B,Q)|0,i=(i=i+Math.imul(B,ee)|0)+Math.imul(N,Q)|0,o=o+Math.imul(N,ee)|0,n=n+Math.imul(I,re)|0,i=(i=i+Math.imul(I,ne)|0)+Math.imul(R,re)|0,o=o+Math.imul(R,ne)|0,n=n+Math.imul(P,oe)|0,i=(i=i+Math.imul(P,se)|0)+Math.imul(j,oe)|0,o=o+Math.imul(j,se)|0,n=n+Math.imul(O,ue)|0,i=(i=i+Math.imul(O,ce)|0)+Math.imul(x,ue)|0,o=o+Math.imul(x,ce)|0,n=n+Math.imul(M,he)|0,i=(i=i+Math.imul(M,le)|0)+Math.imul(A,he)|0,o=o+Math.imul(A,le)|0;var Te=(c+(n=n+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,me)|0)+Math.imul(_,pe)|0))<<13)|0;c=((o=o+Math.imul(_,me)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(D,Q),i=(i=Math.imul(D,ee))+Math.imul(F,Q)|0,o=Math.imul(F,ee),n=n+Math.imul(B,re)|0,i=(i=i+Math.imul(B,ne)|0)+Math.imul(N,re)|0,o=o+Math.imul(N,ne)|0,n=n+Math.imul(I,oe)|0,i=(i=i+Math.imul(I,se)|0)+Math.imul(R,oe)|0,o=o+Math.imul(R,se)|0,n=n+Math.imul(P,ue)|0,i=(i=i+Math.imul(P,ce)|0)+Math.imul(j,ue)|0,o=o+Math.imul(j,ce)|0,n=n+Math.imul(O,he)|0,i=(i=i+Math.imul(O,le)|0)+Math.imul(x,he)|0,o=o+Math.imul(x,le)|0;var Pe=(c+(n=n+Math.imul(M,pe)|0)|0)+((8191&(i=(i=i+Math.imul(M,me)|0)+Math.imul(A,pe)|0))<<13)|0;c=((o=o+Math.imul(A,me)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(D,re),i=(i=Math.imul(D,ne))+Math.imul(F,re)|0,o=Math.imul(F,ne),n=n+Math.imul(B,oe)|0,i=(i=i+Math.imul(B,se)|0)+Math.imul(N,oe)|0,o=o+Math.imul(N,se)|0,n=n+Math.imul(I,ue)|0,i=(i=i+Math.imul(I,ce)|0)+Math.imul(R,ue)|0,o=o+Math.imul(R,ce)|0,n=n+Math.imul(P,he)|0,i=(i=i+Math.imul(P,le)|0)+Math.imul(j,he)|0,o=o+Math.imul(j,le)|0;var je=(c+(n=n+Math.imul(O,pe)|0)|0)+((8191&(i=(i=i+Math.imul(O,me)|0)+Math.imul(x,pe)|0))<<13)|0;c=((o=o+Math.imul(x,me)|0)+(i>>>13)|0)+(je>>>26)|0,je&=67108863,n=Math.imul(D,oe),i=(i=Math.imul(D,se))+Math.imul(F,oe)|0,o=Math.imul(F,se),n=n+Math.imul(B,ue)|0,i=(i=i+Math.imul(B,ce)|0)+Math.imul(N,ue)|0,o=o+Math.imul(N,ce)|0,n=n+Math.imul(I,he)|0,i=(i=i+Math.imul(I,le)|0)+Math.imul(R,he)|0,o=o+Math.imul(R,le)|0;var ke=(c+(n=n+Math.imul(P,pe)|0)|0)+((8191&(i=(i=i+Math.imul(P,me)|0)+Math.imul(j,pe)|0))<<13)|0;c=((o=o+Math.imul(j,me)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(D,ue),i=(i=Math.imul(D,ce))+Math.imul(F,ue)|0,o=Math.imul(F,ce),n=n+Math.imul(B,he)|0,i=(i=i+Math.imul(B,le)|0)+Math.imul(N,he)|0,o=o+Math.imul(N,le)|0;var Ie=(c+(n=n+Math.imul(I,pe)|0)|0)+((8191&(i=(i=i+Math.imul(I,me)|0)+Math.imul(R,pe)|0))<<13)|0;c=((o=o+Math.imul(R,me)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(D,he),i=(i=Math.imul(D,le))+Math.imul(F,he)|0,o=Math.imul(F,le);var Re=(c+(n=n+Math.imul(B,pe)|0)|0)+((8191&(i=(i=i+Math.imul(B,me)|0)+Math.imul(N,pe)|0))<<13)|0;c=((o=o+Math.imul(N,me)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863;var Ce=(c+(n=Math.imul(D,pe))|0)+((8191&(i=(i=Math.imul(D,me))+Math.imul(F,pe)|0))<<13)|0;return c=((o=Math.imul(F,me))+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,u[0]=ge,u[1]=ye,u[2]=be,u[3]=ve,u[4]=we,u[5]=_e,u[6]=Se,u[7]=Me,u[8]=Ae,u[9]=Ee,u[10]=Oe,u[11]=xe,u[12]=Te,u[13]=Pe,u[14]=je,u[15]=ke,u[16]=Ie,u[17]=Re,u[18]=Ce,0!==c&&(u[19]=c,r.length++),r};function y(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,o=0;o<r.length-1;o++){var s=i;i=0;for(var a=67108863&n,u=Math.min(o,t.length-1),c=Math.max(0,o-e.length+1);c<=u;c++){var f=o-c,h=(0|e.words[f])*(0|t.words[c]),l=67108863&h;a=67108863&(l=l+a|0),i+=(s=(s=s+(h/67108864|0)|0)+(l>>>26)|0)>>>26,s&=67108863}r.words[o]=a,n=s,s=i}return 0!==n?r.words[o]=n:r.length--,r._strip()}function b(e,t,r){return y(e,t,r)}function v(e,t){this.x=e,this.y=t}Math.imul||(g=m),o.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?g(this,e,t):r<63?m(this,e,t):r<1024?y(this,e,t):b(this,e,t)},v.prototype.makeRBT=function(e){for(var t=new Array(e),r=o.prototype._countBits(e)-1,n=0;n<e;n++)t[n]=this.revBin(n,r,e);return t},v.prototype.revBin=function(e,t,r){if(0===e||e===r-1)return e;for(var n=0,i=0;i<t;i++)n|=(1&e)<<t-i-1,e>>=1;return n},v.prototype.permute=function(e,t,r,n,i,o){for(var s=0;s<o;s++)n[s]=t[e[s]],i[s]=r[e[s]]},v.prototype.transform=function(e,t,r,n,i,o){this.permute(o,e,t,r,n,i);for(var s=1;s<i;s<<=1)for(var a=s<<1,u=Math.cos(2*Math.PI/a),c=Math.sin(2*Math.PI/a),f=0;f<i;f+=a)for(var h=u,l=c,d=0;d<s;d++){var p=r[f+d],m=n[f+d],g=r[f+d+s],y=n[f+d+s],b=h*g-l*y;y=h*y+l*g,g=b,r[f+d]=p+g,n[f+d]=m+y,r[f+d+s]=p-g,n[f+d+s]=m-y,d!==a&&(b=u*h-c*l,l=u*l+c*h,h=b)}},v.prototype.guessLen13b=function(e,t){var r=1|Math.max(t,e),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},v.prototype.conjugate=function(e,t,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=e[n];e[n]=e[r-n-1],e[r-n-1]=i,i=t[n],t[n]=-t[r-n-1],t[r-n-1]=-i}},v.prototype.normalize13b=function(e,t){for(var r=0,n=0;n<t/2;n++){var i=8192*Math.round(e[2*n+1]/t)+Math.round(e[2*n]/t)+r;e[n]=67108863&i,r=i<67108864?0:i/67108864|0}return e},v.prototype.convert13b=function(e,t,r,i){for(var o=0,s=0;s<t;s++)o+=0|e[s],r[2*s]=8191&o,o>>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*t;s<i;++s)r[s]=0;n(0===o),n(0==(-8192&o))},v.prototype.stub=function(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=0;return t},v.prototype.mulp=function(e,t,r){var n=2*this.guessLen13b(e.length,t.length),i=this.makeRBT(n),o=this.stub(n),s=new Array(n),a=new Array(n),u=new Array(n),c=new Array(n),f=new Array(n),h=new Array(n),l=r.words;l.length=n,this.convert13b(e.words,e.length,s,n),this.convert13b(t.words,t.length,c,n),this.transform(s,o,a,u,n,i),this.transform(c,o,f,h,n,i);for(var d=0;d<n;d++){var p=a[d]*f[d]-u[d]*h[d];u[d]=a[d]*h[d]+u[d]*f[d],a[d]=p}return this.conjugate(a,u,n),this.transform(a,u,l,o,n,i),this.conjugate(l,o,n),this.normalize13b(l,n),r.negative=e.negative^t.negative,r.length=e.length+t.length,r._strip()},o.prototype.mul=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},o.prototype.mulf=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),b(this,e,t)},o.prototype.imul=function(e){return this.clone().mulTo(e,this)},o.prototype.imuln=function(e){var t=e<0;t&&(e=-e),n("number"==typeof e),n(e<67108864);for(var r=0,i=0;i<this.length;i++){var o=(0|this.words[i])*e,s=(67108863&o)+(67108863&r);r>>=26,r+=o/67108864|0,r+=s>>>26,this.words[i]=67108863&s}return 0!==r&&(this.words[i]=r,this.length++),t?this.ineg():this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r<t.length;r++){var n=r/26|0,i=r%26;t[r]=e.words[n]>>>i&1}return t}(e);if(0===t.length)return new o(1);for(var r=this,n=0;n<t.length&&0===t[n];n++,r=r.sqr());if(++n<t.length)for(var i=r.sqr();n<t.length;n++,i=i.sqr())0!==t[n]&&(r=r.mul(i));return r},o.prototype.iushln=function(e){n("number"==typeof e&&e>=0);var t,r=e%26,i=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(t=0;t<this.length;t++){var a=this.words[t]&o,u=(0|this.words[t])-a<<r;this.words[t]=u|s,s=a>>>26-r}s&&(this.words[t]=s,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this._strip()},o.prototype.ishln=function(e){return n(0===this.negative),this.iushln(e)},o.prototype.iushrn=function(e,t,r){var i;n("number"==typeof e&&e>=0),i=t?(t-t%26)/26:0;var o=e%26,s=Math.min((e-o)/26,this.length),a=67108863^67108863>>>o<<o,u=r;if(i-=s,i=Math.max(0,i),u){for(var c=0;c<s;c++)u.words[c]=this.words[c];u.length=s}if(0===s);else if(this.length>s)for(this.length-=s,c=0;c<this.length;c++)this.words[c]=this.words[c+s];else this.words[0]=0,this.length=1;var f=0;for(c=this.length-1;c>=0&&(0!==f||c>=i);c--){var h=0|this.words[c];this.words[c]=f<<26-o|h>>>o,f=h&a}return u&&0!==f&&(u.words[u.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<<t;return!(this.length<=r||!(this.words[r]&i))},o.prototype.imaskn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this._strip()},o.prototype.maskn=function(e){return this.clone().imaskn(e)},o.prototype.iaddn=function(e){return n("number"==typeof e),n(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<=e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},o.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this._strip()},o.prototype.addn=function(e){return this.clone().iaddn(e)},o.prototype.subn=function(e){return this.clone().isubn(e)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(e,t,r){var i,o,s=e.length+r;this._expand(s);var a=0;for(i=0;i<e.length;i++){o=(0|this.words[i+r])+a;var u=(0|e.words[i])*t;a=((o-=67108863&u)>>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i<this.length-r;i++)a=(o=(0|this.words[i+r])+a)>>26,this.words[i+r]=67108863&o;if(0===a)return this._strip();for(n(-1===a),a=0,i=0;i<this.length;i++)a=(o=-(0|this.words[i])+a)>>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),i=e,s=0|i.words[i.length-1];0!=(r=26-this._countBits(s))&&(i=i.ushln(r),n.iushln(r),s=0|i.words[i.length-1]);var a,u=n.length-i.length;if("mod"!==t){(a=new o(null)).length=u+1,a.words=new Array(a.length);for(var c=0;c<a.length;c++)a.words[c]=0}var f=n.clone()._ishlnsubmul(i,1,u);0===f.negative&&(n=f,a&&(a.words[u]=1));for(var h=u-1;h>=0;h--){var l=67108864*(0|n.words[i.length+h])+(0|n.words[i.length+h-1]);for(l=Math.min(l/s|0,67108863),n._ishlnsubmul(i,l,h);0!==n.negative;)l--,n.negative=0,n._ishlnsubmul(i,1,h),n.isZero()||(n.negative^=1);a&&(a.words[h]=l)}return a&&a._strip(),n._strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:a||null,mod:n}},o.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(i=a.div.neg()),"div"!==t&&(s=a.mod.neg(),r&&0!==s.negative&&s.iadd(e)),{div:i,mod:s}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(i=a.div.neg()),{div:i,mod:a.mod}):0!=(this.negative&e.negative)?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(s=a.mod.neg(),r&&0!==s.negative&&s.isub(e)),{div:a.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modrn(e.words[0]))}:this._wordDiv(e,t);var i,s,a},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modrn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=(1<<26)%e,i=0,o=this.length-1;o>=0;o--)i=(r*i+(0|this.words[o]))%e;return t?-i:i},o.prototype.modn=function(e){return this.modrn(e)},o.prototype.idivn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*r;this.words[i]=o/e|0,r=o%e}return this._strip(),t?this.ineg():this},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),s=new o(0),a=new o(0),u=new o(1),c=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++c;for(var f=r.clone(),h=t.clone();!t.isZero();){for(var l=0,d=1;0==(t.words[0]&d)&&l<26;++l,d<<=1);if(l>0)for(t.iushrn(l);l-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(f),s.isub(h)),i.iushrn(1),s.iushrn(1);for(var p=0,m=1;0==(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(a.isOdd()||u.isOdd())&&(a.iadd(f),u.isub(h)),a.iushrn(1),u.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(a),s.isub(u)):(r.isub(t),a.isub(i),u.isub(s))}return{a,b:u,gcd:r.iushln(c)}},o.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,s=new o(1),a=new o(0),u=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,f=1;0==(t.words[0]&f)&&c<26;++c,f<<=1);if(c>0)for(t.iushrn(c);c-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var h=0,l=1;0==(r.words[0]&l)&&h<26;++h,l<<=1);if(h>0)for(r.iushrn(h);h-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);t.cmp(r)>=0?(t.isub(r),s.isub(a)):(r.isub(t),a.isub(s))}return(i=0===t.cmpn(1)?s:a).cmpn(0)<0&&i.iadd(e),i},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var o=t;t=r,r=o}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<<t;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var o=i,s=r;0!==o&&s<this.length;s++){var a=0|this.words[s];o=(a+=o)>>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},o.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},o.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){n<i?t=-1:n>i&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new O(e)},o.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var w={k256:null,p224:null,p192:null,p25519:null};function _(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function S(){_.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function M(){_.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function A(){_.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function E(){_.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function O(e){if("string"==typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function x(e){O.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}_.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},_.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},_.prototype.split=function(e,t){e.iushrn(this.n,0,t)},_.prototype.imulK=function(e){return e.imul(this.k)},i(S,_),S.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),i=0;i<n;i++)t.words[i]=e.words[i];if(t.length=n,e.length<=9)return e.words[0]=0,void(e.length=1);var o=e.words[9];for(t.words[t.length++]=o&r,i=10;i<e.length;i++){var s=0|e.words[i];e.words[i-10]=(s&r)<<4|o>>>22,o=s}o>>>=22,e.words[i-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},S.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r<e.length;r++){var n=0|e.words[r];t+=977*n,e.words[r]=67108863&t,t=64*n+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},i(M,_),i(A,_),i(E,_),E.prototype.imulK=function(e){for(var t=0,r=0;r<e.length;r++){var n=19*(0|e.words[r])+t,i=67108863&n;n>>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(w[e])return w[e];var t;if("k256"===e)t=new S;else if("p224"===e)t=new M;else if("p192"===e)t=new A;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new E}return w[e]=t,t},O.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},O.prototype._verify2=function(e,t){n(0==(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},O.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(f(e,e.umod(this.m)._forceRed(this)),e)},O.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},O.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},O.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},O.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},O.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},O.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},O.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},O.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},O.prototype.isqr=function(e){return this.imul(e,e.clone())},O.prototype.sqr=function(e){return this.mul(e,e)},O.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new o(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);n(!i.isZero());var a=new o(1).toRed(this),u=a.redNeg(),c=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new o(2*f*f).toRed(this);0!==this.pow(f,c).cmp(u);)f.redIAdd(u);for(var h=this.pow(f,i),l=this.pow(e,i.addn(1).iushrn(1)),d=this.pow(e,i),p=s;0!==d.cmp(a);){for(var m=d,g=0;0!==m.cmp(a);g++)m=m.redSqr();n(g<p);var y=this.pow(h,new o(1).iushln(p-g-1));l=l.redMul(y),h=y.redSqr(),d=d.redMul(h),p=g}return l},O.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},O.prototype.pow=function(e,t){if(t.isZero())return new o(1).toRed(this);if(0===t.cmpn(1))return e.clone();var r=new Array(16);r[0]=new o(1).toRed(this),r[1]=e;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],e);var i=r[0],s=0,a=0,u=t.bitLength()%26;for(0===u&&(u=26),n=t.length-1;n>=0;n--){for(var c=t.words[n],f=u-1;f>=0;f--){var h=c>>f&1;i!==r[0]&&(i=this.sqr(i)),0!==h||0!==s?(s<<=1,s|=h,(4==++a||0===n&&0===f)&&(i=this.mul(i,r[s]),a=0,s=0)):a=0}u=26}return i},O.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},O.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new x(e)},i(x,O),x.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},x.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},x.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},x.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},x.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=r.nmd(e),this)},7295:(e,t,r)=>{var n=r(8764).Buffer;e.exports=function(e,t){for(var r=Math.min(e.length,t.length),i=new n(r),o=0;o<r;++o)i[o]=e[o]^t[o];return i}},8764:(e,t,r)=>{"use strict";const n=r(9742),i=r(645),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=u,t.SlowBuffer=function(e){return+e!=e&&(e=0),u.alloc(+e)},t.INSPECT_MAX_BYTES=50;const s=2147483647;function a(e){if(e>s)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,u.prototype),t}function u(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return h(e)}return c(e,t,r)}function c(e,t,r){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!u.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const r=0|m(e,t);let n=a(r);const i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(Z(e,Uint8Array)){const t=new Uint8Array(e);return d(t.buffer,t.byteOffset,t.byteLength)}return l(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(Z(e,ArrayBuffer)||e&&Z(e.buffer,ArrayBuffer))return d(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(Z(e,SharedArrayBuffer)||e&&Z(e.buffer,SharedArrayBuffer)))return d(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return u.from(n,t,r);const i=function(e){if(u.isBuffer(e)){const t=0|p(e.length),r=a(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||G(e.length)?a(0):l(e):"Buffer"===e.type&&Array.isArray(e.data)?l(e.data):void 0}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return u.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function f(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function h(e){return f(e),a(e<0?0:0|p(e))}function l(e){const t=e.length<0?0:0|p(e.length),r=a(t);for(let n=0;n<t;n+=1)r[n]=255&e[n];return r}function d(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');let n;return n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),Object.setPrototypeOf(n,u.prototype),n}function p(e){if(e>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|e}function m(e,t){if(u.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||Z(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return X(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return K(e).length;default:if(i)return n?-1:X(e).length;t=(""+t).toLowerCase(),i=!0}}function g(e,t,r){let n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return j(this,t,r);case"utf8":case"utf-8":return O(this,t,r);case"ascii":return T(this,t,r);case"latin1":case"binary":return P(this,t,r);case"base64":return E(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function y(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function b(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),G(r=+r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=u.from(t,n)),u.isBuffer(t))return 0===t.length?-1:v(e,t,r,n,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):v(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function v(e,t,r,n,i){let o,s=1,a=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;s=2,a/=2,u/=2,r/=2}function c(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){let n=-1;for(o=r;o<a;o++)if(c(e,o)===c(t,-1===n?0:o-n)){if(-1===n&&(n=o),o-n+1===u)return n*s}else-1!==n&&(o-=o-n),n=-1}else for(r+u>a&&(r=a-u),o=r;o>=0;o--){let r=!0;for(let n=0;n<u;n++)if(c(e,o+n)!==c(t,n)){r=!1;break}if(r)return o}return-1}function w(e,t,r,n){r=Number(r)||0;const i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;const o=t.length;let s;for(n>o/2&&(n=o/2),s=0;s<n;++s){const n=parseInt(t.substr(2*s,2),16);if(G(n))return s;e[r+s]=n}return s}function _(e,t,r,n){return J(X(t,e.length-r),e,r,n)}function S(e,t,r,n){return J(function(e){const t=[];for(let r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function M(e,t,r,n){return J(K(t),e,r,n)}function A(e,t,r,n){return J(function(e,t){let r,n,i;const o=[];for(let s=0;s<e.length&&!((t-=2)<0);++s)r=e.charCodeAt(s),n=r>>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function E(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function O(e,t,r){r=Math.min(e.length,r);const n=[];let i=t;for(;i<r;){const t=e[i];let o=null,s=t>239?4:t>223?3:t>191?2:1;if(i+s<=r){let r,n,a,u;switch(s){case 1:t<128&&(o=t);break;case 2:r=e[i+1],128==(192&r)&&(u=(31&t)<<6|63&r,u>127&&(o=u));break;case 3:r=e[i+1],n=e[i+2],128==(192&r)&&128==(192&n)&&(u=(15&t)<<12|(63&r)<<6|63&n,u>2047&&(u<55296||u>57343)&&(o=u));break;case 4:r=e[i+1],n=e[i+2],a=e[i+3],128==(192&r)&&128==(192&n)&&128==(192&a)&&(u=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&a,u>65535&&u<1114112&&(o=u))}}null===o?(o=65533,s=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=s}return function(e){const t=e.length;if(t<=x)return String.fromCharCode.apply(String,e);let r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=x));return r}(n)}t.kMaxLength=s,u.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),u.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||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."),Object.defineProperty(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}}),u.poolSize=8192,u.from=function(e,t,r){return c(e,t,r)},Object.setPrototypeOf(u.prototype,Uint8Array.prototype),Object.setPrototypeOf(u,Uint8Array),u.alloc=function(e,t,r){return function(e,t,r){return f(e),e<=0?a(e):void 0!==t?"string"==typeof r?a(e).fill(t,r):a(e).fill(t):a(e)}(e,t,r)},u.allocUnsafe=function(e){return h(e)},u.allocUnsafeSlow=function(e){return h(e)},u.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==u.prototype},u.compare=function(e,t){if(Z(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),Z(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),!u.isBuffer(e)||!u.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let i=0,o=Math.min(r,n);i<o;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0},u.isEncoding=function(e){switch(String(e).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!0;default:return!1}},u.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return u.alloc(0);let r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;const n=u.allocUnsafe(t);let i=0;for(r=0;r<e.length;++r){let t=e[r];if(Z(t,Uint8Array))i+t.length>n.length?(u.isBuffer(t)||(t=u.from(t)),t.copy(n,i)):Uint8Array.prototype.set.call(n,t,i);else{if(!u.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(n,i)}i+=t.length}return n},u.byteLength=m,u.prototype._isBuffer=!0,u.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)y(this,t,t+1);return this},u.prototype.swap32=function(){const e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)y(this,t,t+3),y(this,t+1,t+2);return this},u.prototype.swap64=function(){const e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)y(this,t,t+7),y(this,t+1,t+6),y(this,t+2,t+5),y(this,t+3,t+4);return this},u.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?O(this,0,e):g.apply(this,arguments)},u.prototype.toLocaleString=u.prototype.toString,u.prototype.equals=function(e){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===u.compare(this,e)},u.prototype.inspect=function(){let e="";const r=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},o&&(u.prototype[o]=u.prototype.inspect),u.prototype.compare=function(e,t,r,n,i){if(Z(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),!u.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;let o=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(t>>>=0);const a=Math.min(o,s),c=this.slice(n,i),f=e.slice(t,r);for(let e=0;e<a;++e)if(c[e]!==f[e]){o=c[e],s=f[e];break}return o<s?-1:s<o?1:0},u.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},u.prototype.indexOf=function(e,t,r){return b(this,e,t,r,!0)},u.prototype.lastIndexOf=function(e,t,r){return b(this,e,t,r,!1)},u.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return w(this,e,t,r);case"utf8":case"utf-8":return _(this,e,t,r);case"ascii":case"latin1":case"binary":return S(this,e,t,r);case"base64":return M(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const x=4096;function T(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}function P(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}function j(e,t,r){const n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);let i="";for(let n=t;n<r;++n)i+=W[e[n]];return i}function k(e,t,r){const n=e.slice(t,r);let i="";for(let e=0;e<n.length-1;e+=2)i+=String.fromCharCode(n[e]+256*n[e+1]);return i}function I(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function R(e,t,r,n,i,o){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function C(e,t,r,n,i){z(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s,r}function B(e,t,r,n,i){z(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r+7]=o,o>>=8,e[r+6]=o,o>>=8,e[r+5]=o,o>>=8,e[r+4]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=s,s>>=8,e[r+2]=s,s>>=8,e[r+1]=s,s>>=8,e[r]=s,r+8}function N(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function L(e,t,r,n,o){return t=+t,r>>>=0,o||N(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function D(e,t,r,n,o){return t=+t,r>>>=0,o||N(e,0,r,8),i.write(e,t,r,n,52,8),r+8}u.prototype.slice=function(e,t){const r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);const n=this.subarray(e,t);return Object.setPrototypeOf(n,u.prototype),n},u.prototype.readUintLE=u.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||I(e,t,this.length);let n=this[e],i=1,o=0;for(;++o<t&&(i*=256);)n+=this[e+o]*i;return n},u.prototype.readUintBE=u.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||I(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n},u.prototype.readUint8=u.prototype.readUInt8=function(e,t){return e>>>=0,t||I(e,1,this.length),this[e]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(e,t){return e>>>=0,t||I(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(e,t){return e>>>=0,t||I(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(e,t){return e>>>=0,t||I(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(e,t){return e>>>=0,t||I(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readBigUInt64LE=Y((function(e){V(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||$(e,this.length-8);const n=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,i=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(n)+(BigInt(i)<<BigInt(32))})),u.prototype.readBigUInt64BE=Y((function(e){V(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||$(e,this.length-8);const n=t*2**24+65536*this[++e]+256*this[++e]+this[++e],i=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<<BigInt(32))+BigInt(i)})),u.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||I(e,t,this.length);let n=this[e],i=1,o=0;for(;++o<t&&(i*=256);)n+=this[e+o]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*t)),n},u.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||I(e,t,this.length);let n=t,i=1,o=this[e+--n];for(;n>0&&(i*=256);)o+=this[e+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o},u.prototype.readInt8=function(e,t){return e>>>=0,t||I(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){e>>>=0,t||I(e,2,this.length);const r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(e,t){e>>>=0,t||I(e,2,this.length);const r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(e,t){return e>>>=0,t||I(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return e>>>=0,t||I(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readBigInt64LE=Y((function(e){V(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||$(e,this.length-8);const n=this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24);return(BigInt(n)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)})),u.prototype.readBigInt64BE=Y((function(e){V(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||$(e,this.length-8);const n=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(n)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+r)})),u.prototype.readFloatLE=function(e,t){return e>>>=0,t||I(e,4,this.length),i.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return e>>>=0,t||I(e,4,this.length),i.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return e>>>=0,t||I(e,8,this.length),i.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return e>>>=0,t||I(e,8,this.length),i.read(this,e,!1,52,8)},u.prototype.writeUintLE=u.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||R(this,e,t,r,Math.pow(2,8*r)-1,0);let i=1,o=0;for(this[t]=255&e;++o<r&&(i*=256);)this[t+o]=e/i&255;return t+r},u.prototype.writeUintBE=u.prototype.writeUIntBE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||R(this,e,t,r,Math.pow(2,8*r)-1,0);let i=r-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r},u.prototype.writeUint8=u.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,1,255,0),this[t]=255&e,t+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeBigUInt64LE=Y((function(e,t=0){return C(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),u.prototype.writeBigUInt64BE=Y((function(e,t=0){return B(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),u.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);R(this,e,t,r,n-1,-n)}let i=0,o=1,s=0;for(this[t]=255&e;++i<r&&(o*=256);)e<0&&0===s&&0!==this[t+i-1]&&(s=1),this[t+i]=(e/o>>0)-s&255;return t+r},u.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);R(this,e,t,r,n-1,-n)}let i=r-1,o=1,s=0;for(this[t+i]=255&e;--i>=0&&(o*=256);)e<0&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/o>>0)-s&255;return t+r},u.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},u.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeBigInt64LE=Y((function(e,t=0){return C(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),u.prototype.writeBigInt64BE=Y((function(e,t=0){return B(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),u.prototype.writeFloatLE=function(e,t,r){return L(this,e,t,!0,r)},u.prototype.writeFloatBE=function(e,t,r){return L(this,e,t,!1,r)},u.prototype.writeDoubleLE=function(e,t,r){return D(this,e,t,!0,r)},u.prototype.writeDoubleBE=function(e,t,r){return D(this,e,t,!1,r)},u.prototype.copy=function(e,t,r,n){if(!u.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);const i=n-r;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,r,n):Uint8Array.prototype.set.call(e,this.subarray(r,n),t),i},u.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!u.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){const t=e.charCodeAt(0);("utf8"===n&&t<128||"latin1"===n)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;let i;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i<r;++i)this[i]=e;else{const o=u.isBuffer(e)?e:u.from(e,n),s=o.length;if(0===s)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<r-t;++i)this[i+t]=o[i%s]}return this};const F={};function q(e,t,r){F[e]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function U(e){let t="",r=e.length;const n="-"===e[0]?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function z(e,t,r,n,i,o){if(e>r||e<t){const n="bigint"==typeof t?"n":"";let i;throw i=o>3?0===t||t===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(o+1)}${n}`:`>= -(2${n} ** ${8*(o+1)-1}${n}) and < 2 ** ${8*(o+1)-1}${n}`:`>= ${t}${n} and <= ${r}${n}`,new F.ERR_OUT_OF_RANGE("value",i,e)}!function(e,t,r){V(t,"offset"),void 0!==e[t]&&void 0!==e[t+r]||$(t,e.length-(r+1))}(n,i,o)}function V(e,t){if("number"!=typeof e)throw new F.ERR_INVALID_ARG_TYPE(t,"number",e)}function $(e,t,r){if(Math.floor(e)!==e)throw V(e,r),new F.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new F.ERR_BUFFER_OUT_OF_BOUNDS;throw new F.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}q("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),q("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),q("ERR_OUT_OF_RANGE",(function(e,t,r){let n=`The value of "${e}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=U(String(r)):"bigint"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=U(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n}),RangeError);const H=/[^+/0-9A-Za-z-_]/g;function X(e,t){let r;t=t||1/0;const n=e.length;let i=null;const o=[];for(let s=0;s<n;++s){if(r=e.charCodeAt(s),r>55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function K(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(H,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function J(e,t,r,n){let i;for(i=0;i<n&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function Z(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function G(e){return e!=e}const W=function(){const e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function Y(e){return"undefined"==typeof BigInt?Q:e}function Q(){throw new Error("BigInt not supported")}},584:e=>{e.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},1924:(e,t,r)=>{"use strict";var n=r(210),i=r(5559),o=i(n("String.prototype.indexOf"));e.exports=function(e,t){var r=n(e,!!t);return"function"==typeof r&&o(e,".prototype.")>-1?i(r):r}},5559:(e,t,r)=>{"use strict";var n=r(8612),i=r(210),o=i("%Function.prototype.apply%"),s=i("%Function.prototype.call%"),a=i("%Reflect.apply%",!0)||n.call(s,o),u=i("%Object.getOwnPropertyDescriptor%",!0),c=i("%Object.defineProperty%",!0),f=i("%Math.max%");if(c)try{c({},"a",{value:1})}catch(e){c=null}e.exports=function(e){var t=a(n,s,arguments);if(u&&c){var r=u(t,"length");r.configurable&&c(t,"length",{value:1+f(0,e.length-(arguments.length-1))})}return t};var h=function(){return a(n,o,arguments)};c?c(e.exports,"apply",{value:h}):e.exports.apply=h},1027:(e,t,r)=>{var n=r(9509).Buffer,i=r(2830).Transform,o=r(2553).s;function s(e){i.call(this),this.hashMode="string"==typeof e,this.hashMode?this[e]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}r(5717)(s,i),s.prototype.update=function(e,t,r){"string"==typeof e&&(e=n.from(e,t));var i=this._update(e);return this.hashMode?this:(r&&(i=this._toString(i,r)),i)},s.prototype.setAutoPadding=function(){},s.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},s.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},s.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},s.prototype._transform=function(e,t,r){var n;try{this.hashMode?this._update(e):this.push(this._update(e))}catch(e){n=e}finally{r(n)}},s.prototype._flush=function(e){var t;try{this.push(this.__final())}catch(e){t=e}e(t)},s.prototype._finalOrDigest=function(e){var t=this.__final()||n.alloc(0);return e&&(t=this._toString(t,e,!0)),t},s.prototype._toString=function(e,t,r){if(this._decoder||(this._decoder=new o(t),this._encoding=t),this._encoding!==t)throw new Error("can't switch encodings");var n=this._decoder.write(e);return r&&(n+=this._decoder.end()),n},e.exports=s},6393:(e,t,r)=>{var n=r(8764).Buffer,i=r(6266),o=r(3550);e.exports=function(e){return new a(e)};var s={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};function a(e){this.curveType=s[e],this.curveType||(this.curveType={name:e}),this.curve=new i.ec(this.curveType.name),this.keys=void 0}function u(e,t,r){Array.isArray(e)||(e=e.toArray());var i=new n(e);if(r&&i.length<r){var o=new n(r-i.length);o.fill(0),i=n.concat([o,i])}return t?i.toString(t):i}s.p224=s.secp224r1,s.p256=s.secp256r1=s.prime256v1,s.p192=s.secp192r1=s.prime192v1,s.p384=s.secp384r1,s.p521=s.secp521r1,a.prototype.generateKeys=function(e,t){return this.keys=this.curve.genKeyPair(),this.getPublicKey(e,t)},a.prototype.computeSecret=function(e,t,r){return t=t||"utf8",n.isBuffer(e)||(e=new n(e,t)),u(this.curve.keyFromPublic(e).getPublic().mul(this.keys.getPrivate()).getX(),r,this.curveType.byteLength)},a.prototype.getPublicKey=function(e,t){var r=this.keys.getPublic("compressed"===t,!0);return"hybrid"===t&&(r[r.length-1]%2?r[0]=7:r[0]=6),u(r,e)},a.prototype.getPrivateKey=function(e){return u(this.keys.getPrivate(),e)},a.prototype.setPublicKey=function(e,t){return t=t||"utf8",n.isBuffer(e)||(e=new n(e,t)),this.keys._importPublic(e),this},a.prototype.setPrivateKey=function(e,t){t=t||"utf8",n.isBuffer(e)||(e=new n(e,t));var r=new o(e);return r=r.toString(16),this.keys=this.curve.genKeyPair(),this.keys._importPrivate(r),this}},3482:(e,t,r)=>{"use strict";var n=r(5717),i=r(2318),o=r(9785),s=r(9072),a=r(1027);function u(e){a.call(this,"digest"),this._hash=e}n(u,a),u.prototype._update=function(e){this._hash.update(e)},u.prototype._final=function(){return this._hash.digest()},e.exports=function(e){return"md5"===(e=e.toLowerCase())?new i:"rmd160"===e||"ripemd160"===e?new o:new u(s(e))}},8028:(e,t,r)=>{var n=r(2318);e.exports=function(e){return(new n).update(e).digest()}},8355:(e,t,r)=>{"use strict";var n=r(5717),i=r(1031),o=r(1027),s=r(9509).Buffer,a=r(8028),u=r(9785),c=r(9072),f=s.alloc(128);function h(e,t){o.call(this,"digest"),"string"==typeof t&&(t=s.from(t));var r="sha512"===e||"sha384"===e?128:64;this._alg=e,this._key=t,t.length>r?t=("rmd160"===e?new u:c(e)).update(t).digest():t.length<r&&(t=s.concat([t,f],r));for(var n=this._ipad=s.allocUnsafe(r),i=this._opad=s.allocUnsafe(r),a=0;a<r;a++)n[a]=54^t[a],i[a]=92^t[a];this._hash="rmd160"===e?new u:c(e),this._hash.update(n)}n(h,o),h.prototype._update=function(e){this._hash.update(e)},h.prototype._final=function(){var e=this._hash.digest();return("rmd160"===this._alg?new u:c(this._alg)).update(this._opad).update(e).digest()},e.exports=function(e,t){return"rmd160"===(e=e.toLowerCase())||"ripemd160"===e?new h("rmd160",t):"md5"===e?new i(a,t):new h(e,t)}},1031:(e,t,r)=>{"use strict";var n=r(5717),i=r(9509).Buffer,o=r(1027),s=i.alloc(128),a=64;function u(e,t){o.call(this,"digest"),"string"==typeof t&&(t=i.from(t)),this._alg=e,this._key=t,t.length>a?t=e(t):t.length<a&&(t=i.concat([t,s],a));for(var r=this._ipad=i.allocUnsafe(a),n=this._opad=i.allocUnsafe(a),u=0;u<a;u++)r[u]=54^t[u],n[u]=92^t[u];this._hash=[r]}n(u,o),u.prototype._update=function(e){this._hash.push(e)},u.prototype._final=function(){var e=this._alg(i.concat(this._hash));return this._alg(i.concat([this._opad,e]))},e.exports=u},5835:(e,t,r)=>{"use strict";t.randomBytes=t.rng=t.pseudoRandomBytes=t.prng=r(1798),t.createHash=t.Hash=r(3482),t.createHmac=t.Hmac=r(8355);var n=r(6042),i=Object.keys(n),o=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(i);t.getHashes=function(){return o};var s=r(5632);t.pbkdf2=s.pbkdf2,t.pbkdf2Sync=s.pbkdf2Sync;var a=r(3614);t.Cipher=a.Cipher,t.createCipher=a.createCipher,t.Cipheriv=a.Cipheriv,t.createCipheriv=a.createCipheriv,t.Decipher=a.Decipher,t.createDecipher=a.createDecipher,t.Decipheriv=a.Decipheriv,t.createDecipheriv=a.createDecipheriv,t.getCiphers=a.getCiphers,t.listCiphers=a.listCiphers;var u=r(2607);t.DiffieHellmanGroup=u.DiffieHellmanGroup,t.createDiffieHellmanGroup=u.createDiffieHellmanGroup,t.getDiffieHellman=u.getDiffieHellman,t.createDiffieHellman=u.createDiffieHellman,t.DiffieHellman=u.DiffieHellman;var c=r(4743);t.createSign=c.createSign,t.Sign=c.Sign,t.createVerify=c.createVerify,t.Verify=c.Verify,t.createECDH=r(6393);var f=r(7900);t.publicEncrypt=f.publicEncrypt,t.privateEncrypt=f.privateEncrypt,t.publicDecrypt=f.publicDecrypt,t.privateDecrypt=f.privateDecrypt;var h=r(7963);t.randomFill=h.randomFill,t.randomFillSync=h.randomFillSync,t.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"))},t.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6}},3776:function(e,t,r){var n;!function(i){"use strict";var o,s,a,u=9e15,c=1e9,f="0123456789abcdef",h="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",l="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",d={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-u,maxE:u,crypto:!1},p=!0,m="[DecimalError] ",g=m+"Invalid argument: ",y=m+"Precision limit exceeded",b=m+"crypto unavailable",v="[object Decimal]",w=Math.floor,_=Math.pow,S=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,M=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,A=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,E=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,O=1e7,x=h.length-1,T=l.length-1,P={toStringTag:v};function j(e){var t,r,n,i=e.length-1,o="",s=e[0];if(i>0){for(o+=s,t=1;t<i;t++)(r=7-(n=e[t]+"").length)&&(o+=U(r)),o+=n;(r=7-(n=(s=e[t])+"").length)&&(o+=U(r))}else if(0===s)return"0";for(;s%10==0;)s/=10;return o+s}function k(e,t,r){if(e!==~~e||e<t||e>r)throw Error(g+e)}function I(e,t,r,n){var i,o,s,a;for(o=e[0];o>=10;o/=10)--t;return--t<0?(t+=7,i=0):(i=Math.ceil((t+1)/7),t%=7),o=_(10,7-t),a=e[i]%o|0,null==n?t<3?(0==t?a=a/100|0:1==t&&(a=a/10|0),s=r<4&&99999==a||r>3&&49999==a||5e4==a||0==a):s=(r<4&&a+1==o||r>3&&a+1==o/2)&&(e[i+1]/o/100|0)==_(10,t-2)-1||(a==o/2||0==a)&&0==(e[i+1]/o/100|0):t<4?(0==t?a=a/1e3|0:1==t?a=a/100|0:2==t&&(a=a/10|0),s=(n||r<4)&&9999==a||!n&&r>3&&4999==a):s=((n||r<4)&&a+1==o||!n&&r>3&&a+1==o/2)&&(e[i+1]/o/1e3|0)==_(10,t-3)-1,s}function R(e,t,r){for(var n,i,o=[0],s=0,a=e.length;s<a;){for(i=o.length;i--;)o[i]*=t;for(o[0]+=f.indexOf(e.charAt(s++)),n=0;n<o.length;n++)o[n]>r-1&&(void 0===o[n+1]&&(o[n+1]=0),o[n+1]+=o[n]/r|0,o[n]%=r)}return o.reverse()}P.absoluteValue=P.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),B(e)},P.ceil=function(){return B(new this.constructor(this),this.e+1,2)},P.clampedTo=P.clamp=function(e,t){var r=this,n=r.constructor;if(e=new n(e),t=new n(t),!e.s||!t.s)return new n(NaN);if(e.gt(t))throw Error(g+t);return r.cmp(e)<0?e:r.cmp(t)>0?t:new n(r)},P.comparedTo=P.cmp=function(e){var t,r,n,i,o=this,s=o.d,a=(e=new o.constructor(e)).d,u=o.s,c=e.s;if(!s||!a)return u&&c?u!==c?u:s===a?0:!s^u<0?1:-1:NaN;if(!s[0]||!a[0])return s[0]?u:a[0]?-c:0;if(u!==c)return u;if(o.e!==e.e)return o.e>e.e^u<0?1:-1;for(t=0,r=(n=s.length)<(i=a.length)?n:i;t<r;++t)if(s[t]!==a[t])return s[t]>a[t]^u<0?1:-1;return n===i?0:n>i^u<0?1:-1},P.cosine=P.cos=function(){var e,t,r=this,n=r.constructor;return r.d?r.d[0]?(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+7,n.rounding=1,r=function(e,t){var r,n,i;if(t.isZero())return t;(n=t.d.length)<32?i=(1/W(4,r=Math.ceil(n/3))).toString():(r=16,i="2.3283064365386962890625e-10"),e.precision+=r,t=G(e,1,t.times(i),new e(1));for(var o=r;o--;){var s=t.times(t);t=s.times(s).minus(s).times(8).plus(1)}return e.precision-=r,t}(n,Y(n,r)),n.precision=e,n.rounding=t,B(2==a||3==a?r.neg():r,e,t,!0)):new n(1):new n(NaN)},P.cubeRoot=P.cbrt=function(){var e,t,r,n,i,o,s,a,u,c,f=this,h=f.constructor;if(!f.isFinite()||f.isZero())return new h(f);for(p=!1,(o=f.s*_(f.s*f,1/3))&&Math.abs(o)!=1/0?n=new h(o.toString()):(r=j(f.d),(o=((e=f.e)-r.length+1)%3)&&(r+=1==o||-2==o?"0":"00"),o=_(r,1/3),e=w((e+1)/3)-(e%3==(e<0?-1:2)),(n=new h(r=o==1/0?"5e"+e:(r=o.toExponential()).slice(0,r.indexOf("e")+1)+e)).s=f.s),s=(e=h.precision)+3;;)if(c=(u=(a=n).times(a).times(a)).plus(f),n=C(c.plus(f).times(a),c.plus(u),s+2,1),j(a.d).slice(0,s)===(r=j(n.d)).slice(0,s)){if("9999"!=(r=r.slice(s-3,s+1))&&(i||"4999"!=r)){+r&&(+r.slice(1)||"5"!=r.charAt(0))||(B(n,e+1,1),t=!n.times(n).times(n).eq(f));break}if(!i&&(B(a,e+1,0),a.times(a).times(a).eq(f))){n=a;break}s+=4,i=1}return p=!0,B(n,e,h.rounding,t)},P.decimalPlaces=P.dp=function(){var e,t=this.d,r=NaN;if(t){if(r=7*((e=t.length-1)-w(this.e/7)),e=t[e])for(;e%10==0;e/=10)r--;r<0&&(r=0)}return r},P.dividedBy=P.div=function(e){return C(this,new this.constructor(e))},P.dividedToIntegerBy=P.divToInt=function(e){var t=this.constructor;return B(C(this,new t(e),0,1,1),t.precision,t.rounding)},P.equals=P.eq=function(e){return 0===this.cmp(e)},P.floor=function(){return B(new this.constructor(this),this.e+1,3)},P.greaterThan=P.gt=function(e){return this.cmp(e)>0},P.greaterThanOrEqualTo=P.gte=function(e){var t=this.cmp(e);return 1==t||0===t},P.hyperbolicCosine=P.cosh=function(){var e,t,r,n,i,o=this,s=o.constructor,a=new s(1);if(!o.isFinite())return new s(o.s?1/0:NaN);if(o.isZero())return a;r=s.precision,n=s.rounding,s.precision=r+Math.max(o.e,o.sd())+4,s.rounding=1,(i=o.d.length)<32?t=(1/W(4,e=Math.ceil(i/3))).toString():(e=16,t="2.3283064365386962890625e-10"),o=G(s,1,o.times(t),new s(1),!0);for(var u,c=e,f=new s(8);c--;)u=o.times(o),o=a.minus(u.times(f.minus(u.times(f))));return B(o,s.precision=r,s.rounding=n,!0)},P.hyperbolicSine=P.sinh=function(){var e,t,r,n,i=this,o=i.constructor;if(!i.isFinite()||i.isZero())return new o(i);if(t=o.precision,r=o.rounding,o.precision=t+Math.max(i.e,i.sd())+4,o.rounding=1,(n=i.d.length)<3)i=G(o,2,i,i,!0);else{e=(e=1.4*Math.sqrt(n))>16?16:0|e,i=G(o,2,i=i.times(1/W(5,e)),i,!0);for(var s,a=new o(5),u=new o(16),c=new o(20);e--;)s=i.times(i),i=i.times(a.plus(s.times(u.times(s).plus(c))))}return o.precision=t,o.rounding=r,B(i,t,r,!0)},P.hyperbolicTangent=P.tanh=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+7,n.rounding=1,C(r.sinh(),r.cosh(),n.precision=e,n.rounding=t)):new n(r.s)},P.inverseCosine=P.acos=function(){var e,t=this,r=t.constructor,n=t.abs().cmp(1),i=r.precision,o=r.rounding;return-1!==n?0===n?t.isNeg()?F(r,i,o):new r(0):new r(NaN):t.isZero()?F(r,i+4,o).times(.5):(r.precision=i+6,r.rounding=1,t=t.asin(),e=F(r,i+4,o).times(.5),r.precision=i,r.rounding=o,e.minus(t))},P.inverseHyperbolicCosine=P.acosh=function(){var e,t,r=this,n=r.constructor;return r.lte(1)?new n(r.eq(1)?0:NaN):r.isFinite()?(e=n.precision,t=n.rounding,n.precision=e+Math.max(Math.abs(r.e),r.sd())+4,n.rounding=1,p=!1,r=r.times(r).minus(1).sqrt().plus(r),p=!0,n.precision=e,n.rounding=t,r.ln()):new n(r)},P.inverseHyperbolicSine=P.asinh=function(){var e,t,r=this,n=r.constructor;return!r.isFinite()||r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+2*Math.max(Math.abs(r.e),r.sd())+6,n.rounding=1,p=!1,r=r.times(r).plus(1).sqrt().plus(r),p=!0,n.precision=e,n.rounding=t,r.ln())},P.inverseHyperbolicTangent=P.atanh=function(){var e,t,r,n,i=this,o=i.constructor;return i.isFinite()?i.e>=0?new o(i.abs().eq(1)?i.s/0:i.isZero()?i:NaN):(e=o.precision,t=o.rounding,n=i.sd(),Math.max(n,e)<2*-i.e-1?B(new o(i),e,t,!0):(o.precision=r=n-i.e,i=C(i.plus(1),new o(1).minus(i),r+e,1),o.precision=e+4,o.rounding=1,i=i.ln(),o.precision=e,o.rounding=t,i.times(.5))):new o(NaN)},P.inverseSine=P.asin=function(){var e,t,r,n,i=this,o=i.constructor;return i.isZero()?new o(i):(t=i.abs().cmp(1),r=o.precision,n=o.rounding,-1!==t?0===t?((e=F(o,r+4,n).times(.5)).s=i.s,e):new o(NaN):(o.precision=r+6,o.rounding=1,i=i.div(new o(1).minus(i.times(i)).sqrt().plus(1)).atan(),o.precision=r,o.rounding=n,i.times(2)))},P.inverseTangent=P.atan=function(){var e,t,r,n,i,o,s,a,u,c=this,f=c.constructor,h=f.precision,l=f.rounding;if(c.isFinite()){if(c.isZero())return new f(c);if(c.abs().eq(1)&&h+4<=T)return(s=F(f,h+4,l).times(.25)).s=c.s,s}else{if(!c.s)return new f(NaN);if(h+4<=T)return(s=F(f,h+4,l).times(.5)).s=c.s,s}for(f.precision=a=h+10,f.rounding=1,e=r=Math.min(28,a/7+2|0);e;--e)c=c.div(c.times(c).plus(1).sqrt().plus(1));for(p=!1,t=Math.ceil(a/7),n=1,u=c.times(c),s=new f(c),i=c;-1!==e;)if(i=i.times(u),o=s.minus(i.div(n+=2)),i=i.times(u),void 0!==(s=o.plus(i.div(n+=2))).d[t])for(e=t;s.d[e]===o.d[e]&&e--;);return r&&(s=s.times(2<<r-1)),p=!0,B(s,f.precision=h,f.rounding=l,!0)},P.isFinite=function(){return!!this.d},P.isInteger=P.isInt=function(){return!!this.d&&w(this.e/7)>this.d.length-2},P.isNaN=function(){return!this.s},P.isNegative=P.isNeg=function(){return this.s<0},P.isPositive=P.isPos=function(){return this.s>0},P.isZero=function(){return!!this.d&&0===this.d[0]},P.lessThan=P.lt=function(e){return this.cmp(e)<0},P.lessThanOrEqualTo=P.lte=function(e){return this.cmp(e)<1},P.logarithm=P.log=function(e){var t,r,n,i,o,s,a,u,c=this,f=c.constructor,h=f.precision,l=f.rounding;if(null==e)e=new f(10),t=!0;else{if(r=(e=new f(e)).d,e.s<0||!r||!r[0]||e.eq(1))return new f(NaN);t=e.eq(10)}if(r=c.d,c.s<0||!r||!r[0]||c.eq(1))return new f(r&&!r[0]?-1/0:1!=c.s?NaN:r?0:1/0);if(t)if(r.length>1)o=!0;else{for(i=r[0];i%10==0;)i/=10;o=1!==i}if(p=!1,s=X(c,a=h+5),n=t?D(f,a+10):X(e,a),I((u=C(s,n,a,1)).d,i=h,l))do{if(s=X(c,a+=10),n=t?D(f,a+10):X(e,a),u=C(s,n,a,1),!o){+j(u.d).slice(i+1,i+15)+1==1e14&&(u=B(u,h+1,0));break}}while(I(u.d,i+=10,l));return p=!0,B(u,h,l)},P.minus=P.sub=function(e){var t,r,n,i,o,s,a,u,c,f,h,l,d=this,m=d.constructor;if(e=new m(e),!d.d||!e.d)return d.s&&e.s?d.d?e.s=-e.s:e=new m(e.d||d.s!==e.s?d:NaN):e=new m(NaN),e;if(d.s!=e.s)return e.s=-e.s,d.plus(e);if(c=d.d,l=e.d,a=m.precision,u=m.rounding,!c[0]||!l[0]){if(l[0])e.s=-e.s;else{if(!c[0])return new m(3===u?-0:0);e=new m(d)}return p?B(e,a,u):e}if(r=w(e.e/7),f=w(d.e/7),c=c.slice(),o=f-r){for((h=o<0)?(t=c,o=-o,s=l.length):(t=l,r=f,s=c.length),o>(n=Math.max(Math.ceil(a/7),s)+2)&&(o=n,t.length=1),t.reverse(),n=o;n--;)t.push(0);t.reverse()}else{for((h=(n=c.length)<(s=l.length))&&(s=n),n=0;n<s;n++)if(c[n]!=l[n]){h=c[n]<l[n];break}o=0}for(h&&(t=c,c=l,l=t,e.s=-e.s),s=c.length,n=l.length-s;n>0;--n)c[s++]=0;for(n=l.length;n>o;){if(c[--n]<l[n]){for(i=n;i&&0===c[--i];)c[i]=O-1;--c[i],c[n]+=O}c[n]-=l[n]}for(;0===c[--s];)c.pop();for(;0===c[0];c.shift())--r;return c[0]?(e.d=c,e.e=L(c,r),p?B(e,a,u):e):new m(3===u?-0:0)},P.modulo=P.mod=function(e){var t,r=this,n=r.constructor;return e=new n(e),!r.d||!e.s||e.d&&!e.d[0]?new n(NaN):!e.d||r.d&&!r.d[0]?B(new n(r),n.precision,n.rounding):(p=!1,9==n.modulo?(t=C(r,e.abs(),0,3,1)).s*=e.s:t=C(r,e,0,n.modulo,1),t=t.times(e),p=!0,r.minus(t))},P.naturalExponential=P.exp=function(){return H(this)},P.naturalLogarithm=P.ln=function(){return X(this)},P.negated=P.neg=function(){var e=new this.constructor(this);return e.s=-e.s,B(e)},P.plus=P.add=function(e){var t,r,n,i,o,s,a,u,c,f,h=this,l=h.constructor;if(e=new l(e),!h.d||!e.d)return h.s&&e.s?h.d||(e=new l(e.d||h.s===e.s?h:NaN)):e=new l(NaN),e;if(h.s!=e.s)return e.s=-e.s,h.minus(e);if(c=h.d,f=e.d,a=l.precision,u=l.rounding,!c[0]||!f[0])return f[0]||(e=new l(h)),p?B(e,a,u):e;if(o=w(h.e/7),n=w(e.e/7),c=c.slice(),i=o-n){for(i<0?(r=c,i=-i,s=f.length):(r=f,n=o,s=c.length),i>(s=(o=Math.ceil(a/7))>s?o+1:s+1)&&(i=s,r.length=1),r.reverse();i--;)r.push(0);r.reverse()}for((s=c.length)-(i=f.length)<0&&(i=s,r=f,f=c,c=r),t=0;i;)t=(c[--i]=c[i]+f[i]+t)/O|0,c[i]%=O;for(t&&(c.unshift(t),++n),s=c.length;0==c[--s];)c.pop();return e.d=c,e.e=L(c,n),p?B(e,a,u):e},P.precision=P.sd=function(e){var t,r=this;if(void 0!==e&&e!==!!e&&1!==e&&0!==e)throw Error(g+e);return r.d?(t=q(r.d),e&&r.e+1>t&&(t=r.e+1)):t=NaN,t},P.round=function(){var e=this,t=e.constructor;return B(new t(e),e.e+1,t.rounding)},P.sine=P.sin=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+7,n.rounding=1,r=function(e,t){var r,n=t.d.length;if(n<3)return t.isZero()?t:G(e,2,t,t);r=(r=1.4*Math.sqrt(n))>16?16:0|r,t=G(e,2,t=t.times(1/W(5,r)),t);for(var i,o=new e(5),s=new e(16),a=new e(20);r--;)i=t.times(t),t=t.times(o.plus(i.times(s.times(i).minus(a))));return t}(n,Y(n,r)),n.precision=e,n.rounding=t,B(a>2?r.neg():r,e,t,!0)):new n(NaN)},P.squareRoot=P.sqrt=function(){var e,t,r,n,i,o,s=this,a=s.d,u=s.e,c=s.s,f=s.constructor;if(1!==c||!a||!a[0])return new f(!c||c<0&&(!a||a[0])?NaN:a?s:1/0);for(p=!1,0==(c=Math.sqrt(+s))||c==1/0?(((t=j(a)).length+u)%2==0&&(t+="0"),c=Math.sqrt(t),u=w((u+1)/2)-(u<0||u%2),n=new f(t=c==1/0?"5e"+u:(t=c.toExponential()).slice(0,t.indexOf("e")+1)+u)):n=new f(c.toString()),r=(u=f.precision)+3;;)if(n=(o=n).plus(C(s,o,r+2,1)).times(.5),j(o.d).slice(0,r)===(t=j(n.d)).slice(0,r)){if("9999"!=(t=t.slice(r-3,r+1))&&(i||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(B(n,u+1,1),e=!n.times(n).eq(s));break}if(!i&&(B(o,u+1,0),o.times(o).eq(s))){n=o;break}r+=4,i=1}return p=!0,B(n,u,f.rounding,e)},P.tangent=P.tan=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+10,n.rounding=1,(r=r.sin()).s=1,r=C(r,new n(1).minus(r.times(r)).sqrt(),e+10,0),n.precision=e,n.rounding=t,B(2==a||4==a?r.neg():r,e,t,!0)):new n(NaN)},P.times=P.mul=function(e){var t,r,n,i,o,s,a,u,c,f=this,h=f.constructor,l=f.d,d=(e=new h(e)).d;if(e.s*=f.s,!(l&&l[0]&&d&&d[0]))return new h(!e.s||l&&!l[0]&&!d||d&&!d[0]&&!l?NaN:l&&d?0*e.s:e.s/0);for(r=w(f.e/7)+w(e.e/7),(u=l.length)<(c=d.length)&&(o=l,l=d,d=o,s=u,u=c,c=s),o=[],n=s=u+c;n--;)o.push(0);for(n=c;--n>=0;){for(t=0,i=u+n;i>n;)a=o[i]+d[n]*l[i-n-1]+t,o[i--]=a%O|0,t=a/O|0;o[i]=(o[i]+t)%O|0}for(;!o[--s];)o.pop();return t?++r:o.shift(),e.d=o,e.e=L(o,r),p?B(e,h.precision,h.rounding):e},P.toBinary=function(e,t){return Q(this,2,e,t)},P.toDecimalPlaces=P.toDP=function(e,t){var r=this,n=r.constructor;return r=new n(r),void 0===e?r:(k(e,0,c),void 0===t?t=n.rounding:k(t,0,8),B(r,e+r.e+1,t))},P.toExponential=function(e,t){var r,n=this,i=n.constructor;return void 0===e?r=N(n,!0):(k(e,0,c),void 0===t?t=i.rounding:k(t,0,8),r=N(n=B(new i(n),e+1,t),!0,e+1)),n.isNeg()&&!n.isZero()?"-"+r:r},P.toFixed=function(e,t){var r,n,i=this,o=i.constructor;return void 0===e?r=N(i):(k(e,0,c),void 0===t?t=o.rounding:k(t,0,8),r=N(n=B(new o(i),e+i.e+1,t),!1,e+n.e+1)),i.isNeg()&&!i.isZero()?"-"+r:r},P.toFraction=function(e){var t,r,n,i,o,s,a,u,c,f,h,l,d=this,m=d.d,y=d.constructor;if(!m)return new y(d);if(c=r=new y(1),n=u=new y(0),s=(o=(t=new y(n)).e=q(m)-d.e-1)%7,t.d[0]=_(10,s<0?7+s:s),null==e)e=o>0?t:c;else{if(!(a=new y(e)).isInt()||a.lt(c))throw Error(g+a);e=a.gt(t)?o>0?t:c:a}for(p=!1,a=new y(j(m)),f=y.precision,y.precision=o=7*m.length*2;h=C(a,t,0,1,1),1!=(i=r.plus(h.times(n))).cmp(e);)r=n,n=i,i=c,c=u.plus(h.times(i)),u=i,i=t,t=a.minus(h.times(i)),a=i;return i=C(e.minus(r),n,0,1,1),u=u.plus(i.times(c)),r=r.plus(i.times(n)),u.s=c.s=d.s,l=C(c,n,o,1).minus(d).abs().cmp(C(u,r,o,1).minus(d).abs())<1?[c,n]:[u,r],y.precision=f,p=!0,l},P.toHexadecimal=P.toHex=function(e,t){return Q(this,16,e,t)},P.toNearest=function(e,t){var r=this,n=r.constructor;if(r=new n(r),null==e){if(!r.d)return r;e=new n(1),t=n.rounding}else{if(e=new n(e),void 0===t?t=n.rounding:k(t,0,8),!r.d)return e.s?r:e;if(!e.d)return e.s&&(e.s=r.s),e}return e.d[0]?(p=!1,r=C(r,e,0,t,1).times(e),p=!0,B(r)):(e.s=r.s,r=e),r},P.toNumber=function(){return+this},P.toOctal=function(e,t){return Q(this,8,e,t)},P.toPower=P.pow=function(e){var t,r,n,i,o,s,a=this,u=a.constructor,c=+(e=new u(e));if(!(a.d&&e.d&&a.d[0]&&e.d[0]))return new u(_(+a,c));if((a=new u(a)).eq(1))return a;if(n=u.precision,o=u.rounding,e.eq(1))return B(a,n,o);if((t=w(e.e/7))>=e.d.length-1&&(r=c<0?-c:c)<=9007199254740991)return i=z(u,a,r,n),e.s<0?new u(1).div(i):B(i,n,o);if((s=a.s)<0){if(t<e.d.length-1)return new u(NaN);if(0==(1&e.d[t])&&(s=1),0==a.e&&1==a.d[0]&&1==a.d.length)return a.s=s,a}return(t=0!=(r=_(+a,c))&&isFinite(r)?new u(r+"").e:w(c*(Math.log("0."+j(a.d))/Math.LN10+a.e+1)))>u.maxE+1||t<u.minE-1?new u(t>0?s/0:0):(p=!1,u.rounding=a.s=1,r=Math.min(12,(t+"").length),(i=H(e.times(X(a,n+r)),n)).d&&I((i=B(i,n+5,1)).d,n,o)&&(t=n+10,+j((i=B(H(e.times(X(a,t+r)),t),t+5,1)).d).slice(n+1,n+15)+1==1e14&&(i=B(i,n+1,0))),i.s=s,p=!0,u.rounding=o,B(i,n,o))},P.toPrecision=function(e,t){var r,n=this,i=n.constructor;return void 0===e?r=N(n,n.e<=i.toExpNeg||n.e>=i.toExpPos):(k(e,1,c),void 0===t?t=i.rounding:k(t,0,8),r=N(n=B(new i(n),e,t),e<=n.e||n.e<=i.toExpNeg,e)),n.isNeg()&&!n.isZero()?"-"+r:r},P.toSignificantDigits=P.toSD=function(e,t){var r=this.constructor;return void 0===e?(e=r.precision,t=r.rounding):(k(e,1,c),void 0===t?t=r.rounding:k(t,0,8)),B(new r(this),e,t)},P.toString=function(){var e=this,t=e.constructor,r=N(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+r:r},P.truncated=P.trunc=function(){return B(new this.constructor(this),this.e+1,1)},P.valueOf=P.toJSON=function(){var e=this,t=e.constructor,r=N(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+r:r};var C=function(){function e(e,t,r){var n,i=0,o=e.length;for(e=e.slice();o--;)n=e[o]*t+i,e[o]=n%r|0,i=n/r|0;return i&&e.unshift(i),e}function t(e,t,r,n){var i,o;if(r!=n)o=r>n?1:-1;else for(i=o=0;i<r;i++)if(e[i]!=t[i]){o=e[i]>t[i]?1:-1;break}return o}function r(e,t,r,n){for(var i=0;r--;)e[r]-=i,i=e[r]<t[r]?1:0,e[r]=i*n+e[r]-t[r];for(;!e[0]&&e.length>1;)e.shift()}return function(n,i,o,a,u,c){var f,h,l,d,p,m,g,y,b,v,_,S,M,A,E,x,T,P,j,k,I=n.constructor,R=n.s==i.s?1:-1,C=n.d,N=i.d;if(!(C&&C[0]&&N&&N[0]))return new I(n.s&&i.s&&(C?!N||C[0]!=N[0]:N)?C&&0==C[0]||!N?0*R:R/0:NaN);for(c?(p=1,h=n.e-i.e):(c=O,p=7,h=w(n.e/p)-w(i.e/p)),j=N.length,T=C.length,v=(b=new I(R)).d=[],l=0;N[l]==(C[l]||0);l++);if(N[l]>(C[l]||0)&&h--,null==o?(A=o=I.precision,a=I.rounding):A=u?o+(n.e-i.e)+1:o,A<0)v.push(1),m=!0;else{if(A=A/p+2|0,l=0,1==j){for(d=0,N=N[0],A++;(l<T||d)&&A--;l++)E=d*c+(C[l]||0),v[l]=E/N|0,d=E%N|0;m=d||l<T}else{for((d=c/(N[0]+1)|0)>1&&(N=e(N,d,c),C=e(C,d,c),j=N.length,T=C.length),x=j,S=(_=C.slice(0,j)).length;S<j;)_[S++]=0;(k=N.slice()).unshift(0),P=N[0],N[1]>=c/2&&++P;do{d=0,(f=t(N,_,j,S))<0?(M=_[0],j!=S&&(M=M*c+(_[1]||0)),(d=M/P|0)>1?(d>=c&&(d=c-1),1==(f=t(g=e(N,d,c),_,y=g.length,S=_.length))&&(d--,r(g,j<y?k:N,y,c))):(0==d&&(f=d=1),g=N.slice()),(y=g.length)<S&&g.unshift(0),r(_,g,S,c),-1==f&&(f=t(N,_,j,S=_.length))<1&&(d++,r(_,j<S?k:N,S,c)),S=_.length):0===f&&(d++,_=[0]),v[l++]=d,f&&_[0]?_[S++]=C[x]||0:(_=[C[x]],S=1)}while((x++<T||void 0!==_[0])&&A--);m=void 0!==_[0]}v[0]||v.shift()}if(1==p)b.e=h,s=m;else{for(l=1,d=v[0];d>=10;d/=10)l++;b.e=l+h*p-1,B(b,u?o+b.e+1:o,a,m)}return b}}();function B(e,t,r,n){var i,o,s,a,u,c,f,h,l,d=e.constructor;e:if(null!=t){if(!(h=e.d))return e;for(i=1,a=h[0];a>=10;a/=10)i++;if((o=t-i)<0)o+=7,s=t,u=(f=h[l=0])/_(10,i-s-1)%10|0;else if((l=Math.ceil((o+1)/7))>=(a=h.length)){if(!n)break e;for(;a++<=l;)h.push(0);f=u=0,i=1,s=(o%=7)-7+1}else{for(f=a=h[l],i=1;a>=10;a/=10)i++;u=(s=(o%=7)-7+i)<0?0:f/_(10,i-s-1)%10|0}if(n=n||t<0||void 0!==h[l+1]||(s<0?f:f%_(10,i-s-1)),c=r<4?(u||n)&&(0==r||r==(e.s<0?3:2)):u>5||5==u&&(4==r||n||6==r&&(o>0?s>0?f/_(10,i-s):0:h[l-1])%10&1||r==(e.s<0?8:7)),t<1||!h[0])return h.length=0,c?(t-=e.e+1,h[0]=_(10,(7-t%7)%7),e.e=-t||0):h[0]=e.e=0,e;if(0==o?(h.length=l,a=1,l--):(h.length=l+1,a=_(10,7-o),h[l]=s>0?(f/_(10,i-s)%_(10,s)|0)*a:0),c)for(;;){if(0==l){for(o=1,s=h[0];s>=10;s/=10)o++;for(s=h[0]+=a,a=1;s>=10;s/=10)a++;o!=a&&(e.e++,h[0]==O&&(h[0]=1));break}if(h[l]+=a,h[l]!=O)break;h[l--]=0,a=1}for(o=h.length;0===h[--o];)h.pop()}return p&&(e.e>d.maxE?(e.d=null,e.e=NaN):e.e<d.minE&&(e.e=0,e.d=[0])),e}function N(e,t,r){if(!e.isFinite())return K(e);var n,i=e.e,o=j(e.d),s=o.length;return t?(r&&(n=r-s)>0?o=o.charAt(0)+"."+o.slice(1)+U(n):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(e.e<0?"e":"e+")+e.e):i<0?(o="0."+U(-i-1)+o,r&&(n=r-s)>0&&(o+=U(n))):i>=s?(o+=U(i+1-s),r&&(n=r-i-1)>0&&(o=o+"."+U(n))):((n=i+1)<s&&(o=o.slice(0,n)+"."+o.slice(n)),r&&(n=r-s)>0&&(i+1===s&&(o+="."),o+=U(n))),o}function L(e,t){var r=e[0];for(t*=7;r>=10;r/=10)t++;return t}function D(e,t,r){if(t>x)throw p=!0,r&&(e.precision=r),Error(y);return B(new e(h),t,1,!0)}function F(e,t,r){if(t>T)throw Error(y);return B(new e(l),t,r,!0)}function q(e){var t=e.length-1,r=7*t+1;if(t=e[t]){for(;t%10==0;t/=10)r--;for(t=e[0];t>=10;t/=10)r++}return r}function U(e){for(var t="";e--;)t+="0";return t}function z(e,t,r,n){var i,o=new e(1),s=Math.ceil(n/7+4);for(p=!1;;){if(r%2&&ee((o=o.times(t)).d,s)&&(i=!0),0===(r=w(r/2))){r=o.d.length-1,i&&0===o.d[r]&&++o.d[r];break}ee((t=t.times(t)).d,s)}return p=!0,o}function V(e){return 1&e.d[e.d.length-1]}function $(e,t,r){for(var n,i=new e(t[0]),o=0;++o<t.length;){if(!(n=new e(t[o])).s){i=n;break}i[r](n)&&(i=n)}return i}function H(e,t){var r,n,i,o,s,a,u,c=0,f=0,h=0,l=e.constructor,d=l.rounding,m=l.precision;if(!e.d||!e.d[0]||e.e>17)return new l(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(null==t?(p=!1,u=m):u=t,a=new l(.03125);e.e>-2;)e=e.times(a),h+=5;for(u+=n=Math.log(_(2,h))/Math.LN10*2+5|0,r=o=s=new l(1),l.precision=u;;){if(o=B(o.times(e),u,1),r=r.times(++f),j((a=s.plus(C(o,r,u,1))).d).slice(0,u)===j(s.d).slice(0,u)){for(i=h;i--;)s=B(s.times(s),u,1);if(null!=t)return l.precision=m,s;if(!(c<3&&I(s.d,u-n,d,c)))return B(s,l.precision=m,d,p=!0);l.precision=u+=10,r=o=a=new l(1),f=0,c++}s=a}}function X(e,t){var r,n,i,o,s,a,u,c,f,h,l,d=1,m=e,g=m.d,y=m.constructor,b=y.rounding,v=y.precision;if(m.s<0||!g||!g[0]||!m.e&&1==g[0]&&1==g.length)return new y(g&&!g[0]?-1/0:1!=m.s?NaN:g?0:m);if(null==t?(p=!1,f=v):f=t,y.precision=f+=10,n=(r=j(g)).charAt(0),!(Math.abs(o=m.e)<15e14))return c=D(y,f+2,v).times(o+""),m=X(new y(n+"."+r.slice(1)),f-10).plus(c),y.precision=v,null==t?B(m,v,b,p=!0):m;for(;n<7&&1!=n||1==n&&r.charAt(1)>3;)n=(r=j((m=m.times(e)).d)).charAt(0),d++;for(o=m.e,n>1?(m=new y("0."+r),o++):m=new y(n+"."+r.slice(1)),h=m,u=s=m=C(m.minus(1),m.plus(1),f,1),l=B(m.times(m),f,1),i=3;;){if(s=B(s.times(l),f,1),j((c=u.plus(C(s,new y(i),f,1))).d).slice(0,f)===j(u.d).slice(0,f)){if(u=u.times(2),0!==o&&(u=u.plus(D(y,f+2,v).times(o+""))),u=C(u,new y(d),f,1),null!=t)return y.precision=v,u;if(!I(u.d,f-10,b,a))return B(u,y.precision=v,b,p=!0);y.precision=f+=10,c=s=m=C(h.minus(1),h.plus(1),f,1),l=B(m.times(m),f,1),i=a=1}u=c,i+=2}}function K(e){return String(e.s*e.s/0)}function J(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;48===t.charCodeAt(n);n++);for(i=t.length;48===t.charCodeAt(i-1);--i);if(t=t.slice(n,i)){if(i-=n,e.e=r=r-n-1,e.d=[],n=(r+1)%7,r<0&&(n+=7),n<i){for(n&&e.d.push(+t.slice(0,n)),i-=7;n<i;)e.d.push(+t.slice(n,n+=7));n=7-(t=t.slice(n)).length}else n-=i;for(;n--;)t+="0";e.d.push(+t),p&&(e.e>e.constructor.maxE?(e.d=null,e.e=NaN):e.e<e.constructor.minE&&(e.e=0,e.d=[0]))}else e.e=0,e.d=[0];return e}function Z(e,t){var r,n,i,s,a,u,c,f,h;if(t.indexOf("_")>-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),E.test(t))return J(e,t)}else if("Infinity"===t||"NaN"===t)return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(M.test(t))r=16,t=t.toLowerCase();else if(S.test(t))r=2;else{if(!A.test(t))throw Error(g+t);r=8}for((s=t.search(/p/i))>0?(c=+t.slice(s+1),t=t.substring(2,s)):t=t.slice(2),a=(s=t.indexOf("."))>=0,n=e.constructor,a&&(s=(u=(t=t.replace(".","")).length)-s,i=z(n,new n(r),s,2*s)),s=h=(f=R(t,r,O)).length-1;0===f[s];--s)f.pop();return s<0?new n(0*e.s):(e.e=L(f,h),e.d=f,p=!1,a&&(e=C(e,i,4*u)),c&&(e=e.times(Math.abs(c)<54?_(2,c):o.pow(2,c))),p=!0,e)}function G(e,t,r,n,i){var o,s,a,u,c=e.precision,f=Math.ceil(c/7);for(p=!1,u=r.times(r),a=new e(n);;){if(s=C(a.times(u),new e(t++*t++),c,1),a=i?n.plus(s):n.minus(s),n=C(s.times(u),new e(t++*t++),c,1),void 0!==(s=a.plus(n)).d[f]){for(o=f;s.d[o]===a.d[o]&&o--;);if(-1==o)break}o=a,a=n,n=s,s=o}return p=!0,s.d.length=f+1,s}function W(e,t){for(var r=e;--t;)r*=e;return r}function Y(e,t){var r,n=t.s<0,i=F(e,e.precision,1),o=i.times(.5);if((t=t.abs()).lte(o))return a=n?4:1,t;if((r=t.divToInt(i)).isZero())a=n?3:2;else{if((t=t.minus(r.times(i))).lte(o))return a=V(r)?n?2:3:n?4:1,t;a=V(r)?n?1:4:n?3:2}return t.minus(i).abs()}function Q(e,t,r,n){var i,o,a,u,h,l,d,p,m,g=e.constructor,y=void 0!==r;if(y?(k(r,1,c),void 0===n?n=g.rounding:k(n,0,8)):(r=g.precision,n=g.rounding),e.isFinite()){for(y?(i=2,16==t?r=4*r-3:8==t&&(r=3*r-2)):i=t,(a=(d=N(e)).indexOf("."))>=0&&(d=d.replace(".",""),(m=new g(1)).e=d.length-a,m.d=R(N(m),10,i),m.e=m.d.length),o=h=(p=R(d,10,i)).length;0==p[--h];)p.pop();if(p[0]){if(a<0?o--:((e=new g(e)).d=p,e.e=o,p=(e=C(e,m,r,n,0,i)).d,o=e.e,l=s),a=p[r],u=i/2,l=l||void 0!==p[r+1],l=n<4?(void 0!==a||l)&&(0===n||n===(e.s<0?3:2)):a>u||a===u&&(4===n||l||6===n&&1&p[r-1]||n===(e.s<0?8:7)),p.length=r,l)for(;++p[--r]>i-1;)p[r]=0,r||(++o,p.unshift(1));for(h=p.length;!p[h-1];--h);for(a=0,d="";a<h;a++)d+=f.charAt(p[a]);if(y){if(h>1)if(16==t||8==t){for(a=16==t?4:3,--h;h%a;h++)d+="0";for(h=(p=R(d,i,t)).length;!p[h-1];--h);for(a=1,d="1.";a<h;a++)d+=f.charAt(p[a])}else d=d.charAt(0)+"."+d.slice(1);d=d+(o<0?"p":"p+")+o}else if(o<0){for(;++o;)d="0"+d;d="0."+d}else if(++o>h)for(o-=h;o--;)d+="0";else o<h&&(d=d.slice(0,o)+"."+d.slice(o))}else d=y?"0p+0":"0";d=(16==t?"0x":2==t?"0b":8==t?"0o":"")+d}else d=K(e);return e.s<0?"-"+d:d}function ee(e,t){if(e.length>t)return e.length=t,!0}function te(e){return new this(e).abs()}function re(e){return new this(e).acos()}function ne(e){return new this(e).acosh()}function ie(e,t){return new this(e).plus(t)}function oe(e){return new this(e).asin()}function se(e){return new this(e).asinh()}function ae(e){return new this(e).atan()}function ue(e){return new this(e).atanh()}function ce(e,t){e=new this(e),t=new this(t);var r,n=this.precision,i=this.rounding,o=n+4;return e.s&&t.s?e.d||t.d?!t.d||e.isZero()?(r=t.s<0?F(this,n,i):new this(0)).s=e.s:!e.d||t.isZero()?(r=F(this,o,1).times(.5)).s=e.s:t.s<0?(this.precision=o,this.rounding=1,r=this.atan(C(e,t,o,1)),t=F(this,o,1),this.precision=n,this.rounding=i,r=e.s<0?r.minus(t):r.plus(t)):r=this.atan(C(e,t,o,1)):(r=F(this,o,1).times(t.s>0?.25:.75)).s=e.s:r=new this(NaN),r}function fe(e){return new this(e).cbrt()}function he(e){return B(e=new this(e),e.e+1,2)}function le(e,t,r){return new this(e).clamp(t,r)}function de(e){if(!e||"object"!=typeof e)throw Error(m+"Object expected");var t,r,n,i=!0===e.defaults,o=["precision",1,c,"rounding",0,8,"toExpNeg",-u,0,"toExpPos",0,u,"maxE",0,u,"minE",-u,0,"modulo",0,9];for(t=0;t<o.length;t+=3)if(r=o[t],i&&(this[r]=d[r]),void 0!==(n=e[r])){if(!(w(n)===n&&n>=o[t+1]&&n<=o[t+2]))throw Error(g+r+": "+n);this[r]=n}if(r="crypto",i&&(this[r]=d[r]),void 0!==(n=e[r])){if(!0!==n&&!1!==n&&0!==n&&1!==n)throw Error(g+r+": "+n);if(n){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw Error(b);this[r]=!0}else this[r]=!1}return this}function pe(e){return new this(e).cos()}function me(e){return new this(e).cosh()}function ge(e,t){return new this(e).div(t)}function ye(e){return new this(e).exp()}function be(e){return B(e=new this(e),e.e+1,3)}function ve(){var e,t,r=new this(0);for(p=!1,e=0;e<arguments.length;)if((t=new this(arguments[e++])).d)r.d&&(r=r.plus(t.times(t)));else{if(t.s)return p=!0,new this(1/0);r=t}return p=!0,r.sqrt()}function we(e){return e instanceof o||e&&e.toStringTag===v||!1}function _e(e){return new this(e).ln()}function Se(e,t){return new this(e).log(t)}function Me(e){return new this(e).log(2)}function Ae(e){return new this(e).log(10)}function Ee(){return $(this,arguments,"lt")}function Oe(){return $(this,arguments,"gt")}function xe(e,t){return new this(e).mod(t)}function Te(e,t){return new this(e).mul(t)}function Pe(e,t){return new this(e).pow(t)}function je(e){var t,r,n,i,o=0,s=new this(1),a=[];if(void 0===e?e=this.precision:k(e,1,c),n=Math.ceil(e/7),this.crypto)if(crypto.getRandomValues)for(t=crypto.getRandomValues(new Uint32Array(n));o<n;)(i=t[o])>=429e7?t[o]=crypto.getRandomValues(new Uint32Array(1))[0]:a[o++]=i%1e7;else{if(!crypto.randomBytes)throw Error(b);for(t=crypto.randomBytes(n*=4);o<n;)(i=t[o]+(t[o+1]<<8)+(t[o+2]<<16)+((127&t[o+3])<<24))>=214e7?crypto.randomBytes(4).copy(t,o):(a.push(i%1e7),o+=4);o=n/4}else for(;o<n;)a[o++]=1e7*Math.random()|0;for(e%=7,(n=a[--o])&&e&&(i=_(10,7-e),a[o]=(n/i|0)*i);0===a[o];o--)a.pop();if(o<0)r=0,a=[0];else{for(r=-1;0===a[0];r-=7)a.shift();for(n=1,i=a[0];i>=10;i/=10)n++;n<7&&(r-=7-n)}return s.e=r,s.d=a,s}function ke(e){return B(e=new this(e),e.e+1,this.rounding)}function Ie(e){return(e=new this(e)).d?e.d[0]?e.s:0*e.s:e.s||NaN}function Re(e){return new this(e).sin()}function Ce(e){return new this(e).sinh()}function Be(e){return new this(e).sqrt()}function Ne(e,t){return new this(e).sub(t)}function Le(){var e=0,t=arguments,r=new this(t[e]);for(p=!1;r.s&&++e<t.length;)r=r.plus(t[e]);return p=!0,B(r,this.precision,this.rounding)}function De(e){return new this(e).tan()}function Fe(e){return new this(e).tanh()}function qe(e){return B(e=new this(e),e.e+1,1)}(o=function e(t){var r,n,i;function o(e){var t,r,n,i=this;if(!(i instanceof o))return new o(e);if(i.constructor=o,we(e))return i.s=e.s,void(p?!e.d||e.e>o.maxE?(i.e=NaN,i.d=null):e.e<o.minE?(i.e=0,i.d=[0]):(i.e=e.e,i.d=e.d.slice()):(i.e=e.e,i.d=e.d?e.d.slice():e.d));if("number"==(n=typeof e)){if(0===e)return i.s=1/e<0?-1:1,i.e=0,void(i.d=[0]);if(e<0?(e=-e,i.s=-1):i.s=1,e===~~e&&e<1e7){for(t=0,r=e;r>=10;r/=10)t++;return void(p?t>o.maxE?(i.e=NaN,i.d=null):t<o.minE?(i.e=0,i.d=[0]):(i.e=t,i.d=[e]):(i.e=t,i.d=[e]))}return 0*e!=0?(e||(i.s=NaN),i.e=NaN,void(i.d=null)):J(i,e.toString())}if("string"!==n)throw Error(g+e);return 45===(r=e.charCodeAt(0))?(e=e.slice(1),i.s=-1):(43===r&&(e=e.slice(1)),i.s=1),E.test(e)?J(i,e):Z(i,e)}if(o.prototype=P,o.ROUND_UP=0,o.ROUND_DOWN=1,o.ROUND_CEIL=2,o.ROUND_FLOOR=3,o.ROUND_HALF_UP=4,o.ROUND_HALF_DOWN=5,o.ROUND_HALF_EVEN=6,o.ROUND_HALF_CEIL=7,o.ROUND_HALF_FLOOR=8,o.EUCLID=9,o.config=o.set=de,o.clone=e,o.isDecimal=we,o.abs=te,o.acos=re,o.acosh=ne,o.add=ie,o.asin=oe,o.asinh=se,o.atan=ae,o.atanh=ue,o.atan2=ce,o.cbrt=fe,o.ceil=he,o.clamp=le,o.cos=pe,o.cosh=me,o.div=ge,o.exp=ye,o.floor=be,o.hypot=ve,o.ln=_e,o.log=Se,o.log10=Ae,o.log2=Me,o.max=Ee,o.min=Oe,o.mod=xe,o.mul=Te,o.pow=Pe,o.random=je,o.round=ke,o.sign=Ie,o.sin=Re,o.sinh=Ce,o.sqrt=Be,o.sub=Ne,o.sum=Le,o.tan=De,o.tanh=Fe,o.trunc=qe,void 0===t&&(t={}),t&&!0!==t.defaults)for(i=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"],r=0;r<i.length;)t.hasOwnProperty(n=i[r++])||(t[n]=this[n]);return o.config(t),o}(d)).prototype.constructor=o,o.default=o.Decimal=o,h=new o(h),l=new o(l),void 0===(n=function(){return o}.call(t,r,t,e))||(e.exports=n)}()},4289:(e,t,r)=>{"use strict";var n=r(2215),i="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),o=Object.prototype.toString,s=Array.prototype.concat,a=Object.defineProperty,u=a&&function(){var e={};try{for(var t in a(e,"x",{enumerable:!1,value:e}),e)return!1;return e.x===e}catch(e){return!1}}(),c=function(e,t,r,n){var i;(!(t in e)||"function"==typeof(i=n)&&"[object Function]"===o.call(i)&&n())&&(u?a(e,t,{configurable:!0,enumerable:!1,value:r,writable:!0}):e[t]=r)},f=function(e,t){var r=arguments.length>2?arguments[2]:{},o=n(t);i&&(o=s.call(o,Object.getOwnPropertySymbols(t)));for(var a=0;a<o.length;a+=1)c(e,o[a],t[o[a]],r[o[a]])};f.supportsDescriptors=!!u,e.exports=f},5251:(e,t,r)=>{"use strict";t.utils=r(1278),t.Cipher=r(5756),t.DES=r(778),t.CBC=r(9051),t.EDE=r(651)},9051:(e,t,r)=>{"use strict";var n=r(9746),i=r(5717),o={};function s(e){n.equal(e.length,8,"Invalid IV length"),this.iv=new Array(8);for(var t=0;t<this.iv.length;t++)this.iv[t]=e[t]}t.instantiate=function(e){function t(t){e.call(this,t),this._cbcInit()}i(t,e);for(var r=Object.keys(o),n=0;n<r.length;n++){var s=r[n];t.prototype[s]=o[s]}return t.create=function(e){return new t(e)},t},o._cbcInit=function(){var e=new s(this.options.iv);this._cbcState=e},o._update=function(e,t,r,n){var i=this._cbcState,o=this.constructor.super_.prototype,s=i.iv;if("encrypt"===this.type){for(var a=0;a<this.blockSize;a++)s[a]^=e[t+a];for(o._update.call(this,s,0,r,n),a=0;a<this.blockSize;a++)s[a]=r[n+a]}else{for(o._update.call(this,e,t,r,n),a=0;a<this.blockSize;a++)r[n+a]^=s[a];for(a=0;a<this.blockSize;a++)s[a]=e[t+a]}}},5756:(e,t,r)=>{"use strict";var n=r(9746);function i(e){this.options=e,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0}e.exports=i,i.prototype._init=function(){},i.prototype.update=function(e){return 0===e.length?[]:"decrypt"===this.type?this._updateDecrypt(e):this._updateEncrypt(e)},i.prototype._buffer=function(e,t){for(var r=Math.min(this.buffer.length-this.bufferOff,e.length-t),n=0;n<r;n++)this.buffer[this.bufferOff+n]=e[t+n];return this.bufferOff+=r,r},i.prototype._flushBuffer=function(e,t){return this._update(this.buffer,0,e,t),this.bufferOff=0,this.blockSize},i.prototype._updateEncrypt=function(e){var t=0,r=0,n=(this.bufferOff+e.length)/this.blockSize|0,i=new Array(n*this.blockSize);0!==this.bufferOff&&(t+=this._buffer(e,t),this.bufferOff===this.buffer.length&&(r+=this._flushBuffer(i,r)));for(var o=e.length-(e.length-t)%this.blockSize;t<o;t+=this.blockSize)this._update(e,t,i,r),r+=this.blockSize;for(;t<e.length;t++,this.bufferOff++)this.buffer[this.bufferOff]=e[t];return i},i.prototype._updateDecrypt=function(e){for(var t=0,r=0,n=Math.ceil((this.bufferOff+e.length)/this.blockSize)-1,i=new Array(n*this.blockSize);n>0;n--)t+=this._buffer(e,t),r+=this._flushBuffer(i,r);return t+=this._buffer(e,t),i},i.prototype.final=function(e){var t,r;return e&&(t=this.update(e)),r="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),t?t.concat(r):r},i.prototype._pad=function(e,t){if(0===t)return!1;for(;t<e.length;)e[t++]=0;return!0},i.prototype._finalEncrypt=function(){if(!this._pad(this.buffer,this.bufferOff))return[];var e=new Array(this.blockSize);return this._update(this.buffer,0,e,0),e},i.prototype._unpad=function(e){return e},i.prototype._finalDecrypt=function(){n.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var e=new Array(this.blockSize);return this._flushBuffer(e,0),this._unpad(e)}},778:(e,t,r)=>{"use strict";var n=r(9746),i=r(5717),o=r(1278),s=r(5756);function a(){this.tmp=new Array(2),this.keys=null}function u(e){s.call(this,e);var t=new a;this._desState=t,this.deriveKeys(t,e.key)}i(u,s),e.exports=u,u.create=function(e){return new u(e)};var c=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];u.prototype.deriveKeys=function(e,t){e.keys=new Array(32),n.equal(t.length,this.blockSize,"Invalid key length");var r=o.readUInt32BE(t,0),i=o.readUInt32BE(t,4);o.pc1(r,i,e.tmp,0),r=e.tmp[0],i=e.tmp[1];for(var s=0;s<e.keys.length;s+=2){var a=c[s>>>1];r=o.r28shl(r,a),i=o.r28shl(i,a),o.pc2(r,i,e.keys,s)}},u.prototype._update=function(e,t,r,n){var i=this._desState,s=o.readUInt32BE(e,t),a=o.readUInt32BE(e,t+4);o.ip(s,a,i.tmp,0),s=i.tmp[0],a=i.tmp[1],"encrypt"===this.type?this._encrypt(i,s,a,i.tmp,0):this._decrypt(i,s,a,i.tmp,0),s=i.tmp[0],a=i.tmp[1],o.writeUInt32BE(r,s,n),o.writeUInt32BE(r,a,n+4)},u.prototype._pad=function(e,t){for(var r=e.length-t,n=t;n<e.length;n++)e[n]=r;return!0},u.prototype._unpad=function(e){for(var t=e[e.length-1],r=e.length-t;r<e.length;r++)n.equal(e[r],t);return e.slice(0,e.length-t)},u.prototype._encrypt=function(e,t,r,n,i){for(var s=t,a=r,u=0;u<e.keys.length;u+=2){var c=e.keys[u],f=e.keys[u+1];o.expand(a,e.tmp,0),c^=e.tmp[0],f^=e.tmp[1];var h=o.substitute(c,f),l=a;a=(s^o.permute(h))>>>0,s=l}o.rip(a,s,n,i)},u.prototype._decrypt=function(e,t,r,n,i){for(var s=r,a=t,u=e.keys.length-2;u>=0;u-=2){var c=e.keys[u],f=e.keys[u+1];o.expand(s,e.tmp,0),c^=e.tmp[0],f^=e.tmp[1];var h=o.substitute(c,f),l=s;s=(a^o.permute(h))>>>0,a=l}o.rip(s,a,n,i)}},651:(e,t,r)=>{"use strict";var n=r(9746),i=r(5717),o=r(5756),s=r(778);function a(e,t){n.equal(t.length,24,"Invalid key length");var r=t.slice(0,8),i=t.slice(8,16),o=t.slice(16,24);this.ciphers="encrypt"===e?[s.create({type:"encrypt",key:r}),s.create({type:"decrypt",key:i}),s.create({type:"encrypt",key:o})]:[s.create({type:"decrypt",key:o}),s.create({type:"encrypt",key:i}),s.create({type:"decrypt",key:r})]}function u(e){o.call(this,e);var t=new a(this.type,this.options.key);this._edeState=t}i(u,o),e.exports=u,u.create=function(e){return new u(e)},u.prototype._update=function(e,t,r,n){var i=this._edeState;i.ciphers[0]._update(e,t,r,n),i.ciphers[1]._update(r,n,r,n),i.ciphers[2]._update(r,n,r,n)},u.prototype._pad=s.prototype._pad,u.prototype._unpad=s.prototype._unpad},1278:(e,t)=>{"use strict";t.readUInt32BE=function(e,t){return(e[0+t]<<24|e[1+t]<<16|e[2+t]<<8|e[3+t])>>>0},t.writeUInt32BE=function(e,t,r){e[0+r]=t>>>24,e[1+r]=t>>>16&255,e[2+r]=t>>>8&255,e[3+r]=255&t},t.ip=function(e,t,r,n){for(var i=0,o=0,s=6;s>=0;s-=2){for(var a=0;a<=24;a+=8)i<<=1,i|=t>>>a+s&1;for(a=0;a<=24;a+=8)i<<=1,i|=e>>>a+s&1}for(s=6;s>=0;s-=2){for(a=1;a<=25;a+=8)o<<=1,o|=t>>>a+s&1;for(a=1;a<=25;a+=8)o<<=1,o|=e>>>a+s&1}r[n+0]=i>>>0,r[n+1]=o>>>0},t.rip=function(e,t,r,n){for(var i=0,o=0,s=0;s<4;s++)for(var a=24;a>=0;a-=8)i<<=1,i|=t>>>a+s&1,i<<=1,i|=e>>>a+s&1;for(s=4;s<8;s++)for(a=24;a>=0;a-=8)o<<=1,o|=t>>>a+s&1,o<<=1,o|=e>>>a+s&1;r[n+0]=i>>>0,r[n+1]=o>>>0},t.pc1=function(e,t,r,n){for(var i=0,o=0,s=7;s>=5;s--){for(var a=0;a<=24;a+=8)i<<=1,i|=t>>a+s&1;for(a=0;a<=24;a+=8)i<<=1,i|=e>>a+s&1}for(a=0;a<=24;a+=8)i<<=1,i|=t>>a+s&1;for(s=1;s<=3;s++){for(a=0;a<=24;a+=8)o<<=1,o|=t>>a+s&1;for(a=0;a<=24;a+=8)o<<=1,o|=e>>a+s&1}for(a=0;a<=24;a+=8)o<<=1,o|=e>>a+s&1;r[n+0]=i>>>0,r[n+1]=o>>>0},t.r28shl=function(e,t){return e<<t&268435455|e>>>28-t};var r=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];t.pc2=function(e,t,n,i){for(var o=0,s=0,a=r.length>>>1,u=0;u<a;u++)o<<=1,o|=e>>>r[u]&1;for(u=a;u<r.length;u++)s<<=1,s|=t>>>r[u]&1;n[i+0]=o>>>0,n[i+1]=s>>>0},t.expand=function(e,t,r){var n=0,i=0;n=(1&e)<<5|e>>>27;for(var o=23;o>=15;o-=4)n<<=6,n|=e>>>o&63;for(o=11;o>=3;o-=4)i|=e>>>o&63,i<<=6;i|=(31&e)<<1|e>>>31,t[r+0]=n>>>0,t[r+1]=i>>>0};var n=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];t.substitute=function(e,t){for(var r=0,i=0;i<4;i++)r<<=4,r|=n[64*i+(e>>>18-6*i&63)];for(i=0;i<4;i++)r<<=4,r|=n[256+64*i+(t>>>18-6*i&63)];return r>>>0};var i=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];t.permute=function(e){for(var t=0,r=0;r<i.length;r++)t<<=1,t|=e>>>i[r]&1;return t>>>0},t.padSplit=function(e,t,r){for(var n=e.toString(2);n.length<t;)n="0"+n;for(var i=[],o=0;o<t;o+=r)i.push(n.slice(o,o+r));return i.join(" ")}},2607:(e,t,r)=>{var n=r(8764).Buffer,i=r(3590),o=r(9799),s=r(7426),a={binary:!0,hex:!0,base64:!0};t.DiffieHellmanGroup=t.createDiffieHellmanGroup=t.getDiffieHellman=function(e){var t=new n(o[e].prime,"hex"),r=new n(o[e].gen,"hex");return new s(t,r)},t.createDiffieHellman=t.DiffieHellman=function e(t,r,o,u){return n.isBuffer(r)||void 0===a[r]?e(t,"binary",r,o):(r=r||"binary",u=u||"binary",o=o||new n([2]),n.isBuffer(o)||(o=new n(o,u)),"number"==typeof t?new s(i(t,o),o,!0):(n.isBuffer(t)||(t=new n(t,r)),new s(t,o,!0)))}},7426:(e,t,r)=>{var n=r(8764).Buffer,i=r(3550),o=new(r(3047)),s=new i(24),a=new i(11),u=new i(10),c=new i(3),f=new i(7),h=r(3590),l=r(1798);function d(e,t){return t=t||"utf8",n.isBuffer(e)||(e=new n(e,t)),this._pub=new i(e),this}function p(e,t){return t=t||"utf8",n.isBuffer(e)||(e=new n(e,t)),this._priv=new i(e),this}e.exports=g;var m={};function g(e,t,r){this.setGenerator(t),this.__prime=new i(e),this._prime=i.mont(this.__prime),this._primeLen=e.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,r?(this.setPublicKey=d,this.setPrivateKey=p):this._primeCode=8}function y(e,t){var r=new n(e.toArray());return t?r.toString(t):r}Object.defineProperty(g.prototype,"verifyError",{enumerable:!0,get:function(){return"number"!=typeof this._primeCode&&(this._primeCode=function(e,t){var r=t.toString("hex"),n=[r,e.toString(16)].join("_");if(n in m)return m[n];var i,l=0;if(e.isEven()||!h.simpleSieve||!h.fermatTest(e)||!o.test(e))return l+=1,l+="02"===r||"05"===r?8:4,m[n]=l,l;switch(o.test(e.shrn(1))||(l+=2),r){case"02":e.mod(s).cmp(a)&&(l+=8);break;case"05":(i=e.mod(u)).cmp(c)&&i.cmp(f)&&(l+=8);break;default:l+=4}return m[n]=l,l}(this.__prime,this.__gen)),this._primeCode}}),g.prototype.generateKeys=function(){return this._priv||(this._priv=new i(l(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},g.prototype.computeSecret=function(e){var t=(e=(e=new i(e)).toRed(this._prime)).redPow(this._priv).fromRed(),r=new n(t.toArray()),o=this.getPrime();if(r.length<o.length){var s=new n(o.length-r.length);s.fill(0),r=n.concat([s,r])}return r},g.prototype.getPublicKey=function(e){return y(this._pub,e)},g.prototype.getPrivateKey=function(e){return y(this._priv,e)},g.prototype.getPrime=function(e){return y(this.__prime,e)},g.prototype.getGenerator=function(e){return y(this._gen,e)},g.prototype.setGenerator=function(e,t){return t=t||"utf8",n.isBuffer(e)||(e=new n(e,t)),this.__gen=e,this._gen=new i(e),this}},3590:(e,t,r)=>{var n=r(1798);e.exports=b,b.simpleSieve=g,b.fermatTest=y;var i=r(3550),o=new i(24),s=new(r(3047)),a=new i(1),u=new i(2),c=new i(5),f=(new i(16),new i(8),new i(10)),h=new i(3),l=(new i(7),new i(11)),d=new i(4),p=(new i(12),null);function m(){if(null!==p)return p;var e=[];e[0]=2;for(var t=1,r=3;r<1048576;r+=2){for(var n=Math.ceil(Math.sqrt(r)),i=0;i<t&&e[i]<=n&&r%e[i]!=0;i++);t!==i&&e[i]<=n||(e[t++]=r)}return p=e,e}function g(e){for(var t=m(),r=0;r<t.length;r++)if(0===e.modn(t[r]))return 0===e.cmpn(t[r]);return!0}function y(e){var t=i.mont(e);return 0===u.toRed(t).redPow(e.subn(1)).fromRed().cmpn(1)}function b(e,t){if(e<16)return new i(2===t||5===t?[140,123]:[140,39]);var r,p;for(t=new i(t);;){for(r=new i(n(Math.ceil(e/8)));r.bitLength()>e;)r.ishrn(1);if(r.isEven()&&r.iadd(a),r.testn(1)||r.iadd(u),t.cmp(u)){if(!t.cmp(c))for(;r.mod(f).cmp(h);)r.iadd(d)}else for(;r.mod(o).cmp(l);)r.iadd(d);if(g(p=r.shrn(1))&&g(r)&&y(p)&&y(r)&&s.test(p)&&s.test(r))return r}}},6266:(e,t,r)=>{"use strict";var n=t;n.version=r(8597).i8,n.utils=r(953),n.rand=r(9931),n.curve=r(8254),n.curves=r(5427),n.ec=r(7954),n.eddsa=r(5980)},4918:(e,t,r)=>{"use strict";var n=r(3550),i=r(953),o=i.getNAF,s=i.getJSF,a=i.assert;function u(e,t){this.type=e,this.p=new n(t.p,16),this.red=t.prime?n.red(t.prime):n.mont(this.p),this.zero=new n(0).toRed(this.red),this.one=new n(1).toRed(this.red),this.two=new n(2).toRed(this.red),this.n=t.n&&new n(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function c(e,t){this.curve=e,this.type=t,this.precomputed=null}e.exports=u,u.prototype.point=function(){throw new Error("Not implemented")},u.prototype.validate=function(){throw new Error("Not implemented")},u.prototype._fixedNafMul=function(e,t){a(e.precomputed);var r=e._getDoubles(),n=o(t,1,this._bitLength),i=(1<<r.step+1)-(r.step%2==0?2:1);i/=3;var s,u,c=[];for(s=0;s<n.length;s+=r.step){u=0;for(var f=s+r.step-1;f>=s;f--)u=(u<<1)+n[f];c.push(u)}for(var h=this.jpoint(null,null,null),l=this.jpoint(null,null,null),d=i;d>0;d--){for(s=0;s<c.length;s++)(u=c[s])===d?l=l.mixedAdd(r.points[s]):u===-d&&(l=l.mixedAdd(r.points[s].neg()));h=h.add(l)}return h.toP()},u.prototype._wnafMul=function(e,t){var r=4,n=e._getNAFPoints(r);r=n.wnd;for(var i=n.points,s=o(t,r,this._bitLength),u=this.jpoint(null,null,null),c=s.length-1;c>=0;c--){for(var f=0;c>=0&&0===s[c];c--)f++;if(c>=0&&f++,u=u.dblp(f),c<0)break;var h=s[c];a(0!==h),u="affine"===e.type?h>0?u.mixedAdd(i[h-1>>1]):u.mixedAdd(i[-h-1>>1].neg()):h>0?u.add(i[h-1>>1]):u.add(i[-h-1>>1].neg())}return"affine"===e.type?u.toP():u},u.prototype._wnafMulAdd=function(e,t,r,n,i){var a,u,c,f=this._wnafT1,h=this._wnafT2,l=this._wnafT3,d=0;for(a=0;a<n;a++){var p=(c=t[a])._getNAFPoints(e);f[a]=p.wnd,h[a]=p.points}for(a=n-1;a>=1;a-=2){var m=a-1,g=a;if(1===f[m]&&1===f[g]){var y=[t[m],null,null,t[g]];0===t[m].y.cmp(t[g].y)?(y[1]=t[m].add(t[g]),y[2]=t[m].toJ().mixedAdd(t[g].neg())):0===t[m].y.cmp(t[g].y.redNeg())?(y[1]=t[m].toJ().mixedAdd(t[g]),y[2]=t[m].add(t[g].neg())):(y[1]=t[m].toJ().mixedAdd(t[g]),y[2]=t[m].toJ().mixedAdd(t[g].neg()));var b=[-3,-1,-5,-7,0,7,5,1,3],v=s(r[m],r[g]);for(d=Math.max(v[0].length,d),l[m]=new Array(d),l[g]=new Array(d),u=0;u<d;u++){var w=0|v[0][u],_=0|v[1][u];l[m][u]=b[3*(w+1)+(_+1)],l[g][u]=0,h[m]=y}}else l[m]=o(r[m],f[m],this._bitLength),l[g]=o(r[g],f[g],this._bitLength),d=Math.max(l[m].length,d),d=Math.max(l[g].length,d)}var S=this.jpoint(null,null,null),M=this._wnafT4;for(a=d;a>=0;a--){for(var A=0;a>=0;){var E=!0;for(u=0;u<n;u++)M[u]=0|l[u][a],0!==M[u]&&(E=!1);if(!E)break;A++,a--}if(a>=0&&A++,S=S.dblp(A),a<0)break;for(u=0;u<n;u++){var O=M[u];0!==O&&(O>0?c=h[u][O-1>>1]:O<0&&(c=h[u][-O-1>>1].neg()),S="affine"===c.type?S.mixedAdd(c):S.add(c))}}for(a=0;a<n;a++)h[a]=null;return i?S:S.toP()},u.BasePoint=c,c.prototype.eq=function(){throw new Error("Not implemented")},c.prototype.validate=function(){return this.curve.validate(this)},u.prototype.decodePoint=function(e,t){e=i.toArray(e,t);var r=this.p.byteLength();if((4===e[0]||6===e[0]||7===e[0])&&e.length-1==2*r)return 6===e[0]?a(e[e.length-1]%2==0):7===e[0]&&a(e[e.length-1]%2==1),this.point(e.slice(1,1+r),e.slice(1+r,1+2*r));if((2===e[0]||3===e[0])&&e.length-1===r)return this.pointFromX(e.slice(1,1+r),3===e[0]);throw new Error("Unknown point format")},c.prototype.encodeCompressed=function(e){return this.encode(e,!0)},c.prototype._encode=function(e){var t=this.curve.p.byteLength(),r=this.getX().toArray("be",t);return e?[this.getY().isEven()?2:3].concat(r):[4].concat(r,this.getY().toArray("be",t))},c.prototype.encode=function(e,t){return i.encode(this._encode(t),e)},c.prototype.precompute=function(e){if(this.precomputed)return this;var t={doubles:null,naf:null,beta:null};return t.naf=this._getNAFPoints(8),t.doubles=this._getDoubles(4,e),t.beta=this._getBeta(),this.precomputed=t,this},c.prototype._hasDoubles=function(e){if(!this.precomputed)return!1;var t=this.precomputed.doubles;return!!t&&t.points.length>=Math.ceil((e.bitLength()+1)/t.step)},c.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i<t;i+=e){for(var o=0;o<e;o++)n=n.dbl();r.push(n)}return{step:e,points:r}},c.prototype._getNAFPoints=function(e){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var t=[this],r=(1<<e)-1,n=1===r?null:this.dbl(),i=1;i<r;i++)t[i]=t[i-1].add(n);return{wnd:e,points:t}},c.prototype._getBeta=function(){return null},c.prototype.dblp=function(e){for(var t=this,r=0;r<e;r++)t=t.dbl();return t}},1138:(e,t,r)=>{"use strict";var n=r(953),i=r(3550),o=r(5717),s=r(4918),a=n.assert;function u(e){this.twisted=1!=(0|e.a),this.mOneA=this.twisted&&-1==(0|e.a),this.extended=this.mOneA,s.call(this,"edwards",e),this.a=new i(e.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new i(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new i(e.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),a(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|e.c)}function c(e,t,r,n,o){s.BasePoint.call(this,e,"projective"),null===t&&null===r&&null===n?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new i(t,16),this.y=new i(r,16),this.z=n?new i(n,16):this.curve.one,this.t=o&&new i(o,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}o(u,s),e.exports=u,u.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)},u.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)},u.prototype.jpoint=function(e,t,r,n){return this.point(e,t,r,n)},u.prototype.pointFromX=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr(),n=this.c2.redSub(this.a.redMul(r)),o=this.one.redSub(this.c2.redMul(this.d).redMul(r)),s=n.redMul(o.redInvm()),a=s.redSqrt();if(0!==a.redSqr().redSub(s).cmp(this.zero))throw new Error("invalid point");var u=a.fromRed().isOdd();return(t&&!u||!t&&u)&&(a=a.redNeg()),this.point(e,a)},u.prototype.pointFromY=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr(),n=r.redSub(this.c2),o=r.redMul(this.d).redMul(this.c2).redSub(this.a),s=n.redMul(o.redInvm());if(0===s.cmp(this.zero)){if(t)throw new Error("invalid point");return this.point(this.zero,e)}var a=s.redSqrt();if(0!==a.redSqr().redSub(s).cmp(this.zero))throw new Error("invalid point");return a.fromRed().isOdd()!==t&&(a=a.redNeg()),this.point(a,e)},u.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var t=e.x.redSqr(),r=e.y.redSqr(),n=t.redMul(this.a).redAdd(r),i=this.c2.redMul(this.one.redAdd(this.d.redMul(t).redMul(r)));return 0===n.cmp(i)},o(c,s.BasePoint),u.prototype.pointFromJSON=function(e){return c.fromJSON(this,e)},u.prototype.point=function(e,t,r,n){return new c(this,e,t,r,n)},c.fromJSON=function(e,t){return new c(e,t[0],t[1],t[2])},c.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},c.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},c.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var n=this.curve._mulA(e),i=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),o=n.redAdd(t),s=o.redSub(r),a=n.redSub(t),u=i.redMul(s),c=o.redMul(a),f=i.redMul(a),h=s.redMul(o);return this.curve.point(u,c,h,f)},c.prototype._projDbl=function(){var e,t,r,n,i,o,s=this.x.redAdd(this.y).redSqr(),a=this.x.redSqr(),u=this.y.redSqr();if(this.curve.twisted){var c=(n=this.curve._mulA(a)).redAdd(u);this.zOne?(e=s.redSub(a).redSub(u).redMul(c.redSub(this.curve.two)),t=c.redMul(n.redSub(u)),r=c.redSqr().redSub(c).redSub(c)):(i=this.z.redSqr(),o=c.redSub(i).redISub(i),e=s.redSub(a).redISub(u).redMul(o),t=c.redMul(n.redSub(u)),r=c.redMul(o))}else n=a.redAdd(u),i=this.curve._mulC(this.z).redSqr(),o=n.redSub(i).redSub(i),e=this.curve._mulC(s.redISub(n)).redMul(o),t=this.curve._mulC(n).redMul(a.redISub(u)),r=n.redMul(o);return this.curve.point(e,t,r)},c.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},c.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),r=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),n=this.t.redMul(this.curve.dd).redMul(e.t),i=this.z.redMul(e.z.redAdd(e.z)),o=r.redSub(t),s=i.redSub(n),a=i.redAdd(n),u=r.redAdd(t),c=o.redMul(s),f=a.redMul(u),h=o.redMul(u),l=s.redMul(a);return this.curve.point(c,f,l,h)},c.prototype._projAdd=function(e){var t,r,n=this.z.redMul(e.z),i=n.redSqr(),o=this.x.redMul(e.x),s=this.y.redMul(e.y),a=this.curve.d.redMul(o).redMul(s),u=i.redSub(a),c=i.redAdd(a),f=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(o).redISub(s),h=n.redMul(u).redMul(f);return this.curve.twisted?(t=n.redMul(c).redMul(s.redSub(this.curve._mulA(o))),r=u.redMul(c)):(t=n.redMul(c).redMul(s.redSub(o)),r=this.curve._mulC(u).redMul(c)),this.curve.point(h,t,r)},c.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},c.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},c.prototype.mulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!1)},c.prototype.jmulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!0)},c.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this},c.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},c.prototype.getX=function(){return this.normalize(),this.x.fromRed()},c.prototype.getY=function(){return this.normalize(),this.y.fromRed()},c.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},c.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var r=e.clone(),n=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(n),0===this.x.cmp(t))return!0}},c.prototype.toP=c.prototype.normalize,c.prototype.mixedAdd=c.prototype.add},8254:(e,t,r)=>{"use strict";var n=t;n.base=r(4918),n.short=r(6673),n.mont=r(2881),n.edwards=r(1138)},2881:(e,t,r)=>{"use strict";var n=r(3550),i=r(5717),o=r(4918),s=r(953);function a(e){o.call(this,"mont",e),this.a=new n(e.a,16).toRed(this.red),this.b=new n(e.b,16).toRed(this.red),this.i4=new n(4).toRed(this.red).redInvm(),this.two=new n(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function u(e,t,r){o.BasePoint.call(this,e,"projective"),null===t&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new n(t,16),this.z=new n(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}i(a,o),e.exports=a,a.prototype.validate=function(e){var t=e.normalize().x,r=t.redSqr(),n=r.redMul(t).redAdd(r.redMul(this.a)).redAdd(t);return 0===n.redSqrt().redSqr().cmp(n)},i(u,o.BasePoint),a.prototype.decodePoint=function(e,t){return this.point(s.toArray(e,t),1)},a.prototype.point=function(e,t){return new u(this,e,t)},a.prototype.pointFromJSON=function(e){return u.fromJSON(this,e)},u.prototype.precompute=function(){},u.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},u.fromJSON=function(e,t){return new u(e,t[0],t[1]||e.one)},u.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},u.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},u.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),t=this.x.redSub(this.z).redSqr(),r=e.redSub(t),n=e.redMul(t),i=r.redMul(t.redAdd(this.curve.a24.redMul(r)));return this.curve.point(n,i)},u.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.diffAdd=function(e,t){var r=this.x.redAdd(this.z),n=this.x.redSub(this.z),i=e.x.redAdd(e.z),o=e.x.redSub(e.z).redMul(r),s=i.redMul(n),a=t.z.redMul(o.redAdd(s).redSqr()),u=t.x.redMul(o.redISub(s).redSqr());return this.curve.point(a,u)},u.prototype.mul=function(e){for(var t=e.clone(),r=this,n=this.curve.point(null,null),i=[];0!==t.cmpn(0);t.iushrn(1))i.push(t.andln(1));for(var o=i.length-1;o>=0;o--)0===i[o]?(r=r.diffAdd(n,this),n=n.dbl()):(n=r.diffAdd(n,this),r=r.dbl());return n},u.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},u.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},u.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},6673:(e,t,r)=>{"use strict";var n=r(953),i=r(3550),o=r(5717),s=r(4918),a=n.assert;function u(e){s.call(this,"short",e),this.a=new i(e.a,16).toRed(this.red),this.b=new i(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function c(e,t,r,n){s.BasePoint.call(this,e,"affine"),null===t&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new i(t,16),this.y=new i(r,16),n&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function f(e,t,r,n){s.BasePoint.call(this,e,"jacobian"),null===t&&null===r&&null===n?(this.x=this.curve.one,this.y=this.curve.one,this.z=new i(0)):(this.x=new i(t,16),this.y=new i(r,16),this.z=new i(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}o(u,s),e.exports=u,u.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,r;if(e.beta)t=new i(e.beta,16).toRed(this.red);else{var n=this._getEndoRoots(this.p);t=(t=n[0].cmp(n[1])<0?n[0]:n[1]).toRed(this.red)}if(e.lambda)r=new i(e.lambda,16);else{var o=this._getEndoRoots(this.n);0===this.g.mul(o[0]).x.cmp(this.g.x.redMul(t))?r=o[0]:(r=o[1],a(0===this.g.mul(r).x.cmp(this.g.x.redMul(t))))}return{beta:t,lambda:r,basis:e.basis?e.basis.map((function(e){return{a:new i(e.a,16),b:new i(e.b,16)}})):this._getEndoBasis(r)}}},u.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:i.mont(e),r=new i(2).toRed(t).redInvm(),n=r.redNeg(),o=new i(3).toRed(t).redNeg().redSqrt().redMul(r);return[n.redAdd(o).fromRed(),n.redSub(o).fromRed()]},u.prototype._getEndoBasis=function(e){for(var t,r,n,o,s,a,u,c,f,h=this.n.ushrn(Math.floor(this.n.bitLength()/2)),l=e,d=this.n.clone(),p=new i(1),m=new i(0),g=new i(0),y=new i(1),b=0;0!==l.cmpn(0);){var v=d.div(l);c=d.sub(v.mul(l)),f=g.sub(v.mul(p));var w=y.sub(v.mul(m));if(!n&&c.cmp(h)<0)t=u.neg(),r=p,n=c.neg(),o=f;else if(n&&2==++b)break;u=c,d=l,l=c,g=p,p=f,y=m,m=w}s=c.neg(),a=f;var _=n.sqr().add(o.sqr());return s.sqr().add(a.sqr()).cmp(_)>=0&&(s=t,a=r),n.negative&&(n=n.neg(),o=o.neg()),s.negative&&(s=s.neg(),a=a.neg()),[{a:n,b:o},{a:s,b:a}]},u.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],n=t[1],i=n.b.mul(e).divRound(this.n),o=r.b.neg().mul(e).divRound(this.n),s=i.mul(r.a),a=o.mul(n.a),u=i.mul(r.b),c=o.mul(n.b);return{k1:e.sub(s).sub(a),k2:u.add(c).neg()}},u.prototype.pointFromX=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var o=n.fromRed().isOdd();return(t&&!o||!t&&o)&&(n=n.redNeg()),this.point(e,n)},u.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,n=this.a.redMul(t),i=t.redSqr().redMul(t).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(i).cmpn(0)},u.prototype._endoWnafMulAdd=function(e,t,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,o=0;o<e.length;o++){var s=this._endoSplit(t[o]),a=e[o],u=a._getBeta();s.k1.negative&&(s.k1.ineg(),a=a.neg(!0)),s.k2.negative&&(s.k2.ineg(),u=u.neg(!0)),n[2*o]=a,n[2*o+1]=u,i[2*o]=s.k1,i[2*o+1]=s.k2}for(var c=this._wnafMulAdd(1,n,i,2*o,r),f=0;f<2*o;f++)n[f]=null,i[f]=null;return c},o(c,s.BasePoint),u.prototype.point=function(e,t,r){return new c(this,e,t,r)},u.prototype.pointFromJSON=function(e,t){return c.fromJSON(this,e,t)},c.prototype._getBeta=function(){if(this.curve.endo){var e=this.precomputed;if(e&&e.beta)return e.beta;var t=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(e){var r=this.curve,n=function(e){return r.point(e.x.redMul(r.endo.beta),e.y)};e.beta=t,t.precomputed={beta:null,naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(n)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(n)}}}return t}},c.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},c.fromJSON=function(e,t,r){"string"==typeof t&&(t=JSON.parse(t));var n=e.point(t[0],t[1],r);if(!t[2])return n;function i(t){return e.point(t[0],t[1],r)}var o=t[2];return n.precomputed={beta:null,doubles:o.doubles&&{step:o.doubles.step,points:[n].concat(o.doubles.points.map(i))},naf:o.naf&&{wnd:o.naf.wnd,points:[n].concat(o.naf.points.map(i))}},n},c.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},c.prototype.isInfinity=function(){return this.inf},c.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var r=t.redSqr().redISub(this.x).redISub(e.x),n=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},c.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,r=this.x.redSqr(),n=e.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(n),o=i.redSqr().redISub(this.x.redAdd(this.x)),s=i.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,s)},c.prototype.getX=function(){return this.x.fromRed()},c.prototype.getY=function(){return this.y.fromRed()},c.prototype.mul=function(e){return e=new i(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},c.prototype.mulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},c.prototype.jmulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},c.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},c.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var r=this.precomputed,n=function(e){return e.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return t},c.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},o(f,s.BasePoint),u.prototype.jpoint=function(e,t,r){return new f(this,e,t,r)},f.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),r=this.x.redMul(t),n=this.y.redMul(t).redMul(e);return this.curve.point(r,n)},f.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},f.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(t),i=e.x.redMul(r),o=this.y.redMul(t.redMul(e.z)),s=e.y.redMul(r.redMul(this.z)),a=n.redSub(i),u=o.redSub(s);if(0===a.cmpn(0))return 0!==u.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=a.redSqr(),f=c.redMul(a),h=n.redMul(c),l=u.redSqr().redIAdd(f).redISub(h).redISub(h),d=u.redMul(h.redISub(l)).redISub(o.redMul(f)),p=this.z.redMul(e.z).redMul(a);return this.curve.jpoint(l,d,p)},f.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),r=this.x,n=e.x.redMul(t),i=this.y,o=e.y.redMul(t).redMul(this.z),s=r.redSub(n),a=i.redSub(o);if(0===s.cmpn(0))return 0!==a.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=s.redSqr(),c=u.redMul(s),f=r.redMul(u),h=a.redSqr().redIAdd(c).redISub(f).redISub(f),l=a.redMul(f.redISub(h)).redISub(i.redMul(c)),d=this.z.redMul(s);return this.curve.jpoint(h,l,d)},f.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var r=this;for(t=0;t<e;t++)r=r.dbl();return r}var n=this.curve.a,i=this.curve.tinv,o=this.x,s=this.y,a=this.z,u=a.redSqr().redSqr(),c=s.redAdd(s);for(t=0;t<e;t++){var f=o.redSqr(),h=c.redSqr(),l=h.redSqr(),d=f.redAdd(f).redIAdd(f).redIAdd(n.redMul(u)),p=o.redMul(h),m=d.redSqr().redISub(p.redAdd(p)),g=p.redISub(m),y=d.redMul(g);y=y.redIAdd(y).redISub(l);var b=c.redMul(a);t+1<e&&(u=u.redMul(l)),o=m,a=b,c=y}return this.curve.jpoint(o,c.redMul(i),a)},f.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},f.prototype._zeroDbl=function(){var e,t,r;if(this.zOne){var n=this.x.redSqr(),i=this.y.redSqr(),o=i.redSqr(),s=this.x.redAdd(i).redSqr().redISub(n).redISub(o);s=s.redIAdd(s);var a=n.redAdd(n).redIAdd(n),u=a.redSqr().redISub(s).redISub(s),c=o.redIAdd(o);c=(c=c.redIAdd(c)).redIAdd(c),e=u,t=a.redMul(s.redISub(u)).redISub(c),r=this.y.redAdd(this.y)}else{var f=this.x.redSqr(),h=this.y.redSqr(),l=h.redSqr(),d=this.x.redAdd(h).redSqr().redISub(f).redISub(l);d=d.redIAdd(d);var p=f.redAdd(f).redIAdd(f),m=p.redSqr(),g=l.redIAdd(l);g=(g=g.redIAdd(g)).redIAdd(g),e=m.redISub(d).redISub(d),t=p.redMul(d.redISub(e)).redISub(g),r=(r=this.y.redMul(this.z)).redIAdd(r)}return this.curve.jpoint(e,t,r)},f.prototype._threeDbl=function(){var e,t,r;if(this.zOne){var n=this.x.redSqr(),i=this.y.redSqr(),o=i.redSqr(),s=this.x.redAdd(i).redSqr().redISub(n).redISub(o);s=s.redIAdd(s);var a=n.redAdd(n).redIAdd(n).redIAdd(this.curve.a),u=a.redSqr().redISub(s).redISub(s);e=u;var c=o.redIAdd(o);c=(c=c.redIAdd(c)).redIAdd(c),t=a.redMul(s.redISub(u)).redISub(c),r=this.y.redAdd(this.y)}else{var f=this.z.redSqr(),h=this.y.redSqr(),l=this.x.redMul(h),d=this.x.redSub(f).redMul(this.x.redAdd(f));d=d.redAdd(d).redIAdd(d);var p=l.redIAdd(l),m=(p=p.redIAdd(p)).redAdd(p);e=d.redSqr().redISub(m),r=this.y.redAdd(this.z).redSqr().redISub(h).redISub(f);var g=h.redSqr();g=(g=(g=g.redIAdd(g)).redIAdd(g)).redIAdd(g),t=d.redMul(p.redISub(e)).redISub(g)}return this.curve.jpoint(e,t,r)},f.prototype._dbl=function(){var e=this.curve.a,t=this.x,r=this.y,n=this.z,i=n.redSqr().redSqr(),o=t.redSqr(),s=r.redSqr(),a=o.redAdd(o).redIAdd(o).redIAdd(e.redMul(i)),u=t.redAdd(t),c=(u=u.redIAdd(u)).redMul(s),f=a.redSqr().redISub(c.redAdd(c)),h=c.redISub(f),l=s.redSqr();l=(l=(l=l.redIAdd(l)).redIAdd(l)).redIAdd(l);var d=a.redMul(h).redISub(l),p=r.redAdd(r).redMul(n);return this.curve.jpoint(f,d,p)},f.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr(),n=t.redSqr(),i=e.redAdd(e).redIAdd(e),o=i.redSqr(),s=this.x.redAdd(t).redSqr().redISub(e).redISub(n),a=(s=(s=(s=s.redIAdd(s)).redAdd(s).redIAdd(s)).redISub(o)).redSqr(),u=n.redIAdd(n);u=(u=(u=u.redIAdd(u)).redIAdd(u)).redIAdd(u);var c=i.redIAdd(s).redSqr().redISub(o).redISub(a).redISub(u),f=t.redMul(c);f=(f=f.redIAdd(f)).redIAdd(f);var h=this.x.redMul(a).redISub(f);h=(h=h.redIAdd(h)).redIAdd(h);var l=this.y.redMul(c.redMul(u.redISub(c)).redISub(s.redMul(a)));l=(l=(l=l.redIAdd(l)).redIAdd(l)).redIAdd(l);var d=this.z.redAdd(s).redSqr().redISub(r).redISub(a);return this.curve.jpoint(h,l,d)},f.prototype.mul=function(e,t){return e=new i(e,t),this.curve._wnafMul(this,e)},f.prototype.eq=function(e){if("affine"===e.type)return this.eq(e.toJ());if(this===e)return!0;var t=this.z.redSqr(),r=e.z.redSqr();if(0!==this.x.redMul(r).redISub(e.x.redMul(t)).cmpn(0))return!1;var n=t.redMul(this.z),i=r.redMul(e.z);return 0===this.y.redMul(i).redISub(e.y.redMul(n)).cmpn(0)},f.prototype.eqXToP=function(e){var t=this.z.redSqr(),r=e.toRed(this.curve.red).redMul(t);if(0===this.x.cmp(r))return!0;for(var n=e.clone(),i=this.curve.redN.redMul(t);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}},f.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},f.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},5427:(e,t,r)=>{"use strict";var n,i=t,o=r(3715),s=r(8254),a=r(953).assert;function u(e){"short"===e.type?this.curve=new s.short(e):"edwards"===e.type?this.curve=new s.edwards(e):this.curve=new s.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,a(this.g.validate(),"Invalid curve"),a(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function c(e,t){Object.defineProperty(i,e,{configurable:!0,enumerable:!0,get:function(){var r=new u(t);return Object.defineProperty(i,e,{configurable:!0,enumerable:!0,value:r}),r}})}i.PresetCurve=u,c("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:o.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),c("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:o.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),c("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:o.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),c("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:o.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),c("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:o.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),c("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["9"]}),c("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{n=r(1037)}catch(e){n=void 0}c("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:o.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",n]})},7954:(e,t,r)=>{"use strict";var n=r(3550),i=r(2156),o=r(953),s=r(5427),a=r(9931),u=o.assert,c=r(1251),f=r(611);function h(e){if(!(this instanceof h))return new h(e);"string"==typeof e&&(u(Object.prototype.hasOwnProperty.call(s,e),"Unknown curve "+e),e=s[e]),e instanceof s.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}e.exports=h,h.prototype.keyPair=function(e){return new c(this,e)},h.prototype.keyFromPrivate=function(e,t){return c.fromPrivate(this,e,t)},h.prototype.keyFromPublic=function(e,t){return c.fromPublic(this,e,t)},h.prototype.genKeyPair=function(e){e||(e={});for(var t=new i({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||a(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),o=this.n.sub(new n(2));;){var s=new n(t.generate(r));if(!(s.cmp(o)>0))return s.iaddn(1),this.keyFromPrivate(s)}},h.prototype._truncateToN=function(e,t){var r=8*e.byteLength()-this.n.bitLength();return r>0&&(e=e.ushrn(r)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},h.prototype.sign=function(e,t,r,o){"object"==typeof r&&(o=r,r=null),o||(o={}),t=this.keyFromPrivate(t,r),e=this._truncateToN(new n(e,16));for(var s=this.n.byteLength(),a=t.getPrivate().toArray("be",s),u=e.toArray("be",s),c=new i({hash:this.hash,entropy:a,nonce:u,pers:o.pers,persEnc:o.persEnc||"utf8"}),h=this.n.sub(new n(1)),l=0;;l++){var d=o.k?o.k(l):new n(c.generate(this.n.byteLength()));if(!((d=this._truncateToN(d,!0)).cmpn(1)<=0||d.cmp(h)>=0)){var p=this.g.mul(d);if(!p.isInfinity()){var m=p.getX(),g=m.umod(this.n);if(0!==g.cmpn(0)){var y=d.invm(this.n).mul(g.mul(t.getPrivate()).iadd(e));if(0!==(y=y.umod(this.n)).cmpn(0)){var b=(p.getY().isOdd()?1:0)|(0!==m.cmp(g)?2:0);return o.canonical&&y.cmp(this.nh)>0&&(y=this.n.sub(y),b^=1),new f({r:g,s:y,recoveryParam:b})}}}}}},h.prototype.verify=function(e,t,r,i){e=this._truncateToN(new n(e,16)),r=this.keyFromPublic(r,i);var o=(t=new f(t,"hex")).r,s=t.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;if(s.cmpn(1)<0||s.cmp(this.n)>=0)return!1;var a,u=s.invm(this.n),c=u.mul(e).umod(this.n),h=u.mul(o).umod(this.n);return this.curve._maxwellTrick?!(a=this.g.jmulAdd(c,r.getPublic(),h)).isInfinity()&&a.eqXToP(o):!(a=this.g.mulAdd(c,r.getPublic(),h)).isInfinity()&&0===a.getX().umod(this.n).cmp(o)},h.prototype.recoverPubKey=function(e,t,r,i){u((3&r)===r,"The recovery param is more than two bits"),t=new f(t,i);var o=this.n,s=new n(e),a=t.r,c=t.s,h=1&r,l=r>>1;if(a.cmp(this.curve.p.umod(this.curve.n))>=0&&l)throw new Error("Unable to find sencond key candinate");a=l?this.curve.pointFromX(a.add(this.curve.n),h):this.curve.pointFromX(a,h);var d=t.r.invm(o),p=o.sub(s).mul(d).umod(o),m=c.mul(d).umod(o);return this.g.mulAdd(p,a,m)},h.prototype.getKeyRecoveryParam=function(e,t,r,n){if(null!==(t=new f(t,n)).recoveryParam)return t.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(e,t,i)}catch(e){continue}if(o.eq(r))return i}throw new Error("Unable to find valid recovery factor")}},1251:(e,t,r)=>{"use strict";var n=r(3550),i=r(953).assert;function o(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}e.exports=o,o.fromPublic=function(e,t,r){return t instanceof o?t:new o(e,{pub:t,pubEnc:r})},o.fromPrivate=function(e,t,r){return t instanceof o?t:new o(e,{priv:t,privEnc:r})},o.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},o.prototype.getPublic=function(e,t){return"string"==typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},o.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},o.prototype._importPrivate=function(e,t){this.priv=new n(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},o.prototype._importPublic=function(e,t){if(e.x||e.y)return"mont"===this.ec.curve.type?i(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||i(e.x&&e.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(e.x,e.y));this.pub=this.ec.curve.decodePoint(e,t)},o.prototype.derive=function(e){return e.validate()||i(e.validate(),"public point not validated"),e.mul(this.priv).getX()},o.prototype.sign=function(e,t,r){return this.ec.sign(e,this,t,r)},o.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},o.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"}},611:(e,t,r)=>{"use strict";var n=r(3550),i=r(953),o=i.assert;function s(e,t){if(e instanceof s)return e;this._importDER(e,t)||(o(e.r&&e.s,"Signature without r or s"),this.r=new n(e.r,16),this.s=new n(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}function a(){this.place=0}function u(e,t){var r=e[t.place++];if(!(128&r))return r;var n=15&r;if(0===n||n>4)return!1;for(var i=0,o=0,s=t.place;o<n;o++,s++)i<<=8,i|=e[s],i>>>=0;return!(i<=127)&&(t.place=s,i)}function c(e){for(var t=0,r=e.length-1;!e[t]&&!(128&e[t+1])&&t<r;)t++;return 0===t?e:e.slice(t)}function f(e,t){if(t<128)e.push(t);else{var r=1+(Math.log(t)/Math.LN2>>>3);for(e.push(128|r);--r;)e.push(t>>>(r<<3)&255);e.push(t)}}e.exports=s,s.prototype._importDER=function(e,t){e=i.toArray(e,t);var r=new a;if(48!==e[r.place++])return!1;var o=u(e,r);if(!1===o)return!1;if(o+r.place!==e.length)return!1;if(2!==e[r.place++])return!1;var s=u(e,r);if(!1===s)return!1;var c=e.slice(r.place,s+r.place);if(r.place+=s,2!==e[r.place++])return!1;var f=u(e,r);if(!1===f)return!1;if(e.length!==f+r.place)return!1;var h=e.slice(r.place,f+r.place);if(0===c[0]){if(!(128&c[1]))return!1;c=c.slice(1)}if(0===h[0]){if(!(128&h[1]))return!1;h=h.slice(1)}return this.r=new n(c),this.s=new n(h),this.recoveryParam=null,!0},s.prototype.toDER=function(e){var t=this.r.toArray(),r=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&r[0]&&(r=[0].concat(r)),t=c(t),r=c(r);!(r[0]||128&r[1]);)r=r.slice(1);var n=[2];f(n,t.length),(n=n.concat(t)).push(2),f(n,r.length);var o=n.concat(r),s=[48];return f(s,o.length),s=s.concat(o),i.encode(s,e)}},5980:(e,t,r)=>{"use strict";var n=r(3715),i=r(5427),o=r(953),s=o.assert,a=o.parseBytes,u=r(9087),c=r(3622);function f(e){if(s("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof f))return new f(e);e=i[e].curve,this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=n.sha512}e.exports=f,f.prototype.sign=function(e,t){e=a(e);var r=this.keyFromSecret(t),n=this.hashInt(r.messagePrefix(),e),i=this.g.mul(n),o=this.encodePoint(i),s=this.hashInt(o,r.pubBytes(),e).mul(r.priv()),u=n.add(s).umod(this.curve.n);return this.makeSignature({R:i,S:u,Rencoded:o})},f.prototype.verify=function(e,t,r){e=a(e),t=this.makeSignature(t);var n=this.keyFromPublic(r),i=this.hashInt(t.Rencoded(),n.pubBytes(),e),o=this.g.mul(t.S());return t.R().add(n.pub().mul(i)).eq(o)},f.prototype.hashInt=function(){for(var e=this.hash(),t=0;t<arguments.length;t++)e.update(arguments[t]);return o.intFromLE(e.digest()).umod(this.curve.n)},f.prototype.keyFromPublic=function(e){return u.fromPublic(this,e)},f.prototype.keyFromSecret=function(e){return u.fromSecret(this,e)},f.prototype.makeSignature=function(e){return e instanceof c?e:new c(this,e)},f.prototype.encodePoint=function(e){var t=e.getY().toArray("le",this.encodingLength);return t[this.encodingLength-1]|=e.getX().isOdd()?128:0,t},f.prototype.decodePoint=function(e){var t=(e=o.parseBytes(e)).length-1,r=e.slice(0,t).concat(-129&e[t]),n=0!=(128&e[t]),i=o.intFromLE(r);return this.curve.pointFromY(i,n)},f.prototype.encodeInt=function(e){return e.toArray("le",this.encodingLength)},f.prototype.decodeInt=function(e){return o.intFromLE(e)},f.prototype.isPoint=function(e){return e instanceof this.pointClass}},9087:(e,t,r)=>{"use strict";var n=r(953),i=n.assert,o=n.parseBytes,s=n.cachedProperty;function a(e,t){this.eddsa=e,this._secret=o(t.secret),e.isPoint(t.pub)?this._pub=t.pub:this._pubBytes=o(t.pub)}a.fromPublic=function(e,t){return t instanceof a?t:new a(e,{pub:t})},a.fromSecret=function(e,t){return t instanceof a?t:new a(e,{secret:t})},a.prototype.secret=function(){return this._secret},s(a,"pubBytes",(function(){return this.eddsa.encodePoint(this.pub())})),s(a,"pub",(function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())})),s(a,"privBytes",(function(){var e=this.eddsa,t=this.hash(),r=e.encodingLength-1,n=t.slice(0,e.encodingLength);return n[0]&=248,n[r]&=127,n[r]|=64,n})),s(a,"priv",(function(){return this.eddsa.decodeInt(this.privBytes())})),s(a,"hash",(function(){return this.eddsa.hash().update(this.secret()).digest()})),s(a,"messagePrefix",(function(){return this.hash().slice(this.eddsa.encodingLength)})),a.prototype.sign=function(e){return i(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)},a.prototype.verify=function(e,t){return this.eddsa.verify(e,t,this)},a.prototype.getSecret=function(e){return i(this._secret,"KeyPair is public only"),n.encode(this.secret(),e)},a.prototype.getPublic=function(e){return n.encode(this.pubBytes(),e)},e.exports=a},3622:(e,t,r)=>{"use strict";var n=r(3550),i=r(953),o=i.assert,s=i.cachedProperty,a=i.parseBytes;function u(e,t){this.eddsa=e,"object"!=typeof t&&(t=a(t)),Array.isArray(t)&&(t={R:t.slice(0,e.encodingLength),S:t.slice(e.encodingLength)}),o(t.R&&t.S,"Signature without R or S"),e.isPoint(t.R)&&(this._R=t.R),t.S instanceof n&&(this._S=t.S),this._Rencoded=Array.isArray(t.R)?t.R:t.Rencoded,this._Sencoded=Array.isArray(t.S)?t.S:t.Sencoded}s(u,"S",(function(){return this.eddsa.decodeInt(this.Sencoded())})),s(u,"R",(function(){return this.eddsa.decodePoint(this.Rencoded())})),s(u,"Rencoded",(function(){return this.eddsa.encodePoint(this.R())})),s(u,"Sencoded",(function(){return this.eddsa.encodeInt(this.S())})),u.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},u.prototype.toHex=function(){return i.encode(this.toBytes(),"hex").toUpperCase()},e.exports=u},1037:e=>{e.exports={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}},953:(e,t,r)=>{"use strict";var n=t,i=r(3550),o=r(9746),s=r(4504);n.assert=o,n.toArray=s.toArray,n.zero2=s.zero2,n.toHex=s.toHex,n.encode=s.encode,n.getNAF=function(e,t,r){var n=new Array(Math.max(e.bitLength(),r)+1);n.fill(0);for(var i=1<<t+1,o=e.clone(),s=0;s<n.length;s++){var a,u=o.andln(i-1);o.isOdd()?(a=u>(i>>1)-1?(i>>1)-u:u,o.isubn(a)):a=0,n[s]=a,o.iushrn(1)}return n},n.getJSF=function(e,t){var r=[[],[]];e=e.clone(),t=t.clone();for(var n,i=0,o=0;e.cmpn(-i)>0||t.cmpn(-o)>0;){var s,a,u=e.andln(3)+i&3,c=t.andln(3)+o&3;3===u&&(u=-1),3===c&&(c=-1),s=0==(1&u)?0:3!=(n=e.andln(7)+i&7)&&5!==n||2!==c?u:-u,r[0].push(s),a=0==(1&c)?0:3!=(n=t.andln(7)+o&7)&&5!==n||2!==u?c:-c,r[1].push(a),2*i===s+1&&(i=1-i),2*o===a+1&&(o=1-o),e.iushrn(1),t.iushrn(1)}return r},n.cachedProperty=function(e,t,r){var n="_"+t;e.prototype[t]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},n.parseBytes=function(e){return"string"==typeof e?n.toArray(e,"hex"):e},n.intFromLE=function(e){return new i(e,"hex","le")}},8091:e=>{"use strict";function t(e,t){if(null==e)throw new TypeError("Cannot convert first argument to object");for(var r=Object(e),n=1;n<arguments.length;n++){var i=arguments[n];if(null!=i)for(var o=Object.keys(Object(i)),s=0,a=o.length;s<a;s++){var u=o[s],c=Object.getOwnPropertyDescriptor(i,u);void 0!==c&&c.enumerable&&(r[u]=i[u])}}return r}e.exports={assign:t,polyfill:function(){Object.assign||Object.defineProperty(Object,"assign",{enumerable:!1,configurable:!0,writable:!0,value:t})}}},7187:e=>{"use strict";var t,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};t=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!=e};function o(){o.init.call(this)}e.exports=o,e.exports.once=function(e,t){return new Promise((function(r,n){function i(r){e.removeListener(t,o),n(r)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",i),r([].slice.call(arguments))}m(e,t,o,{once:!0}),"error"!==t&&function(e,t,r){"function"==typeof e.on&&m(e,"error",t,{once:!0})}(e,i)}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var s=10;function a(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function u(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function c(e,t,r,n){var i,o,s,c;if(a(r),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),o=e._events),s=o[t]),void 0===s)s=o[t]=r,++e._eventsCount;else if("function"==typeof s?s=o[t]=n?[r,s]:[s,r]:n?s.unshift(r):s.push(r),(i=u(e))>0&&s.length>i&&!s.warned){s.warned=!0;var f=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");f.name="MaxListenersExceededWarning",f.emitter=e,f.type=t,f.count=s.length,c=f,console&&console.warn&&console.warn(c)}return e}function f(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function h(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=f.bind(n);return i.listener=r,n.wrapFn=i,i}function l(e,t,r){var n=e._events;if(void 0===n)return[];var i=n[t];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(i):p(i,i.length)}function d(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function p(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}function m(e,t,r,n){if("function"==typeof e.on)n.once?e.once(t,r):e.on(t,r);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function i(o){n.once&&e.removeEventListener(t,i),r(o)}))}}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");s=e}}),o.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},o.prototype.getMaxListeners=function(){return u(this)},o.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var i="error"===e,o=this._events;if(void 0!==o)i=i&&void 0===o.error;else if(!i)return!1;if(i){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var u=o[e];if(void 0===u)return!1;if("function"==typeof u)n(u,this,t);else{var c=u.length,f=p(u,c);for(r=0;r<c;++r)n(f[r],this,t)}return!0},o.prototype.addListener=function(e,t){return c(this,e,t,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(e,t){return c(this,e,t,!0)},o.prototype.once=function(e,t){return a(t),this.on(e,h(this,e,t)),this},o.prototype.prependOnceListener=function(e,t){return a(t),this.prependListener(e,h(this,e,t)),this},o.prototype.removeListener=function(e,t){var r,n,i,o,s;if(a(t),void 0===(n=this._events))return this;if(void 0===(r=n[e]))return this;if(r===t||r.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(i=-1,o=r.length-1;o>=0;o--)if(r[o]===t||r[o].listener===t){s=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,i),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",e,s||t)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(e){var t,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){var i,o=Object.keys(r);for(n=0;n<o.length;++n)"removeListener"!==(i=o[n])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},o.prototype.listeners=function(e){return l(this,e,!0)},o.prototype.rawListeners=function(e){return l(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):d.call(e,t)},o.prototype.listenerCount=d,o.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},3048:(e,t,r)=>{var n=r(9509).Buffer,i=r(2318);e.exports=function(e,t,r,o){if(n.isBuffer(e)||(e=n.from(e,"binary")),t&&(n.isBuffer(t)||(t=n.from(t,"binary")),8!==t.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var s=r/8,a=n.alloc(s),u=n.alloc(o||0),c=n.alloc(0);s>0||o>0;){var f=new i;f.update(c),f.update(e),t&&f.update(t),c=f.digest();var h=0;if(s>0){var l=a.length-s;h=Math.min(s,c.length),c.copy(a,l,0,h),s-=h}if(h<c.length&&o>0){var d=u.length-o,p=Math.min(o,c.length-h);c.copy(u,d,h,h+p),o-=p}}return c.fill(0),{key:a,iv:u}}},9804:e=>{var t=Object.prototype.hasOwnProperty,r=Object.prototype.toString;e.exports=function(e,n,i){if("[object Function]"!==r.call(n))throw new TypeError("iterator must be a function");var o=e.length;if(o===+o)for(var s=0;s<o;s++)n.call(i,e[s],s,e);else for(var a in e)t.call(e,a)&&n.call(i,e[a],a,e)}},7648:e=>{"use strict";var t="Function.prototype.bind called on incompatible ",r=Array.prototype.slice,n=Object.prototype.toString,i="[object Function]";e.exports=function(e){var o=this;if("function"!=typeof o||n.call(o)!==i)throw new TypeError(t+o);for(var s,a=r.call(arguments,1),u=function(){if(this instanceof s){var t=o.apply(this,a.concat(r.call(arguments)));return Object(t)===t?t:this}return o.apply(e,a.concat(r.call(arguments)))},c=Math.max(0,o.length-a.length),f=[],h=0;h<c;h++)f.push("$"+h);if(s=Function("binder","return function ("+f.join(",")+"){ return binder.apply(this,arguments); }")(u),o.prototype){var l=function(){};l.prototype=o.prototype,s.prototype=new l,l.prototype=null}return s}},8612:(e,t,r)=>{"use strict";var n=r(7648);e.exports=Function.prototype.bind||n},210:(e,t,r)=>{"use strict";var n,i=SyntaxError,o=Function,s=TypeError,a=function(e){try{return o('"use strict"; return ('+e+").constructor;")()}catch(e){}},u=Object.getOwnPropertyDescriptor;if(u)try{u({},"")}catch(e){u=null}var c=function(){throw new s},f=u?function(){try{return c}catch(e){try{return u(arguments,"callee").get}catch(e){return c}}}():c,h=r(1405)(),l=Object.getPrototypeOf||function(e){return e.__proto__},d={},p="undefined"==typeof Uint8Array?n:l(Uint8Array),m={"%AggregateError%":"undefined"==typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":h?l([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":d,"%AsyncGenerator%":d,"%AsyncGeneratorFunction%":d,"%AsyncIteratorPrototype%":d,"%Atomics%":"undefined"==typeof Atomics?n:Atomics,"%BigInt%":"undefined"==typeof BigInt?n:BigInt,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?n:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":o,"%GeneratorFunction%":d,"%Int8Array%":"undefined"==typeof Int8Array?n:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?n:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":h?l(l([][Symbol.iterator]())):n,"%JSON%":"object"==typeof JSON?JSON:n,"%Map%":"undefined"==typeof Map?n:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&h?l((new Map)[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?n:Promise,"%Proxy%":"undefined"==typeof Proxy?n:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?n:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&h?l((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":h?l(""[Symbol.iterator]()):n,"%Symbol%":h?Symbol:n,"%SyntaxError%":i,"%ThrowTypeError%":f,"%TypedArray%":p,"%TypeError%":s,"%Uint8Array%":"undefined"==typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?n:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?n:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?n:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?n:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?n:WeakSet},g=function e(t){var r;if("%AsyncFunction%"===t)r=a("async function () {}");else if("%GeneratorFunction%"===t)r=a("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=a("async function* () {}");else if("%AsyncGenerator%"===t){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===t){var i=e("%AsyncGenerator%");i&&(r=l(i.prototype))}return m[t]=r,r},y={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},b=r(8612),v=r(7642),w=b.call(Function.call,Array.prototype.concat),_=b.call(Function.apply,Array.prototype.splice),S=b.call(Function.call,String.prototype.replace),M=b.call(Function.call,String.prototype.slice),A=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,E=/\\(\\)?/g,O=function(e){var t=M(e,0,1),r=M(e,-1);if("%"===t&&"%"!==r)throw new i("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new i("invalid intrinsic syntax, expected opening `%`");var n=[];return S(e,A,(function(e,t,r,i){n[n.length]=r?S(i,E,"$1"):t||e})),n},x=function(e,t){var r,n=e;if(v(y,n)&&(n="%"+(r=y[n])[0]+"%"),v(m,n)){var o=m[n];if(o===d&&(o=g(n)),void 0===o&&!t)throw new s("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:o}}throw new i("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new s("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new s('"allowMissing" argument must be a boolean');var r=O(e),n=r.length>0?r[0]:"",o=x("%"+n+"%",t),a=o.name,c=o.value,f=!1,h=o.alias;h&&(n=h[0],_(r,w([0,1],h)));for(var l=1,d=!0;l<r.length;l+=1){var p=r[l],g=M(p,0,1),y=M(p,-1);if(('"'===g||"'"===g||"`"===g||'"'===y||"'"===y||"`"===y)&&g!==y)throw new i("property names with quotes must have matching quotes");if("constructor"!==p&&d||(f=!0),v(m,a="%"+(n+="."+p)+"%"))c=m[a];else if(null!=c){if(!(p in c)){if(!t)throw new s("base intrinsic for "+e+" exists, but the property is not available.");return}if(u&&l+1>=r.length){var b=u(c,p);c=(d=!!b)&&"get"in b&&!("originalValue"in b.get)?b.get:c[p]}else d=v(c,p),c=c[p];d&&!f&&(m[a]=c)}}return c}},1405:(e,t,r)=>{"use strict";var n="undefined"!=typeof Symbol&&Symbol,i=r(5419);e.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&i()}},5419:e=>{"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var n=Object.getOwnPropertySymbols(e);if(1!==n.length||n[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(e,t);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},7642:(e,t,r)=>{"use strict";var n=r(8612);e.exports=n.call(Function.call,Object.prototype.hasOwnProperty)},3349:(e,t,r)=>{"use strict";var n=r(9509).Buffer,i=r(8473).Transform;function o(e){i.call(this),this._block=n.allocUnsafe(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}r(5717)(o,i),o.prototype._transform=function(e,t,r){var n=null;try{this.update(e,t)}catch(e){n=e}r(n)},o.prototype._flush=function(e){var t=null;try{this.push(this.digest())}catch(e){t=e}e(t)},o.prototype.update=function(e,t){if(function(e,t){if(!n.isBuffer(e)&&"string"!=typeof e)throw new TypeError("Data must be a string or a buffer")}(e),this._finalized)throw new Error("Digest already called");n.isBuffer(e)||(e=n.from(e,t));for(var r=this._block,i=0;this._blockOffset+e.length-i>=this._blockSize;){for(var o=this._blockOffset;o<this._blockSize;)r[o++]=e[i++];this._update(),this._blockOffset=0}for(;i<e.length;)r[this._blockOffset++]=e[i++];for(var s=0,a=8*e.length;a>0;++s)this._length[s]+=a,(a=this._length[s]/4294967296|0)>0&&(this._length[s]-=4294967296*a);return this},o.prototype._update=function(){throw new Error("_update is not implemented")},o.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var t=this._digest();void 0!==e&&(t=t.toString(e)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return t},o.prototype._digest=function(){throw new Error("_digest is not implemented")},e.exports=o},3715:(e,t,r)=>{var n=t;n.utils=r(6436),n.common=r(5772),n.sha=r(9041),n.ripemd=r(2949),n.hmac=r(2344),n.sha1=n.sha.sha1,n.sha256=n.sha.sha256,n.sha224=n.sha.sha224,n.sha384=n.sha.sha384,n.sha512=n.sha.sha512,n.ripemd160=n.ripemd.ripemd160},5772:(e,t,r)=>{"use strict";var n=r(6436),i=r(9746);function o(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}t.BlockHash=o,o.prototype.update=function(e,t){if(e=n.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var r=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-r,e.length),0===this.pending.length&&(this.pending=null),e=n.join32(e,0,e.length-r,this.endian);for(var i=0;i<e.length;i+=this._delta32)this._update(e,i,i+this._delta32)}return this},o.prototype.digest=function(e){return this.update(this._pad()),i(null===this.pending),this._digest(e)},o.prototype._pad=function(){var e=this.pendingTotal,t=this._delta8,r=t-(e+this.padLength)%t,n=new Array(r+this.padLength);n[0]=128;for(var i=1;i<r;i++)n[i]=0;if(e<<=3,"big"===this.endian){for(var o=8;o<this.padLength;o++)n[i++]=0;n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=e>>>24&255,n[i++]=e>>>16&255,n[i++]=e>>>8&255,n[i++]=255&e}else for(n[i++]=255&e,n[i++]=e>>>8&255,n[i++]=e>>>16&255,n[i++]=e>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,o=8;o<this.padLength;o++)n[i++]=0;return n}},2344:(e,t,r)=>{"use strict";var n=r(6436),i=r(9746);function o(e,t,r){if(!(this instanceof o))return new o(e,t,r);this.Hash=e,this.blockSize=e.blockSize/8,this.outSize=e.outSize/8,this.inner=null,this.outer=null,this._init(n.toArray(t,r))}e.exports=o,o.prototype._init=function(e){e.length>this.blockSize&&(e=(new this.Hash).update(e).digest()),i(e.length<=this.blockSize);for(var t=e.length;t<this.blockSize;t++)e.push(0);for(t=0;t<e.length;t++)e[t]^=54;for(this.inner=(new this.Hash).update(e),t=0;t<e.length;t++)e[t]^=106;this.outer=(new this.Hash).update(e)},o.prototype.update=function(e,t){return this.inner.update(e,t),this},o.prototype.digest=function(e){return this.outer.update(this.inner.digest()),this.outer.digest(e)}},2949:(e,t,r)=>{"use strict";var n=r(6436),i=r(5772),o=n.rotl32,s=n.sum32,a=n.sum32_3,u=n.sum32_4,c=i.BlockHash;function f(){if(!(this instanceof f))return new f;c.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function h(e,t,r,n){return e<=15?t^r^n:e<=31?t&r|~t&n:e<=47?(t|~r)^n:e<=63?t&n|r&~n:t^(r|~n)}function l(e){return e<=15?0:e<=31?1518500249:e<=47?1859775393:e<=63?2400959708:2840853838}function d(e){return e<=15?1352829926:e<=31?1548603684:e<=47?1836072691:e<=63?2053994217:0}n.inherits(f,c),t.ripemd160=f,f.blockSize=512,f.outSize=160,f.hmacStrength=192,f.padLength=64,f.prototype._update=function(e,t){for(var r=this.h[0],n=this.h[1],i=this.h[2],c=this.h[3],f=this.h[4],b=r,v=n,w=i,_=c,S=f,M=0;M<80;M++){var A=s(o(u(r,h(M,n,i,c),e[p[M]+t],l(M)),g[M]),f);r=f,f=c,c=o(i,10),i=n,n=A,A=s(o(u(b,h(79-M,v,w,_),e[m[M]+t],d(M)),y[M]),S),b=S,S=_,_=o(w,10),w=v,v=A}A=a(this.h[1],i,_),this.h[1]=a(this.h[2],c,S),this.h[2]=a(this.h[3],f,b),this.h[3]=a(this.h[4],r,v),this.h[4]=a(this.h[0],n,w),this.h[0]=A},f.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"little"):n.split32(this.h,"little")};var p=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],m=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],g=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],y=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]},9041:(e,t,r)=>{"use strict";t.sha1=r(4761),t.sha224=r(799),t.sha256=r(9344),t.sha384=r(772),t.sha512=r(5900)},4761:(e,t,r)=>{"use strict";var n=r(6436),i=r(5772),o=r(7038),s=n.rotl32,a=n.sum32,u=n.sum32_5,c=o.ft_1,f=i.BlockHash,h=[1518500249,1859775393,2400959708,3395469782];function l(){if(!(this instanceof l))return new l;f.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}n.inherits(l,f),e.exports=l,l.blockSize=512,l.outSize=160,l.hmacStrength=80,l.padLength=64,l.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;n<r.length;n++)r[n]=s(r[n-3]^r[n-8]^r[n-14]^r[n-16],1);var i=this.h[0],o=this.h[1],f=this.h[2],l=this.h[3],d=this.h[4];for(n=0;n<r.length;n++){var p=~~(n/20),m=u(s(i,5),c(p,o,f,l),d,r[n],h[p]);d=l,l=f,f=s(o,30),o=i,i=m}this.h[0]=a(this.h[0],i),this.h[1]=a(this.h[1],o),this.h[2]=a(this.h[2],f),this.h[3]=a(this.h[3],l),this.h[4]=a(this.h[4],d)},l.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},799:(e,t,r)=>{"use strict";var n=r(6436),i=r(9344);function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}n.inherits(o,i),e.exports=o,o.blockSize=512,o.outSize=224,o.hmacStrength=192,o.padLength=64,o.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h.slice(0,7),"big"):n.split32(this.h.slice(0,7),"big")}},9344:(e,t,r)=>{"use strict";var n=r(6436),i=r(5772),o=r(7038),s=r(9746),a=n.sum32,u=n.sum32_4,c=n.sum32_5,f=o.ch32,h=o.maj32,l=o.s0_256,d=o.s1_256,p=o.g0_256,m=o.g1_256,g=i.BlockHash,y=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function b(){if(!(this instanceof b))return new b;g.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=y,this.W=new Array(64)}n.inherits(b,g),e.exports=b,b.blockSize=512,b.outSize=256,b.hmacStrength=192,b.padLength=64,b.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;n<r.length;n++)r[n]=u(m(r[n-2]),r[n-7],p(r[n-15]),r[n-16]);var i=this.h[0],o=this.h[1],g=this.h[2],y=this.h[3],b=this.h[4],v=this.h[5],w=this.h[6],_=this.h[7];for(s(this.k.length===r.length),n=0;n<r.length;n++){var S=c(_,d(b),f(b,v,w),this.k[n],r[n]),M=a(l(i),h(i,o,g));_=w,w=v,v=b,b=a(y,S),y=g,g=o,o=i,i=a(S,M)}this.h[0]=a(this.h[0],i),this.h[1]=a(this.h[1],o),this.h[2]=a(this.h[2],g),this.h[3]=a(this.h[3],y),this.h[4]=a(this.h[4],b),this.h[5]=a(this.h[5],v),this.h[6]=a(this.h[6],w),this.h[7]=a(this.h[7],_)},b.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},772:(e,t,r)=>{"use strict";var n=r(6436),i=r(5900);function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}n.inherits(o,i),e.exports=o,o.blockSize=1024,o.outSize=384,o.hmacStrength=192,o.padLength=128,o.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h.slice(0,12),"big"):n.split32(this.h.slice(0,12),"big")}},5900:(e,t,r)=>{"use strict";var n=r(6436),i=r(5772),o=r(9746),s=n.rotr64_hi,a=n.rotr64_lo,u=n.shr64_hi,c=n.shr64_lo,f=n.sum64,h=n.sum64_hi,l=n.sum64_lo,d=n.sum64_4_hi,p=n.sum64_4_lo,m=n.sum64_5_hi,g=n.sum64_5_lo,y=i.BlockHash,b=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function v(){if(!(this instanceof v))return new v;y.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=b,this.W=new Array(160)}function w(e,t,r,n,i){var o=e&r^~e&i;return o<0&&(o+=4294967296),o}function _(e,t,r,n,i,o){var s=t&n^~t&o;return s<0&&(s+=4294967296),s}function S(e,t,r,n,i){var o=e&r^e&i^r&i;return o<0&&(o+=4294967296),o}function M(e,t,r,n,i,o){var s=t&n^t&o^n&o;return s<0&&(s+=4294967296),s}function A(e,t){var r=s(e,t,28)^s(t,e,2)^s(t,e,7);return r<0&&(r+=4294967296),r}function E(e,t){var r=a(e,t,28)^a(t,e,2)^a(t,e,7);return r<0&&(r+=4294967296),r}function O(e,t){var r=a(e,t,14)^a(e,t,18)^a(t,e,9);return r<0&&(r+=4294967296),r}function x(e,t){var r=s(e,t,1)^s(e,t,8)^u(e,t,7);return r<0&&(r+=4294967296),r}function T(e,t){var r=a(e,t,1)^a(e,t,8)^c(e,t,7);return r<0&&(r+=4294967296),r}function P(e,t){var r=a(e,t,19)^a(t,e,29)^c(e,t,6);return r<0&&(r+=4294967296),r}n.inherits(v,y),e.exports=v,v.blockSize=1024,v.outSize=512,v.hmacStrength=192,v.padLength=128,v.prototype._prepareBlock=function(e,t){for(var r=this.W,n=0;n<32;n++)r[n]=e[t+n];for(;n<r.length;n+=2){var i=(g=r[n-4],y=r[n-3],b=void 0,(b=s(g,y,19)^s(y,g,29)^u(g,y,6))<0&&(b+=4294967296),b),o=P(r[n-4],r[n-3]),a=r[n-14],c=r[n-13],f=x(r[n-30],r[n-29]),h=T(r[n-30],r[n-29]),l=r[n-32],m=r[n-31];r[n]=d(i,o,a,c,f,h,l,m),r[n+1]=p(i,o,a,c,f,h,l,m)}var g,y,b},v.prototype._update=function(e,t){this._prepareBlock(e,t);var r,n,i,a=this.W,u=this.h[0],c=this.h[1],d=this.h[2],p=this.h[3],y=this.h[4],b=this.h[5],v=this.h[6],x=this.h[7],T=this.h[8],P=this.h[9],j=this.h[10],k=this.h[11],I=this.h[12],R=this.h[13],C=this.h[14],B=this.h[15];o(this.k.length===a.length);for(var N=0;N<a.length;N+=2){var L=C,D=B,F=(i=void 0,(i=s(r=T,n=P,14)^s(r,n,18)^s(n,r,9))<0&&(i+=4294967296),i),q=O(T,P),U=w(T,0,j,0,I),z=_(0,P,0,k,0,R),V=this.k[N],$=this.k[N+1],H=a[N],X=a[N+1],K=m(L,D,F,q,U,z,V,$,H,X),J=g(L,D,F,q,U,z,V,$,H,X);L=A(u,c),D=E(u,c),F=S(u,0,d,0,y),q=M(0,c,0,p,0,b);var Z=h(L,D,F,q),G=l(L,D,F,q);C=I,B=R,I=j,R=k,j=T,k=P,T=h(v,x,K,J),P=l(x,x,K,J),v=y,x=b,y=d,b=p,d=u,p=c,u=h(K,J,Z,G),c=l(K,J,Z,G)}f(this.h,0,u,c),f(this.h,2,d,p),f(this.h,4,y,b),f(this.h,6,v,x),f(this.h,8,T,P),f(this.h,10,j,k),f(this.h,12,I,R),f(this.h,14,C,B)},v.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},7038:(e,t,r)=>{"use strict";var n=r(6436).rotr32;function i(e,t,r){return e&t^~e&r}function o(e,t,r){return e&t^e&r^t&r}function s(e,t,r){return e^t^r}t.ft_1=function(e,t,r,n){return 0===e?i(t,r,n):1===e||3===e?s(t,r,n):2===e?o(t,r,n):void 0},t.ch32=i,t.maj32=o,t.p32=s,t.s0_256=function(e){return n(e,2)^n(e,13)^n(e,22)},t.s1_256=function(e){return n(e,6)^n(e,11)^n(e,25)},t.g0_256=function(e){return n(e,7)^n(e,18)^e>>>3},t.g1_256=function(e){return n(e,17)^n(e,19)^e>>>10}},6436:(e,t,r)=>{"use strict";var n=r(9746),i=r(5717);function o(e,t){return 55296==(64512&e.charCodeAt(t))&&!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1))}function s(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function a(e){return 1===e.length?"0"+e:e}function u(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}t.inherits=i,t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),i=0;i<e.length;i+=2)r.push(parseInt(e[i]+e[i+1],16))}else for(var n=0,i=0;i<e.length;i++){var s=e.charCodeAt(i);s<128?r[n++]=s:s<2048?(r[n++]=s>>6|192,r[n++]=63&s|128):o(e,i)?(s=65536+((1023&s)<<10)+(1023&e.charCodeAt(++i)),r[n++]=s>>18|240,r[n++]=s>>12&63|128,r[n++]=s>>6&63|128,r[n++]=63&s|128):(r[n++]=s>>12|224,r[n++]=s>>6&63|128,r[n++]=63&s|128)}else for(i=0;i<e.length;i++)r[i]=0|e[i];return r},t.toHex=function(e){for(var t="",r=0;r<e.length;r++)t+=a(e[r].toString(16));return t},t.htonl=s,t.toHex32=function(e,t){for(var r="",n=0;n<e.length;n++){var i=e[n];"little"===t&&(i=s(i)),r+=u(i.toString(16))}return r},t.zero2=a,t.zero8=u,t.join32=function(e,t,r,i){var o=r-t;n(o%4==0);for(var s=new Array(o/4),a=0,u=t;a<s.length;a++,u+=4){var c;c="big"===i?e[u]<<24|e[u+1]<<16|e[u+2]<<8|e[u+3]:e[u+3]<<24|e[u+2]<<16|e[u+1]<<8|e[u],s[a]=c>>>0}return s},t.split32=function(e,t){for(var r=new Array(4*e.length),n=0,i=0;n<e.length;n++,i+=4){var o=e[n];"big"===t?(r[i]=o>>>24,r[i+1]=o>>>16&255,r[i+2]=o>>>8&255,r[i+3]=255&o):(r[i+3]=o>>>24,r[i+2]=o>>>16&255,r[i+1]=o>>>8&255,r[i]=255&o)}return r},t.rotr32=function(e,t){return e>>>t|e<<32-t},t.rotl32=function(e,t){return e<<t|e>>>32-t},t.sum32=function(e,t){return e+t>>>0},t.sum32_3=function(e,t,r){return e+t+r>>>0},t.sum32_4=function(e,t,r,n){return e+t+r+n>>>0},t.sum32_5=function(e,t,r,n,i){return e+t+r+n+i>>>0},t.sum64=function(e,t,r,n){var i=e[t],o=n+e[t+1]>>>0,s=(o<n?1:0)+r+i;e[t]=s>>>0,e[t+1]=o},t.sum64_hi=function(e,t,r,n){return(t+n>>>0<t?1:0)+e+r>>>0},t.sum64_lo=function(e,t,r,n){return t+n>>>0},t.sum64_4_hi=function(e,t,r,n,i,o,s,a){var u=0,c=t;return u+=(c=c+n>>>0)<t?1:0,u+=(c=c+o>>>0)<o?1:0,e+r+i+s+(u+=(c=c+a>>>0)<a?1:0)>>>0},t.sum64_4_lo=function(e,t,r,n,i,o,s,a){return t+n+o+a>>>0},t.sum64_5_hi=function(e,t,r,n,i,o,s,a,u,c){var f=0,h=t;return f+=(h=h+n>>>0)<t?1:0,f+=(h=h+o>>>0)<o?1:0,f+=(h=h+a>>>0)<a?1:0,e+r+i+s+u+(f+=(h=h+c>>>0)<c?1:0)>>>0},t.sum64_5_lo=function(e,t,r,n,i,o,s,a,u,c){return t+n+o+a+c>>>0},t.rotr64_hi=function(e,t,r){return(t<<32-r|e>>>r)>>>0},t.rotr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0},t.shr64_hi=function(e,t,r){return e>>>r},t.shr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0}},2156:(e,t,r)=>{"use strict";var n=r(3715),i=r(4504),o=r(9746);function s(e){if(!(this instanceof s))return new s(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=i.toArray(e.entropy,e.entropyEnc||"hex"),r=i.toArray(e.nonce,e.nonceEnc||"hex"),n=i.toArray(e.pers,e.persEnc||"hex");o(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,n)}e.exports=s,s.prototype._init=function(e,t,r){var n=e.concat(t).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i<this.V.length;i++)this.K[i]=0,this.V[i]=1;this._update(n),this._reseed=1,this.reseedInterval=281474976710656},s.prototype._hmac=function(){return new n.hmac(this.hash,this.K)},s.prototype._update=function(e){var t=this._hmac().update(this.V).update([0]);e&&(t=t.update(e)),this.K=t.digest(),this.V=this._hmac().update(this.V).digest(),e&&(this.K=this._hmac().update(this.V).update([1]).update(e).digest(),this.V=this._hmac().update(this.V).digest())},s.prototype.reseed=function(e,t,r,n){"string"!=typeof t&&(n=r,r=t,t=null),e=i.toArray(e,t),r=i.toArray(r,n),o(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1},s.prototype.generate=function(e,t,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(n=r,r=t,t=null),r&&(r=i.toArray(r,n||"hex"),this._update(r));for(var o=[];o.length<e;)this.V=this._hmac().update(this.V).digest(),o=o.concat(this.V);var s=o.slice(0,e);return this._update(r),this._reseed++,i.encode(s,t)}},9267:(e,t,r)=>{var n=r(8501),i=r(8575),o=e.exports;for(var s in n)n.hasOwnProperty(s)&&(o[s]=n[s]);function a(e){if("string"==typeof e&&(e=i.parse(e)),e.protocol||(e.protocol="https:"),"https:"!==e.protocol)throw new Error('Protocol "'+e.protocol+'" not supported. Expected "https:"');return e}o.request=function(e,t){return e=a(e),n.request.call(this,e,t)},o.get=function(e,t){return e=a(e),n.get.call(this,e,t)}},645:(e,t)=>{t.read=function(e,t,r,n,i){var o,s,a=8*i-n-1,u=(1<<a)-1,c=u>>1,f=-7,h=r?i-1:0,l=r?-1:1,d=e[t+h];for(h+=l,o=d&(1<<-f)-1,d>>=-f,f+=a;f>0;o=256*o+e[t+h],h+=l,f-=8);for(s=o&(1<<-f)-1,o>>=-f,f+=n;f>0;s=256*s+e[t+h],h+=l,f-=8);if(0===o)o=1-c;else{if(o===u)return s?NaN:1/0*(d?-1:1);s+=Math.pow(2,n),o-=c}return(d?-1:1)*s*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var s,a,u,c=8*o-i-1,f=(1<<c)-1,h=f>>1,l=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:o-1,p=n?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=f):(s=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-s))<1&&(s--,u*=2),(t+=s+h>=1?l/u:l*Math.pow(2,1-h))*u>=2&&(s++,u/=2),s+h>=f?(a=0,s=f):s+h>=1?(a=(t*u-1)*Math.pow(2,i),s+=h):(a=t*Math.pow(2,h-1)*Math.pow(2,i),s=0));i>=8;e[r+d]=255&a,d+=p,a/=256,i-=8);for(s=s<<i|a,c+=i;c>0;e[r+d]=255&s,d+=p,s/=256,c-=8);e[r+d-p]|=128*m}},5717:e=>{"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},2584:(e,t,r)=>{"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag,i=r(1924)("Object.prototype.toString"),o=function(e){return!(n&&e&&"object"==typeof e&&Symbol.toStringTag in e)&&"[object Arguments]"===i(e)},s=function(e){return!!o(e)||null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Array]"!==i(e)&&"[object Function]"===i(e.callee)},a=function(){return o(arguments)}();o.isLegacyArguments=s,e.exports=a?o:s},8662:e=>{"use strict";var t,r=Object.prototype.toString,n=Function.prototype.toString,i=/^\s*(?:function)?\*/,o="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag,s=Object.getPrototypeOf;e.exports=function(e){if("function"!=typeof e)return!1;if(i.test(n.call(e)))return!0;if(!o)return"[object GeneratorFunction]"===r.call(e);if(!s)return!1;if(void 0===t){var a=function(){if(!o)return!1;try{return Function("return function*() {}")()}catch(e){}}();t=!!a&&s(a)}return s(e)===t}},8611:e=>{"use strict";e.exports=function(e){return e!=e}},360:(e,t,r)=>{"use strict";var n=r(5559),i=r(4289),o=r(8611),s=r(9415),a=r(3194),u=n(s(),Number);i(u,{getPolyfill:s,implementation:o,shim:a}),e.exports=u},9415:(e,t,r)=>{"use strict";var n=r(8611);e.exports=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:n}},3194:(e,t,r)=>{"use strict";var n=r(4289),i=r(9415);e.exports=function(){var e=i();return n(Number,{isNaN:e},{isNaN:function(){return Number.isNaN!==e}}),e}},5692:(e,t,r)=>{"use strict";var n=r(9804),i=r(3083),o=r(1924),s=o("Object.prototype.toString"),a=r(1405)()&&"symbol"==typeof Symbol.toStringTag,u=i(),c=o("Array.prototype.indexOf",!0)||function(e,t){for(var r=0;r<e.length;r+=1)if(e[r]===t)return r;return-1},f=o("String.prototype.slice"),h={},l=r(882),d=Object.getPrototypeOf;a&&l&&d&&n(u,(function(e){var t=new r.g[e];if(!(Symbol.toStringTag in t))throw new EvalError("this engine has support for Symbol.toStringTag, but "+e+" does not have the property! Please report this.");var n=d(t),i=l(n,Symbol.toStringTag);if(!i){var o=d(n);i=l(o,Symbol.toStringTag)}h[e]=i.get})),e.exports=function(e){if(!e||"object"!=typeof e)return!1;if(!a){var t=f(s(e),8,-1);return c(u,t)>-1}return!!l&&function(e){var t=!1;return n(h,(function(r,n){if(!t)try{t=r.call(e)===n}catch(e){}})),t}(e)}},6481:(e,t,r)=>{"use strict";var n=r(9177),i=n.ValidatorResult,o=n.SchemaError,s={ignoreProperties:{id:!0,default:!0,description:!0,title:!0,exclusiveMinimum:!0,exclusiveMaximum:!0,additionalItems:!0,$schema:!0,$ref:!0,extends:!0}},a=s.validators={};function u(e,t,r,n,i){var o=this.validateSchema(e,i,t,r);return!o.valid&&n instanceof Function&&n(o),o.valid}function c(e,t,r,n,i,o){if(!t.properties||void 0===t.properties[i])if(!1===t.additionalProperties)o.addError({name:"additionalProperties",argument:i,message:"additionalProperty "+JSON.stringify(i)+" exists in instance when not allowed"});else{var s=t.additionalProperties||{};"function"==typeof r.preValidateProperty&&r.preValidateProperty(e,i,s,r,n);var a=this.validateSchema(e[i],s,r,n.makeChild(s,i));a.instance!==o.instance[i]&&(o.instance[i]=a.instance),o.importErrors(a)}}a.type=function(e,t,r,n){if(void 0===e)return null;var o=new i(e,t,r,n),s=Array.isArray(t.type)?t.type:[t.type];if(!s.some(this.testType.bind(this,e,t,r,n))){var a=s.map((function(e){return e.id&&"<"+e.id+">"||e+""}));o.addError({name:"type",argument:a,message:"is not of a type(s) "+a})}return o},a.anyOf=function(e,t,r,n){if(void 0===e)return null;var s=new i(e,t,r,n),a=new i(e,t,r,n);if(!Array.isArray(t.anyOf))throw new o("anyOf must be an array");if(!t.anyOf.some(u.bind(this,e,r,n,(function(e){a.importErrors(e)})))){var c=t.anyOf.map((function(e,t){return e.id&&"<"+e.id+">"||e.title&&JSON.stringify(e.title)||e.$ref&&"<"+e.$ref+">"||"[subschema "+t+"]"}));r.nestedErrors&&s.importErrors(a),s.addError({name:"anyOf",argument:c,message:"is not any of "+c.join(",")})}return s},a.allOf=function(e,t,r,n){if(void 0===e)return null;if(!Array.isArray(t.allOf))throw new o("allOf must be an array");var s=new i(e,t,r,n),a=this;return t.allOf.forEach((function(t,i){var o=a.validateSchema(e,t,r,n);if(!o.valid){var u=t.id&&"<"+t.id+">"||t.title&&JSON.stringify(t.title)||t.$ref&&"<"+t.$ref+">"||"[subschema "+i+"]";s.addError({name:"allOf",argument:{id:u,length:o.errors.length,valid:o},message:"does not match allOf schema "+u+" with "+o.errors.length+" error[s]:"}),s.importErrors(o)}})),s},a.oneOf=function(e,t,r,n){if(void 0===e)return null;if(!Array.isArray(t.oneOf))throw new o("oneOf must be an array");var s=new i(e,t,r,n),a=new i(e,t,r,n),c=t.oneOf.filter(u.bind(this,e,r,n,(function(e){a.importErrors(e)}))).length,f=t.oneOf.map((function(e,t){return e.id&&"<"+e.id+">"||e.title&&JSON.stringify(e.title)||e.$ref&&"<"+e.$ref+">"||"[subschema "+t+"]"}));return 1!==c&&(r.nestedErrors&&s.importErrors(a),s.addError({name:"oneOf",argument:f,message:"is not exactly one from "+f.join(",")})),s},a.properties=function(e,t,r,n){if(void 0!==e&&e instanceof Object){var o=new i(e,t,r,n),s=t.properties||{};for(var a in s){"function"==typeof r.preValidateProperty&&r.preValidateProperty(e,a,s[a],r,n);var u=e?e[a]:void 0,c=this.validateSchema(u,s[a],r,n.makeChild(s[a],a));c.instance!==o.instance[a]&&(o.instance[a]=c.instance),o.importErrors(c)}return o}},a.patternProperties=function(e,t,r,n){if(void 0!==e&&this.types.object(e)){var o=new i(e,t,r,n),s=t.patternProperties||{};for(var a in e){var u=!0;for(var f in s)if(new RegExp(f).test(a)){u=!1,"function"==typeof r.preValidateProperty&&r.preValidateProperty(e,a,s[f],r,n);var h=this.validateSchema(e[a],s[f],r,n.makeChild(s[f],a));h.instance!==o.instance[a]&&(o.instance[a]=h.instance),o.importErrors(h)}u&&c.call(this,e,t,r,n,a,o)}return o}},a.additionalProperties=function(e,t,r,n){if(void 0!==e&&this.types.object(e)){if(t.patternProperties)return null;var o=new i(e,t,r,n);for(var s in e)c.call(this,e,t,r,n,s,o);return o}},a.minProperties=function(e,t,r,n){if(!e||"object"!=typeof e)return null;var o=new i(e,t,r,n);return Object.keys(e).length>=t.minProperties||o.addError({name:"minProperties",argument:t.minProperties,message:"does not meet minimum property length of "+t.minProperties}),o},a.maxProperties=function(e,t,r,n){if(!e||"object"!=typeof e)return null;var o=new i(e,t,r,n);return Object.keys(e).length<=t.maxProperties||o.addError({name:"maxProperties",argument:t.maxProperties,message:"does not meet maximum property length of "+t.maxProperties}),o},a.items=function(e,t,r,n){if(!Array.isArray(e))return null;var o=this,s=new i(e,t,r,n);return void 0!==e&&t.items?(e.every((function(e,i){var a=Array.isArray(t.items)?t.items[i]||t.additionalItems:t.items;if(void 0===a)return!0;if(!1===a)return s.addError({name:"items",message:"additionalItems not permitted"}),!1;var u=o.validateSchema(e,a,r,n.makeChild(a,i));return u.instance!==s.instance[i]&&(s.instance[i]=u.instance),s.importErrors(u),!0})),s):s},a.minimum=function(e,t,r,n){if("number"!=typeof e)return null;var o=new i(e,t,r,n);return(t.exclusiveMinimum&&!0===t.exclusiveMinimum?e>t.minimum:e>=t.minimum)||o.addError({name:"minimum",argument:t.minimum,message:"must have a minimum value of "+t.minimum}),o},a.maximum=function(e,t,r,n){if("number"!=typeof e)return null;var o=new i(e,t,r,n);return(t.exclusiveMaximum&&!0===t.exclusiveMaximum?e<t.maximum:e<=t.maximum)||o.addError({name:"maximum",argument:t.maximum,message:"must have a maximum value of "+t.maximum}),o};var f=function(e,t,r,s,a,u){if("number"!=typeof e)return null;var c=t[a];if(0==c)throw new o(a+" cannot be zero");var f=new i(e,t,r,s),h=n.getDecimalPlaces(e),l=n.getDecimalPlaces(c),d=Math.max(h,l),p=Math.pow(10,d);return Math.round(e*p)%Math.round(c*p)!=0&&f.addError({name:a,argument:c,message:u+JSON.stringify(c)}),f};function h(e,t,r){var i,o=r.length;for(i=t+1;i<o;i++)if(n.deepCompareStrict(e,r[i]))return!1;return!0}a.multipleOf=function(e,t,r,n){return f(e,t,r,n,"multipleOf","is not a multiple of (divisible by) ")},a.divisibleBy=function(e,t,r,n){return f(e,t,r,n,"divisibleBy","is not divisible by (multiple of) ")},a.required=function(e,t,r,n){var o=new i(e,t,r,n);return void 0===e&&!0===t.required?o.addError({name:"required",message:"is required"}):e&&"object"==typeof e&&Array.isArray(t.required)&&t.required.forEach((function(t){void 0===e[t]&&o.addError({name:"required",argument:t,message:"requires property "+JSON.stringify(t)})})),o},a.pattern=function(e,t,r,n){if("string"!=typeof e)return null;var o=new i(e,t,r,n);return e.match(t.pattern)||o.addError({name:"pattern",argument:t.pattern,message:"does not match pattern "+JSON.stringify(t.pattern)}),o},a.format=function(e,t,r,o){var s=new i(e,t,r,o);return s.disableFormat||n.isFormat(e,t.format,this)||s.addError({name:"format",argument:t.format,message:"does not conform to the "+JSON.stringify(t.format)+" format"}),s},a.minLength=function(e,t,r,n){if("string"!=typeof e)return null;var o=new i(e,t,r,n);return e.length>=t.minLength||o.addError({name:"minLength",argument:t.minLength,message:"does not meet minimum length of "+t.minLength}),o},a.maxLength=function(e,t,r,n){if("string"!=typeof e)return null;var o=new i(e,t,r,n);return e.length<=t.maxLength||o.addError({name:"maxLength",argument:t.maxLength,message:"does not meet maximum length of "+t.maxLength}),o},a.minItems=function(e,t,r,n){if(!Array.isArray(e))return null;var o=new i(e,t,r,n);return e.length>=t.minItems||o.addError({name:"minItems",argument:t.minItems,message:"does not meet minimum length of "+t.minItems}),o},a.maxItems=function(e,t,r,n){if(!Array.isArray(e))return null;var o=new i(e,t,r,n);return e.length<=t.maxItems||o.addError({name:"maxItems",argument:t.maxItems,message:"does not meet maximum length of "+t.maxItems}),o},a.uniqueItems=function(e,t,r,o){var s=new i(e,t,r,o);return Array.isArray(e)?(e.every((function(e,t,r){for(var i=t+1;i<r.length;i++)if(n.deepCompareStrict(e,r[i]))return!1;return!0}))||s.addError({name:"uniqueItems",message:"contains duplicate item"}),s):s},a.uniqueItems=function(e,t,r,n){if(!Array.isArray(e))return null;var o=new i(e,t,r,n);return e.every(h)||o.addError({name:"uniqueItems",message:"contains duplicate item"}),o},a.dependencies=function(e,t,r,n){if(!e||"object"!=typeof e)return null;var o=new i(e,t,r,n);for(var s in t.dependencies)if(void 0!==e[s]){var a=t.dependencies[s],u=n.makeChild(a,s);if("string"==typeof a&&(a=[a]),Array.isArray(a))a.forEach((function(t){void 0===e[t]&&o.addError({name:"dependencies",argument:u.propertyPath,message:"property "+t+" not found, required by "+u.propertyPath})}));else{var c=this.validateSchema(e,a,r,u);o.instance!==c.instance&&(o.instance=c.instance),c&&c.errors.length&&(o.addError({name:"dependencies",argument:u.propertyPath,message:"does not meet dependency required by "+u.propertyPath}),o.importErrors(c))}}return o},a.enum=function(e,t,r,s){if(!Array.isArray(t.enum))throw new o("enum expects an array",t);if(void 0===e)return null;var a=new i(e,t,r,s);return t.enum.some(n.deepCompareStrict.bind(null,e))||a.addError({name:"enum",argument:t.enum,message:"is not one of enum values: "+t.enum.join(",")}),a},a.const=function(e,t,r,o){var s=new i(e,t,r,o);return n.deepCompareStrict(t.const,e)||s.addError({name:"const",argument:t.const,message:"does not exactly match expected constant: "+t.const}),s},a.not=a.disallow=function(e,t,r,n){var o=this;if(void 0===e)return null;var s=new i(e,t,r,n),a=t.not||t.disallow;return a?(Array.isArray(a)||(a=[a]),a.forEach((function(i){if(o.testType(e,t,r,n,i)){var a=i&&i.id&&"<"+i.id+">"||i;s.addError({name:"not",argument:a,message:"is of prohibited type "+a})}})),s):null},e.exports=s},9177:(e,t,r)=>{"use strict";var n=r(8575),i=t.ValidationError=function(e,t,r,n,i,o){n&&(this.property=n),e&&(this.message=e),r&&(r.id?this.schema=r.id:this.schema=r),t&&(this.instance=t),this.name=i,this.argument=o,this.stack=this.toString()};i.prototype.toString=function(){return this.property+" "+this.message};var o=t.ValidatorResult=function(e,t,r,n){this.instance=e,this.schema=t,this.propertyPath=n.propertyPath,this.errors=[],this.throwError=r&&r.throwError,this.disableFormat=r&&!0===r.disableFormat};function s(e,t){return t+": "+e.toString()+"\n"}o.prototype.addError=function(e){var t;if("string"==typeof e)t=new i(e,this.instance,this.schema,this.propertyPath);else{if(!e)throw new Error("Missing error detail");if(!e.message)throw new Error("Missing error message");if(!e.name)throw new Error("Missing validator type");t=new i(e.message,this.instance,this.schema,this.propertyPath,e.name,e.argument)}if(this.throwError)throw t;return this.errors.push(t),t},o.prototype.importErrors=function(e){"string"==typeof e||e&&e.validatorType?this.addError(e):e&&e.errors&&Array.prototype.push.apply(this.errors,e.errors)},o.prototype.toString=function(e){return this.errors.map(s).join("")},Object.defineProperty(o.prototype,"valid",{get:function(){return!this.errors.length}});var a=t.SchemaError=function e(t,r){this.message=t,this.schema=r,Error.call(this,t),Error.captureStackTrace(this,e)};a.prototype=Object.create(Error.prototype,{constructor:{value:a,enumerable:!1},name:{value:"SchemaError",enumerable:!1}});var u=t.SchemaContext=function(e,t,r,n,i){this.schema=e,this.options=t,this.propertyPath=r,this.base=n,this.schemas=i};u.prototype.resolve=function(e){return n.resolve(this.base,e)},u.prototype.makeChild=function(e,t){var r=void 0===t?this.propertyPath:this.propertyPath+f(t),i=n.resolve(this.base,e.id||""),o=new u(e,this.options,r,i,Object.create(this.schemas));return e.id&&!o.schemas[i]&&(o.schemas[i]=e),o};var c=t.FORMAT_REGEXPS={"date-time":/^\d{4}-(?:0[0-9]{1}|1[0-2]{1})-(3[01]|0[1-9]|[12][0-9])[tT ](2[0-4]|[01][0-9]):([0-5][0-9]):(60|[0-5][0-9])(\.\d+)?([zZ]|[+-]([0-5][0-9]):(60|[0-5][0-9]))$/,date:/^\d{4}-(?:0[0-9]{1}|1[0-2]{1})-(3[01]|0[1-9]|[12][0-9])$/,time:/^(2[0-4]|[01][0-9]):([0-5][0-9]):(60|[0-5][0-9])$/,email:/^(?:[\w\!\#\$\%\&\'\*\+\-\/\=\?\^\`\{\|\}\~]+\.)*[\w\!\#\$\%\&\'\*\+\-\/\=\?\^\`\{\|\}\~]+@(?:(?:(?:[a-zA-Z0-9](?:[a-zA-Z0-9\-](?!\.)){0,61}[a-zA-Z0-9]?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9\-](?!$)){0,61}[a-zA-Z0-9]?)|(?:\[(?:(?:[01]?\d{1,2}|2[0-4]\d|25[0-5])\.){3}(?:[01]?\d{1,2}|2[0-4]\d|25[0-5])\]))$/,"ip-address":/^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/,ipv6:/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/,uri:/^[a-zA-Z][a-zA-Z0-9+-.]*:[^\s]*$/,color:/^(#?([0-9A-Fa-f]{3}){1,2}\b|aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow|(rgb\(\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*\))|(rgb\(\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*\)))$/,hostname:/^(?=.{1,255}$)[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?(?:\.[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?)*\.?$/,"host-name":/^(?=.{1,255}$)[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?(?:\.[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?)*\.?$/,alpha:/^[a-zA-Z]+$/,alphanumeric:/^[a-zA-Z0-9]+$/,"utc-millisec":function(e){return"string"==typeof e&&parseFloat(e)===parseInt(e,10)&&!isNaN(e)},regex:function(e){var t=!0;try{new RegExp(e)}catch(e){t=!1}return t},style:/\s*(.+?):\s*([^;]+);?/g,phone:/^\+(?:[0-9] ?){6,14}[0-9]$/};c.regexp=c.regex,c.pattern=c.regex,c.ipv4=c["ip-address"],t.isFormat=function(e,t,r){if("string"==typeof e&&void 0!==c[t]){if(c[t]instanceof RegExp)return c[t].test(e);if("function"==typeof c[t])return c[t](e)}else if(r&&r.customFormats&&"function"==typeof r.customFormats[t])return r.customFormats[t](e);return!0};var f=t.makeSuffix=function(e){return(e=e.toString()).match(/[.\s\[\]]/)||e.match(/^[\d]/)?e.match(/^\d+$/)?"["+e+"]":"["+JSON.stringify(e)+"]":"."+e};function h(e,t,r,n){"object"==typeof r?t[n]=p(e[n],r):-1===e.indexOf(r)&&t.push(r)}function l(e,t,r){t[r]=e[r]}function d(e,t,r,n){"object"==typeof t[n]&&t[n]&&e[n]?r[n]=p(e[n],t[n]):r[n]=t[n]}function p(e,t){var r=Array.isArray(t),n=r&&[]||{};return r?(e=e||[],n=n.concat(e),t.forEach(h.bind(null,e,n))):(e&&"object"==typeof e&&Object.keys(e).forEach(l.bind(null,e,n)),Object.keys(t).forEach(d.bind(null,e,t,n))),n}function m(e){return"/"+encodeURIComponent(e).replace(/~/g,"%7E")}t.deepCompareStrict=function e(t,r){if(typeof t!=typeof r)return!1;if(t instanceof Array)return r instanceof Array&&t.length===r.length&&t.every((function(n,i){return e(t[i],r[i])}));if("object"==typeof t){if(!t||!r)return t===r;var n=Object.keys(t),i=Object.keys(r);return n.length===i.length&&n.every((function(n){return e(t[n],r[n])}))}return t===r},e.exports.deepMerge=p,t.objectGetPath=function(e,t){for(var r,n=t.split("/").slice(1);"string"==typeof(r=n.shift());){var i=decodeURIComponent(r.replace(/~0/,"~").replace(/~1/g,"/"));if(!(i in e))return;e=e[i]}return e},t.encodePath=function(e){return e.map(m).join("")},t.getDecimalPlaces=function(e){var t=0;if(isNaN(e))return t;"number"!=typeof e&&(e=Number(e));var r=e.toString().split("e");if(2===r.length){if("-"!==r[1][0])return t;t=Number(r[1].slice(1))}var n=r[0].split(".");return 2===n.length&&(t+=n[1].length),t}},660:(e,t,r)=>{"use strict";var n=e.exports.Validator=r(3058);e.exports.ValidatorResult=r(9177).ValidatorResult,e.exports.ValidationError=r(9177).ValidationError,e.exports.SchemaError=r(9177).SchemaError,e.exports.validate=function(e,t,r){return(new n).validate(e,t,r)}},3058:(e,t,r)=>{"use strict";var n=r(8575),i=r(6481),o=r(9177),s=o.ValidatorResult,a=o.SchemaError,u=o.SchemaContext,c=function e(){this.customFormats=Object.create(e.prototype.customFormats),this.schemas={},this.unresolvedRefs=[],this.types=Object.create(h),this.attributes=Object.create(i.validators)};function f(e){var t="string"==typeof e?e:e.$ref;return"string"==typeof t&&t}c.prototype.customFormats={},c.prototype.schemas=null,c.prototype.types=null,c.prototype.attributes=null,c.prototype.unresolvedRefs=null,c.prototype.addSchema=function(e,t){if(!e)return null;var r=t||e.id;return this.addSubSchema(r,e),r&&(this.schemas[r]=e),this.schemas[r]},c.prototype.addSubSchema=function(e,t){if(t&&"object"==typeof t){if(!t.$ref){var r=t.id&&n.resolve(e,t.id),i=r||e;if(r){if(this.schemas[r]){if(!o.deepCompareStrict(this.schemas[r],t))throw new Error("Schema <"+t+"> already exists with different definition");return this.schemas[r]}this.schemas[r]=t;var s=r.replace(/^([^#]*)#$/,"$1");this.schemas[s]=t}return this.addSubSchemaArray(i,t.items instanceof Array?t.items:[t.items]),this.addSubSchemaArray(i,t.extends instanceof Array?t.extends:[t.extends]),this.addSubSchema(i,t.additionalItems),this.addSubSchemaObject(i,t.properties),this.addSubSchema(i,t.additionalProperties),this.addSubSchemaObject(i,t.definitions),this.addSubSchemaObject(i,t.patternProperties),this.addSubSchemaObject(i,t.dependencies),this.addSubSchemaArray(i,t.disallow),this.addSubSchemaArray(i,t.allOf),this.addSubSchemaArray(i,t.anyOf),this.addSubSchemaArray(i,t.oneOf),this.addSubSchema(i,t.not),this.schemas[r]}var a=n.resolve(e,t.$ref);void 0===this.schemas[a]&&(this.schemas[a]=null,this.unresolvedRefs.push(a))}},c.prototype.addSubSchemaArray=function(e,t){if(t instanceof Array)for(var r=0;r<t.length;r++)this.addSubSchema(e,t[r])},c.prototype.addSubSchemaObject=function(e,t){if(t&&"object"==typeof t)for(var r in t)this.addSubSchema(e,t[r])},c.prototype.setSchemas=function(e){this.schemas=e},c.prototype.getSchema=function(e){return this.schemas[e]},c.prototype.validate=function(e,t,r,i){r||(r={});var o=r.propertyName||"instance",s=n.resolve(r.base||"/",t.id||"");if(i||(i=new u(t,r,o,s,Object.create(this.schemas))).schemas[s]||(i.schemas[s]=t),t){var c=this.validateSchema(e,t,r,i);if(!c)throw new Error("Result undefined");return c}throw new a("no schema specified",t)},c.prototype.validateSchema=function(e,t,r,n){var c,h=new s(e,t,r,n);if(!t)throw new Error("schema is undefined");if(t.extends)if(t.extends instanceof Array){var l={schema:t,ctx:n};t.extends.forEach(this.schemaTraverser.bind(this,l)),t=l.schema,l.schema=null,l.ctx=null,l=null}else t=o.deepMerge(t,this.superResolve(t.extends,n));if(c=f(t)){var d=this.resolve(t,c,n),p=new u(d.subschema,r,n.propertyPath,d.switchSchema,n.schemas);return this.validateSchema(e,d.subschema,r,p)}var m=r&&r.skipAttributes||[];for(var g in t)if(!i.ignoreProperties[g]&&m.indexOf(g)<0){var y=null,b=this.attributes[g];if(b)y=b.call(this,e,t,r,n);else if(!1===r.allowUnknownAttributes)throw new a("Unsupported attribute: "+g,t);y&&h.importErrors(y)}if("function"==typeof r.rewrite){var v=r.rewrite.call(this,e,t,r,n);h.instance=v}return h},c.prototype.schemaTraverser=function(e,t){e.schema=o.deepMerge(e.schema,this.superResolve(t,e.ctx))},c.prototype.superResolve=function(e,t){var r;return(r=f(e))?this.resolve(e,r,t).subschema:e},c.prototype.resolve=function(e,t,r){if(t=r.resolve(t),r.schemas[t])return{subschema:r.schemas[t],switchSchema:t};var i=n.parse(t),s=i&&i.hash,u=s&&s.length&&t.substr(0,t.length-s.length);if(!u||!r.schemas[u])throw new a("no such schema <"+t+">",e);var c=o.objectGetPath(r.schemas[u],s.substr(1));if(void 0===c)throw new a("no such schema "+s+" located in <"+u+">",e);return{subschema:c,switchSchema:t}},c.prototype.testType=function(e,t,r,n,i){if("function"==typeof this.types[i])return this.types[i].call(this,e);if(i&&"object"==typeof i){var o=this.validateSchema(e,i,r,n);return void 0===o||!(o&&o.errors.length)}return!0};var h=c.prototype.types={};h.string=function(e){return"string"==typeof e},h.number=function(e){return"number"==typeof e&&isFinite(e)},h.integer=function(e){return"number"==typeof e&&e%1==0},h.boolean=function(e){return"boolean"==typeof e},h.array=function(e){return Array.isArray(e)},h.null=function(e){return null===e},h.date=function(e){return e instanceof Date},h.any=function(e){return!0},h.object=function(e){return e&&"object"==typeof e&&!(e instanceof Array)&&!(e instanceof Date)},e.exports=c},6486:function(e,t,r){var n;e=r.nmd(e),function(){var i,o="Expected a function",s="__lodash_hash_undefined__",a="__lodash_placeholder__",u=32,c=128,f=1/0,h=9007199254740991,l=NaN,d=4294967295,p=[["ary",c],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",u],["partialRight",64],["rearg",256]],m="[object Arguments]",g="[object Array]",y="[object Boolean]",b="[object Date]",v="[object Error]",w="[object Function]",_="[object GeneratorFunction]",S="[object Map]",M="[object Number]",A="[object Object]",E="[object Promise]",O="[object RegExp]",x="[object Set]",T="[object String]",P="[object Symbol]",j="[object WeakMap]",k="[object ArrayBuffer]",I="[object DataView]",R="[object Float32Array]",C="[object Float64Array]",B="[object Int8Array]",N="[object Int16Array]",L="[object Int32Array]",D="[object Uint8Array]",F="[object Uint8ClampedArray]",q="[object Uint16Array]",U="[object Uint32Array]",z=/\b__p \+= '';/g,V=/\b(__p \+=) '' \+/g,$=/(__e\(.*?\)|\b__t\)) \+\n'';/g,H=/&(?:amp|lt|gt|quot|#39);/g,X=/[&<>"']/g,K=RegExp(H.source),J=RegExp(X.source),Z=/<%-([\s\S]+?)%>/g,G=/<%([\s\S]+?)%>/g,W=/<%=([\s\S]+?)%>/g,Y=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Q=/^\w*$/,ee=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,te=/[\\^$.*+?()[\]{}|]/g,re=RegExp(te.source),ne=/^\s+/,ie=/\s/,oe=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,se=/\{\n\/\* \[wrapped with (.+)\] \*/,ae=/,? & /,ue=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ce=/[()=,{}\[\]\/\s]/,fe=/\\(\\)?/g,he=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,le=/\w*$/,de=/^[-+]0x[0-9a-f]+$/i,pe=/^0b[01]+$/i,me=/^\[object .+?Constructor\]$/,ge=/^0o[0-7]+$/i,ye=/^(?:0|[1-9]\d*)$/,be=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ve=/($^)/,we=/['\n\r\u2028\u2029\\]/g,_e="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Se="a-z\\xdf-\\xf6\\xf8-\\xff",Me="A-Z\\xc0-\\xd6\\xd8-\\xde",Ae="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ee="["+Ae+"]",Oe="["+_e+"]",xe="\\d+",Te="["+Se+"]",Pe="[^\\ud800-\\udfff"+Ae+xe+"\\u2700-\\u27bf"+Se+Me+"]",je="\\ud83c[\\udffb-\\udfff]",ke="[^\\ud800-\\udfff]",Ie="(?:\\ud83c[\\udde6-\\uddff]){2}",Re="[\\ud800-\\udbff][\\udc00-\\udfff]",Ce="["+Me+"]",Be="(?:"+Te+"|"+Pe+")",Ne="(?:"+Ce+"|"+Pe+")",Le="(?:['’](?:d|ll|m|re|s|t|ve))?",De="(?:['’](?:D|LL|M|RE|S|T|VE))?",Fe="(?:"+Oe+"|"+je+")?",qe="[\\ufe0e\\ufe0f]?",Ue=qe+Fe+"(?:\\u200d(?:"+[ke,Ie,Re].join("|")+")"+qe+Fe+")*",ze="(?:"+["[\\u2700-\\u27bf]",Ie,Re].join("|")+")"+Ue,Ve="(?:"+[ke+Oe+"?",Oe,Ie,Re,"[\\ud800-\\udfff]"].join("|")+")",$e=RegExp("['’]","g"),He=RegExp(Oe,"g"),Xe=RegExp(je+"(?="+je+")|"+Ve+Ue,"g"),Ke=RegExp([Ce+"?"+Te+"+"+Le+"(?="+[Ee,Ce,"$"].join("|")+")",Ne+"+"+De+"(?="+[Ee,Ce+Be,"$"].join("|")+")",Ce+"?"+Be+"+"+Le,Ce+"+"+De,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",xe,ze].join("|"),"g"),Je=RegExp("[\\u200d\\ud800-\\udfff"+_e+"\\ufe0e\\ufe0f]"),Ze=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Ge=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],We=-1,Ye={};Ye[R]=Ye[C]=Ye[B]=Ye[N]=Ye[L]=Ye[D]=Ye[F]=Ye[q]=Ye[U]=!0,Ye[m]=Ye[g]=Ye[k]=Ye[y]=Ye[I]=Ye[b]=Ye[v]=Ye[w]=Ye[S]=Ye[M]=Ye[A]=Ye[O]=Ye[x]=Ye[T]=Ye[j]=!1;var Qe={};Qe[m]=Qe[g]=Qe[k]=Qe[I]=Qe[y]=Qe[b]=Qe[R]=Qe[C]=Qe[B]=Qe[N]=Qe[L]=Qe[S]=Qe[M]=Qe[A]=Qe[O]=Qe[x]=Qe[T]=Qe[P]=Qe[D]=Qe[F]=Qe[q]=Qe[U]=!0,Qe[v]=Qe[w]=Qe[j]=!1;var et={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},tt=parseFloat,rt=parseInt,nt="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,it="object"==typeof self&&self&&self.Object===Object&&self,ot=nt||it||Function("return this")(),st=t&&!t.nodeType&&t,at=st&&e&&!e.nodeType&&e,ut=at&&at.exports===st,ct=ut&&nt.process,ft=function(){try{return at&&at.require&&at.require("util").types||ct&&ct.binding&&ct.binding("util")}catch(e){}}(),ht=ft&&ft.isArrayBuffer,lt=ft&&ft.isDate,dt=ft&&ft.isMap,pt=ft&&ft.isRegExp,mt=ft&&ft.isSet,gt=ft&&ft.isTypedArray;function yt(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function bt(e,t,r,n){for(var i=-1,o=null==e?0:e.length;++i<o;){var s=e[i];t(n,s,r(s),e)}return n}function vt(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e}function wt(e,t){for(var r=null==e?0:e.length;r--&&!1!==t(e[r],r,e););return e}function _t(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(!t(e[r],r,e))return!1;return!0}function St(e,t){for(var r=-1,n=null==e?0:e.length,i=0,o=[];++r<n;){var s=e[r];t(s,r,e)&&(o[i++]=s)}return o}function Mt(e,t){return!(null==e||!e.length)&&Rt(e,t,0)>-1}function At(e,t,r){for(var n=-1,i=null==e?0:e.length;++n<i;)if(r(t,e[n]))return!0;return!1}function Et(e,t){for(var r=-1,n=null==e?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}function Ot(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}function xt(e,t,r,n){var i=-1,o=null==e?0:e.length;for(n&&o&&(r=e[++i]);++i<o;)r=t(r,e[i],i,e);return r}function Tt(e,t,r,n){var i=null==e?0:e.length;for(n&&i&&(r=e[--i]);i--;)r=t(r,e[i],i,e);return r}function Pt(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}var jt=Lt("length");function kt(e,t,r){var n;return r(e,(function(e,r,i){if(t(e,r,i))return n=r,!1})),n}function It(e,t,r,n){for(var i=e.length,o=r+(n?1:-1);n?o--:++o<i;)if(t(e[o],o,e))return o;return-1}function Rt(e,t,r){return t==t?function(e,t,r){for(var n=r-1,i=e.length;++n<i;)if(e[n]===t)return n;return-1}(e,t,r):It(e,Bt,r)}function Ct(e,t,r,n){for(var i=r-1,o=e.length;++i<o;)if(n(e[i],t))return i;return-1}function Bt(e){return e!=e}function Nt(e,t){var r=null==e?0:e.length;return r?qt(e,t)/r:l}function Lt(e){return function(t){return null==t?i:t[e]}}function Dt(e){return function(t){return null==e?i:e[t]}}function Ft(e,t,r,n,i){return i(e,(function(e,i,o){r=n?(n=!1,e):t(r,e,i,o)})),r}function qt(e,t){for(var r,n=-1,o=e.length;++n<o;){var s=t(e[n]);s!==i&&(r=r===i?s:r+s)}return r}function Ut(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}function zt(e){return e?e.slice(0,sr(e)+1).replace(ne,""):e}function Vt(e){return function(t){return e(t)}}function $t(e,t){return Et(t,(function(t){return e[t]}))}function Ht(e,t){return e.has(t)}function Xt(e,t){for(var r=-1,n=e.length;++r<n&&Rt(t,e[r],0)>-1;);return r}function Kt(e,t){for(var r=e.length;r--&&Rt(t,e[r],0)>-1;);return r}function Jt(e,t){for(var r=e.length,n=0;r--;)e[r]===t&&++n;return n}var Zt=Dt({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),Gt=Dt({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function Wt(e){return"\\"+et[e]}function Yt(e){return Je.test(e)}function Qt(e){var t=-1,r=Array(e.size);return e.forEach((function(e,n){r[++t]=[n,e]})),r}function er(e,t){return function(r){return e(t(r))}}function tr(e,t){for(var r=-1,n=e.length,i=0,o=[];++r<n;){var s=e[r];s!==t&&s!==a||(e[r]=a,o[i++]=r)}return o}function rr(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=e})),r}function nr(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=[e,e]})),r}function ir(e){return Yt(e)?function(e){for(var t=Xe.lastIndex=0;Xe.test(e);)++t;return t}(e):jt(e)}function or(e){return Yt(e)?function(e){return e.match(Xe)||[]}(e):function(e){return e.split("")}(e)}function sr(e){for(var t=e.length;t--&&ie.test(e.charAt(t)););return t}var ar=Dt({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),ur=function e(t){var r,n=(t=null==t?ot:ur.defaults(ot.Object(),t,ur.pick(ot,Ge))).Array,ie=t.Date,_e=t.Error,Se=t.Function,Me=t.Math,Ae=t.Object,Ee=t.RegExp,Oe=t.String,xe=t.TypeError,Te=n.prototype,Pe=Se.prototype,je=Ae.prototype,ke=t["__core-js_shared__"],Ie=Pe.toString,Re=je.hasOwnProperty,Ce=0,Be=(r=/[^.]+$/.exec(ke&&ke.keys&&ke.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",Ne=je.toString,Le=Ie.call(Ae),De=ot._,Fe=Ee("^"+Ie.call(Re).replace(te,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),qe=ut?t.Buffer:i,Ue=t.Symbol,ze=t.Uint8Array,Ve=qe?qe.allocUnsafe:i,Xe=er(Ae.getPrototypeOf,Ae),Je=Ae.create,et=je.propertyIsEnumerable,nt=Te.splice,it=Ue?Ue.isConcatSpreadable:i,st=Ue?Ue.iterator:i,at=Ue?Ue.toStringTag:i,ct=function(){try{var e=co(Ae,"defineProperty");return e({},"",{}),e}catch(e){}}(),ft=t.clearTimeout!==ot.clearTimeout&&t.clearTimeout,jt=ie&&ie.now!==ot.Date.now&&ie.now,Dt=t.setTimeout!==ot.setTimeout&&t.setTimeout,cr=Me.ceil,fr=Me.floor,hr=Ae.getOwnPropertySymbols,lr=qe?qe.isBuffer:i,dr=t.isFinite,pr=Te.join,mr=er(Ae.keys,Ae),gr=Me.max,yr=Me.min,br=ie.now,vr=t.parseInt,wr=Me.random,_r=Te.reverse,Sr=co(t,"DataView"),Mr=co(t,"Map"),Ar=co(t,"Promise"),Er=co(t,"Set"),Or=co(t,"WeakMap"),xr=co(Ae,"create"),Tr=Or&&new Or,Pr={},jr=Fo(Sr),kr=Fo(Mr),Ir=Fo(Ar),Rr=Fo(Er),Cr=Fo(Or),Br=Ue?Ue.prototype:i,Nr=Br?Br.valueOf:i,Lr=Br?Br.toString:i;function Dr(e){if(ra(e)&&!Hs(e)&&!(e instanceof zr)){if(e instanceof Ur)return e;if(Re.call(e,"__wrapped__"))return qo(e)}return new Ur(e)}var Fr=function(){function e(){}return function(t){if(!ta(t))return{};if(Je)return Je(t);e.prototype=t;var r=new e;return e.prototype=i,r}}();function qr(){}function Ur(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=i}function zr(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=d,this.__views__=[]}function Vr(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function $r(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Hr(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Xr(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new Hr;++t<r;)this.add(e[t])}function Kr(e){var t=this.__data__=new $r(e);this.size=t.size}function Jr(e,t){var r=Hs(e),n=!r&&$s(e),i=!r&&!n&&Zs(e),o=!r&&!n&&!i&&fa(e),s=r||n||i||o,a=s?Ut(e.length,Oe):[],u=a.length;for(var c in e)!t&&!Re.call(e,c)||s&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||yo(c,u))||a.push(c);return a}function Zr(e){var t=e.length;return t?e[Xn(0,t-1)]:i}function Gr(e,t){return Co(xi(e),sn(t,0,e.length))}function Wr(e){return Co(xi(e))}function Yr(e,t,r){(r!==i&&!Us(e[t],r)||r===i&&!(t in e))&&nn(e,t,r)}function Qr(e,t,r){var n=e[t];Re.call(e,t)&&Us(n,r)&&(r!==i||t in e)||nn(e,t,r)}function en(e,t){for(var r=e.length;r--;)if(Us(e[r][0],t))return r;return-1}function tn(e,t,r,n){return hn(e,(function(e,i,o){t(n,e,r(e),o)})),n}function rn(e,t){return e&&Ti(t,Ia(t),e)}function nn(e,t,r){"__proto__"==t&&ct?ct(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function on(e,t){for(var r=-1,o=t.length,s=n(o),a=null==e;++r<o;)s[r]=a?i:xa(e,t[r]);return s}function sn(e,t,r){return e==e&&(r!==i&&(e=e<=r?e:r),t!==i&&(e=e>=t?e:t)),e}function an(e,t,r,n,o,s){var a,u=1&t,c=2&t,f=4&t;if(r&&(a=o?r(e,n,o,s):r(e)),a!==i)return a;if(!ta(e))return e;var h=Hs(e);if(h){if(a=function(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&Re.call(e,"index")&&(r.index=e.index,r.input=e.input),r}(e),!u)return xi(e,a)}else{var l=lo(e),d=l==w||l==_;if(Zs(e))return _i(e,u);if(l==A||l==m||d&&!o){if(a=c||d?{}:mo(e),!u)return c?function(e,t){return Ti(e,ho(e),t)}(e,function(e,t){return e&&Ti(t,Ra(t),e)}(a,e)):function(e,t){return Ti(e,fo(e),t)}(e,rn(a,e))}else{if(!Qe[l])return o?e:{};a=function(e,t,r){var n,i=e.constructor;switch(t){case k:return Si(e);case y:case b:return new i(+e);case I:return function(e,t){var r=t?Si(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}(e,r);case R:case C:case B:case N:case L:case D:case F:case q:case U:return Mi(e,r);case S:return new i;case M:case T:return new i(e);case O:return function(e){var t=new e.constructor(e.source,le.exec(e));return t.lastIndex=e.lastIndex,t}(e);case x:return new i;case P:return n=e,Nr?Ae(Nr.call(n)):{}}}(e,l,u)}}s||(s=new Kr);var p=s.get(e);if(p)return p;s.set(e,a),aa(e)?e.forEach((function(n){a.add(an(n,t,r,n,e,s))})):na(e)&&e.forEach((function(n,i){a.set(i,an(n,t,r,i,e,s))}));var g=h?i:(f?c?ro:to:c?Ra:Ia)(e);return vt(g||e,(function(n,i){g&&(n=e[i=n]),Qr(a,i,an(n,t,r,i,e,s))})),a}function un(e,t,r){var n=r.length;if(null==e)return!n;for(e=Ae(e);n--;){var o=r[n],s=t[o],a=e[o];if(a===i&&!(o in e)||!s(a))return!1}return!0}function cn(e,t,r){if("function"!=typeof e)throw new xe(o);return jo((function(){e.apply(i,r)}),t)}function fn(e,t,r,n){var i=-1,o=Mt,s=!0,a=e.length,u=[],c=t.length;if(!a)return u;r&&(t=Et(t,Vt(r))),n?(o=At,s=!1):t.length>=200&&(o=Ht,s=!1,t=new Xr(t));e:for(;++i<a;){var f=e[i],h=null==r?f:r(f);if(f=n||0!==f?f:0,s&&h==h){for(var l=c;l--;)if(t[l]===h)continue e;u.push(f)}else o(t,h,n)||u.push(f)}return u}Dr.templateSettings={escape:Z,evaluate:G,interpolate:W,variable:"",imports:{_:Dr}},Dr.prototype=qr.prototype,Dr.prototype.constructor=Dr,Ur.prototype=Fr(qr.prototype),Ur.prototype.constructor=Ur,zr.prototype=Fr(qr.prototype),zr.prototype.constructor=zr,Vr.prototype.clear=function(){this.__data__=xr?xr(null):{},this.size=0},Vr.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Vr.prototype.get=function(e){var t=this.__data__;if(xr){var r=t[e];return r===s?i:r}return Re.call(t,e)?t[e]:i},Vr.prototype.has=function(e){var t=this.__data__;return xr?t[e]!==i:Re.call(t,e)},Vr.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=xr&&t===i?s:t,this},$r.prototype.clear=function(){this.__data__=[],this.size=0},$r.prototype.delete=function(e){var t=this.__data__,r=en(t,e);return!(r<0||(r==t.length-1?t.pop():nt.call(t,r,1),--this.size,0))},$r.prototype.get=function(e){var t=this.__data__,r=en(t,e);return r<0?i:t[r][1]},$r.prototype.has=function(e){return en(this.__data__,e)>-1},$r.prototype.set=function(e,t){var r=this.__data__,n=en(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},Hr.prototype.clear=function(){this.size=0,this.__data__={hash:new Vr,map:new(Mr||$r),string:new Vr}},Hr.prototype.delete=function(e){var t=ao(this,e).delete(e);return this.size-=t?1:0,t},Hr.prototype.get=function(e){return ao(this,e).get(e)},Hr.prototype.has=function(e){return ao(this,e).has(e)},Hr.prototype.set=function(e,t){var r=ao(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},Xr.prototype.add=Xr.prototype.push=function(e){return this.__data__.set(e,s),this},Xr.prototype.has=function(e){return this.__data__.has(e)},Kr.prototype.clear=function(){this.__data__=new $r,this.size=0},Kr.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},Kr.prototype.get=function(e){return this.__data__.get(e)},Kr.prototype.has=function(e){return this.__data__.has(e)},Kr.prototype.set=function(e,t){var r=this.__data__;if(r instanceof $r){var n=r.__data__;if(!Mr||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Hr(n)}return r.set(e,t),this.size=r.size,this};var hn=ki(vn),ln=ki(wn,!0);function dn(e,t){var r=!0;return hn(e,(function(e,n,i){return r=!!t(e,n,i)})),r}function pn(e,t,r){for(var n=-1,o=e.length;++n<o;){var s=e[n],a=t(s);if(null!=a&&(u===i?a==a&&!ca(a):r(a,u)))var u=a,c=s}return c}function mn(e,t){var r=[];return hn(e,(function(e,n,i){t(e,n,i)&&r.push(e)})),r}function gn(e,t,r,n,i){var o=-1,s=e.length;for(r||(r=go),i||(i=[]);++o<s;){var a=e[o];t>0&&r(a)?t>1?gn(a,t-1,r,n,i):Ot(i,a):n||(i[i.length]=a)}return i}var yn=Ii(),bn=Ii(!0);function vn(e,t){return e&&yn(e,t,Ia)}function wn(e,t){return e&&bn(e,t,Ia)}function _n(e,t){return St(t,(function(t){return Ys(e[t])}))}function Sn(e,t){for(var r=0,n=(t=yi(t,e)).length;null!=e&&r<n;)e=e[Do(t[r++])];return r&&r==n?e:i}function Mn(e,t,r){var n=t(e);return Hs(e)?n:Ot(n,r(e))}function An(e){return null==e?e===i?"[object Undefined]":"[object Null]":at&&at in Ae(e)?function(e){var t=Re.call(e,at),r=e[at];try{e[at]=i;var n=!0}catch(e){}var o=Ne.call(e);return n&&(t?e[at]=r:delete e[at]),o}(e):function(e){return Ne.call(e)}(e)}function En(e,t){return e>t}function On(e,t){return null!=e&&Re.call(e,t)}function xn(e,t){return null!=e&&t in Ae(e)}function Tn(e,t,r){for(var o=r?At:Mt,s=e[0].length,a=e.length,u=a,c=n(a),f=1/0,h=[];u--;){var l=e[u];u&&t&&(l=Et(l,Vt(t))),f=yr(l.length,f),c[u]=!r&&(t||s>=120&&l.length>=120)?new Xr(u&&l):i}l=e[0];var d=-1,p=c[0];e:for(;++d<s&&h.length<f;){var m=l[d],g=t?t(m):m;if(m=r||0!==m?m:0,!(p?Ht(p,g):o(h,g,r))){for(u=a;--u;){var y=c[u];if(!(y?Ht(y,g):o(e[u],g,r)))continue e}p&&p.push(g),h.push(m)}}return h}function Pn(e,t,r){var n=null==(e=Oo(e,t=yi(t,e)))?e:e[Do(Wo(t))];return null==n?i:yt(n,e,r)}function jn(e){return ra(e)&&An(e)==m}function kn(e,t,r,n,o){return e===t||(null==e||null==t||!ra(e)&&!ra(t)?e!=e&&t!=t:function(e,t,r,n,o,s){var a=Hs(e),u=Hs(t),c=a?g:lo(e),f=u?g:lo(t),h=(c=c==m?A:c)==A,l=(f=f==m?A:f)==A,d=c==f;if(d&&Zs(e)){if(!Zs(t))return!1;a=!0,h=!1}if(d&&!h)return s||(s=new Kr),a||fa(e)?Qi(e,t,r,n,o,s):function(e,t,r,n,i,o,s){switch(r){case I:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case k:return!(e.byteLength!=t.byteLength||!o(new ze(e),new ze(t)));case y:case b:case M:return Us(+e,+t);case v:return e.name==t.name&&e.message==t.message;case O:case T:return e==t+"";case S:var a=Qt;case x:var u=1&n;if(a||(a=rr),e.size!=t.size&&!u)return!1;var c=s.get(e);if(c)return c==t;n|=2,s.set(e,t);var f=Qi(a(e),a(t),n,i,o,s);return s.delete(e),f;case P:if(Nr)return Nr.call(e)==Nr.call(t)}return!1}(e,t,c,r,n,o,s);if(!(1&r)){var p=h&&Re.call(e,"__wrapped__"),w=l&&Re.call(t,"__wrapped__");if(p||w){var _=p?e.value():e,E=w?t.value():t;return s||(s=new Kr),o(_,E,r,n,s)}}return!!d&&(s||(s=new Kr),function(e,t,r,n,o,s){var a=1&r,u=to(e),c=u.length;if(c!=to(t).length&&!a)return!1;for(var f=c;f--;){var h=u[f];if(!(a?h in t:Re.call(t,h)))return!1}var l=s.get(e),d=s.get(t);if(l&&d)return l==t&&d==e;var p=!0;s.set(e,t),s.set(t,e);for(var m=a;++f<c;){var g=e[h=u[f]],y=t[h];if(n)var b=a?n(y,g,h,t,e,s):n(g,y,h,e,t,s);if(!(b===i?g===y||o(g,y,r,n,s):b)){p=!1;break}m||(m="constructor"==h)}if(p&&!m){var v=e.constructor,w=t.constructor;v==w||!("constructor"in e)||!("constructor"in t)||"function"==typeof v&&v instanceof v&&"function"==typeof w&&w instanceof w||(p=!1)}return s.delete(e),s.delete(t),p}(e,t,r,n,o,s))}(e,t,r,n,kn,o))}function In(e,t,r,n){var o=r.length,s=o,a=!n;if(null==e)return!s;for(e=Ae(e);o--;){var u=r[o];if(a&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++o<s;){var c=(u=r[o])[0],f=e[c],h=u[1];if(a&&u[2]){if(f===i&&!(c in e))return!1}else{var l=new Kr;if(n)var d=n(f,h,c,e,t,l);if(!(d===i?kn(h,f,3,n,l):d))return!1}}return!0}function Rn(e){return!(!ta(e)||(t=e,Be&&Be in t))&&(Ys(e)?Fe:me).test(Fo(e));var t}function Cn(e){return"function"==typeof e?e:null==e?iu:"object"==typeof e?Hs(e)?Fn(e[0],e[1]):Dn(e):du(e)}function Bn(e){if(!So(e))return mr(e);var t=[];for(var r in Ae(e))Re.call(e,r)&&"constructor"!=r&&t.push(r);return t}function Nn(e,t){return e<t}function Ln(e,t){var r=-1,i=Ks(e)?n(e.length):[];return hn(e,(function(e,n,o){i[++r]=t(e,n,o)})),i}function Dn(e){var t=uo(e);return 1==t.length&&t[0][2]?Ao(t[0][0],t[0][1]):function(r){return r===e||In(r,e,t)}}function Fn(e,t){return vo(e)&&Mo(t)?Ao(Do(e),t):function(r){var n=xa(r,e);return n===i&&n===t?Ta(r,e):kn(t,n,3)}}function qn(e,t,r,n,o){e!==t&&yn(t,(function(s,a){if(o||(o=new Kr),ta(s))!function(e,t,r,n,o,s,a){var u=To(e,r),c=To(t,r),f=a.get(c);if(f)Yr(e,r,f);else{var h=s?s(u,c,r+"",e,t,a):i,l=h===i;if(l){var d=Hs(c),p=!d&&Zs(c),m=!d&&!p&&fa(c);h=c,d||p||m?Hs(u)?h=u:Js(u)?h=xi(u):p?(l=!1,h=_i(c,!0)):m?(l=!1,h=Mi(c,!0)):h=[]:oa(c)||$s(c)?(h=u,$s(u)?h=ba(u):ta(u)&&!Ys(u)||(h=mo(c))):l=!1}l&&(a.set(c,h),o(h,c,n,s,a),a.delete(c)),Yr(e,r,h)}}(e,t,a,r,qn,n,o);else{var u=n?n(To(e,a),s,a+"",e,t,o):i;u===i&&(u=s),Yr(e,a,u)}}),Ra)}function Un(e,t){var r=e.length;if(r)return yo(t+=t<0?r:0,r)?e[t]:i}function zn(e,t,r){t=t.length?Et(t,(function(e){return Hs(e)?function(t){return Sn(t,1===e.length?e[0]:e)}:e})):[iu];var n=-1;return t=Et(t,Vt(so())),function(e,t){var n=e.length;for(e.sort((function(e,t){return function(e,t,r){for(var n=-1,i=e.criteria,o=t.criteria,s=i.length,a=r.length;++n<s;){var u=Ai(i[n],o[n]);if(u)return n>=a?u:u*("desc"==r[n]?-1:1)}return e.index-t.index}(e,t,r)}));n--;)e[n]=e[n].value;return e}(Ln(e,(function(e,r,i){return{criteria:Et(t,(function(t){return t(e)})),index:++n,value:e}})))}function Vn(e,t,r){for(var n=-1,i=t.length,o={};++n<i;){var s=t[n],a=Sn(e,s);r(a,s)&&Wn(o,yi(s,e),a)}return o}function $n(e,t,r,n){var i=n?Ct:Rt,o=-1,s=t.length,a=e;for(e===t&&(t=xi(t)),r&&(a=Et(e,Vt(r)));++o<s;)for(var u=0,c=t[o],f=r?r(c):c;(u=i(a,f,u,n))>-1;)a!==e&&nt.call(a,u,1),nt.call(e,u,1);return e}function Hn(e,t){for(var r=e?t.length:0,n=r-1;r--;){var i=t[r];if(r==n||i!==o){var o=i;yo(i)?nt.call(e,i,1):ci(e,i)}}return e}function Xn(e,t){return e+fr(wr()*(t-e+1))}function Kn(e,t){var r="";if(!e||t<1||t>h)return r;do{t%2&&(r+=e),(t=fr(t/2))&&(e+=e)}while(t);return r}function Jn(e,t){return ko(Eo(e,t,iu),e+"")}function Zn(e){return Zr(Ua(e))}function Gn(e,t){var r=Ua(e);return Co(r,sn(t,0,r.length))}function Wn(e,t,r,n){if(!ta(e))return e;for(var o=-1,s=(t=yi(t,e)).length,a=s-1,u=e;null!=u&&++o<s;){var c=Do(t[o]),f=r;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(o!=a){var h=u[c];(f=n?n(h,c,u):i)===i&&(f=ta(h)?h:yo(t[o+1])?[]:{})}Qr(u,c,f),u=u[c]}return e}var Yn=Tr?function(e,t){return Tr.set(e,t),e}:iu,Qn=ct?function(e,t){return ct(e,"toString",{configurable:!0,enumerable:!1,value:tu(t),writable:!0})}:iu;function ei(e){return Co(Ua(e))}function ti(e,t,r){var i=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(r=r>o?o:r)<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var s=n(o);++i<o;)s[i]=e[i+t];return s}function ri(e,t){var r;return hn(e,(function(e,n,i){return!(r=t(e,n,i))})),!!r}function ni(e,t,r){var n=0,i=null==e?n:e.length;if("number"==typeof t&&t==t&&i<=2147483647){for(;n<i;){var o=n+i>>>1,s=e[o];null!==s&&!ca(s)&&(r?s<=t:s<t)?n=o+1:i=o}return i}return ii(e,t,iu,r)}function ii(e,t,r,n){var o=0,s=null==e?0:e.length;if(0===s)return 0;for(var a=(t=r(t))!=t,u=null===t,c=ca(t),f=t===i;o<s;){var h=fr((o+s)/2),l=r(e[h]),d=l!==i,p=null===l,m=l==l,g=ca(l);if(a)var y=n||m;else y=f?m&&(n||d):u?m&&d&&(n||!p):c?m&&d&&!p&&(n||!g):!p&&!g&&(n?l<=t:l<t);y?o=h+1:s=h}return yr(s,4294967294)}function oi(e,t){for(var r=-1,n=e.length,i=0,o=[];++r<n;){var s=e[r],a=t?t(s):s;if(!r||!Us(a,u)){var u=a;o[i++]=0===s?0:s}}return o}function si(e){return"number"==typeof e?e:ca(e)?l:+e}function ai(e){if("string"==typeof e)return e;if(Hs(e))return Et(e,ai)+"";if(ca(e))return Lr?Lr.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function ui(e,t,r){var n=-1,i=Mt,o=e.length,s=!0,a=[],u=a;if(r)s=!1,i=At;else if(o>=200){var c=t?null:Ki(e);if(c)return rr(c);s=!1,i=Ht,u=new Xr}else u=t?[]:a;e:for(;++n<o;){var f=e[n],h=t?t(f):f;if(f=r||0!==f?f:0,s&&h==h){for(var l=u.length;l--;)if(u[l]===h)continue e;t&&u.push(h),a.push(f)}else i(u,h,r)||(u!==a&&u.push(h),a.push(f))}return a}function ci(e,t){return null==(e=Oo(e,t=yi(t,e)))||delete e[Do(Wo(t))]}function fi(e,t,r,n){return Wn(e,t,r(Sn(e,t)),n)}function hi(e,t,r,n){for(var i=e.length,o=n?i:-1;(n?o--:++o<i)&&t(e[o],o,e););return r?ti(e,n?0:o,n?o+1:i):ti(e,n?o+1:0,n?i:o)}function li(e,t){var r=e;return r instanceof zr&&(r=r.value()),xt(t,(function(e,t){return t.func.apply(t.thisArg,Ot([e],t.args))}),r)}function di(e,t,r){var i=e.length;if(i<2)return i?ui(e[0]):[];for(var o=-1,s=n(i);++o<i;)for(var a=e[o],u=-1;++u<i;)u!=o&&(s[o]=fn(s[o]||a,e[u],t,r));return ui(gn(s,1),t,r)}function pi(e,t,r){for(var n=-1,o=e.length,s=t.length,a={};++n<o;){var u=n<s?t[n]:i;r(a,e[n],u)}return a}function mi(e){return Js(e)?e:[]}function gi(e){return"function"==typeof e?e:iu}function yi(e,t){return Hs(e)?e:vo(e,t)?[e]:Lo(va(e))}var bi=Jn;function vi(e,t,r){var n=e.length;return r=r===i?n:r,!t&&r>=n?e:ti(e,t,r)}var wi=ft||function(e){return ot.clearTimeout(e)};function _i(e,t){if(t)return e.slice();var r=e.length,n=Ve?Ve(r):new e.constructor(r);return e.copy(n),n}function Si(e){var t=new e.constructor(e.byteLength);return new ze(t).set(new ze(e)),t}function Mi(e,t){var r=t?Si(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function Ai(e,t){if(e!==t){var r=e!==i,n=null===e,o=e==e,s=ca(e),a=t!==i,u=null===t,c=t==t,f=ca(t);if(!u&&!f&&!s&&e>t||s&&a&&c&&!u&&!f||n&&a&&c||!r&&c||!o)return 1;if(!n&&!s&&!f&&e<t||f&&r&&o&&!n&&!s||u&&r&&o||!a&&o||!c)return-1}return 0}function Ei(e,t,r,i){for(var o=-1,s=e.length,a=r.length,u=-1,c=t.length,f=gr(s-a,0),h=n(c+f),l=!i;++u<c;)h[u]=t[u];for(;++o<a;)(l||o<s)&&(h[r[o]]=e[o]);for(;f--;)h[u++]=e[o++];return h}function Oi(e,t,r,i){for(var o=-1,s=e.length,a=-1,u=r.length,c=-1,f=t.length,h=gr(s-u,0),l=n(h+f),d=!i;++o<h;)l[o]=e[o];for(var p=o;++c<f;)l[p+c]=t[c];for(;++a<u;)(d||o<s)&&(l[p+r[a]]=e[o++]);return l}function xi(e,t){var r=-1,i=e.length;for(t||(t=n(i));++r<i;)t[r]=e[r];return t}function Ti(e,t,r,n){var o=!r;r||(r={});for(var s=-1,a=t.length;++s<a;){var u=t[s],c=n?n(r[u],e[u],u,r,e):i;c===i&&(c=e[u]),o?nn(r,u,c):Qr(r,u,c)}return r}function Pi(e,t){return function(r,n){var i=Hs(r)?bt:tn,o=t?t():{};return i(r,e,so(n,2),o)}}function ji(e){return Jn((function(t,r){var n=-1,o=r.length,s=o>1?r[o-1]:i,a=o>2?r[2]:i;for(s=e.length>3&&"function"==typeof s?(o--,s):i,a&&bo(r[0],r[1],a)&&(s=o<3?i:s,o=1),t=Ae(t);++n<o;){var u=r[n];u&&e(t,u,n,s)}return t}))}function ki(e,t){return function(r,n){if(null==r)return r;if(!Ks(r))return e(r,n);for(var i=r.length,o=t?i:-1,s=Ae(r);(t?o--:++o<i)&&!1!==n(s[o],o,s););return r}}function Ii(e){return function(t,r,n){for(var i=-1,o=Ae(t),s=n(t),a=s.length;a--;){var u=s[e?a:++i];if(!1===r(o[u],u,o))break}return t}}function Ri(e){return function(t){var r=Yt(t=va(t))?or(t):i,n=r?r[0]:t.charAt(0),o=r?vi(r,1).join(""):t.slice(1);return n[e]()+o}}function Ci(e){return function(t){return xt(Ya($a(t).replace($e,"")),e,"")}}function Bi(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var r=Fr(e.prototype),n=e.apply(r,t);return ta(n)?n:r}}function Ni(e){return function(t,r,n){var o=Ae(t);if(!Ks(t)){var s=so(r,3);t=Ia(t),r=function(e){return s(o[e],e,o)}}var a=e(t,r,n);return a>-1?o[s?t[a]:a]:i}}function Li(e){return eo((function(t){var r=t.length,n=r,s=Ur.prototype.thru;for(e&&t.reverse();n--;){var a=t[n];if("function"!=typeof a)throw new xe(o);if(s&&!u&&"wrapper"==io(a))var u=new Ur([],!0)}for(n=u?n:r;++n<r;){var c=io(a=t[n]),f="wrapper"==c?no(a):i;u=f&&wo(f[0])&&424==f[1]&&!f[4].length&&1==f[9]?u[io(f[0])].apply(u,f[3]):1==a.length&&wo(a)?u[c]():u.thru(a)}return function(){var e=arguments,n=e[0];if(u&&1==e.length&&Hs(n))return u.plant(n).value();for(var i=0,o=r?t[i].apply(this,e):n;++i<r;)o=t[i].call(this,o);return o}}))}function Di(e,t,r,o,s,a,u,f,h,l){var d=t&c,p=1&t,m=2&t,g=24&t,y=512&t,b=m?i:Bi(e);return function i(){for(var c=arguments.length,v=n(c),w=c;w--;)v[w]=arguments[w];if(g)var _=oo(i),S=Jt(v,_);if(o&&(v=Ei(v,o,s,g)),a&&(v=Oi(v,a,u,g)),c-=S,g&&c<l){var M=tr(v,_);return Hi(e,t,Di,i.placeholder,r,v,M,f,h,l-c)}var A=p?r:this,E=m?A[e]:e;return c=v.length,f?v=xo(v,f):y&&c>1&&v.reverse(),d&&h<c&&(v.length=h),this&&this!==ot&&this instanceof i&&(E=b||Bi(E)),E.apply(A,v)}}function Fi(e,t){return function(r,n){return function(e,t,r,n){return vn(e,(function(e,i,o){t(n,r(e),i,o)})),n}(r,e,t(n),{})}}function qi(e,t){return function(r,n){var o;if(r===i&&n===i)return t;if(r!==i&&(o=r),n!==i){if(o===i)return n;"string"==typeof r||"string"==typeof n?(r=ai(r),n=ai(n)):(r=si(r),n=si(n)),o=e(r,n)}return o}}function Ui(e){return eo((function(t){return t=Et(t,Vt(so())),Jn((function(r){var n=this;return e(t,(function(e){return yt(e,n,r)}))}))}))}function zi(e,t){var r=(t=t===i?" ":ai(t)).length;if(r<2)return r?Kn(t,e):t;var n=Kn(t,cr(e/ir(t)));return Yt(t)?vi(or(n),0,e).join(""):n.slice(0,e)}function Vi(e){return function(t,r,o){return o&&"number"!=typeof o&&bo(t,r,o)&&(r=o=i),t=pa(t),r===i?(r=t,t=0):r=pa(r),function(e,t,r,i){for(var o=-1,s=gr(cr((t-e)/(r||1)),0),a=n(s);s--;)a[i?s:++o]=e,e+=r;return a}(t,r,o=o===i?t<r?1:-1:pa(o),e)}}function $i(e){return function(t,r){return"string"==typeof t&&"string"==typeof r||(t=ya(t),r=ya(r)),e(t,r)}}function Hi(e,t,r,n,o,s,a,c,f,h){var l=8&t;t|=l?u:64,4&(t&=~(l?64:u))||(t&=-4);var d=[e,t,o,l?s:i,l?a:i,l?i:s,l?i:a,c,f,h],p=r.apply(i,d);return wo(e)&&Po(p,d),p.placeholder=n,Io(p,e,t)}function Xi(e){var t=Me[e];return function(e,r){if(e=ya(e),(r=null==r?0:yr(ma(r),292))&&dr(e)){var n=(va(e)+"e").split("e");return+((n=(va(t(n[0]+"e"+(+n[1]+r)))+"e").split("e"))[0]+"e"+(+n[1]-r))}return t(e)}}var Ki=Er&&1/rr(new Er([,-0]))[1]==f?function(e){return new Er(e)}:cu;function Ji(e){return function(t){var r=lo(t);return r==S?Qt(t):r==x?nr(t):function(e,t){return Et(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Zi(e,t,r,s,f,h,l,d){var p=2&t;if(!p&&"function"!=typeof e)throw new xe(o);var m=s?s.length:0;if(m||(t&=-97,s=f=i),l=l===i?l:gr(ma(l),0),d=d===i?d:ma(d),m-=f?f.length:0,64&t){var g=s,y=f;s=f=i}var b=p?i:no(e),v=[e,t,r,s,f,g,y,h,l,d];if(b&&function(e,t){var r=e[1],n=t[1],i=r|n,o=i<131,s=n==c&&8==r||n==c&&256==r&&e[7].length<=t[8]||384==n&&t[7].length<=t[8]&&8==r;if(!o&&!s)return e;1&n&&(e[2]=t[2],i|=1&r?0:4);var u=t[3];if(u){var f=e[3];e[3]=f?Ei(f,u,t[4]):u,e[4]=f?tr(e[3],a):t[4]}(u=t[5])&&(f=e[5],e[5]=f?Oi(f,u,t[6]):u,e[6]=f?tr(e[5],a):t[6]),(u=t[7])&&(e[7]=u),n&c&&(e[8]=null==e[8]?t[8]:yr(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=i}(v,b),e=v[0],t=v[1],r=v[2],s=v[3],f=v[4],!(d=v[9]=v[9]===i?p?0:e.length:gr(v[9]-m,0))&&24&t&&(t&=-25),t&&1!=t)w=8==t||16==t?function(e,t,r){var o=Bi(e);return function s(){for(var a=arguments.length,u=n(a),c=a,f=oo(s);c--;)u[c]=arguments[c];var h=a<3&&u[0]!==f&&u[a-1]!==f?[]:tr(u,f);return(a-=h.length)<r?Hi(e,t,Di,s.placeholder,i,u,h,i,i,r-a):yt(this&&this!==ot&&this instanceof s?o:e,this,u)}}(e,t,d):t!=u&&33!=t||f.length?Di.apply(i,v):function(e,t,r,i){var o=1&t,s=Bi(e);return function t(){for(var a=-1,u=arguments.length,c=-1,f=i.length,h=n(f+u),l=this&&this!==ot&&this instanceof t?s:e;++c<f;)h[c]=i[c];for(;u--;)h[c++]=arguments[++a];return yt(l,o?r:this,h)}}(e,t,r,s);else var w=function(e,t,r){var n=1&t,i=Bi(e);return function t(){return(this&&this!==ot&&this instanceof t?i:e).apply(n?r:this,arguments)}}(e,t,r);return Io((b?Yn:Po)(w,v),e,t)}function Gi(e,t,r,n){return e===i||Us(e,je[r])&&!Re.call(n,r)?t:e}function Wi(e,t,r,n,o,s){return ta(e)&&ta(t)&&(s.set(t,e),qn(e,t,i,Wi,s),s.delete(t)),e}function Yi(e){return oa(e)?i:e}function Qi(e,t,r,n,o,s){var a=1&r,u=e.length,c=t.length;if(u!=c&&!(a&&c>u))return!1;var f=s.get(e),h=s.get(t);if(f&&h)return f==t&&h==e;var l=-1,d=!0,p=2&r?new Xr:i;for(s.set(e,t),s.set(t,e);++l<u;){var m=e[l],g=t[l];if(n)var y=a?n(g,m,l,t,e,s):n(m,g,l,e,t,s);if(y!==i){if(y)continue;d=!1;break}if(p){if(!Pt(t,(function(e,t){if(!Ht(p,t)&&(m===e||o(m,e,r,n,s)))return p.push(t)}))){d=!1;break}}else if(m!==g&&!o(m,g,r,n,s)){d=!1;break}}return s.delete(e),s.delete(t),d}function eo(e){return ko(Eo(e,i,Xo),e+"")}function to(e){return Mn(e,Ia,fo)}function ro(e){return Mn(e,Ra,ho)}var no=Tr?function(e){return Tr.get(e)}:cu;function io(e){for(var t=e.name+"",r=Pr[t],n=Re.call(Pr,t)?r.length:0;n--;){var i=r[n],o=i.func;if(null==o||o==e)return i.name}return t}function oo(e){return(Re.call(Dr,"placeholder")?Dr:e).placeholder}function so(){var e=Dr.iteratee||ou;return e=e===ou?Cn:e,arguments.length?e(arguments[0],arguments[1]):e}function ao(e,t){var r,n,i=e.__data__;return("string"==(n=typeof(r=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?i["string"==typeof t?"string":"hash"]:i.map}function uo(e){for(var t=Ia(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,Mo(i)]}return t}function co(e,t){var r=function(e,t){return null==e?i:e[t]}(e,t);return Rn(r)?r:i}var fo=hr?function(e){return null==e?[]:(e=Ae(e),St(hr(e),(function(t){return et.call(e,t)})))}:gu,ho=hr?function(e){for(var t=[];e;)Ot(t,fo(e)),e=Xe(e);return t}:gu,lo=An;function po(e,t,r){for(var n=-1,i=(t=yi(t,e)).length,o=!1;++n<i;){var s=Do(t[n]);if(!(o=null!=e&&r(e,s)))break;e=e[s]}return o||++n!=i?o:!!(i=null==e?0:e.length)&&ea(i)&&yo(s,i)&&(Hs(e)||$s(e))}function mo(e){return"function"!=typeof e.constructor||So(e)?{}:Fr(Xe(e))}function go(e){return Hs(e)||$s(e)||!!(it&&e&&e[it])}function yo(e,t){var r=typeof e;return!!(t=null==t?h:t)&&("number"==r||"symbol"!=r&&ye.test(e))&&e>-1&&e%1==0&&e<t}function bo(e,t,r){if(!ta(r))return!1;var n=typeof t;return!!("number"==n?Ks(r)&&yo(t,r.length):"string"==n&&t in r)&&Us(r[t],e)}function vo(e,t){if(Hs(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!ca(e))||Q.test(e)||!Y.test(e)||null!=t&&e in Ae(t)}function wo(e){var t=io(e),r=Dr[t];if("function"!=typeof r||!(t in zr.prototype))return!1;if(e===r)return!0;var n=no(r);return!!n&&e===n[0]}(Sr&&lo(new Sr(new ArrayBuffer(1)))!=I||Mr&&lo(new Mr)!=S||Ar&&lo(Ar.resolve())!=E||Er&&lo(new Er)!=x||Or&&lo(new Or)!=j)&&(lo=function(e){var t=An(e),r=t==A?e.constructor:i,n=r?Fo(r):"";if(n)switch(n){case jr:return I;case kr:return S;case Ir:return E;case Rr:return x;case Cr:return j}return t});var _o=ke?Ys:yu;function So(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||je)}function Mo(e){return e==e&&!ta(e)}function Ao(e,t){return function(r){return null!=r&&r[e]===t&&(t!==i||e in Ae(r))}}function Eo(e,t,r){return t=gr(t===i?e.length-1:t,0),function(){for(var i=arguments,o=-1,s=gr(i.length-t,0),a=n(s);++o<s;)a[o]=i[t+o];o=-1;for(var u=n(t+1);++o<t;)u[o]=i[o];return u[t]=r(a),yt(e,this,u)}}function Oo(e,t){return t.length<2?e:Sn(e,ti(t,0,-1))}function xo(e,t){for(var r=e.length,n=yr(t.length,r),o=xi(e);n--;){var s=t[n];e[n]=yo(s,r)?o[s]:i}return e}function To(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var Po=Ro(Yn),jo=Dt||function(e,t){return ot.setTimeout(e,t)},ko=Ro(Qn);function Io(e,t,r){var n=t+"";return ko(e,function(e,t){var r=t.length;if(!r)return e;var n=r-1;return t[n]=(r>1?"& ":"")+t[n],t=t.join(r>2?", ":" "),e.replace(oe,"{\n/* [wrapped with "+t+"] */\n")}(n,function(e,t){return vt(p,(function(r){var n="_."+r[0];t&r[1]&&!Mt(e,n)&&e.push(n)})),e.sort()}(function(e){var t=e.match(se);return t?t[1].split(ae):[]}(n),r)))}function Ro(e){var t=0,r=0;return function(){var n=br(),o=16-(n-r);if(r=n,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(i,arguments)}}function Co(e,t){var r=-1,n=e.length,o=n-1;for(t=t===i?n:t;++r<t;){var s=Xn(r,o),a=e[s];e[s]=e[r],e[r]=a}return e.length=t,e}var Bo,No,Lo=(Bo=Bs((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(ee,(function(e,r,n,i){t.push(n?i.replace(fe,"$1"):r||e)})),t}),(function(e){return 500===No.size&&No.clear(),e})),No=Bo.cache,Bo);function Do(e){if("string"==typeof e||ca(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Fo(e){if(null!=e){try{return Ie.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function qo(e){if(e instanceof zr)return e.clone();var t=new Ur(e.__wrapped__,e.__chain__);return t.__actions__=xi(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Uo=Jn((function(e,t){return Js(e)?fn(e,gn(t,1,Js,!0)):[]})),zo=Jn((function(e,t){var r=Wo(t);return Js(r)&&(r=i),Js(e)?fn(e,gn(t,1,Js,!0),so(r,2)):[]})),Vo=Jn((function(e,t){var r=Wo(t);return Js(r)&&(r=i),Js(e)?fn(e,gn(t,1,Js,!0),i,r):[]}));function $o(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var i=null==r?0:ma(r);return i<0&&(i=gr(n+i,0)),It(e,so(t,3),i)}function Ho(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var o=n-1;return r!==i&&(o=ma(r),o=r<0?gr(n+o,0):yr(o,n-1)),It(e,so(t,3),o,!0)}function Xo(e){return null!=e&&e.length?gn(e,1):[]}function Ko(e){return e&&e.length?e[0]:i}var Jo=Jn((function(e){var t=Et(e,mi);return t.length&&t[0]===e[0]?Tn(t):[]})),Zo=Jn((function(e){var t=Wo(e),r=Et(e,mi);return t===Wo(r)?t=i:r.pop(),r.length&&r[0]===e[0]?Tn(r,so(t,2)):[]})),Go=Jn((function(e){var t=Wo(e),r=Et(e,mi);return(t="function"==typeof t?t:i)&&r.pop(),r.length&&r[0]===e[0]?Tn(r,i,t):[]}));function Wo(e){var t=null==e?0:e.length;return t?e[t-1]:i}var Yo=Jn(Qo);function Qo(e,t){return e&&e.length&&t&&t.length?$n(e,t):e}var es=eo((function(e,t){var r=null==e?0:e.length,n=on(e,t);return Hn(e,Et(t,(function(e){return yo(e,r)?+e:e})).sort(Ai)),n}));function ts(e){return null==e?e:_r.call(e)}var rs=Jn((function(e){return ui(gn(e,1,Js,!0))})),ns=Jn((function(e){var t=Wo(e);return Js(t)&&(t=i),ui(gn(e,1,Js,!0),so(t,2))})),is=Jn((function(e){var t=Wo(e);return t="function"==typeof t?t:i,ui(gn(e,1,Js,!0),i,t)}));function os(e){if(!e||!e.length)return[];var t=0;return e=St(e,(function(e){if(Js(e))return t=gr(e.length,t),!0})),Ut(t,(function(t){return Et(e,Lt(t))}))}function ss(e,t){if(!e||!e.length)return[];var r=os(e);return null==t?r:Et(r,(function(e){return yt(t,i,e)}))}var as=Jn((function(e,t){return Js(e)?fn(e,t):[]})),us=Jn((function(e){return di(St(e,Js))})),cs=Jn((function(e){var t=Wo(e);return Js(t)&&(t=i),di(St(e,Js),so(t,2))})),fs=Jn((function(e){var t=Wo(e);return t="function"==typeof t?t:i,di(St(e,Js),i,t)})),hs=Jn(os),ls=Jn((function(e){var t=e.length,r=t>1?e[t-1]:i;return r="function"==typeof r?(e.pop(),r):i,ss(e,r)}));function ds(e){var t=Dr(e);return t.__chain__=!0,t}function ps(e,t){return t(e)}var ms=eo((function(e){var t=e.length,r=t?e[0]:0,n=this.__wrapped__,o=function(t){return on(t,e)};return!(t>1||this.__actions__.length)&&n instanceof zr&&yo(r)?((n=n.slice(r,+r+(t?1:0))).__actions__.push({func:ps,args:[o],thisArg:i}),new Ur(n,this.__chain__).thru((function(e){return t&&!e.length&&e.push(i),e}))):this.thru(o)})),gs=Pi((function(e,t,r){Re.call(e,r)?++e[r]:nn(e,r,1)})),ys=Ni($o),bs=Ni(Ho);function vs(e,t){return(Hs(e)?vt:hn)(e,so(t,3))}function ws(e,t){return(Hs(e)?wt:ln)(e,so(t,3))}var _s=Pi((function(e,t,r){Re.call(e,r)?e[r].push(t):nn(e,r,[t])})),Ss=Jn((function(e,t,r){var i=-1,o="function"==typeof t,s=Ks(e)?n(e.length):[];return hn(e,(function(e){s[++i]=o?yt(t,e,r):Pn(e,t,r)})),s})),Ms=Pi((function(e,t,r){nn(e,r,t)}));function As(e,t){return(Hs(e)?Et:Ln)(e,so(t,3))}var Es=Pi((function(e,t,r){e[r?0:1].push(t)}),(function(){return[[],[]]})),Os=Jn((function(e,t){if(null==e)return[];var r=t.length;return r>1&&bo(e,t[0],t[1])?t=[]:r>2&&bo(t[0],t[1],t[2])&&(t=[t[0]]),zn(e,gn(t,1),[])})),xs=jt||function(){return ot.Date.now()};function Ts(e,t,r){return t=r?i:t,t=e&&null==t?e.length:t,Zi(e,c,i,i,i,i,t)}function Ps(e,t){var r;if("function"!=typeof t)throw new xe(o);return e=ma(e),function(){return--e>0&&(r=t.apply(this,arguments)),e<=1&&(t=i),r}}var js=Jn((function(e,t,r){var n=1;if(r.length){var i=tr(r,oo(js));n|=u}return Zi(e,n,t,r,i)})),ks=Jn((function(e,t,r){var n=3;if(r.length){var i=tr(r,oo(ks));n|=u}return Zi(t,n,e,r,i)}));function Is(e,t,r){var n,s,a,u,c,f,h=0,l=!1,d=!1,p=!0;if("function"!=typeof e)throw new xe(o);function m(t){var r=n,o=s;return n=s=i,h=t,u=e.apply(o,r)}function g(e){return h=e,c=jo(b,t),l?m(e):u}function y(e){var r=e-f;return f===i||r>=t||r<0||d&&e-h>=a}function b(){var e=xs();if(y(e))return v(e);c=jo(b,function(e){var r=t-(e-f);return d?yr(r,a-(e-h)):r}(e))}function v(e){return c=i,p&&n?m(e):(n=s=i,u)}function w(){var e=xs(),r=y(e);if(n=arguments,s=this,f=e,r){if(c===i)return g(f);if(d)return wi(c),c=jo(b,t),m(f)}return c===i&&(c=jo(b,t)),u}return t=ya(t)||0,ta(r)&&(l=!!r.leading,a=(d="maxWait"in r)?gr(ya(r.maxWait)||0,t):a,p="trailing"in r?!!r.trailing:p),w.cancel=function(){c!==i&&wi(c),h=0,n=f=s=c=i},w.flush=function(){return c===i?u:v(xs())},w}var Rs=Jn((function(e,t){return cn(e,1,t)})),Cs=Jn((function(e,t,r){return cn(e,ya(t)||0,r)}));function Bs(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new xe(o);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var s=e.apply(this,n);return r.cache=o.set(i,s)||o,s};return r.cache=new(Bs.Cache||Hr),r}function Ns(e){if("function"!=typeof e)throw new xe(o);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Bs.Cache=Hr;var Ls=bi((function(e,t){var r=(t=1==t.length&&Hs(t[0])?Et(t[0],Vt(so())):Et(gn(t,1),Vt(so()))).length;return Jn((function(n){for(var i=-1,o=yr(n.length,r);++i<o;)n[i]=t[i].call(this,n[i]);return yt(e,this,n)}))})),Ds=Jn((function(e,t){var r=tr(t,oo(Ds));return Zi(e,u,i,t,r)})),Fs=Jn((function(e,t){var r=tr(t,oo(Fs));return Zi(e,64,i,t,r)})),qs=eo((function(e,t){return Zi(e,256,i,i,i,t)}));function Us(e,t){return e===t||e!=e&&t!=t}var zs=$i(En),Vs=$i((function(e,t){return e>=t})),$s=jn(function(){return arguments}())?jn:function(e){return ra(e)&&Re.call(e,"callee")&&!et.call(e,"callee")},Hs=n.isArray,Xs=ht?Vt(ht):function(e){return ra(e)&&An(e)==k};function Ks(e){return null!=e&&ea(e.length)&&!Ys(e)}function Js(e){return ra(e)&&Ks(e)}var Zs=lr||yu,Gs=lt?Vt(lt):function(e){return ra(e)&&An(e)==b};function Ws(e){if(!ra(e))return!1;var t=An(e);return t==v||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!oa(e)}function Ys(e){if(!ta(e))return!1;var t=An(e);return t==w||t==_||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Qs(e){return"number"==typeof e&&e==ma(e)}function ea(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=h}function ta(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function ra(e){return null!=e&&"object"==typeof e}var na=dt?Vt(dt):function(e){return ra(e)&&lo(e)==S};function ia(e){return"number"==typeof e||ra(e)&&An(e)==M}function oa(e){if(!ra(e)||An(e)!=A)return!1;var t=Xe(e);if(null===t)return!0;var r=Re.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&Ie.call(r)==Le}var sa=pt?Vt(pt):function(e){return ra(e)&&An(e)==O},aa=mt?Vt(mt):function(e){return ra(e)&&lo(e)==x};function ua(e){return"string"==typeof e||!Hs(e)&&ra(e)&&An(e)==T}function ca(e){return"symbol"==typeof e||ra(e)&&An(e)==P}var fa=gt?Vt(gt):function(e){return ra(e)&&ea(e.length)&&!!Ye[An(e)]},ha=$i(Nn),la=$i((function(e,t){return e<=t}));function da(e){if(!e)return[];if(Ks(e))return ua(e)?or(e):xi(e);if(st&&e[st])return function(e){for(var t,r=[];!(t=e.next()).done;)r.push(t.value);return r}(e[st]());var t=lo(e);return(t==S?Qt:t==x?rr:Ua)(e)}function pa(e){return e?(e=ya(e))===f||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function ma(e){var t=pa(e),r=t%1;return t==t?r?t-r:t:0}function ga(e){return e?sn(ma(e),0,d):0}function ya(e){if("number"==typeof e)return e;if(ca(e))return l;if(ta(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=ta(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=zt(e);var r=pe.test(e);return r||ge.test(e)?rt(e.slice(2),r?2:8):de.test(e)?l:+e}function ba(e){return Ti(e,Ra(e))}function va(e){return null==e?"":ai(e)}var wa=ji((function(e,t){if(So(t)||Ks(t))Ti(t,Ia(t),e);else for(var r in t)Re.call(t,r)&&Qr(e,r,t[r])})),_a=ji((function(e,t){Ti(t,Ra(t),e)})),Sa=ji((function(e,t,r,n){Ti(t,Ra(t),e,n)})),Ma=ji((function(e,t,r,n){Ti(t,Ia(t),e,n)})),Aa=eo(on),Ea=Jn((function(e,t){e=Ae(e);var r=-1,n=t.length,o=n>2?t[2]:i;for(o&&bo(t[0],t[1],o)&&(n=1);++r<n;)for(var s=t[r],a=Ra(s),u=-1,c=a.length;++u<c;){var f=a[u],h=e[f];(h===i||Us(h,je[f])&&!Re.call(e,f))&&(e[f]=s[f])}return e})),Oa=Jn((function(e){return e.push(i,Wi),yt(Ba,i,e)}));function xa(e,t,r){var n=null==e?i:Sn(e,t);return n===i?r:n}function Ta(e,t){return null!=e&&po(e,t,xn)}var Pa=Fi((function(e,t,r){null!=t&&"function"!=typeof t.toString&&(t=Ne.call(t)),e[t]=r}),tu(iu)),ja=Fi((function(e,t,r){null!=t&&"function"!=typeof t.toString&&(t=Ne.call(t)),Re.call(e,t)?e[t].push(r):e[t]=[r]}),so),ka=Jn(Pn);function Ia(e){return Ks(e)?Jr(e):Bn(e)}function Ra(e){return Ks(e)?Jr(e,!0):function(e){if(!ta(e))return function(e){var t=[];if(null!=e)for(var r in Ae(e))t.push(r);return t}(e);var t=So(e),r=[];for(var n in e)("constructor"!=n||!t&&Re.call(e,n))&&r.push(n);return r}(e)}var Ca=ji((function(e,t,r){qn(e,t,r)})),Ba=ji((function(e,t,r,n){qn(e,t,r,n)})),Na=eo((function(e,t){var r={};if(null==e)return r;var n=!1;t=Et(t,(function(t){return t=yi(t,e),n||(n=t.length>1),t})),Ti(e,ro(e),r),n&&(r=an(r,7,Yi));for(var i=t.length;i--;)ci(r,t[i]);return r})),La=eo((function(e,t){return null==e?{}:function(e,t){return Vn(e,t,(function(t,r){return Ta(e,r)}))}(e,t)}));function Da(e,t){if(null==e)return{};var r=Et(ro(e),(function(e){return[e]}));return t=so(t),Vn(e,r,(function(e,r){return t(e,r[0])}))}var Fa=Ji(Ia),qa=Ji(Ra);function Ua(e){return null==e?[]:$t(e,Ia(e))}var za=Ci((function(e,t,r){return t=t.toLowerCase(),e+(r?Va(t):t)}));function Va(e){return Wa(va(e).toLowerCase())}function $a(e){return(e=va(e))&&e.replace(be,Zt).replace(He,"")}var Ha=Ci((function(e,t,r){return e+(r?"-":"")+t.toLowerCase()})),Xa=Ci((function(e,t,r){return e+(r?" ":"")+t.toLowerCase()})),Ka=Ri("toLowerCase"),Ja=Ci((function(e,t,r){return e+(r?"_":"")+t.toLowerCase()})),Za=Ci((function(e,t,r){return e+(r?" ":"")+Wa(t)})),Ga=Ci((function(e,t,r){return e+(r?" ":"")+t.toUpperCase()})),Wa=Ri("toUpperCase");function Ya(e,t,r){return e=va(e),(t=r?i:t)===i?function(e){return Ze.test(e)}(e)?function(e){return e.match(Ke)||[]}(e):function(e){return e.match(ue)||[]}(e):e.match(t)||[]}var Qa=Jn((function(e,t){try{return yt(e,i,t)}catch(e){return Ws(e)?e:new _e(e)}})),eu=eo((function(e,t){return vt(t,(function(t){t=Do(t),nn(e,t,js(e[t],e))})),e}));function tu(e){return function(){return e}}var ru=Li(),nu=Li(!0);function iu(e){return e}function ou(e){return Cn("function"==typeof e?e:an(e,1))}var su=Jn((function(e,t){return function(r){return Pn(r,e,t)}})),au=Jn((function(e,t){return function(r){return Pn(e,r,t)}}));function uu(e,t,r){var n=Ia(t),i=_n(t,n);null!=r||ta(t)&&(i.length||!n.length)||(r=t,t=e,e=this,i=_n(t,Ia(t)));var o=!(ta(r)&&"chain"in r&&!r.chain),s=Ys(e);return vt(i,(function(r){var n=t[r];e[r]=n,s&&(e.prototype[r]=function(){var t=this.__chain__;if(o||t){var r=e(this.__wrapped__),i=r.__actions__=xi(this.__actions__);return i.push({func:n,args:arguments,thisArg:e}),r.__chain__=t,r}return n.apply(e,Ot([this.value()],arguments))})})),e}function cu(){}var fu=Ui(Et),hu=Ui(_t),lu=Ui(Pt);function du(e){return vo(e)?Lt(Do(e)):function(e){return function(t){return Sn(t,e)}}(e)}var pu=Vi(),mu=Vi(!0);function gu(){return[]}function yu(){return!1}var bu,vu=qi((function(e,t){return e+t}),0),wu=Xi("ceil"),_u=qi((function(e,t){return e/t}),1),Su=Xi("floor"),Mu=qi((function(e,t){return e*t}),1),Au=Xi("round"),Eu=qi((function(e,t){return e-t}),0);return Dr.after=function(e,t){if("function"!=typeof t)throw new xe(o);return e=ma(e),function(){if(--e<1)return t.apply(this,arguments)}},Dr.ary=Ts,Dr.assign=wa,Dr.assignIn=_a,Dr.assignInWith=Sa,Dr.assignWith=Ma,Dr.at=Aa,Dr.before=Ps,Dr.bind=js,Dr.bindAll=eu,Dr.bindKey=ks,Dr.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Hs(e)?e:[e]},Dr.chain=ds,Dr.chunk=function(e,t,r){t=(r?bo(e,t,r):t===i)?1:gr(ma(t),0);var o=null==e?0:e.length;if(!o||t<1)return[];for(var s=0,a=0,u=n(cr(o/t));s<o;)u[a++]=ti(e,s,s+=t);return u},Dr.compact=function(e){for(var t=-1,r=null==e?0:e.length,n=0,i=[];++t<r;){var o=e[t];o&&(i[n++]=o)}return i},Dr.concat=function(){var e=arguments.length;if(!e)return[];for(var t=n(e-1),r=arguments[0],i=e;i--;)t[i-1]=arguments[i];return Ot(Hs(r)?xi(r):[r],gn(t,1))},Dr.cond=function(e){var t=null==e?0:e.length,r=so();return e=t?Et(e,(function(e){if("function"!=typeof e[1])throw new xe(o);return[r(e[0]),e[1]]})):[],Jn((function(r){for(var n=-1;++n<t;){var i=e[n];if(yt(i[0],this,r))return yt(i[1],this,r)}}))},Dr.conforms=function(e){return function(e){var t=Ia(e);return function(r){return un(r,e,t)}}(an(e,1))},Dr.constant=tu,Dr.countBy=gs,Dr.create=function(e,t){var r=Fr(e);return null==t?r:rn(r,t)},Dr.curry=function e(t,r,n){var o=Zi(t,8,i,i,i,i,i,r=n?i:r);return o.placeholder=e.placeholder,o},Dr.curryRight=function e(t,r,n){var o=Zi(t,16,i,i,i,i,i,r=n?i:r);return o.placeholder=e.placeholder,o},Dr.debounce=Is,Dr.defaults=Ea,Dr.defaultsDeep=Oa,Dr.defer=Rs,Dr.delay=Cs,Dr.difference=Uo,Dr.differenceBy=zo,Dr.differenceWith=Vo,Dr.drop=function(e,t,r){var n=null==e?0:e.length;return n?ti(e,(t=r||t===i?1:ma(t))<0?0:t,n):[]},Dr.dropRight=function(e,t,r){var n=null==e?0:e.length;return n?ti(e,0,(t=n-(t=r||t===i?1:ma(t)))<0?0:t):[]},Dr.dropRightWhile=function(e,t){return e&&e.length?hi(e,so(t,3),!0,!0):[]},Dr.dropWhile=function(e,t){return e&&e.length?hi(e,so(t,3),!0):[]},Dr.fill=function(e,t,r,n){var o=null==e?0:e.length;return o?(r&&"number"!=typeof r&&bo(e,t,r)&&(r=0,n=o),function(e,t,r,n){var o=e.length;for((r=ma(r))<0&&(r=-r>o?0:o+r),(n=n===i||n>o?o:ma(n))<0&&(n+=o),n=r>n?0:ga(n);r<n;)e[r++]=t;return e}(e,t,r,n)):[]},Dr.filter=function(e,t){return(Hs(e)?St:mn)(e,so(t,3))},Dr.flatMap=function(e,t){return gn(As(e,t),1)},Dr.flatMapDeep=function(e,t){return gn(As(e,t),f)},Dr.flatMapDepth=function(e,t,r){return r=r===i?1:ma(r),gn(As(e,t),r)},Dr.flatten=Xo,Dr.flattenDeep=function(e){return null!=e&&e.length?gn(e,f):[]},Dr.flattenDepth=function(e,t){return null!=e&&e.length?gn(e,t=t===i?1:ma(t)):[]},Dr.flip=function(e){return Zi(e,512)},Dr.flow=ru,Dr.flowRight=nu,Dr.fromPairs=function(e){for(var t=-1,r=null==e?0:e.length,n={};++t<r;){var i=e[t];n[i[0]]=i[1]}return n},Dr.functions=function(e){return null==e?[]:_n(e,Ia(e))},Dr.functionsIn=function(e){return null==e?[]:_n(e,Ra(e))},Dr.groupBy=_s,Dr.initial=function(e){return null!=e&&e.length?ti(e,0,-1):[]},Dr.intersection=Jo,Dr.intersectionBy=Zo,Dr.intersectionWith=Go,Dr.invert=Pa,Dr.invertBy=ja,Dr.invokeMap=Ss,Dr.iteratee=ou,Dr.keyBy=Ms,Dr.keys=Ia,Dr.keysIn=Ra,Dr.map=As,Dr.mapKeys=function(e,t){var r={};return t=so(t,3),vn(e,(function(e,n,i){nn(r,t(e,n,i),e)})),r},Dr.mapValues=function(e,t){var r={};return t=so(t,3),vn(e,(function(e,n,i){nn(r,n,t(e,n,i))})),r},Dr.matches=function(e){return Dn(an(e,1))},Dr.matchesProperty=function(e,t){return Fn(e,an(t,1))},Dr.memoize=Bs,Dr.merge=Ca,Dr.mergeWith=Ba,Dr.method=su,Dr.methodOf=au,Dr.mixin=uu,Dr.negate=Ns,Dr.nthArg=function(e){return e=ma(e),Jn((function(t){return Un(t,e)}))},Dr.omit=Na,Dr.omitBy=function(e,t){return Da(e,Ns(so(t)))},Dr.once=function(e){return Ps(2,e)},Dr.orderBy=function(e,t,r,n){return null==e?[]:(Hs(t)||(t=null==t?[]:[t]),Hs(r=n?i:r)||(r=null==r?[]:[r]),zn(e,t,r))},Dr.over=fu,Dr.overArgs=Ls,Dr.overEvery=hu,Dr.overSome=lu,Dr.partial=Ds,Dr.partialRight=Fs,Dr.partition=Es,Dr.pick=La,Dr.pickBy=Da,Dr.property=du,Dr.propertyOf=function(e){return function(t){return null==e?i:Sn(e,t)}},Dr.pull=Yo,Dr.pullAll=Qo,Dr.pullAllBy=function(e,t,r){return e&&e.length&&t&&t.length?$n(e,t,so(r,2)):e},Dr.pullAllWith=function(e,t,r){return e&&e.length&&t&&t.length?$n(e,t,i,r):e},Dr.pullAt=es,Dr.range=pu,Dr.rangeRight=mu,Dr.rearg=qs,Dr.reject=function(e,t){return(Hs(e)?St:mn)(e,Ns(so(t,3)))},Dr.remove=function(e,t){var r=[];if(!e||!e.length)return r;var n=-1,i=[],o=e.length;for(t=so(t,3);++n<o;){var s=e[n];t(s,n,e)&&(r.push(s),i.push(n))}return Hn(e,i),r},Dr.rest=function(e,t){if("function"!=typeof e)throw new xe(o);return Jn(e,t=t===i?t:ma(t))},Dr.reverse=ts,Dr.sampleSize=function(e,t,r){return t=(r?bo(e,t,r):t===i)?1:ma(t),(Hs(e)?Gr:Gn)(e,t)},Dr.set=function(e,t,r){return null==e?e:Wn(e,t,r)},Dr.setWith=function(e,t,r,n){return n="function"==typeof n?n:i,null==e?e:Wn(e,t,r,n)},Dr.shuffle=function(e){return(Hs(e)?Wr:ei)(e)},Dr.slice=function(e,t,r){var n=null==e?0:e.length;return n?(r&&"number"!=typeof r&&bo(e,t,r)?(t=0,r=n):(t=null==t?0:ma(t),r=r===i?n:ma(r)),ti(e,t,r)):[]},Dr.sortBy=Os,Dr.sortedUniq=function(e){return e&&e.length?oi(e):[]},Dr.sortedUniqBy=function(e,t){return e&&e.length?oi(e,so(t,2)):[]},Dr.split=function(e,t,r){return r&&"number"!=typeof r&&bo(e,t,r)&&(t=r=i),(r=r===i?d:r>>>0)?(e=va(e))&&("string"==typeof t||null!=t&&!sa(t))&&!(t=ai(t))&&Yt(e)?vi(or(e),0,r):e.split(t,r):[]},Dr.spread=function(e,t){if("function"!=typeof e)throw new xe(o);return t=null==t?0:gr(ma(t),0),Jn((function(r){var n=r[t],i=vi(r,0,t);return n&&Ot(i,n),yt(e,this,i)}))},Dr.tail=function(e){var t=null==e?0:e.length;return t?ti(e,1,t):[]},Dr.take=function(e,t,r){return e&&e.length?ti(e,0,(t=r||t===i?1:ma(t))<0?0:t):[]},Dr.takeRight=function(e,t,r){var n=null==e?0:e.length;return n?ti(e,(t=n-(t=r||t===i?1:ma(t)))<0?0:t,n):[]},Dr.takeRightWhile=function(e,t){return e&&e.length?hi(e,so(t,3),!1,!0):[]},Dr.takeWhile=function(e,t){return e&&e.length?hi(e,so(t,3)):[]},Dr.tap=function(e,t){return t(e),e},Dr.throttle=function(e,t,r){var n=!0,i=!0;if("function"!=typeof e)throw new xe(o);return ta(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),Is(e,t,{leading:n,maxWait:t,trailing:i})},Dr.thru=ps,Dr.toArray=da,Dr.toPairs=Fa,Dr.toPairsIn=qa,Dr.toPath=function(e){return Hs(e)?Et(e,Do):ca(e)?[e]:xi(Lo(va(e)))},Dr.toPlainObject=ba,Dr.transform=function(e,t,r){var n=Hs(e),i=n||Zs(e)||fa(e);if(t=so(t,4),null==r){var o=e&&e.constructor;r=i?n?new o:[]:ta(e)&&Ys(o)?Fr(Xe(e)):{}}return(i?vt:vn)(e,(function(e,n,i){return t(r,e,n,i)})),r},Dr.unary=function(e){return Ts(e,1)},Dr.union=rs,Dr.unionBy=ns,Dr.unionWith=is,Dr.uniq=function(e){return e&&e.length?ui(e):[]},Dr.uniqBy=function(e,t){return e&&e.length?ui(e,so(t,2)):[]},Dr.uniqWith=function(e,t){return t="function"==typeof t?t:i,e&&e.length?ui(e,i,t):[]},Dr.unset=function(e,t){return null==e||ci(e,t)},Dr.unzip=os,Dr.unzipWith=ss,Dr.update=function(e,t,r){return null==e?e:fi(e,t,gi(r))},Dr.updateWith=function(e,t,r,n){return n="function"==typeof n?n:i,null==e?e:fi(e,t,gi(r),n)},Dr.values=Ua,Dr.valuesIn=function(e){return null==e?[]:$t(e,Ra(e))},Dr.without=as,Dr.words=Ya,Dr.wrap=function(e,t){return Ds(gi(t),e)},Dr.xor=us,Dr.xorBy=cs,Dr.xorWith=fs,Dr.zip=hs,Dr.zipObject=function(e,t){return pi(e||[],t||[],Qr)},Dr.zipObjectDeep=function(e,t){return pi(e||[],t||[],Wn)},Dr.zipWith=ls,Dr.entries=Fa,Dr.entriesIn=qa,Dr.extend=_a,Dr.extendWith=Sa,uu(Dr,Dr),Dr.add=vu,Dr.attempt=Qa,Dr.camelCase=za,Dr.capitalize=Va,Dr.ceil=wu,Dr.clamp=function(e,t,r){return r===i&&(r=t,t=i),r!==i&&(r=(r=ya(r))==r?r:0),t!==i&&(t=(t=ya(t))==t?t:0),sn(ya(e),t,r)},Dr.clone=function(e){return an(e,4)},Dr.cloneDeep=function(e){return an(e,5)},Dr.cloneDeepWith=function(e,t){return an(e,5,t="function"==typeof t?t:i)},Dr.cloneWith=function(e,t){return an(e,4,t="function"==typeof t?t:i)},Dr.conformsTo=function(e,t){return null==t||un(e,t,Ia(t))},Dr.deburr=$a,Dr.defaultTo=function(e,t){return null==e||e!=e?t:e},Dr.divide=_u,Dr.endsWith=function(e,t,r){e=va(e),t=ai(t);var n=e.length,o=r=r===i?n:sn(ma(r),0,n);return(r-=t.length)>=0&&e.slice(r,o)==t},Dr.eq=Us,Dr.escape=function(e){return(e=va(e))&&J.test(e)?e.replace(X,Gt):e},Dr.escapeRegExp=function(e){return(e=va(e))&&re.test(e)?e.replace(te,"\\$&"):e},Dr.every=function(e,t,r){var n=Hs(e)?_t:dn;return r&&bo(e,t,r)&&(t=i),n(e,so(t,3))},Dr.find=ys,Dr.findIndex=$o,Dr.findKey=function(e,t){return kt(e,so(t,3),vn)},Dr.findLast=bs,Dr.findLastIndex=Ho,Dr.findLastKey=function(e,t){return kt(e,so(t,3),wn)},Dr.floor=Su,Dr.forEach=vs,Dr.forEachRight=ws,Dr.forIn=function(e,t){return null==e?e:yn(e,so(t,3),Ra)},Dr.forInRight=function(e,t){return null==e?e:bn(e,so(t,3),Ra)},Dr.forOwn=function(e,t){return e&&vn(e,so(t,3))},Dr.forOwnRight=function(e,t){return e&&wn(e,so(t,3))},Dr.get=xa,Dr.gt=zs,Dr.gte=Vs,Dr.has=function(e,t){return null!=e&&po(e,t,On)},Dr.hasIn=Ta,Dr.head=Ko,Dr.identity=iu,Dr.includes=function(e,t,r,n){e=Ks(e)?e:Ua(e),r=r&&!n?ma(r):0;var i=e.length;return r<0&&(r=gr(i+r,0)),ua(e)?r<=i&&e.indexOf(t,r)>-1:!!i&&Rt(e,t,r)>-1},Dr.indexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var i=null==r?0:ma(r);return i<0&&(i=gr(n+i,0)),Rt(e,t,i)},Dr.inRange=function(e,t,r){return t=pa(t),r===i?(r=t,t=0):r=pa(r),function(e,t,r){return e>=yr(t,r)&&e<gr(t,r)}(e=ya(e),t,r)},Dr.invoke=ka,Dr.isArguments=$s,Dr.isArray=Hs,Dr.isArrayBuffer=Xs,Dr.isArrayLike=Ks,Dr.isArrayLikeObject=Js,Dr.isBoolean=function(e){return!0===e||!1===e||ra(e)&&An(e)==y},Dr.isBuffer=Zs,Dr.isDate=Gs,Dr.isElement=function(e){return ra(e)&&1===e.nodeType&&!oa(e)},Dr.isEmpty=function(e){if(null==e)return!0;if(Ks(e)&&(Hs(e)||"string"==typeof e||"function"==typeof e.splice||Zs(e)||fa(e)||$s(e)))return!e.length;var t=lo(e);if(t==S||t==x)return!e.size;if(So(e))return!Bn(e).length;for(var r in e)if(Re.call(e,r))return!1;return!0},Dr.isEqual=function(e,t){return kn(e,t)},Dr.isEqualWith=function(e,t,r){var n=(r="function"==typeof r?r:i)?r(e,t):i;return n===i?kn(e,t,i,r):!!n},Dr.isError=Ws,Dr.isFinite=function(e){return"number"==typeof e&&dr(e)},Dr.isFunction=Ys,Dr.isInteger=Qs,Dr.isLength=ea,Dr.isMap=na,Dr.isMatch=function(e,t){return e===t||In(e,t,uo(t))},Dr.isMatchWith=function(e,t,r){return r="function"==typeof r?r:i,In(e,t,uo(t),r)},Dr.isNaN=function(e){return ia(e)&&e!=+e},Dr.isNative=function(e){if(_o(e))throw new _e("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Rn(e)},Dr.isNil=function(e){return null==e},Dr.isNull=function(e){return null===e},Dr.isNumber=ia,Dr.isObject=ta,Dr.isObjectLike=ra,Dr.isPlainObject=oa,Dr.isRegExp=sa,Dr.isSafeInteger=function(e){return Qs(e)&&e>=-9007199254740991&&e<=h},Dr.isSet=aa,Dr.isString=ua,Dr.isSymbol=ca,Dr.isTypedArray=fa,Dr.isUndefined=function(e){return e===i},Dr.isWeakMap=function(e){return ra(e)&&lo(e)==j},Dr.isWeakSet=function(e){return ra(e)&&"[object WeakSet]"==An(e)},Dr.join=function(e,t){return null==e?"":pr.call(e,t)},Dr.kebabCase=Ha,Dr.last=Wo,Dr.lastIndexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var o=n;return r!==i&&(o=(o=ma(r))<0?gr(n+o,0):yr(o,n-1)),t==t?function(e,t,r){for(var n=r+1;n--;)if(e[n]===t)return n;return n}(e,t,o):It(e,Bt,o,!0)},Dr.lowerCase=Xa,Dr.lowerFirst=Ka,Dr.lt=ha,Dr.lte=la,Dr.max=function(e){return e&&e.length?pn(e,iu,En):i},Dr.maxBy=function(e,t){return e&&e.length?pn(e,so(t,2),En):i},Dr.mean=function(e){return Nt(e,iu)},Dr.meanBy=function(e,t){return Nt(e,so(t,2))},Dr.min=function(e){return e&&e.length?pn(e,iu,Nn):i},Dr.minBy=function(e,t){return e&&e.length?pn(e,so(t,2),Nn):i},Dr.stubArray=gu,Dr.stubFalse=yu,Dr.stubObject=function(){return{}},Dr.stubString=function(){return""},Dr.stubTrue=function(){return!0},Dr.multiply=Mu,Dr.nth=function(e,t){return e&&e.length?Un(e,ma(t)):i},Dr.noConflict=function(){return ot._===this&&(ot._=De),this},Dr.noop=cu,Dr.now=xs,Dr.pad=function(e,t,r){e=va(e);var n=(t=ma(t))?ir(e):0;if(!t||n>=t)return e;var i=(t-n)/2;return zi(fr(i),r)+e+zi(cr(i),r)},Dr.padEnd=function(e,t,r){e=va(e);var n=(t=ma(t))?ir(e):0;return t&&n<t?e+zi(t-n,r):e},Dr.padStart=function(e,t,r){e=va(e);var n=(t=ma(t))?ir(e):0;return t&&n<t?zi(t-n,r)+e:e},Dr.parseInt=function(e,t,r){return r||null==t?t=0:t&&(t=+t),vr(va(e).replace(ne,""),t||0)},Dr.random=function(e,t,r){if(r&&"boolean"!=typeof r&&bo(e,t,r)&&(t=r=i),r===i&&("boolean"==typeof t?(r=t,t=i):"boolean"==typeof e&&(r=e,e=i)),e===i&&t===i?(e=0,t=1):(e=pa(e),t===i?(t=e,e=0):t=pa(t)),e>t){var n=e;e=t,t=n}if(r||e%1||t%1){var o=wr();return yr(e+o*(t-e+tt("1e-"+((o+"").length-1))),t)}return Xn(e,t)},Dr.reduce=function(e,t,r){var n=Hs(e)?xt:Ft,i=arguments.length<3;return n(e,so(t,4),r,i,hn)},Dr.reduceRight=function(e,t,r){var n=Hs(e)?Tt:Ft,i=arguments.length<3;return n(e,so(t,4),r,i,ln)},Dr.repeat=function(e,t,r){return t=(r?bo(e,t,r):t===i)?1:ma(t),Kn(va(e),t)},Dr.replace=function(){var e=arguments,t=va(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Dr.result=function(e,t,r){var n=-1,o=(t=yi(t,e)).length;for(o||(o=1,e=i);++n<o;){var s=null==e?i:e[Do(t[n])];s===i&&(n=o,s=r),e=Ys(s)?s.call(e):s}return e},Dr.round=Au,Dr.runInContext=e,Dr.sample=function(e){return(Hs(e)?Zr:Zn)(e)},Dr.size=function(e){if(null==e)return 0;if(Ks(e))return ua(e)?ir(e):e.length;var t=lo(e);return t==S||t==x?e.size:Bn(e).length},Dr.snakeCase=Ja,Dr.some=function(e,t,r){var n=Hs(e)?Pt:ri;return r&&bo(e,t,r)&&(t=i),n(e,so(t,3))},Dr.sortedIndex=function(e,t){return ni(e,t)},Dr.sortedIndexBy=function(e,t,r){return ii(e,t,so(r,2))},Dr.sortedIndexOf=function(e,t){var r=null==e?0:e.length;if(r){var n=ni(e,t);if(n<r&&Us(e[n],t))return n}return-1},Dr.sortedLastIndex=function(e,t){return ni(e,t,!0)},Dr.sortedLastIndexBy=function(e,t,r){return ii(e,t,so(r,2),!0)},Dr.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var r=ni(e,t,!0)-1;if(Us(e[r],t))return r}return-1},Dr.startCase=Za,Dr.startsWith=function(e,t,r){return e=va(e),r=null==r?0:sn(ma(r),0,e.length),t=ai(t),e.slice(r,r+t.length)==t},Dr.subtract=Eu,Dr.sum=function(e){return e&&e.length?qt(e,iu):0},Dr.sumBy=function(e,t){return e&&e.length?qt(e,so(t,2)):0},Dr.template=function(e,t,r){var n=Dr.templateSettings;r&&bo(e,t,r)&&(t=i),e=va(e),t=Sa({},t,n,Gi);var o,s,a=Sa({},t.imports,n.imports,Gi),u=Ia(a),c=$t(a,u),f=0,h=t.interpolate||ve,l="__p += '",d=Ee((t.escape||ve).source+"|"+h.source+"|"+(h===W?he:ve).source+"|"+(t.evaluate||ve).source+"|$","g"),p="//# sourceURL="+(Re.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++We+"]")+"\n";e.replace(d,(function(t,r,n,i,a,u){return n||(n=i),l+=e.slice(f,u).replace(we,Wt),r&&(o=!0,l+="' +\n__e("+r+") +\n'"),a&&(s=!0,l+="';\n"+a+";\n__p += '"),n&&(l+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"),f=u+t.length,t})),l+="';\n";var m=Re.call(t,"variable")&&t.variable;if(m){if(ce.test(m))throw new _e("Invalid `variable` option passed into `_.template`")}else l="with (obj) {\n"+l+"\n}\n";l=(s?l.replace(z,""):l).replace(V,"$1").replace($,"$1;"),l="function("+(m||"obj")+") {\n"+(m?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(s?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+l+"return __p\n}";var g=Qa((function(){return Se(u,p+"return "+l).apply(i,c)}));if(g.source=l,Ws(g))throw g;return g},Dr.times=function(e,t){if((e=ma(e))<1||e>h)return[];var r=d,n=yr(e,d);t=so(t),e-=d;for(var i=Ut(n,t);++r<e;)t(r);return i},Dr.toFinite=pa,Dr.toInteger=ma,Dr.toLength=ga,Dr.toLower=function(e){return va(e).toLowerCase()},Dr.toNumber=ya,Dr.toSafeInteger=function(e){return e?sn(ma(e),-9007199254740991,h):0===e?e:0},Dr.toString=va,Dr.toUpper=function(e){return va(e).toUpperCase()},Dr.trim=function(e,t,r){if((e=va(e))&&(r||t===i))return zt(e);if(!e||!(t=ai(t)))return e;var n=or(e),o=or(t);return vi(n,Xt(n,o),Kt(n,o)+1).join("")},Dr.trimEnd=function(e,t,r){if((e=va(e))&&(r||t===i))return e.slice(0,sr(e)+1);if(!e||!(t=ai(t)))return e;var n=or(e);return vi(n,0,Kt(n,or(t))+1).join("")},Dr.trimStart=function(e,t,r){if((e=va(e))&&(r||t===i))return e.replace(ne,"");if(!e||!(t=ai(t)))return e;var n=or(e);return vi(n,Xt(n,or(t))).join("")},Dr.truncate=function(e,t){var r=30,n="...";if(ta(t)){var o="separator"in t?t.separator:o;r="length"in t?ma(t.length):r,n="omission"in t?ai(t.omission):n}var s=(e=va(e)).length;if(Yt(e)){var a=or(e);s=a.length}if(r>=s)return e;var u=r-ir(n);if(u<1)return n;var c=a?vi(a,0,u).join(""):e.slice(0,u);if(o===i)return c+n;if(a&&(u+=c.length-u),sa(o)){if(e.slice(u).search(o)){var f,h=c;for(o.global||(o=Ee(o.source,va(le.exec(o))+"g")),o.lastIndex=0;f=o.exec(h);)var l=f.index;c=c.slice(0,l===i?u:l)}}else if(e.indexOf(ai(o),u)!=u){var d=c.lastIndexOf(o);d>-1&&(c=c.slice(0,d))}return c+n},Dr.unescape=function(e){return(e=va(e))&&K.test(e)?e.replace(H,ar):e},Dr.uniqueId=function(e){var t=++Ce;return va(e)+t},Dr.upperCase=Ga,Dr.upperFirst=Wa,Dr.each=vs,Dr.eachRight=ws,Dr.first=Ko,uu(Dr,(bu={},vn(Dr,(function(e,t){Re.call(Dr.prototype,t)||(bu[t]=e)})),bu),{chain:!1}),Dr.VERSION="4.17.21",vt(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Dr[e].placeholder=Dr})),vt(["drop","take"],(function(e,t){zr.prototype[e]=function(r){r=r===i?1:gr(ma(r),0);var n=this.__filtered__&&!t?new zr(this):this.clone();return n.__filtered__?n.__takeCount__=yr(r,n.__takeCount__):n.__views__.push({size:yr(r,d),type:e+(n.__dir__<0?"Right":"")}),n},zr.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),vt(["filter","map","takeWhile"],(function(e,t){var r=t+1,n=1==r||3==r;zr.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:so(e,3),type:r}),t.__filtered__=t.__filtered__||n,t}})),vt(["head","last"],(function(e,t){var r="take"+(t?"Right":"");zr.prototype[e]=function(){return this[r](1).value()[0]}})),vt(["initial","tail"],(function(e,t){var r="drop"+(t?"":"Right");zr.prototype[e]=function(){return this.__filtered__?new zr(this):this[r](1)}})),zr.prototype.compact=function(){return this.filter(iu)},zr.prototype.find=function(e){return this.filter(e).head()},zr.prototype.findLast=function(e){return this.reverse().find(e)},zr.prototype.invokeMap=Jn((function(e,t){return"function"==typeof e?new zr(this):this.map((function(r){return Pn(r,e,t)}))})),zr.prototype.reject=function(e){return this.filter(Ns(so(e)))},zr.prototype.slice=function(e,t){e=ma(e);var r=this;return r.__filtered__&&(e>0||t<0)?new zr(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),t!==i&&(r=(t=ma(t))<0?r.dropRight(-t):r.take(t-e)),r)},zr.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},zr.prototype.toArray=function(){return this.take(d)},vn(zr.prototype,(function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),n=/^(?:head|last)$/.test(t),o=Dr[n?"take"+("last"==t?"Right":""):t],s=n||/^find/.test(t);o&&(Dr.prototype[t]=function(){var t=this.__wrapped__,a=n?[1]:arguments,u=t instanceof zr,c=a[0],f=u||Hs(t),h=function(e){var t=o.apply(Dr,Ot([e],a));return n&&l?t[0]:t};f&&r&&"function"==typeof c&&1!=c.length&&(u=f=!1);var l=this.__chain__,d=!!this.__actions__.length,p=s&&!l,m=u&&!d;if(!s&&f){t=m?t:new zr(this);var g=e.apply(t,a);return g.__actions__.push({func:ps,args:[h],thisArg:i}),new Ur(g,l)}return p&&m?e.apply(this,a):(g=this.thru(h),p?n?g.value()[0]:g.value():g)})})),vt(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Te[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",n=/^(?:pop|shift)$/.test(e);Dr.prototype[e]=function(){var e=arguments;if(n&&!this.__chain__){var i=this.value();return t.apply(Hs(i)?i:[],e)}return this[r]((function(r){return t.apply(Hs(r)?r:[],e)}))}})),vn(zr.prototype,(function(e,t){var r=Dr[t];if(r){var n=r.name+"";Re.call(Pr,n)||(Pr[n]=[]),Pr[n].push({name:t,func:r})}})),Pr[Di(i,2).name]=[{name:"wrapper",func:i}],zr.prototype.clone=function(){var e=new zr(this.__wrapped__);return e.__actions__=xi(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=xi(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=xi(this.__views__),e},zr.prototype.reverse=function(){if(this.__filtered__){var e=new zr(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},zr.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,r=Hs(e),n=t<0,i=r?e.length:0,o=function(e,t,r){for(var n=-1,i=r.length;++n<i;){var o=r[n],s=o.size;switch(o.type){case"drop":e+=s;break;case"dropRight":t-=s;break;case"take":t=yr(t,e+s);break;case"takeRight":e=gr(e,t-s)}}return{start:e,end:t}}(0,i,this.__views__),s=o.start,a=o.end,u=a-s,c=n?a:s-1,f=this.__iteratees__,h=f.length,l=0,d=yr(u,this.__takeCount__);if(!r||!n&&i==u&&d==u)return li(e,this.__actions__);var p=[];e:for(;u--&&l<d;){for(var m=-1,g=e[c+=t];++m<h;){var y=f[m],b=y.iteratee,v=y.type,w=b(g);if(2==v)g=w;else if(!w){if(1==v)continue e;break e}}p[l++]=g}return p},Dr.prototype.at=ms,Dr.prototype.chain=function(){return ds(this)},Dr.prototype.commit=function(){return new Ur(this.value(),this.__chain__)},Dr.prototype.next=function(){this.__values__===i&&(this.__values__=da(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?i:this.__values__[this.__index__++]}},Dr.prototype.plant=function(e){for(var t,r=this;r instanceof qr;){var n=qo(r);n.__index__=0,n.__values__=i,t?o.__wrapped__=n:t=n;var o=n;r=r.__wrapped__}return o.__wrapped__=e,t},Dr.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof zr){var t=e;return this.__actions__.length&&(t=new zr(this)),(t=t.reverse()).__actions__.push({func:ps,args:[ts],thisArg:i}),new Ur(t,this.__chain__)}return this.thru(ts)},Dr.prototype.toJSON=Dr.prototype.valueOf=Dr.prototype.value=function(){return li(this.__wrapped__,this.__actions__)},Dr.prototype.first=Dr.prototype.head,st&&(Dr.prototype[st]=function(){return this}),Dr}();ot._=ur,(n=function(){return ur}.call(t,r,t,e))===i||(e.exports=n)}.call(this)},2318:(e,t,r)=>{"use strict";var n=r(5717),i=r(3349),o=r(9509).Buffer,s=new Array(16);function a(){i.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function u(e,t){return e<<t|e>>>32-t}function c(e,t,r,n,i,o,s){return u(e+(t&r|~t&n)+i+o|0,s)+t|0}function f(e,t,r,n,i,o,s){return u(e+(t&n|r&~n)+i+o|0,s)+t|0}function h(e,t,r,n,i,o,s){return u(e+(t^r^n)+i+o|0,s)+t|0}function l(e,t,r,n,i,o,s){return u(e+(r^(t|~n))+i+o|0,s)+t|0}n(a,i),a.prototype._update=function(){for(var e=s,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);var r=this._a,n=this._b,i=this._c,o=this._d;r=c(r,n,i,o,e[0],3614090360,7),o=c(o,r,n,i,e[1],3905402710,12),i=c(i,o,r,n,e[2],606105819,17),n=c(n,i,o,r,e[3],3250441966,22),r=c(r,n,i,o,e[4],4118548399,7),o=c(o,r,n,i,e[5],1200080426,12),i=c(i,o,r,n,e[6],2821735955,17),n=c(n,i,o,r,e[7],4249261313,22),r=c(r,n,i,o,e[8],1770035416,7),o=c(o,r,n,i,e[9],2336552879,12),i=c(i,o,r,n,e[10],4294925233,17),n=c(n,i,o,r,e[11],2304563134,22),r=c(r,n,i,o,e[12],1804603682,7),o=c(o,r,n,i,e[13],4254626195,12),i=c(i,o,r,n,e[14],2792965006,17),r=f(r,n=c(n,i,o,r,e[15],1236535329,22),i,o,e[1],4129170786,5),o=f(o,r,n,i,e[6],3225465664,9),i=f(i,o,r,n,e[11],643717713,14),n=f(n,i,o,r,e[0],3921069994,20),r=f(r,n,i,o,e[5],3593408605,5),o=f(o,r,n,i,e[10],38016083,9),i=f(i,o,r,n,e[15],3634488961,14),n=f(n,i,o,r,e[4],3889429448,20),r=f(r,n,i,o,e[9],568446438,5),o=f(o,r,n,i,e[14],3275163606,9),i=f(i,o,r,n,e[3],4107603335,14),n=f(n,i,o,r,e[8],1163531501,20),r=f(r,n,i,o,e[13],2850285829,5),o=f(o,r,n,i,e[2],4243563512,9),i=f(i,o,r,n,e[7],1735328473,14),r=h(r,n=f(n,i,o,r,e[12],2368359562,20),i,o,e[5],4294588738,4),o=h(o,r,n,i,e[8],2272392833,11),i=h(i,o,r,n,e[11],1839030562,16),n=h(n,i,o,r,e[14],4259657740,23),r=h(r,n,i,o,e[1],2763975236,4),o=h(o,r,n,i,e[4],1272893353,11),i=h(i,o,r,n,e[7],4139469664,16),n=h(n,i,o,r,e[10],3200236656,23),r=h(r,n,i,o,e[13],681279174,4),o=h(o,r,n,i,e[0],3936430074,11),i=h(i,o,r,n,e[3],3572445317,16),n=h(n,i,o,r,e[6],76029189,23),r=h(r,n,i,o,e[9],3654602809,4),o=h(o,r,n,i,e[12],3873151461,11),i=h(i,o,r,n,e[15],530742520,16),r=l(r,n=h(n,i,o,r,e[2],3299628645,23),i,o,e[0],4096336452,6),o=l(o,r,n,i,e[7],1126891415,10),i=l(i,o,r,n,e[14],2878612391,15),n=l(n,i,o,r,e[5],4237533241,21),r=l(r,n,i,o,e[12],1700485571,6),o=l(o,r,n,i,e[3],2399980690,10),i=l(i,o,r,n,e[10],4293915773,15),n=l(n,i,o,r,e[1],2240044497,21),r=l(r,n,i,o,e[8],1873313359,6),o=l(o,r,n,i,e[15],4264355552,10),i=l(i,o,r,n,e[6],2734768916,15),n=l(n,i,o,r,e[13],1309151649,21),r=l(r,n,i,o,e[4],4149444226,6),o=l(o,r,n,i,e[11],3174756917,10),i=l(i,o,r,n,e[2],718787259,15),n=l(n,i,o,r,e[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+n|0,this._c=this._c+i|0,this._d=this._d+o|0},a.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=o.allocUnsafe(16);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e},e.exports=a},3047:(e,t,r)=>{var n=r(3550),i=r(9931);function o(e){this.rand=e||new i.Rand}e.exports=o,o.create=function(e){return new o(e)},o.prototype._randbelow=function(e){var t=e.bitLength(),r=Math.ceil(t/8);do{var i=new n(this.rand.generate(r))}while(i.cmp(e)>=0);return i},o.prototype._randrange=function(e,t){var r=t.sub(e);return e.add(this._randbelow(r))},o.prototype.test=function(e,t,r){var i=e.bitLength(),o=n.mont(e),s=new n(1).toRed(o);t||(t=Math.max(1,i/48|0));for(var a=e.subn(1),u=0;!a.testn(u);u++);for(var c=e.shrn(u),f=a.toRed(o);t>0;t--){var h=this._randrange(new n(2),a);r&&r(h);var l=h.toRed(o).redPow(c);if(0!==l.cmp(s)&&0!==l.cmp(f)){for(var d=1;d<u;d++){if(0===(l=l.redSqr()).cmp(s))return!1;if(0===l.cmp(f))break}if(d===u)return!1}}return!0},o.prototype.getDivisor=function(e,t){var r=e.bitLength(),i=n.mont(e),o=new n(1).toRed(i);t||(t=Math.max(1,r/48|0));for(var s=e.subn(1),a=0;!s.testn(a);a++);for(var u=e.shrn(a),c=s.toRed(i);t>0;t--){var f=this._randrange(new n(2),s),h=e.gcd(f);if(0!==h.cmpn(1))return h;var l=f.toRed(i).redPow(u);if(0!==l.cmp(o)&&0!==l.cmp(c)){for(var d=1;d<a;d++){if(0===(l=l.redSqr()).cmp(o))return l.fromRed().subn(1).gcd(e);if(0===l.cmp(c))break}if(d===a)return(l=l.redSqr()).fromRed().subn(1).gcd(e)}}return!1}},9746:e=>{function t(e,t){if(!e)throw new Error(t||"Assertion failed")}e.exports=t,t.equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)}},4504:(e,t)=>{"use strict";var r=t;function n(e){return 1===e.length?"0"+e:e}function i(e){for(var t="",r=0;r<e.length;r++)t+=n(e[r].toString(16));return t}r.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"!=typeof e){for(var n=0;n<e.length;n++)r[n]=0|e[n];return r}if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),n=0;n<e.length;n+=2)r.push(parseInt(e[n]+e[n+1],16));else for(n=0;n<e.length;n++){var i=e.charCodeAt(n),o=i>>8,s=255&i;o?r.push(o,s):r.push(s)}return r},r.zero2=n,r.toHex=i,r.encode=function(e,t){return"hex"===t?i(e):e}},4244:e=>{"use strict";var t=function(e){return e!=e};e.exports=function(e,r){return 0===e&&0===r?1/e==1/r:e===r||!(!t(e)||!t(r))}},609:(e,t,r)=>{"use strict";var n=r(4289),i=r(5559),o=r(4244),s=r(5624),a=r(2281),u=i(s(),Object);n(u,{getPolyfill:s,implementation:o,shim:a}),e.exports=u},5624:(e,t,r)=>{"use strict";var n=r(4244);e.exports=function(){return"function"==typeof Object.is?Object.is:n}},2281:(e,t,r)=>{"use strict";var n=r(5624),i=r(4289);e.exports=function(){var e=n();return i(Object,{is:e},{is:function(){return Object.is!==e}}),e}},8987:(e,t,r)=>{"use strict";var n;if(!Object.keys){var i=Object.prototype.hasOwnProperty,o=Object.prototype.toString,s=r(1414),a=Object.prototype.propertyIsEnumerable,u=!a.call({toString:null},"toString"),c=a.call((function(){}),"prototype"),f=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],h=function(e){var t=e.constructor;return t&&t.prototype===e},l={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},d=function(){if("undefined"==typeof window)return!1;for(var e in window)try{if(!l["$"+e]&&i.call(window,e)&&null!==window[e]&&"object"==typeof window[e])try{h(window[e])}catch(e){return!0}}catch(e){return!0}return!1}();n=function(e){var t=null!==e&&"object"==typeof e,r="[object Function]"===o.call(e),n=s(e),a=t&&"[object String]"===o.call(e),l=[];if(!t&&!r&&!n)throw new TypeError("Object.keys called on a non-object");var p=c&&r;if(a&&e.length>0&&!i.call(e,0))for(var m=0;m<e.length;++m)l.push(String(m));if(n&&e.length>0)for(var g=0;g<e.length;++g)l.push(String(g));else for(var y in e)p&&"prototype"===y||!i.call(e,y)||l.push(String(y));if(u)for(var b=function(e){if("undefined"==typeof window||!d)return h(e);try{return h(e)}catch(e){return!1}}(e),v=0;v<f.length;++v)b&&"constructor"===f[v]||!i.call(e,f[v])||l.push(f[v]);return l}}e.exports=n},2215:(e,t,r)=>{"use strict";var n=Array.prototype.slice,i=r(1414),o=Object.keys,s=o?function(e){return o(e)}:r(8987),a=Object.keys;s.shim=function(){return Object.keys?function(){var e=Object.keys(arguments);return e&&e.length===arguments.length}(1,2)||(Object.keys=function(e){return i(e)?a(n.call(e)):a(e)}):Object.keys=s,Object.keys||s},e.exports=s},1414:e=>{"use strict";var t=Object.prototype.toString;e.exports=function(e){var r=t.call(e),n="[object Arguments]"===r;return n||(n="[object Array]"!==r&&null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Function]"===t.call(e.callee)),n}},2818:(e,t,r)=>{"use strict";var n=r(7824);t.certificate=r(1934);var i=n.define("RSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())}));t.RSAPrivateKey=i;var o=n.define("RSAPublicKey",(function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())}));t.RSAPublicKey=o;var s=n.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(a),this.key("subjectPublicKey").bitstr())}));t.PublicKey=s;var a=n.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())})),u=n.define("PrivateKeyInfo",(function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(a),this.key("subjectPrivateKey").octstr())}));t.PrivateKey=u;var c=n.define("EncryptedPrivateKeyInfo",(function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())}));t.EncryptedPrivateKey=c;var f=n.define("DSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())}));t.DSAPrivateKey=f,t.DSAparam=n.define("DSAparam",(function(){this.int()}));var h=n.define("ECPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(l),this.key("publicKey").optional().explicit(1).bitstr())}));t.ECPrivateKey=h;var l=n.define("ECParameters",(function(){this.choice({namedCurve:this.objid()})}));t.signature=n.define("signature",(function(){this.seq().obj(this.key("r").int(),this.key("s").int())}))},1934:(e,t,r)=>{"use strict";var n=r(7824),i=n.define("Time",(function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})})),o=n.define("AttributeTypeValue",(function(){this.seq().obj(this.key("type").objid(),this.key("value").any())})),s=n.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())})),a=n.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(s),this.key("subjectPublicKey").bitstr())})),u=n.define("RelativeDistinguishedName",(function(){this.setof(o)})),c=n.define("RDNSequence",(function(){this.seqof(u)})),f=n.define("Name",(function(){this.choice({rdnSequence:this.use(c)})})),h=n.define("Validity",(function(){this.seq().obj(this.key("notBefore").use(i),this.key("notAfter").use(i))})),l=n.define("Extension",(function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())})),d=n.define("TBSCertificate",(function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(s),this.key("issuer").use(f),this.key("validity").use(h),this.key("subject").use(f),this.key("subjectPublicKeyInfo").use(a),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(l).optional())})),p=n.define("X509Certificate",(function(){this.seq().obj(this.key("tbsCertificate").use(d),this.key("signatureAlgorithm").use(s),this.key("signatureValue").bitstr())}));e.exports=p},7631:(e,t,r)=>{var n=/Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r+/=]+)[\n\r]+/m,i=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,o=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,s=r(3048),a=r(4696),u=r(9509).Buffer;e.exports=function(e,t){var r,c=e.toString(),f=c.match(n);if(f){var h="aes"+f[1],l=u.from(f[2],"hex"),d=u.from(f[3].replace(/[\r\n]/g,""),"base64"),p=s(t,l.slice(0,8),parseInt(f[1],10)).key,m=[],g=a.createDecipheriv(h,p,l);m.push(g.update(d)),m.push(g.final()),r=u.concat(m)}else{var y=c.match(o);r=u.from(y[2].replace(/[\r\n]/g,""),"base64")}return{tag:c.match(i)[1],data:r}}},980:(e,t,r)=>{var n=r(2818),i=r(2562),o=r(7631),s=r(4696),a=r(5632),u=r(9509).Buffer;function c(e){var t;"object"!=typeof e||u.isBuffer(e)||(t=e.passphrase,e=e.key),"string"==typeof e&&(e=u.from(e));var r,c,f=o(e,t),h=f.tag,l=f.data;switch(h){case"CERTIFICATE":c=n.certificate.decode(l,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(c||(c=n.PublicKey.decode(l,"der")),r=c.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return n.RSAPublicKey.decode(c.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return c.subjectPrivateKey=c.subjectPublicKey,{type:"ec",data:c};case"1.2.840.10040.4.1":return c.algorithm.params.pub_key=n.DSAparam.decode(c.subjectPublicKey.data,"der"),{type:"dsa",data:c.algorithm.params};default:throw new Error("unknown key id "+r)}case"ENCRYPTED PRIVATE KEY":l=function(e,t){var r=e.algorithm.decrypt.kde.kdeparams.salt,n=parseInt(e.algorithm.decrypt.kde.kdeparams.iters.toString(),10),o=i[e.algorithm.decrypt.cipher.algo.join(".")],c=e.algorithm.decrypt.cipher.iv,f=e.subjectPrivateKey,h=parseInt(o.split("-")[1],10)/8,l=a.pbkdf2Sync(t,r,n,h,"sha1"),d=s.createDecipheriv(o,l,c),p=[];return p.push(d.update(f)),p.push(d.final()),u.concat(p)}(l=n.EncryptedPrivateKey.decode(l,"der"),t);case"PRIVATE KEY":switch(r=(c=n.PrivateKey.decode(l,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return n.RSAPrivateKey.decode(c.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:c.algorithm.curve,privateKey:n.ECPrivateKey.decode(c.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return c.algorithm.params.priv_key=n.DSAparam.decode(c.subjectPrivateKey,"der"),{type:"dsa",params:c.algorithm.params};default:throw new Error("unknown key id "+r)}case"RSA PUBLIC KEY":return n.RSAPublicKey.decode(l,"der");case"RSA PRIVATE KEY":return n.RSAPrivateKey.decode(l,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:n.DSAPrivateKey.decode(l,"der")};case"EC PRIVATE KEY":return{curve:(l=n.ECPrivateKey.decode(l,"der")).parameters.value,privateKey:l.privateKey};default:throw new Error("unknown key type "+h)}}e.exports=c,c.signature=n.signature},5632:(e,t,r)=>{t.pbkdf2=r(8638),t.pbkdf2Sync=r(1257)},8638:(e,t,r)=>{var n,i,o=r(9509).Buffer,s=r(7357),a=r(2368),u=r(1257),c=r(7777),f=r.g.crypto&&r.g.crypto.subtle,h={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},l=[];function d(){return i||(i=r.g.process&&r.g.process.nextTick?r.g.process.nextTick:r.g.queueMicrotask?r.g.queueMicrotask:r.g.setImmediate?r.g.setImmediate:r.g.setTimeout)}function p(e,t,r,n,i){return f.importKey("raw",e,{name:"PBKDF2"},!1,["deriveBits"]).then((function(e){return f.deriveBits({name:"PBKDF2",salt:t,iterations:r,hash:{name:i}},e,n<<3)})).then((function(e){return o.from(e)}))}e.exports=function(e,t,i,m,g,y){"function"==typeof g&&(y=g,g=void 0);var b=h[(g=g||"sha1").toLowerCase()];if(b&&"function"==typeof r.g.Promise){if(s(i,m),e=c(e,a,"Password"),t=c(t,a,"Salt"),"function"!=typeof y)throw new Error("No callback provided to pbkdf2");!function(e,t){e.then((function(e){d()((function(){t(null,e)}))}),(function(e){d()((function(){t(e)}))}))}(function(e){if(r.g.process&&!r.g.process.browser)return Promise.resolve(!1);if(!f||!f.importKey||!f.deriveBits)return Promise.resolve(!1);if(void 0!==l[e])return l[e];var t=p(n=n||o.alloc(8),n,10,128,e).then((function(){return!0})).catch((function(){return!1}));return l[e]=t,t}(b).then((function(r){return r?p(e,t,i,m,b):u(e,t,i,m,g)})),y)}else d()((function(){var r;try{r=u(e,t,i,m,g)}catch(e){return y(e)}y(null,r)}))}},2368:(e,t,r)=>{var n,i=r(4155);n=r.g.process&&r.g.process.browser?"utf-8":r.g.process&&r.g.process.version?parseInt(i.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary":"utf-8",e.exports=n},7357:e=>{var t=Math.pow(2,30)-1;e.exports=function(e,r){if("number"!=typeof e)throw new TypeError("Iterations not a number");if(e<0)throw new TypeError("Bad iterations");if("number"!=typeof r)throw new TypeError("Key length not a number");if(r<0||r>t||r!=r)throw new TypeError("Bad key length")}},1257:(e,t,r)=>{var n=r(8028),i=r(9785),o=r(9072),s=r(9509).Buffer,a=r(7357),u=r(2368),c=r(7777),f=s.alloc(128),h={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function l(e,t,r){var a=function(e){return"rmd160"===e||"ripemd160"===e?function(e){return(new i).update(e).digest()}:"md5"===e?n:function(t){return o(e).update(t).digest()}}(e),u="sha512"===e||"sha384"===e?128:64;t.length>u?t=a(t):t.length<u&&(t=s.concat([t,f],u));for(var c=s.allocUnsafe(u+h[e]),l=s.allocUnsafe(u+h[e]),d=0;d<u;d++)c[d]=54^t[d],l[d]=92^t[d];var p=s.allocUnsafe(u+r+4);c.copy(p,0,0,u),this.ipad1=p,this.ipad2=c,this.opad=l,this.alg=e,this.blocksize=u,this.hash=a,this.size=h[e]}l.prototype.run=function(e,t){return e.copy(t,this.blocksize),this.hash(t).copy(this.opad,this.blocksize),this.hash(this.opad)},e.exports=function(e,t,r,n,i){a(r,n);var o=new l(i=i||"sha1",e=c(e,u,"Password"),(t=c(t,u,"Salt")).length),f=s.allocUnsafe(n),d=s.allocUnsafe(t.length+4);t.copy(d,0,0,t.length);for(var p=0,m=h[i],g=Math.ceil(n/m),y=1;y<=g;y++){d.writeUInt32BE(y,t.length);for(var b=o.run(d,o.ipad1),v=b,w=1;w<r;w++){v=o.run(v,o.ipad2);for(var _=0;_<m;_++)b[_]^=v[_]}b.copy(f,p),p+=m}return f}},7777:(e,t,r)=>{var n=r(9509).Buffer;e.exports=function(e,t,r){if(n.isBuffer(e))return e;if("string"==typeof e)return n.from(e,t);if(ArrayBuffer.isView(e))return n.from(e.buffer);throw new TypeError(r+" must be a string, a Buffer, a typed array or a DataView")}},4155:e=>{var t,r,n=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function s(e){if(t===setTimeout)return setTimeout(e,0);if((t===i||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:i}catch(e){t=i}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(e){r=o}}();var a,u=[],c=!1,f=-1;function h(){c&&a&&(c=!1,a.length?u=a.concat(u):f=-1,u.length&&l())}function l(){if(!c){var e=s(h);c=!0;for(var t=u.length;t;){for(a=u,u=[];++f<t;)a&&a[f].run();f=-1,t=u.length}a=null,c=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===o||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function d(e,t){this.fun=e,this.array=t}function p(){}n.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];u.push(new d(e,t)),1!==u.length||c||s(l)},d.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=p,n.addListener=p,n.once=p,n.off=p,n.removeListener=p,n.removeAllListeners=p,n.emit=p,n.prependListener=p,n.prependOnceListener=p,n.listeners=function(e){return[]},n.binding=function(e){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(e){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}},7900:(e,t,r)=>{t.publicEncrypt=r(6559),t.privateDecrypt=r(6138),t.privateEncrypt=function(e,r){return t.publicEncrypt(e,r,!0)},t.publicDecrypt=function(e,r){return t.privateDecrypt(e,r,!0)}},9199:(e,t,r)=>{var n=r(3482),i=r(9509).Buffer;function o(e){var t=i.allocUnsafe(4);return t.writeUInt32BE(e,0),t}e.exports=function(e,t){for(var r,s=i.alloc(0),a=0;s.length<t;)r=o(a++),s=i.concat([s,n("sha1").update(e).update(r).digest()]);return s.slice(0,t)}},6138:(e,t,r)=>{var n=r(980),i=r(9199),o=r(7859),s=r(3550),a=r(3663),u=r(3482),c=r(4818),f=r(9509).Buffer;e.exports=function(e,t,r){var h;h=e.padding?e.padding:r?1:4;var l,d=n(e),p=d.modulus.byteLength();if(t.length>p||new s(t).cmp(d.modulus)>=0)throw new Error("decryption error");l=r?c(new s(t),d):a(t,d);var m=f.alloc(p-l.length);if(l=f.concat([m,l],p),4===h)return function(e,t){var r=e.modulus.byteLength(),n=u("sha1").update(f.alloc(0)).digest(),s=n.length;if(0!==t[0])throw new Error("decryption error");var a=t.slice(1,s+1),c=t.slice(s+1),h=o(a,i(c,s)),l=o(c,i(h,r-s-1));if(function(e,t){e=f.from(e),t=f.from(t);var r=0,n=e.length;e.length!==t.length&&(r++,n=Math.min(e.length,t.length));for(var i=-1;++i<n;)r+=e[i]^t[i];return r}(n,l.slice(0,s)))throw new Error("decryption error");for(var d=s;0===l[d];)d++;if(1!==l[d++])throw new Error("decryption error");return l.slice(d)}(d,l);if(1===h)return function(e,t,r){for(var n=t.slice(0,2),i=2,o=0;0!==t[i++];)if(i>=t.length){o++;break}var s=t.slice(2,i-1);if(("0002"!==n.toString("hex")&&!r||"0001"!==n.toString("hex")&&r)&&o++,s.length<8&&o++,o)throw new Error("decryption error");return t.slice(i)}(0,l,r);if(3===h)return l;throw new Error("unknown padding")}},6559:(e,t,r)=>{var n=r(980),i=r(1798),o=r(3482),s=r(9199),a=r(7859),u=r(3550),c=r(4818),f=r(3663),h=r(9509).Buffer;e.exports=function(e,t,r){var l;l=e.padding?e.padding:r?1:4;var d,p=n(e);if(4===l)d=function(e,t){var r=e.modulus.byteLength(),n=t.length,c=o("sha1").update(h.alloc(0)).digest(),f=c.length,l=2*f;if(n>r-l-2)throw new Error("message too long");var d=h.alloc(r-n-l-2),p=r-f-1,m=i(f),g=a(h.concat([c,d,h.alloc(1,1),t],p),s(m,p)),y=a(m,s(g,f));return new u(h.concat([h.alloc(1),y,g],r))}(p,t);else if(1===l)d=function(e,t,r){var n,o=t.length,s=e.modulus.byteLength();if(o>s-11)throw new Error("message too long");return n=r?h.alloc(s-o-3,255):function(e){for(var t,r=h.allocUnsafe(e),n=0,o=i(2*e),s=0;n<e;)s===o.length&&(o=i(2*e),s=0),(t=o[s++])&&(r[n++]=t);return r}(s-o-3),new u(h.concat([h.from([0,r?1:2]),n,h.alloc(1),t],s))}(p,t,r);else{if(3!==l)throw new Error("unknown padding");if((d=new u(t)).cmp(p.modulus)>=0)throw new Error("data too long for modulus")}return r?f(d,p):c(d,p)}},4818:(e,t,r)=>{var n=r(3550),i=r(9509).Buffer;e.exports=function(e,t){return i.from(e.toRed(n.mont(t.modulus)).redPow(new n(t.publicExponent)).fromRed().toArray())}},7859:e=>{e.exports=function(e,t){for(var r=e.length,n=-1;++n<r;)e[n]^=t[n];return e}},4971:function(e,t,r){var n;e=r.nmd(e),function(i){t&&t.nodeType,e&&e.nodeType;var o="object"==typeof r.g&&r.g;o.global!==o&&o.window!==o&&o.self;var s,a=2147483647,u=36,c=/^xn--/,f=/[^\x20-\x7E]/,h=/[\x2E\u3002\uFF0E\uFF61]/g,l={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},d=Math.floor,p=String.fromCharCode;function m(e){throw RangeError(l[e])}function g(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}function y(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),n+g((e=e.replace(h,".")).split("."),t).join(".")}function b(e){for(var t,r,n=[],i=0,o=e.length;i<o;)(t=e.charCodeAt(i++))>=55296&&t<=56319&&i<o?56320==(64512&(r=e.charCodeAt(i++)))?n.push(((1023&t)<<10)+(1023&r)+65536):(n.push(t),i--):n.push(t);return n}function v(e){return g(e,(function(e){var t="";return e>65535&&(t+=p((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+p(e)})).join("")}function w(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function _(e,t,r){var n=0;for(e=r?d(e/700):e>>1,e+=d(e/t);e>455;n+=u)e=d(e/35);return d(n+36*e/(e+38))}function S(e){var t,r,n,i,o,s,c,f,h,l,p,g=[],y=e.length,b=0,w=128,S=72;for((r=e.lastIndexOf("-"))<0&&(r=0),n=0;n<r;++n)e.charCodeAt(n)>=128&&m("not-basic"),g.push(e.charCodeAt(n));for(i=r>0?r+1:0;i<y;){for(o=b,s=1,c=u;i>=y&&m("invalid-input"),((f=(p=e.charCodeAt(i++))-48<10?p-22:p-65<26?p-65:p-97<26?p-97:u)>=u||f>d((a-b)/s))&&m("overflow"),b+=f*s,!(f<(h=c<=S?1:c>=S+26?26:c-S));c+=u)s>d(a/(l=u-h))&&m("overflow"),s*=l;S=_(b-o,t=g.length+1,0==o),d(b/t)>a-w&&m("overflow"),w+=d(b/t),b%=t,g.splice(b++,0,w)}return v(g)}function M(e){var t,r,n,i,o,s,c,f,h,l,g,y,v,S,M,A=[];for(y=(e=b(e)).length,t=128,r=0,o=72,s=0;s<y;++s)(g=e[s])<128&&A.push(p(g));for(n=i=A.length,i&&A.push("-");n<y;){for(c=a,s=0;s<y;++s)(g=e[s])>=t&&g<c&&(c=g);for(c-t>d((a-r)/(v=n+1))&&m("overflow"),r+=(c-t)*v,t=c,s=0;s<y;++s)if((g=e[s])<t&&++r>a&&m("overflow"),g==t){for(f=r,h=u;!(f<(l=h<=o?1:h>=o+26?26:h-o));h+=u)M=f-l,S=u-l,A.push(p(w(l+M%S,0))),f=d(M/S);A.push(p(w(f,0))),o=_(r,v,n==i),r=0,++n}++r,++t}return A.join("")}s={version:"1.3.2",ucs2:{decode:b,encode:v},decode:S,encode:M,toASCII:function(e){return y(e,(function(e){return f.test(e)?"xn--"+M(e):e}))},toUnicode:function(e){return y(e,(function(e){return c.test(e)?S(e.slice(4).toLowerCase()):e}))}},void 0===(n=function(){return s}.call(t,r,t,e))||(e.exports=n)}()},2587:e=>{"use strict";function t(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,r,n,i){r=r||"&",n=n||"=";var o={};if("string"!=typeof e||0===e.length)return o;var s=/\+/g;e=e.split(r);var a=1e3;i&&"number"==typeof i.maxKeys&&(a=i.maxKeys);var u=e.length;a>0&&u>a&&(u=a);for(var c=0;c<u;++c){var f,h,l,d,p=e[c].replace(s,"%20"),m=p.indexOf(n);m>=0?(f=p.substr(0,m),h=p.substr(m+1)):(f=p,h=""),l=decodeURIComponent(f),d=decodeURIComponent(h),t(o,l)?Array.isArray(o[l])?o[l].push(d):o[l]=[o[l],d]:o[l]=d}return o}},2361:e=>{"use strict";var t=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,r,n,i){return r=r||"&",n=n||"=",null===e&&(e=void 0),"object"==typeof e?Object.keys(e).map((function(i){var o=encodeURIComponent(t(i))+n;return Array.isArray(e[i])?e[i].map((function(e){return o+encodeURIComponent(t(e))})).join(r):o+encodeURIComponent(t(e[i]))})).join(r):i?encodeURIComponent(t(i))+n+encodeURIComponent(t(e)):""}},7673:(e,t,r)=>{"use strict";t.decode=t.parse=r(2587),t.encode=t.stringify=r(2361)},1798:(e,t,r)=>{"use strict";var n=r(4155),i=65536,o=r(9509).Buffer,s=r.g.crypto||r.g.msCrypto;s&&s.getRandomValues?e.exports=function(e,t){if(e>4294967295)throw new RangeError("requested too many random bytes");var r=o.allocUnsafe(e);if(e>0)if(e>i)for(var a=0;a<e;a+=i)s.getRandomValues(r.slice(a,a+i));else s.getRandomValues(r);return"function"==typeof t?n.nextTick((function(){t(null,r)})):r}:e.exports=function(){throw new Error("Secure random number generation is not supported by this browser.\nUse Chrome, Firefox or Internet Explorer 11")}},7963:(e,t,r)=>{"use strict";var n=r(4155);function i(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}var o=r(9509),s=r(1798),a=o.Buffer,u=o.kMaxLength,c=r.g.crypto||r.g.msCrypto,f=Math.pow(2,32)-1;function h(e,t){if("number"!=typeof e||e!=e)throw new TypeError("offset must be a number");if(e>f||e<0)throw new TypeError("offset must be a uint32");if(e>u||e>t)throw new RangeError("offset out of range")}function l(e,t,r){if("number"!=typeof e||e!=e)throw new TypeError("size must be a number");if(e>f||e<0)throw new TypeError("size must be a uint32");if(e+t>r||e>u)throw new RangeError("buffer too small")}function d(e,t,r,i){if(n.browser){var o=e.buffer,a=new Uint8Array(o,t,r);return c.getRandomValues(a),i?void n.nextTick((function(){i(null,e)})):e}if(!i)return s(r).copy(e,t),e;s(r,(function(r,n){if(r)return i(r);n.copy(e,t),i(null,e)}))}c&&c.getRandomValues||!n.browser?(t.randomFill=function(e,t,n,i){if(!(a.isBuffer(e)||e instanceof r.g.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"==typeof t)i=t,t=0,n=e.length;else if("function"==typeof n)i=n,n=e.length-t;else if("function"!=typeof i)throw new TypeError('"cb" argument must be a function');return h(t,e.length),l(n,t,e.length),d(e,t,n,i)},t.randomFillSync=function(e,t,n){if(void 0===t&&(t=0),!(a.isBuffer(e)||e instanceof r.g.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');return h(t,e.length),void 0===n&&(n=e.length-t),l(n,t,e.length),d(e,t,n)}):(t.randomFill=i,t.randomFillSync=i)},4281:e=>{"use strict";var t={};function r(e,r,n){n||(n=Error);var i=function(e){var t,n;function i(t,n,i){return e.call(this,function(e,t,n){return"string"==typeof r?r:r(e,t,n)}(t,n,i))||this}return n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,i}(n);i.prototype.name=n.name,i.prototype.code=e,t[e]=i}function n(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map((function(e){return String(e)})),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}r("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),r("ERR_INVALID_ARG_TYPE",(function(e,t,r){var i,o,s,a,u;if("string"==typeof t&&(o="not ",t.substr(0,o.length)===o)?(i="must not be",t=t.replace(/^not /,"")):i="must be",function(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}(e," argument"))s="The ".concat(e," ").concat(i," ").concat(n(t,"type"));else{var c=("number"!=typeof u&&(u=0),u+".".length>(a=e).length||-1===a.indexOf(".",u)?"argument":"property");s='The "'.concat(e,'" ').concat(c," ").concat(i," ").concat(n(t,"type"))}return s+". Received type ".concat(typeof r)}),TypeError),r("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),r("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),r("ERR_STREAM_PREMATURE_CLOSE","Premature close"),r("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),r("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),r("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),r("ERR_STREAM_WRITE_AFTER_END","write after end"),r("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),r("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),r("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.q=t},6753:(e,t,r)=>{"use strict";var n=r(4155),i=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=f;var o=r(9481),s=r(4229);r(5717)(f,o);for(var a=i(s.prototype),u=0;u<a.length;u++){var c=a[u];f.prototype[c]||(f.prototype[c]=s.prototype[c])}function f(e){if(!(this instanceof f))return new f(e);o.call(this,e),s.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",h)))}function h(){this._writableState.ended||n.nextTick(l,this)}function l(e){e.end()}Object.defineProperty(f.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(f.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(f.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(f.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}})},2725:(e,t,r)=>{"use strict";e.exports=i;var n=r(4605);function i(e){if(!(this instanceof i))return new i(e);n.call(this,e)}r(5717)(i,n),i.prototype._transform=function(e,t,r){r(null,e)}},9481:(e,t,r)=>{"use strict";var n,i=r(4155);e.exports=E,E.ReadableState=A,r(7187).EventEmitter;var o,s=function(e,t){return e.listeners(t).length},a=r(2503),u=r(8764).Buffer,c=r.g.Uint8Array||function(){},f=r(4616);o=f&&f.debuglog?f.debuglog("stream"):function(){};var h,l,d,p=r(7327),m=r(1195),g=r(2457).getHighWaterMark,y=r(4281).q,b=y.ERR_INVALID_ARG_TYPE,v=y.ERR_STREAM_PUSH_AFTER_EOF,w=y.ERR_METHOD_NOT_IMPLEMENTED,_=y.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;r(5717)(E,a);var S=m.errorOrDestroy,M=["error","close","destroy","pause","resume"];function A(e,t,i){n=n||r(6753),e=e||{},"boolean"!=typeof i&&(i=t instanceof n),this.objectMode=!!e.objectMode,i&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=g(this,e,"readableHighWaterMark",i),this.buffer=new p,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(h||(h=r(2553).s),this.decoder=new h(e.encoding),this.encoding=e.encoding)}function E(e){if(n=n||r(6753),!(this instanceof E))return new E(e);var t=this instanceof n;this._readableState=new A(e,this,t),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),a.call(this)}function O(e,t,r,n,i){o("readableAddChunk",t);var s,a=e._readableState;if(null===t)a.reading=!1,function(e,t){if(o("onEofChunk"),!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?j(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,k(e)))}}(e,a);else if(i||(s=function(e,t){var r,n;return n=t,u.isBuffer(n)||n instanceof c||"string"==typeof t||void 0===t||e.objectMode||(r=new b("chunk",["string","Buffer","Uint8Array"],t)),r}(a,t)),s)S(e,s);else if(a.objectMode||t&&t.length>0)if("string"==typeof t||a.objectMode||Object.getPrototypeOf(t)===u.prototype||(t=function(e){return u.from(e)}(t)),n)a.endEmitted?S(e,new _):x(e,a,t,!0);else if(a.ended)S(e,new v);else{if(a.destroyed)return!1;a.reading=!1,a.decoder&&!r?(t=a.decoder.write(t),a.objectMode||0!==t.length?x(e,a,t,!1):I(e,a)):x(e,a,t,!1)}else n||(a.reading=!1,I(e,a));return!a.ended&&(a.length<a.highWaterMark||0===a.length)}function x(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&j(e)),I(e,t)}Object.defineProperty(E.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),E.prototype.destroy=m.destroy,E.prototype._undestroy=m.undestroy,E.prototype._destroy=function(e,t){t(e)},E.prototype.push=function(e,t){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof e&&((t=t||n.defaultEncoding)!==n.encoding&&(e=u.from(e,t),t=""),r=!0),O(this,e,t,!1,r)},E.prototype.unshift=function(e){return O(this,e,null,!0,!1)},E.prototype.isPaused=function(){return!1===this._readableState.flowing},E.prototype.setEncoding=function(e){h||(h=r(2553).s);var t=new h(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var n=this._readableState.buffer.head,i="";null!==n;)i+=t.write(n.data),n=n.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var T=1073741824;function P(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=T?e=T:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function j(e){var t=e._readableState;o("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(o("emitReadable",t.flowing),t.emittedReadable=!0,i.nextTick(k,e))}function k(e){var t=e._readableState;o("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,L(e)}function I(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(R,e,t))}function R(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var r=t.length;if(o("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}function C(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function B(e){o("readable nexttick read 0"),e.read(0)}function N(e,t){o("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),L(e),t.flowing&&!t.reading&&e.read(0)}function L(e){var t=e._readableState;for(o("flow",t.flowing);t.flowing&&null!==e.read(););}function D(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r);var r}function F(e){var t=e._readableState;o("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,i.nextTick(q,t,e))}function q(e,t){if(o("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function U(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}E.prototype.read=function(e){o("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return o("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?F(this):j(this),null;if(0===(e=P(e,t))&&t.ended)return 0===t.length&&F(this),null;var n,i=t.needReadable;return o("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&o("length less than watermark",i=!0),t.ended||t.reading?o("reading or ended",i=!1):i&&(o("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=P(r,t))),null===(n=e>0?D(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&F(this)),null!==n&&this.emit("data",n),n},E.prototype._read=function(e){S(this,new w("_read()"))},E.prototype.pipe=function(e,t){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=e;break;case 1:n.pipes=[n.pipes,e];break;default:n.pipes.push(e)}n.pipesCount+=1,o("pipe count=%d opts=%j",n.pipesCount,t);var a=t&&!1===t.end||e===i.stdout||e===i.stderr?m:u;function u(){o("onend"),e.end()}n.endEmitted?i.nextTick(a):r.once("end",a),e.on("unpipe",(function t(i,s){o("onunpipe"),i===r&&s&&!1===s.hasUnpiped&&(s.hasUnpiped=!0,o("cleanup"),e.removeListener("close",d),e.removeListener("finish",p),e.removeListener("drain",c),e.removeListener("error",l),e.removeListener("unpipe",t),r.removeListener("end",u),r.removeListener("end",m),r.removeListener("data",h),f=!0,!n.awaitDrain||e._writableState&&!e._writableState.needDrain||c())}));var c=function(e){return function(){var t=e._readableState;o("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&s(e,"data")&&(t.flowing=!0,L(e))}}(r);e.on("drain",c);var f=!1;function h(t){o("ondata");var i=e.write(t);o("dest.write",i),!1===i&&((1===n.pipesCount&&n.pipes===e||n.pipesCount>1&&-1!==U(n.pipes,e))&&!f&&(o("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function l(t){o("onerror",t),m(),e.removeListener("error",l),0===s(e,"error")&&S(e,t)}function d(){e.removeListener("finish",p),m()}function p(){o("onfinish"),e.removeListener("close",d),m()}function m(){o("unpipe"),r.unpipe(e)}return r.on("data",h),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events.error?Array.isArray(e._events.error)?e._events.error.unshift(r):e._events.error=[r,e._events.error]:e.on(t,r)}(e,"error",l),e.once("close",d),e.once("finish",p),e.emit("pipe",r),n.flowing||(o("pipe resume"),r.resume()),e},E.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<i;o++)n[o].emit("unpipe",this,{hasUnpiped:!1});return this}var s=U(t.pipes,e);return-1===s||(t.pipes.splice(s,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r)),this},E.prototype.on=function(e,t){var r=a.prototype.on.call(this,e,t),n=this._readableState;return"data"===e?(n.readableListening=this.listenerCount("readable")>0,!1!==n.flowing&&this.resume()):"readable"===e&&(n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,o("on readable",n.length,n.reading),n.length?j(this):n.reading||i.nextTick(B,this))),r},E.prototype.addListener=E.prototype.on,E.prototype.removeListener=function(e,t){var r=a.prototype.removeListener.call(this,e,t);return"readable"===e&&i.nextTick(C,this),r},E.prototype.removeAllListeners=function(e){var t=a.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||i.nextTick(C,this),t},E.prototype.resume=function(){var e=this._readableState;return e.flowing||(o("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,i.nextTick(N,e,t))}(this,e)),e.paused=!1,this},E.prototype.pause=function(){return o("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(o("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},E.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var i in e.on("end",(function(){if(o("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){o("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i||(r.objectMode||i&&i.length)&&(t.push(i)||(n=!0,e.pause()))})),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var s=0;s<M.length;s++)e.on(M[s],this.emit.bind(this,M[s]));return this._read=function(t){o("wrapped _read",t),n&&(n=!1,e.resume())},this},"function"==typeof Symbol&&(E.prototype[Symbol.asyncIterator]=function(){return void 0===l&&(l=r(5850)),l(this)}),Object.defineProperty(E.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(E.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(E.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),E._fromList=D,Object.defineProperty(E.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(E.from=function(e,t){return void 0===d&&(d=r(5167)),d(E,e,t)})},4605:(e,t,r)=>{"use strict";e.exports=f;var n=r(4281).q,i=n.ERR_METHOD_NOT_IMPLEMENTED,o=n.ERR_MULTIPLE_CALLBACK,s=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,a=n.ERR_TRANSFORM_WITH_LENGTH_0,u=r(6753);function c(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new o);r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function f(e){if(!(this instanceof f))return new f(e);u.call(this,e),this._transformState={afterTransform:c.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",h)}function h(){var e=this;"function"!=typeof this._flush||this._readableState.destroyed?l(this,null,null):this._flush((function(t,r){l(e,t,r)}))}function l(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new a;if(e._transformState.transforming)throw new s;return e.push(null)}r(5717)(f,u),f.prototype.push=function(e,t){return this._transformState.needTransform=!1,u.prototype.push.call(this,e,t)},f.prototype._transform=function(e,t,r){r(new i("_transform()"))},f.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},f.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},f.prototype._destroy=function(e,t){u.prototype._destroy.call(this,e,(function(e){t(e)}))}},4229:(e,t,r)=>{"use strict";var n,i=r(4155);function o(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,r){var n=e.entry;for(e.entry=null;n;){var i=n.callback;t.pendingcb--,i(undefined),n=n.next}t.corkedRequestsFree.next=e}(t,e)}}e.exports=E,E.WritableState=A;var s,a={deprecate:r(4927)},u=r(2503),c=r(8764).Buffer,f=r.g.Uint8Array||function(){},h=r(1195),l=r(2457).getHighWaterMark,d=r(4281).q,p=d.ERR_INVALID_ARG_TYPE,m=d.ERR_METHOD_NOT_IMPLEMENTED,g=d.ERR_MULTIPLE_CALLBACK,y=d.ERR_STREAM_CANNOT_PIPE,b=d.ERR_STREAM_DESTROYED,v=d.ERR_STREAM_NULL_VALUES,w=d.ERR_STREAM_WRITE_AFTER_END,_=d.ERR_UNKNOWN_ENCODING,S=h.errorOrDestroy;function M(){}function A(e,t,s){n=n||r(6753),e=e||{},"boolean"!=typeof s&&(s=t instanceof n),this.objectMode=!!e.objectMode,s&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=l(this,e,"writableHighWaterMark",s),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var a=!1===e.decodeStrings;this.decodeStrings=!a,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,n=r.sync,o=r.writecb;if("function"!=typeof o)throw new g;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,n,o){--t.pendingcb,r?(i.nextTick(o,n),i.nextTick(k,e,t),e._writableState.errorEmitted=!0,S(e,n)):(o(n),e._writableState.errorEmitted=!0,S(e,n),k(e,t))}(e,r,n,t,o);else{var s=P(r)||e.destroyed;s||r.corked||r.bufferProcessing||!r.bufferedRequest||T(e,r),n?i.nextTick(x,e,r,s,o):x(e,r,s,o)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new o(this)}function E(e){var t=this instanceof(n=n||r(6753));if(!t&&!s.call(E,this))return new E(e);this._writableState=new A(e,this,t),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),u.call(this)}function O(e,t,r,n,i,o,s){t.writelen=n,t.writecb=s,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new b("write")):r?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function x(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),k(e,t)}function T(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,i=new Array(n),s=t.corkedRequestsFree;s.entry=r;for(var a=0,u=!0;r;)i[a]=r,r.isBuf||(u=!1),r=r.next,a+=1;i.allBuffers=u,O(e,t,!0,t.length,i,"",s.finish),t.pendingcb++,t.lastBufferedRequest=null,s.next?(t.corkedRequestsFree=s.next,s.next=null):t.corkedRequestsFree=new o(t),t.bufferedRequestCount=0}else{for(;r;){var c=r.chunk,f=r.encoding,h=r.callback;if(O(e,t,!1,t.objectMode?1:c.length,c,f,h),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function P(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function j(e,t){e._final((function(r){t.pendingcb--,r&&S(e,r),t.prefinished=!0,e.emit("prefinish"),k(e,t)}))}function k(e,t){var r=P(t);if(r&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,i.nextTick(j,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var n=e._readableState;(!n||n.autoDestroy&&n.endEmitted)&&e.destroy()}return r}r(5717)(E,u),A.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(A.prototype,"buffer",{get:a.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(s=Function.prototype[Symbol.hasInstance],Object.defineProperty(E,Symbol.hasInstance,{value:function(e){return!!s.call(this,e)||this===E&&e&&e._writableState instanceof A}})):s=function(e){return e instanceof this},E.prototype.pipe=function(){S(this,new y)},E.prototype.write=function(e,t,r){var n,o=this._writableState,s=!1,a=!o.objectMode&&(n=e,c.isBuffer(n)||n instanceof f);return a&&!c.isBuffer(e)&&(e=function(e){return c.from(e)}(e)),"function"==typeof t&&(r=t,t=null),a?t="buffer":t||(t=o.defaultEncoding),"function"!=typeof r&&(r=M),o.ending?function(e,t){var r=new w;S(e,r),i.nextTick(t,r)}(this,r):(a||function(e,t,r,n){var o;return null===r?o=new v:"string"==typeof r||t.objectMode||(o=new p("chunk",["string","Buffer"],r)),!o||(S(e,o),i.nextTick(n,o),!1)}(this,o,e,r))&&(o.pendingcb++,s=function(e,t,r,n,i,o){if(!r){var s=function(e,t,r){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=c.from(t,r)),t}(t,n,i);n!==s&&(r=!0,i="buffer",n=s)}var a=t.objectMode?1:n.length;t.length+=a;var u=t.length<t.highWaterMark;if(u||(t.needDrain=!0),t.writing||t.corked){var f=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:o,next:null},f?f.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else O(e,t,!1,a,n,i,o);return u}(this,o,a,e,t,r)),s},E.prototype.cork=function(){this._writableState.corked++},E.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||T(this,e))},E.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new _(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(E.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(E.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),E.prototype._write=function(e,t,r){r(new m("_write()"))},E.prototype._writev=null,E.prototype.end=function(e,t,r){var n=this._writableState;return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||function(e,t,r){t.ending=!0,k(e,t),r&&(t.finished?i.nextTick(r):e.once("finish",r)),t.ended=!0,e.writable=!1}(this,n,r),this},Object.defineProperty(E.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(E.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),E.prototype.destroy=h.destroy,E.prototype._undestroy=h.undestroy,E.prototype._destroy=function(e,t){t(e)}},5850:(e,t,r)=>{"use strict";var n,i=r(4155);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var s=r(8610),a=Symbol("lastResolve"),u=Symbol("lastReject"),c=Symbol("error"),f=Symbol("ended"),h=Symbol("lastPromise"),l=Symbol("handlePromise"),d=Symbol("stream");function p(e,t){return{value:e,done:t}}function m(e){var t=e[a];if(null!==t){var r=e[d].read();null!==r&&(e[h]=null,e[a]=null,e[u]=null,t(p(r,!1)))}}function g(e){i.nextTick(m,e)}var y=Object.getPrototypeOf((function(){})),b=Object.setPrototypeOf((o(n={get stream(){return this[d]},next:function(){var e=this,t=this[c];if(null!==t)return Promise.reject(t);if(this[f])return Promise.resolve(p(void 0,!0));if(this[d].destroyed)return new Promise((function(t,r){i.nextTick((function(){e[c]?r(e[c]):t(p(void 0,!0))}))}));var r,n=this[h];if(n)r=new Promise(function(e,t){return function(r,n){e.then((function(){t[f]?r(p(void 0,!0)):t[l](r,n)}),n)}}(n,this));else{var o=this[d].read();if(null!==o)return Promise.resolve(p(o,!1));r=new Promise(this[l])}return this[h]=r,r}},Symbol.asyncIterator,(function(){return this})),o(n,"return",(function(){var e=this;return new Promise((function(t,r){e[d].destroy(null,(function(e){e?r(e):t(p(void 0,!0))}))}))})),n),y);e.exports=function(e){var t,r=Object.create(b,(o(t={},d,{value:e,writable:!0}),o(t,a,{value:null,writable:!0}),o(t,u,{value:null,writable:!0}),o(t,c,{value:null,writable:!0}),o(t,f,{value:e._readableState.endEmitted,writable:!0}),o(t,l,{value:function(e,t){var n=r[d].read();n?(r[h]=null,r[a]=null,r[u]=null,e(p(n,!1))):(r[a]=e,r[u]=t)},writable:!0}),t));return r[h]=null,s(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=r[u];return null!==t&&(r[h]=null,r[a]=null,r[u]=null,t(e)),void(r[c]=e)}var n=r[a];null!==n&&(r[h]=null,r[a]=null,r[u]=null,n(p(void 0,!0))),r[f]=!0})),e.on("readable",g.bind(null,r)),r}},7327:(e,t,r)=>{"use strict";function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var s=r(8764).Buffer,a=r(6854).inspect,u=a&&a.custom||"inspect";e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}var t,r;return t=e,(r=[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return s.alloc(0);for(var t,r,n,i=s.allocUnsafe(e>>>0),o=this.head,a=0;o;)t=o.data,r=i,n=a,s.prototype.copy.call(t,r,n),a+=o.data.length,o=o.next;return i}},{key:"consume",value:function(e,t){var r;return e<this.head.data.length?(r=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):r=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),r}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,r=1,n=t.data;for(e-=n.length;t=t.next;){var i=t.data,o=e>i.length?i.length:e;if(o===i.length?n+=i:n+=i.slice(0,e),0==(e-=o)){o===i.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(o));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(e){var t=s.allocUnsafe(e),r=this.head,n=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var i=r.data,o=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,o),0==(e-=o)){o===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(o));break}++n}return this.length-=n,t}},{key:u,value:function(e,t){return a(this,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach((function(t){i(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},t,{depth:0,customInspect:!1}))}}])&&o(t.prototype,r),e}()},1195:(e,t,r)=>{"use strict";var n=r(4155);function i(e,t){s(e,t),o(e)}function o(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function s(e,t){e.emit("error",t)}e.exports={destroy:function(e,t){var r=this,a=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return a||u?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,n.nextTick(s,this,e)):n.nextTick(s,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!t&&e?r._writableState?r._writableState.errorEmitted?n.nextTick(o,r):(r._writableState.errorEmitted=!0,n.nextTick(i,r,e)):n.nextTick(i,r,e):t?(n.nextTick(o,r),t(e)):n.nextTick(o,r)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}}},8610:(e,t,r)=>{"use strict";var n=r(4281).q.ERR_STREAM_PREMATURE_CLOSE;function i(){}e.exports=function e(t,r,o){if("function"==typeof r)return e(t,null,r);r||(r={}),o=function(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];e.apply(this,n)}}}(o||i);var s=r.readable||!1!==r.readable&&t.readable,a=r.writable||!1!==r.writable&&t.writable,u=function(){t.writable||f()},c=t._writableState&&t._writableState.finished,f=function(){a=!1,c=!0,s||o.call(t)},h=t._readableState&&t._readableState.endEmitted,l=function(){s=!1,h=!0,a||o.call(t)},d=function(e){o.call(t,e)},p=function(){var e;return s&&!h?(t._readableState&&t._readableState.ended||(e=new n),o.call(t,e)):a&&!c?(t._writableState&&t._writableState.ended||(e=new n),o.call(t,e)):void 0},m=function(){t.req.on("finish",f)};return function(e){return e.setHeader&&"function"==typeof e.abort}(t)?(t.on("complete",f),t.on("abort",p),t.req?m():t.on("request",m)):a&&!t._writableState&&(t.on("end",u),t.on("close",u)),t.on("end",l),t.on("finish",f),!1!==r.error&&t.on("error",d),t.on("close",p),function(){t.removeListener("complete",f),t.removeListener("abort",p),t.removeListener("request",m),t.req&&t.req.removeListener("finish",f),t.removeListener("end",u),t.removeListener("close",u),t.removeListener("finish",f),t.removeListener("end",l),t.removeListener("error",d),t.removeListener("close",p)}}},5167:e=>{e.exports=function(){throw new Error("Readable.from is not available in the browser")}},9946:(e,t,r)=>{"use strict";var n,i=r(4281).q,o=i.ERR_MISSING_ARGS,s=i.ERR_STREAM_DESTROYED;function a(e){if(e)throw e}function u(e,t,i,o){o=function(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}(o);var a=!1;e.on("close",(function(){a=!0})),void 0===n&&(n=r(8610)),n(e,{readable:t,writable:i},(function(e){if(e)return o(e);a=!0,o()}));var u=!1;return function(t){if(!a&&!u)return u=!0,function(e){return e.setHeader&&"function"==typeof e.abort}(e)?e.abort():"function"==typeof e.destroy?e.destroy():void o(t||new s("pipe"))}}function c(e){e()}function f(e,t){return e.pipe(t)}function h(e){return e.length?"function"!=typeof e[e.length-1]?a:e.pop():a}e.exports=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n,i=h(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new o("streams");var s=t.map((function(e,r){var o=r<t.length-1;return u(e,o,r>0,(function(e){n||(n=e),e&&s.forEach(c),o||(s.forEach(c),i(n))}))}));return t.reduce(f)}},2457:(e,t,r)=>{"use strict";var n=r(4281).q.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(e,t,r,i){var o=function(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}(t,i,r);if(null!=o){if(!isFinite(o)||Math.floor(o)!==o||o<0)throw new n(i?r:"highWaterMark",o);return Math.floor(o)}return e.objectMode?16:16384}}},2503:(e,t,r)=>{e.exports=r(7187).EventEmitter},8473:(e,t,r)=>{(t=e.exports=r(9481)).Stream=t,t.Readable=t,t.Writable=r(4229),t.Duplex=r(6753),t.Transform=r(4605),t.PassThrough=r(2725),t.finished=r(8610),t.pipeline=r(9946)},9785:(e,t,r)=>{"use strict";var n=r(8764).Buffer,i=r(5717),o=r(3349),s=new Array(16),a=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],u=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],c=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],f=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],h=[0,1518500249,1859775393,2400959708,2840853838],l=[1352829926,1548603684,1836072691,2053994217,0];function d(){o.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function p(e,t){return e<<t|e>>>32-t}function m(e,t,r,n,i,o,s,a){return p(e+(t^r^n)+o+s|0,a)+i|0}function g(e,t,r,n,i,o,s,a){return p(e+(t&r|~t&n)+o+s|0,a)+i|0}function y(e,t,r,n,i,o,s,a){return p(e+((t|~r)^n)+o+s|0,a)+i|0}function b(e,t,r,n,i,o,s,a){return p(e+(t&n|r&~n)+o+s|0,a)+i|0}function v(e,t,r,n,i,o,s,a){return p(e+(t^(r|~n))+o+s|0,a)+i|0}i(d,o),d.prototype._update=function(){for(var e=s,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);for(var r=0|this._a,n=0|this._b,i=0|this._c,o=0|this._d,d=0|this._e,w=0|this._a,_=0|this._b,S=0|this._c,M=0|this._d,A=0|this._e,E=0;E<80;E+=1){var O,x;E<16?(O=m(r,n,i,o,d,e[a[E]],h[0],c[E]),x=v(w,_,S,M,A,e[u[E]],l[0],f[E])):E<32?(O=g(r,n,i,o,d,e[a[E]],h[1],c[E]),x=b(w,_,S,M,A,e[u[E]],l[1],f[E])):E<48?(O=y(r,n,i,o,d,e[a[E]],h[2],c[E]),x=y(w,_,S,M,A,e[u[E]],l[2],f[E])):E<64?(O=b(r,n,i,o,d,e[a[E]],h[3],c[E]),x=g(w,_,S,M,A,e[u[E]],l[3],f[E])):(O=v(r,n,i,o,d,e[a[E]],h[4],c[E]),x=m(w,_,S,M,A,e[u[E]],l[4],f[E])),r=d,d=o,o=p(i,10),i=n,n=O,w=A,A=M,M=p(S,10),S=_,_=x}var T=this._b+i+M|0;this._b=this._c+o+A|0,this._c=this._d+d+w|0,this._d=this._e+r+_|0,this._e=this._a+n+S|0,this._a=T},d.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=n.alloc?n.alloc(20):new n(20);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e.writeInt32LE(this._e,16),e},e.exports=d},8914:(e,t,r)=>{"use strict";var n=r(8764).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.isValidXAddress=t.decodeXAddress=t.xAddressToClassicAddress=t.encodeXAddress=t.classicAddressToXAddress=t.isValidClassicAddress=t.decodeAccountPublic=t.encodeAccountPublic=t.decodeNodePublic=t.encodeNodePublic=t.decodeAccountID=t.encodeAccountID=t.decodeSeed=t.encodeSeed=t.codec=void 0;const i=r(8537);Object.defineProperty(t,"codec",{enumerable:!0,get:function(){return i.codec}}),Object.defineProperty(t,"encodeSeed",{enumerable:!0,get:function(){return i.encodeSeed}}),Object.defineProperty(t,"decodeSeed",{enumerable:!0,get:function(){return i.decodeSeed}}),Object.defineProperty(t,"encodeAccountID",{enumerable:!0,get:function(){return i.encodeAccountID}}),Object.defineProperty(t,"decodeAccountID",{enumerable:!0,get:function(){return i.decodeAccountID}}),Object.defineProperty(t,"encodeNodePublic",{enumerable:!0,get:function(){return i.encodeNodePublic}}),Object.defineProperty(t,"decodeNodePublic",{enumerable:!0,get:function(){return i.decodeNodePublic}}),Object.defineProperty(t,"encodeAccountPublic",{enumerable:!0,get:function(){return i.encodeAccountPublic}}),Object.defineProperty(t,"decodeAccountPublic",{enumerable:!0,get:function(){return i.decodeAccountPublic}}),Object.defineProperty(t,"isValidClassicAddress",{enumerable:!0,get:function(){return i.isValidClassicAddress}});const o=r(9282),s={MAIN:n.from([5,68]),TEST:n.from([4,147])};function a(e,t,r){if(20!==e.length)throw new Error("Account ID must be 20 bytes");const o=!1===t?0:t<=4294967295?1:2;if(2===o)throw new Error("Invalid tag");!1===t&&(t=0);const a=n.concat([r?s.TEST:s.MAIN,e,n.from([o,255&t,t>>8&255,t>>16&255,t>>24&255,0,0,0,0])]);return i.codec.encodeChecked(a)}function u(e){const t=i.codec.decodeChecked(e),r=function(e){const t=e.slice(0,2);if(s.MAIN.equals(t))return!1;if(s.TEST.equals(t))return!0;throw new Error("Invalid X-address: bad prefix")}(t);return{accountId:t.slice(2,22),tag:function(e){const t=e[22];if(t>=2)throw new Error("Unsupported X-address");return 1===t?e[23]+256*e[24]+65536*e[25]+16777216*e[26]:(o.strictEqual(t,0,"flag must be zero to indicate no tag"),o.ok(n.from("0000000000000000","hex").equals(e.slice(23,31)),"remaining bytes must be zero"),!1)}(t),test:r}}t.classicAddressToXAddress=function(e,t,r){return a(i.decodeAccountID(e),t,r)},t.encodeXAddress=a,t.xAddressToClassicAddress=function(e){const{accountId:t,tag:r,test:n}=u(e);return{classicAddress:i.encodeAccountID(t),tag:r,test:n}},t.decodeXAddress=u,t.isValidXAddress=function(e){try{u(e)}catch(e){return!1}return!0}},9896:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.concatArgs=t.seqEqual=void 0,t.seqEqual=function(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0},t.concatArgs=function(...e){const t=[];return e.forEach((function(e){if(void 0!==e.length)for(let r=0;r<e.length;r++)t.push(e[r]);else t.push(e)})),t}},8537:(e,t,r)=>{"use strict";var n=r(8764).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.isValidClassicAddress=t.decodeAccountPublic=t.encodeAccountPublic=t.encodeNodePublic=t.decodeNodePublic=t.decodeAddress=t.decodeAccountID=t.encodeAddress=t.encodeAccountID=t.decodeSeed=t.encodeSeed=t.codec=void 0;const i=r(8162),o=r(9896),s=r(3482),a=[1,225,75],u={sha256:function(e){return s("sha256").update(n.from(e)).digest()},alphabet:"rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz"},c=new class{constructor(e){this.sha256=e.sha256,this.alphabet=e.alphabet,this.codec=i(this.alphabet),this.base=this.alphabet.length}encode(e,t){const r=t.versions;return this.encodeVersioned(e,r,t.expectedLength)}encodeVersioned(e,t,r){if(r&&e.length!==r)throw new Error("unexpected_payload_length: bytes.length does not match expectedLength. Ensure that the bytes are a Buffer.");return this.encodeChecked(n.from(o.concatArgs(t,e)))}encodeChecked(e){const t=this.sha256(this.sha256(e)).slice(0,4);return this.encodeRaw(n.from(o.concatArgs(e,t)))}encodeRaw(e){return this.codec.encode(e)}decode(e,t){const r=t.versions,n=t.versionTypes,i=this.decodeChecked(e);if(r.length>1&&!t.expectedLength)throw new Error("expectedLength is required because there are >= 2 possible versions");const s="number"==typeof r[0]?1:r[0].length,a=t.expectedLength||i.length-s,u=i.slice(0,-a),c=i.slice(-a);for(let e=0;e<r.length;e++){const t=Array.isArray(r[e])?r[e]:[r[e]];if(o.seqEqual(u,t))return{version:t,bytes:c,type:n?n[e]:null}}throw new Error("version_invalid: version bytes do not match any of the provided version(s)")}decodeChecked(e){const t=this.decodeRaw(e);if(t.length<5)throw new Error("invalid_input_size: decoded data must have length >= 5");if(!this.verifyCheckSum(t))throw new Error("checksum_invalid");return t.slice(0,-4)}decodeRaw(e){return this.codec.decode(e)}verifyCheckSum(e){const t=this.sha256(this.sha256(e.slice(0,-4))).slice(0,4),r=e.slice(-4);return o.seqEqual(t,r)}}(u);function f(e){return c.encode(e,{versions:[0],expectedLength:20})}function h(e){return c.decode(e,{versions:[0],expectedLength:20}).bytes}t.codec=c,t.encodeSeed=function(e,t){if(16!==e.length)throw new Error("entropy must have length 16");const r={expectedLength:16,versions:"ed25519"===t?a:[33]};return c.encode(e,r)},t.decodeSeed=function(e,t={versionTypes:["ed25519","secp256k1"],versions:[a,33],expectedLength:16}){return c.decode(e,t)},t.encodeAccountID=f,t.encodeAddress=f,t.decodeAccountID=h,t.decodeAddress=h,t.decodeNodePublic=function(e){return c.decode(e,{versions:[28],expectedLength:33}).bytes},t.encodeNodePublic=function(e){return c.encode(e,{versions:[28],expectedLength:33})},t.encodeAccountPublic=function(e){return c.encode(e,{versions:[35],expectedLength:33})},t.decodeAccountPublic=function(e){return c.decode(e,{versions:[35],expectedLength:33}).bytes},t.isValidClassicAddress=function(e){try{h(e)}catch(e){return!1}return!0}},2509:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.transactionID=t.sha512Half=t.binaryToJSON=t.signingClaimData=t.signingData=t.multiSigningData=t.readJSON=t.serializeObject=t.makeParser=t.BytesList=t.BinarySerializer=t.BinaryParser=void 0;var n=r(5003),i=r(6633);Object.defineProperty(t,"BinaryParser",{enumerable:!0,get:function(){return i.BinaryParser}});var o=r(1771),s=r(7894);Object.defineProperty(t,"BinarySerializer",{enumerable:!0,get:function(){return s.BinarySerializer}}),Object.defineProperty(t,"BytesList",{enumerable:!0,get:function(){return s.BytesList}});var a=r(9019);Object.defineProperty(t,"sha512Half",{enumerable:!0,get:function(){return a.sha512Half}}),Object.defineProperty(t,"transactionID",{enumerable:!0,get:function(){return a.transactionID}});var u=r(4736),c=function(e){return new i.BinaryParser(e)};t.makeParser=c;var f=function(e){return e.readType(n.coreTypes.STObject).toJSON()};function h(e,t){void 0===t&&(t={});var r=t.prefix,i=t.suffix,o=t.signingFieldsOnly,a=void 0!==o&&o,u=new s.BytesList;r&&u.put(r);var c=a?function(e){return e.isSigningField}:void 0;return n.coreTypes.STObject.from(e,c).toBytesSink(u),i&&u.put(i),u.toBytes()}t.readJSON=f,t.binaryToJSON=function(e){return f(c(e))},t.serializeObject=h,t.signingData=function(e,t){return void 0===t&&(t=o.HashPrefix.transactionSig),h(e,{prefix:t,signingFieldsOnly:!0})},t.signingClaimData=function(e){var t=u(String(e.amount)),r=o.HashPrefix.paymentChannelClaim,i=n.coreTypes.Hash256.from(e.channel).toBytes(),a=n.coreTypes.UInt64.from(t).toBytes(),c=new s.BytesList;return c.put(r),c.put(i),c.put(a),c.toBytes()},t.multiSigningData=function(e,t){return h(e,{prefix:o.HashPrefix.transactionMultiSig,suffix:n.coreTypes.AccountID.from(t).toBytes(),signingFieldsOnly:!0})}},8381:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.types=t.ShaMap=t.HashPrefix=t.quality=t.TransactionResult=t.Type=t.LedgerEntryType=t.TransactionType=t.Field=t.ledgerHashes=t.binary=t.hashes=void 0;var n=r(4543);Object.defineProperty(t,"Field",{enumerable:!0,get:function(){return n.Field}}),Object.defineProperty(t,"TransactionType",{enumerable:!0,get:function(){return n.TransactionType}}),Object.defineProperty(t,"LedgerEntryType",{enumerable:!0,get:function(){return n.LedgerEntryType}}),Object.defineProperty(t,"Type",{enumerable:!0,get:function(){return n.Type}}),Object.defineProperty(t,"TransactionResult",{enumerable:!0,get:function(){return n.TransactionResult}});var i=r(5003);t.types=i;var o=r(2509);t.binary=o;var s=r(9059);Object.defineProperty(t,"ShaMap",{enumerable:!0,get:function(){return s.ShaMap}});var a=r(3453);t.ledgerHashes=a;var u=r(9019);t.hashes=u;var c=r(2369);Object.defineProperty(t,"quality",{enumerable:!0,get:function(){return c.quality}});var f=r(1771);Object.defineProperty(t,"HashPrefix",{enumerable:!0,get:function(){return f.HashPrefix}})},4543:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TransactionType=t.TransactionResult=t.LedgerEntryType=t.Type=t.Field=void 0;var n=r(8652),i=r(1883),o=r(9691),s=function(){function e(e,t,r){this.name=e,this.ordinal=t,this.ordinalWidth=r,this.bytes=o.Buffer.alloc(r);for(var n=0;n<r;n++)this.bytes[r-n-1]=t>>>8*n&255}return e.prototype.toJSON=function(){return this.name},e.prototype.toBytesSink=function(e){e.put(this.bytes)},e.prototype.toBytes=function(){return this.bytes},e}(),a=function(){function e(e,t){var r=this;this.ordinalWidth=t,Object.entries(e).forEach((function(e){var n=e[0],i=e[1];r[n]=new s(n,i,t),r[i.toString()]=r[n]}))}return e.prototype.from=function(e){return e instanceof s?e:this[e]},e.prototype.fromParser=function(e){return this.from(e.readUIntN(this.ordinalWidth).toString())},e}();var u=function(){function e(e){var t=this;e.forEach((function(e){var r=e[0],a=e[1];t[r]=function(e){var t,r,a,u=e[0],c=e[1],f=n.TYPES[c.type],h=(t=f,r=c.nth,a=[],t<16?r<16?a.push(t<<4|r):a.push(t<<4,r):r<16?a.push(r,t):a.push(0,t,r),o.Buffer.from(a));return{name:u,nth:c.nth,isVariableLengthEncoded:c.isVLEncoded,isSerialized:c.isSerialized,isSigningField:c.isSigningField,ordinal:f<<16|c.nth,type:new s(c.type,f,2),header:h,associatedType:i.SerializedType}}([r,a]),t[t[r].ordinal.toString()]=t[r]}))}return e.prototype.fromString=function(e){return this[e]},e}(),c=new a(n.TYPES,2);t.Type=c;var f=new a(n.LEDGER_ENTRY_TYPES,2);t.LedgerEntryType=f;var h=new a(n.TRANSACTION_TYPES,2);t.TransactionType=h;var l=new a(n.TRANSACTION_RESULTS,1);t.TransactionResult=l;var d=new u(n.FIELDS);t.Field=d},1771:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HashPrefix=void 0;var n=r(9691);function i(e){var t=n.Buffer.alloc(4);return t.writeUInt32BE(e,0),t}var o={transactionID:i(1415073280),transaction:i(1397638144),accountStateEntry:i(1296846336),innerNode:i(1296649728),ledgerHeader:i(1280791040),transactionSig:i(1398036480),transactionMultiSig:i(1397576704),validation:i(1447119872),proposal:i(1347571712),paymentChannelClaim:i(1129073920)};t.HashPrefix=o},9019:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.transactionID=t.sha512Half=t.Sha512Half=void 0;var o=r(1771),s=r(3482),a=r(9334),u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.hash=s("sha512"),t}return i(t,e),t.put=function(e){return(new t).put(e)},t.prototype.put=function(e){return this.hash.update(e),this},t.prototype.finish256=function(){return this.hash.digest().slice(0,32)},t.prototype.finish=function(){return new a.Hash256(this.finish256())},t}(r(7894).BytesList);function c(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=new u;return e.forEach((function(e){return r.put(e)})),r.finish256()}t.Sha512Half=u,t.sha512Half=c,t.transactionID=function(e){return new a.Hash256(c(o.HashPrefix.transactionID,e))}},2353:(e,t,r)=>{"use strict";var n=r(9282),i=r(8381),o=r(3453),s=i.binary.signingData,a=i.binary.signingClaimData,u=i.binary.multiSigningData,c=i.binary.binaryToJSON,f=i.binary.serializeObject;e.exports={decode:function(e){return n("string"==typeof e,"binary must be a hex string"),c(e)},encode:function(e){return n("object"==typeof e),f(e).toString("hex").toUpperCase()},encodeForSigning:function(e){return n("object"==typeof e),s(e).toString("hex").toUpperCase()},encodeForSigningClaim:function(e){return n("object"==typeof e),a(e).toString("hex").toUpperCase()},encodeForMultisigning:function(e,t){return n("object"==typeof e),n.equal(e.SigningPubKey,""),u(e,t).toString("hex").toUpperCase()},encodeQuality:function(e){return n("string"==typeof e),i.quality.encode(e).toString("hex").toUpperCase()},decodeQuality:function(e){return n("string"==typeof e),i.quality.decode(e).toString()},decodeLedgerData:o.decodeLedgerData}},3453:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeLedgerData=t.ledgerHash=t.transactionTreeHash=t.accountStateHash=void 0;var n=r(9282),i=r(9059),o=r(1771),s=r(9019),a=r(2509),u=r(9334),c=r(409),f=r(7569),h=r(9441),l=r(7636),d=r(6633),p=r(4736);function m(e,t){var r=new i.ShaMap;return t.forEach((function(t){return r.addItem.apply(r,e(t))})),r.hash()}function g(e){return n(e.hash),[u.Hash256.from(e.hash),{hashPrefix:function(){return o.HashPrefix.transaction},toBytesSink:function(t){var r=new a.BinarySerializer(t);r.writeLengthEncoded(c.STObject.from(e)),r.writeLengthEncoded(c.STObject.from(e.metaData))}},void 0]}function y(e){var t=u.Hash256.from(e.index),r=a.serializeObject(e);return[t,{hashPrefix:function(){return o.HashPrefix.accountStateEntry},toBytesSink:function(e){e.put(r)}},void 0]}t.transactionTreeHash=function(e){return m(g,e)},t.accountStateHash=function(e){return m(y,e)},t.ledgerHash=function(e){var t=new s.Sha512Half;return t.put(o.HashPrefix.ledgerHeader),n(void 0!==e.parent_close_time),n(void 0!==e.close_flags),h.UInt32.from(e.ledger_index).toBytesSink(t),f.UInt64.from(p(String(e.total_coins))).toBytesSink(t),u.Hash256.from(e.parent_hash).toBytesSink(t),u.Hash256.from(e.transaction_hash).toBytesSink(t),u.Hash256.from(e.account_hash).toBytesSink(t),h.UInt32.from(e.parent_close_time).toBytesSink(t),h.UInt32.from(e.close_time).toBytesSink(t),l.UInt8.from(e.close_time_resolution).toBytesSink(t),l.UInt8.from(e.close_flags).toBytesSink(t),t.finish()},t.decodeLedgerData=function(e){n("string"==typeof e,"binary must be a hex string");var t=new d.BinaryParser(e);return{ledger_index:t.readUInt32(),total_coins:t.readType(f.UInt64).valueOf().toString(),parent_hash:t.readType(u.Hash256).toHex(),transaction_hash:t.readType(u.Hash256).toHex(),account_hash:t.readType(u.Hash256).toHex(),parent_close_time:t.readUInt32(),close_time:t.readUInt32(),close_time_resolution:t.readUInt8(),close_flags:t.readUInt8()}}},2369:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.quality=void 0;var n=r(5003),i=r(3776),o=r(4736),s=r(9691),a=function(){function e(){}return e.encode=function(e){var t=new i.Decimal(e),r=t.e-15,s=t.times("1e"+-r).abs().toString(),a=n.coreTypes.UInt64.from(o(s)).toBytes();return a[0]=r+100,a},e.decode=function(e){var t=s.Buffer.from(e,"hex").slice(-8),r=t[0]-100;return new i.Decimal("0x"+t.slice(1).toString("hex")).times("1e"+r)},e}();t.quality=a},6633:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BinaryParser=void 0;var n=r(9282),i=r(4543),o=r(9691),s=function(){function e(e){this.bytes=o.Buffer.from(e,"hex")}return e.prototype.peek=function(){return n(0!==this.bytes.byteLength),this.bytes[0]},e.prototype.skip=function(e){n(e<=this.bytes.byteLength),this.bytes=this.bytes.slice(e)},e.prototype.read=function(e){n(e<=this.bytes.byteLength);var t=this.bytes.slice(0,e);return this.skip(e),t},e.prototype.readUIntN=function(e){return n(0<e&&e<=4,"invalid n"),this.read(e).reduce((function(e,t){return e<<8|t}))>>>0},e.prototype.readUInt8=function(){return this.readUIntN(1)},e.prototype.readUInt16=function(){return this.readUIntN(2)},e.prototype.readUInt32=function(){return this.readUIntN(4)},e.prototype.size=function(){return this.bytes.byteLength},e.prototype.end=function(e){var t=this.bytes.byteLength;return 0===t||void 0!==e&&t<=e},e.prototype.readVariableLength=function(){return this.read(this.readVariableLengthLength())},e.prototype.readVariableLengthLength=function(){var e=this.readUInt8();if(e<=192)return e;if(e<=240)return 193+256*(e-193)+this.readUInt8();if(e<=254)return 12481+65536*(e-241)+256*this.readUInt8()+this.readUInt8();throw new Error("Invalid variable length indicator")},e.prototype.readFieldOrdinal=function(){var e=this.readUInt8(),t=15&e;if(0==(e>>=4)&&(0===(e=this.readUInt8())||e<16))throw new Error("Cannot read FieldOrdinal, type_code out of range");if(0===t&&(0===(t=this.readUInt8())||t<16))throw new Error("Cannot read FieldOrdinal, field_code out of range");return e<<16|t},e.prototype.readField=function(){return i.Field.fromString(this.readFieldOrdinal().toString())},e.prototype.readType=function(e){return e.fromParser(this)},e.prototype.typeForField=function(e){return e.associatedType},e.prototype.readFieldValue=function(e){var t=this.typeForField(e);if(!t)throw new Error("unsupported: ("+e.name+", "+e.type.name+")");var r=e.isVariableLengthEncoded?this.readVariableLengthLength():void 0,n=t.fromParser(this,r);if(void 0===n)throw new Error("fromParser for ("+e.name+", "+e.type.name+") -> undefined ");return n},e.prototype.readFieldAndValue=function(){var e=this.readField();return[e,this.readFieldValue(e)]},e}();t.BinaryParser=s},7894:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BinarySerializer=t.BytesList=void 0;var n=r(9282),i=r(9691),o=function(){function e(){this.bytesArray=[]}return e.prototype.getLength=function(){return i.Buffer.concat(this.bytesArray).byteLength},e.prototype.put=function(e){var t=i.Buffer.from(e);return this.bytesArray.push(t),this},e.prototype.toBytesSink=function(e){e.put(this.toBytes())},e.prototype.toBytes=function(){return i.Buffer.concat(this.bytesArray)},e.prototype.toHex=function(){return this.toBytes().toString("hex").toUpperCase()},e}();t.BytesList=o;var s=function(){function e(e){this.sink=new o,this.sink=e}return e.prototype.write=function(e){e.toBytesSink(this.sink)},e.prototype.put=function(e){this.sink.put(e)},e.prototype.writeType=function(e,t){this.write(e.from(t))},e.prototype.writeBytesList=function(e){e.toBytesSink(this.sink)},e.prototype.encodeVariableLength=function(e){var t=i.Buffer.alloc(3);if(e<=192)return t[0]=e,t.slice(0,1);if(e<=12480)return e-=193,t[0]=193+(e>>>8),t[1]=255&e,t.slice(0,2);if(e<=918744)return e-=12481,t[0]=241+(e>>>16),t[1]=e>>8&255,t[2]=255&e,t.slice(0,3);throw new Error("Overflow error")},e.prototype.writeFieldAndValue=function(e,t){var r=e.associatedType.from(t);n(void 0!==r.toBytesSink),n(void 0!==e.name),this.sink.put(e.header),e.isVariableLengthEncoded?this.writeLengthEncoded(r):r.toBytesSink(this.sink)},e.prototype.writeLengthEncoded=function(e){var t=new o;e.toBytesSink(t),this.put(this.encodeVariableLength(t.getLength())),this.writeBytesList(t)},e}();t.BinarySerializer=s},9059:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.ShaMapLeaf=t.ShaMapNode=t.ShaMap=void 0;var o=r(9282),s=r(5003),a=r(1771),u=r(9019),c=r(9691),f=function(){};t.ShaMapNode=f;var h=function(e){function t(t,r){var n=e.call(this)||this;return n.index=t,n.item=r,n}return i(t,e),t.prototype.isLeaf=function(){return!0},t.prototype.isInner=function(){return!1},t.prototype.hashPrefix=function(){return void 0===this.item?c.Buffer.alloc(0):this.item.hashPrefix()},t.prototype.hash=function(){var e=u.Sha512Half.put(this.hashPrefix());return this.toBytesSink(e),e.finish()},t.prototype.toBytesSink=function(e){void 0!==this.item&&this.item.toBytesSink(e),this.index.toBytesSink(e)},t}(f);t.ShaMapLeaf=h;var l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t}(function(e){function t(t){void 0===t&&(t=0);var r=e.call(this)||this;return r.depth=t,r.slotBits=0,r.branches=Array(16),r}return i(t,e),t.prototype.isInner=function(){return!0},t.prototype.isLeaf=function(){return!1},t.prototype.hashPrefix=function(){return a.HashPrefix.innerNode},t.prototype.setBranch=function(e,t){this.slotBits=this.slotBits|1<<e,this.branches[e]=t},t.prototype.empty=function(){return 0===this.slotBits},t.prototype.hash=function(){if(this.empty())return s.coreTypes.Hash256.ZERO_256;var e=u.Sha512Half.put(this.hashPrefix());return this.toBytesSink(e),e.finish()},t.prototype.toBytesSink=function(e){for(var t=0;t<this.branches.length;t++){var r=this.branches[t];(r?r.hash():s.coreTypes.Hash256.ZERO_256).toBytesSink(e)}},t.prototype.addItem=function(e,r,n){o.strict(void 0!==e);var i=e.nibblet(this.depth),s=this.branches[i];if(void 0===s)this.setBranch(i,n||new h(e,r));else if(s instanceof h){var a=new t(this.depth+1);a.addItem(s.index,void 0,s),a.addItem(e,r,n),this.setBranch(i,a)}else{if(!(s instanceof t))throw new Error("invalid ShaMap.addItem call");s.addItem(e,r,n)}},t}(f));t.ShaMap=l},403:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.AccountID=void 0;var o=r(8914),s=r(9292),a=r(9691),u=/^[A-F0-9]{40}$/,c=function(e){function t(r){return e.call(this,null!=r?r:t.defaultAccountID.bytes)||this}return i(t,e),t.from=function(e){if(e instanceof t)return e;if("string"==typeof e)return""===e?new t:u.test(e)?new t(a.Buffer.from(e,"hex")):this.fromBase58(e);throw new Error("Cannot construct AccountID from value given")},t.fromBase58=function(e){if(o.isValidXAddress(e)){var r=o.xAddressToClassicAddress(e);if(!1!==r.tag)throw new Error("Only allowed to have tag on Account or Destination");e=r.classicAddress}return new t(a.Buffer.from(o.decodeAccountID(e)))},t.prototype.toJSON=function(){return this.toBase58()},t.prototype.toBase58=function(){return o.encodeAccountID(this.bytes)},t.defaultAccountID=new t(a.Buffer.alloc(20)),t}(s.Hash160);t.AccountID=c},7829:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.Amount=void 0;var o=r(3776),s=r(6633),a=r(403),u=r(729),c=r(1883),f=r(4736),h=r(9691),l=new o.Decimal("1e17"),d=new o.Decimal("1e-6"),p=f(4294967295);o.Decimal.config({toExpPos:96,toExpNeg:-112});var m=function(e){function t(r){return e.call(this,null!=r?r:t.defaultAmount.bytes)||this}return i(t,e),t.from=function(e){if(e instanceof t)return e;var r,n,i=h.Buffer.alloc(8);if("string"==typeof e){t.assertXrpIsValid(e);var s=f(e);return(c=[h.Buffer.alloc(4),h.Buffer.alloc(4)])[0].writeUInt32BE(Number(s.shiftRight(32)),0),c[1].writeUInt32BE(Number(s.and(p)),0),(i=h.Buffer.concat(c))[0]|=64,new t(i)}if(r=e,3===(n=Object.keys(r).sort()).length&&"currency"===n[0]&&"issuer"===n[1]&&"value"===n[2]){if(s=new o.Decimal(e.value),t.assertIouIsValid(s),s.isZero())i[0]|=128;else{var c,l=s.times("1e"+-(s.e-15)).abs().toString(),d=f(l);(c=[h.Buffer.alloc(4),h.Buffer.alloc(4)])[0].writeUInt32BE(Number(d.shiftRight(32)),0),c[1].writeUInt32BE(Number(d.and(p)),0),(i=h.Buffer.concat(c))[0]|=128,s.gt(new o.Decimal(0))&&(i[0]|=64);var m=s.e-15+97;i[0]|=m>>>2,i[1]|=(3&m)<<6}var g=u.Currency.from(e.currency).toBytes(),y=a.AccountID.from(e.issuer).toBytes();return new t(h.Buffer.concat([i,g,y]))}throw new Error("Invalid type to construct an Amount")},t.fromParser=function(e){var r=128&e.peek()?48:8;return new t(e.read(r))},t.prototype.toJSON=function(){if(this.isNative()){var e=this.bytes,r=64&e[0]?"":"-";e[0]&=63;var n=f(e.slice(0,4).readUInt32BE(0)),i=f(e.slice(4).readUInt32BE(0));return""+r+n.shiftLeft(32).or(i).toString()}var c=new s.BinaryParser(this.toString()),h=c.read(8),l=u.Currency.fromParser(c),d=a.AccountID.fromParser(c),p=h[0],m=(r=64&p?"":"-",((63&p)<<2)+((255&h[1])>>6)-97);h[0]=0,h[1]&=63;var g=new o.Decimal(r+"0x"+h.toString("hex")).times("1e"+m);return t.assertIouIsValid(g),{value:g.toString(),currency:l.toJSON(),issuer:d.toJSON()}},t.assertXrpIsValid=function(e){if(-1!==e.indexOf("."))throw new Error(e.toString()+" is an illegal amount");var t=new o.Decimal(e);if(!t.isZero()&&(t.lt(d)||t.gt(l)))throw new Error(e.toString()+" is an illegal amount")},t.assertIouIsValid=function(e){if(!e.isZero()){var t=e.precision(),r=e.e-15;if(t>16||r>80||r<-96)throw new Error("Decimal precision out of range");this.verifyNoDecimal(e)}},t.verifyNoDecimal=function(e){if(-1!==e.times("1e"+-(e.e-15)).abs().toString().indexOf("."))throw new Error("Decimal place found in integerNumberString")},t.prototype.isNative=function(){return 0==(128&this.bytes[0])},t.defaultAmount=new t(h.Buffer.from("4000000000000000","hex")),t}(c.SerializedType);t.Amount=m},8906:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.Blob=void 0;var o=r(1883),s=r(9691),a=function(e){function t(t){return e.call(this,t)||this}return i(t,e),t.fromParser=function(e,r){return new t(e.read(r))},t.from=function(e){if(e instanceof t)return e;if("string"==typeof e)return new t(s.Buffer.from(e,"hex"));throw new Error("Cannot construct Blob from value given")},t}(o.SerializedType);t.Blob=a},729:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.Currency=void 0;var o=r(9292),s=r(9691),a=/^[A-Z0-9]{3}$/,u=/^[A-F0-9]{40}$/;function c(e){if(!function(e){return e instanceof s.Buffer?20===e.byteLength:function(e){return 3===e.length||(t=e,u.test(t));var t}(e)}(e))throw new Error("Unsupported Currency representation: "+e);return 3===e.length?function(e){var t=s.Buffer.alloc(20);if("XRP"!==e){var r=e.split("").map((function(e){return e.charCodeAt(0)}));t.set(r,12)}return t}(e):s.Buffer.from(e,"hex")}var f=function(e){function t(r){for(var n=e.call(this,null!=r?r:t.XRP.bytes)||this,i=!0,o=n.bytes,s=n.bytes.slice(12,15),u=s.toString(),c=o.length-1;c>=0;c--)if(0!==o[c]&&12!==c&&13!==c&&14!==c){i=!1;break}var f=i&&"XRP"!==u&&a.test(u);return n._isNative=i&&"000000"===s.toString("hex"),n._iso=n._isNative?"XRP":f?u:void 0,n}return i(t,e),t.prototype.isNative=function(){return this._isNative},t.prototype.iso=function(){return this._iso},t.from=function(e){if(e instanceof t)return e;if("string"==typeof e)return new t(c(e));throw new Error("Cannot construct Currency from value given")},t.prototype.toJSON=function(){var e=this.iso();return void 0!==e?e:this.bytes.toString("hex").toUpperCase()},t.XRP=new t(s.Buffer.alloc(20)),t}(o.Hash160);t.Currency=f},7477:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.Hash128=void 0;var o=r(142),s=r(9691),a=function(e){function t(r){return e.call(this,null!=r?r:t.ZERO_128.bytes)||this}return i(t,e),t.width=16,t.ZERO_128=new t(s.Buffer.alloc(t.width)),t}(o.Hash);t.Hash128=a},9292:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.Hash160=void 0;var o=r(142),s=r(9691),a=function(e){function t(r){return r&&0===r.byteLength&&(r=t.ZERO_160.bytes),e.call(this,null!=r?r:t.ZERO_160.bytes)||this}return i(t,e),t.width=20,t.ZERO_160=new t(s.Buffer.alloc(t.width)),t}(o.Hash);t.Hash160=a},9334:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.Hash256=void 0;var o=r(142),s=r(9691),a=function(e){function t(r){return e.call(this,null!=r?r:t.ZERO_256.bytes)||this}return i(t,e),t.width=32,t.ZERO_256=new t(s.Buffer.alloc(t.width)),t}(o.Hash);t.Hash256=a},142:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.Hash=void 0;var o=r(1883),s=r(9691),a=function(e){function t(t){var r=e.call(this,t)||this;if(r.bytes.byteLength!==r.constructor.width)throw new Error("Invalid Hash length "+r.bytes.byteLength);return r}return i(t,e),t.from=function(e){if(e instanceof this)return e;if("string"==typeof e)return new this(s.Buffer.from(e,"hex"));throw new Error("Cannot construct Hash from given value")},t.fromParser=function(e,t){return new this(e.read(null!=t?t:this.width))},t.prototype.compareTo=function(e){return this.bytes.compare(this.constructor.from(e).bytes)},t.prototype.toString=function(){return this.toHex()},t.prototype.nibblet=function(e){var t=e>0?e/2|0:0,r=this.bytes[t];return e%2==0?r=(240&r)>>>4:r&=15,r},t}(o.Comparable);t.Hash=a},5003:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.coreTypes=void 0;var n=r(4543),i=r(403),o=r(7829),s=r(8906),a=r(729),u=r(7477),c=r(9292),f=r(9334),h=r(6284),l=r(1194),d=r(409),p=r(3774),m=r(9441),g=r(7569),y=r(7636),b=r(9403),v={AccountID:i.AccountID,Amount:o.Amount,Blob:s.Blob,Currency:a.Currency,Hash128:u.Hash128,Hash160:c.Hash160,Hash256:f.Hash256,PathSet:h.PathSet,STArray:l.STArray,STObject:d.STObject,UInt8:y.UInt8,UInt16:p.UInt16,UInt32:m.UInt32,UInt64:g.UInt64,Vector256:b.Vector256};t.coreTypes=v,Object.values(n.Field).forEach((function(e){e.associatedType=v[e.type.name]})),n.Field.TransactionType.associatedType=n.TransactionType,n.Field.TransactionResult.associatedType=n.TransactionResult,n.Field.LedgerEntryType.associatedType=n.LedgerEntryType},6284:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.PathSet=void 0;var o=r(403),s=r(729),a=r(6633),u=r(1883),c=r(9691),f=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.from=function(e){if(e instanceof t)return e;var r=[c.Buffer.from([0])];return e.account&&(r.push(o.AccountID.from(e.account).toBytes()),r[0][0]|=1),e.currency&&(r.push(s.Currency.from(e.currency).toBytes()),r[0][0]|=16),e.issuer&&(r.push(o.AccountID.from(e.issuer).toBytes()),r[0][0]|=32),new t(c.Buffer.concat(r))},t.fromParser=function(e){var r=e.readUInt8(),n=[c.Buffer.from([r])];return 1&r&&n.push(e.read(o.AccountID.width)),16&r&&n.push(e.read(s.Currency.width)),32&r&&n.push(e.read(o.AccountID.width)),new t(c.Buffer.concat(n))},t.prototype.toJSON=function(){var e,t,r,n=new a.BinaryParser(this.bytes.toString("hex")),i=n.readUInt8();1&i&&(e=o.AccountID.fromParser(n).toJSON()),16&i&&(t=s.Currency.fromParser(n).toJSON()),32&i&&(r=o.AccountID.fromParser(n).toJSON());var u={};return e&&(u.account=e),r&&(u.issuer=r),t&&(u.currency=t),u},t.prototype.type=function(){return this.bytes[0]},t}(u.SerializedType),h=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.from=function(e){if(e instanceof t)return e;var r=[];return e.forEach((function(e){r.push(f.from(e).toBytes())})),new t(c.Buffer.concat(r))},t.fromParser=function(e){for(var r=[];!e.end()&&(r.push(f.fromParser(e).toBytes()),0!==e.peek()&&255!==e.peek()););return new t(c.Buffer.concat(r))},t.prototype.toJSON=function(){for(var e=[],t=new a.BinaryParser(this.toString());!t.end();)e.push(f.fromParser(t).toJSON());return e},t}(u.SerializedType),l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.from=function(e){if(e instanceof t)return e;if(n=e,Array.isArray(n)&&0===n.length||Array.isArray(n)&&Array.isArray(n[0])&&0===n[0].length||Array.isArray(n)&&Array.isArray(n[0])&&function(e){return void 0!==e.issuer||void 0!==e.account||void 0!==e.currency}(n[0][0])){var r=[];return e.forEach((function(e){r.push(h.from(e).toBytes()),r.push(c.Buffer.from([255]))})),r[r.length-1]=c.Buffer.from([0]),new t(c.Buffer.concat(r))}var n;throw new Error("Cannot construct PathSet from given value")},t.fromParser=function(e){for(var r=[];!e.end()&&(r.push(h.fromParser(e).toBytes()),r.push(e.read(1)),0!=r[r.length-1][0]););return new t(c.Buffer.concat(r))},t.prototype.toJSON=function(){for(var e=[],t=new a.BinaryParser(this.toString());!t.end();)e.push(h.fromParser(t).toJSON()),t.skip(1);return e},t}(u.SerializedType);t.PathSet=l},1883:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.Comparable=t.SerializedType=void 0;var o=r(7894),s=r(9691),a=function(){function e(e){this.bytes=s.Buffer.alloc(0),this.bytes=null!=e?e:s.Buffer.alloc(0)}return e.fromParser=function(e,t){throw new Error("fromParser not implemented")},e.from=function(e){throw new Error("from not implemented")},e.prototype.toBytesSink=function(e){e.put(this.bytes)},e.prototype.toHex=function(){return this.toBytes().toString("hex").toUpperCase()},e.prototype.toBytes=function(){if(this.bytes)return this.bytes;var e=new o.BytesList;return this.toBytesSink(e),e.toBytes()},e.prototype.toJSON=function(){return this.toHex()},e.prototype.toString=function(){return this.toHex()},e}();t.SerializedType=a;var u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.lt=function(e){return this.compareTo(e)<0},t.prototype.eq=function(e){return 0===this.compareTo(e)},t.prototype.gt=function(e){return this.compareTo(e)>0},t.prototype.gte=function(e){return this.compareTo(e)>-1},t.prototype.lte=function(e){return this.compareTo(e)<1},t.prototype.compareTo=function(e){throw new Error("cannot compare "+this.toString()+" and "+e.toString())},t}(a);t.Comparable=u},1194:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.STArray=void 0;var o=r(1883),s=r(409),a=r(6633),u=r(9691),c=u.Buffer.from([241]),f="ArrayEndMarker",h=u.Buffer.from([225]),l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.fromParser=function(e){for(var r=[];!e.end();){var n=e.readField();if(n.name===f)break;r.push(n.header,e.readFieldValue(n).toBytes(),h)}return r.push(c),new t(u.Buffer.concat(r))},t.from=function(e){if(e instanceof t)return e;if(n=e,Array.isArray(n)&&(0===n.length||"object"==typeof n[0])){var r=[];return e.forEach((function(e){r.push(s.STObject.from(e).toBytes())})),r.push(c),new t(u.Buffer.concat(r))}var n;throw new Error("Cannot construct STArray from value given")},t.prototype.toJSON=function(){for(var e=[],t=new a.BinaryParser(this.toString());!t.end();){var r=t.readField();if(r.name===f)break;var n={};n[r.name]=s.STObject.fromParser(t).toJSON(),e.push(n)}return e},t}(o.SerializedType);t.STArray=l},409:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.STObject=void 0;var o=r(4543),s=r(1883),a=r(8914),u=r(6633),c=r(7894),f=r(9691).Buffer.from([225]),h="ObjectEndMarker",l="STObject",d="DestinationTag",p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.fromParser=function(e){for(var r=new c.BytesList,n=new c.BinarySerializer(r);!e.end();){var i=e.readField();if(i.name===h)break;var o=e.readFieldValue(i);n.writeFieldAndValue(i,o),i.type.name===l&&n.put(f)}return new t(r.toBytes())},t.from=function(e,r){if(e instanceof t)return e;var n=new c.BytesList,i=new c.BinarySerializer(n),s=Object.entries(e).reduce((function(t,r){var n,i=r[0],o=r[1],s=void 0;return a.isValidXAddress(o)&&function(e,t){if(void 0!==e.SourceTag&&void 0!==t.SourceTag)throw new Error("Cannot have Account X-Address and SourceTag");if(void 0!==e[d]&&void 0!==t[d])throw new Error("Cannot have Destination X-Address and DestinationTag")}(s=function(e,t){var r,n,i,o=a.xAddressToClassicAddress(t);if("Destination"===e)i=d;else if("Account"===e)i="SourceTag";else if(!1!==o.tag)throw new Error(e+" cannot have an associated tag");return!1!==o.tag?((r={})[e]=o.classicAddress,r[i]=o.tag,r):((n={})[e]=o.classicAddress,n)}(i,o),e),Object.assign(t,null!=s?s:((n={})[i]=o,n))}),{}),u=Object.keys(s).map((function(e){return o.Field[e]})).filter((function(e){return void 0!==e&&void 0!==s[e.name]&&e.isSerialized})).sort((function(e,t){return e.ordinal-t.ordinal}));return void 0!==r&&(u=u.filter(r)),u.forEach((function(e){var t=e.associatedType.from(s[e.name]);i.writeFieldAndValue(e,t),e.type.name===l&&i.put(f)})),new t(n.toBytes())},t.prototype.toJSON=function(){for(var e=new u.BinaryParser(this.toString()),t={};!e.end();){var r=e.readField();if(r.name===h)break;t[r.name]=e.readFieldValue(r).toJSON()}return t},t}(s.SerializedType);t.STObject=p},3774:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.UInt16=void 0;var o=r(6770),s=r(9691),a=function(e){function t(r){return e.call(this,null!=r?r:t.defaultUInt16.bytes)||this}return i(t,e),t.fromParser=function(e){return new t(e.read(t.width))},t.from=function(e){if(e instanceof t)return e;if("number"==typeof e){var r=s.Buffer.alloc(t.width);return r.writeUInt16BE(e,0),new t(r)}throw new Error("Can not construct UInt16 with given value")},t.prototype.valueOf=function(){return this.bytes.readUInt16BE(0)},t.width=2,t.defaultUInt16=new t(s.Buffer.alloc(t.width)),t}(o.UInt);t.UInt16=a},9441:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.UInt32=void 0;var o=r(6770),s=r(9691),a=function(e){function t(r){return e.call(this,null!=r?r:t.defaultUInt32.bytes)||this}return i(t,e),t.fromParser=function(e){return new t(e.read(t.width))},t.from=function(e){if(e instanceof t)return e;var r=s.Buffer.alloc(t.width);if("string"==typeof e){var n=Number.parseInt(e);return r.writeUInt32BE(n,0),new t(r)}if("number"==typeof e)return r.writeUInt32BE(e,0),new t(r);throw new Error("Cannot construct UInt32 from given value")},t.prototype.valueOf=function(){return this.bytes.readUInt32BE(0)},t.width=4,t.defaultUInt32=new t(s.Buffer.alloc(t.width)),t}(o.UInt);t.UInt32=a},7569:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.UInt64=void 0;var o=r(6770),s=r(4736),a=r(4736),u=r(9691),c=/^[a-fA-F0-9]{1,16}$/,f=s(4294967295),h=function(e){function t(r){return e.call(this,null!=r?r:t.defaultUInt64.bytes)||this}return i(t,e),t.fromParser=function(e){return new t(e.read(t.width))},t.from=function(e){if(e instanceof t)return e;if(u.Buffer.alloc(t.width),"number"==typeof e){if(e<0)throw new Error("value must be an unsigned integer");var r,n=s(e);return(r=[u.Buffer.alloc(4),u.Buffer.alloc(4)])[0].writeUInt32BE(Number(n.shiftRight(32)),0),r[1].writeUInt32BE(Number(n.and(f)),0),new t(u.Buffer.concat(r))}if("string"==typeof e){if(!c.test(e))throw new Error(e+" is not a valid hex-string");var i=e.padStart(16,"0");return new t(u.Buffer.from(i,"hex"))}if(a.isInstance(e))return(r=[u.Buffer.alloc(4),u.Buffer.alloc(4)])[0].writeUInt32BE(Number(e.shiftRight(s(32))),0),r[1].writeUInt32BE(Number(e.and(f)),0),new t(u.Buffer.concat(r));throw new Error("Cannot construct UInt64 from given value")},t.prototype.toJSON=function(){return this.bytes.toString("hex").toUpperCase()},t.prototype.valueOf=function(){var e=s(this.bytes.slice(0,4).readUInt32BE(0)),t=s(this.bytes.slice(4).readUInt32BE(0));return e.shiftLeft(s(32)).or(t)},t.prototype.toBytes=function(){return this.bytes},t.width=8,t.defaultUInt64=new t(u.Buffer.alloc(t.width)),t}(o.UInt);t.UInt64=h},7636:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.UInt8=void 0;var o=r(6770),s=r(9691),a=function(e){function t(r){return e.call(this,null!=r?r:t.defaultUInt8.bytes)||this}return i(t,e),t.fromParser=function(e){return new t(e.read(t.width))},t.from=function(e){if(e instanceof t)return e;if("number"==typeof e){var r=s.Buffer.alloc(t.width);return r.writeUInt8(e,0),new t(r)}throw new Error("Cannot construct UInt8 from given value")},t.prototype.valueOf=function(){return this.bytes.readUInt8(0)},t.width=1,t.defaultUInt8=new t(s.Buffer.alloc(t.width)),t}(o.UInt);t.UInt8=a},6770:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.UInt=void 0;var o=function(e){function t(t){return e.call(this,t)||this}return i(t,e),t.prototype.compareTo=function(e){return(t=this.valueOf())<(r=e.valueOf())?-1:t==r?0:1;var t,r},t.prototype.toJSON=function(){var e=this.valueOf();return"number"==typeof e?e:e.toString()},t}(r(1883).Comparable);t.UInt=o},9403:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.Vector256=void 0;var o=r(1883),s=r(9334),a=r(7894),u=function(e){function t(t){return e.call(this,t)||this}return i(t,e),t.fromParser=function(e,r){for(var n=new a.BytesList,i=(null!=r?r:e.size())/32,o=0;o<i;o++)s.Hash256.fromParser(e).toBytesSink(n);return new t(n.toBytes())},t.from=function(e){if(e instanceof t)return e;if(n=e,Array.isArray(n)&&(0===n.length||"string"==typeof n[0])){var r=new a.BytesList;return e.forEach((function(e){s.Hash256.from(e).toBytesSink(r)})),new t(r.toBytes())}var n;throw new Error("Cannot construct Vector256 from given value")},t.prototype.toJSON=function(){if(this.bytes.byteLength%32!=0)throw new Error("Invalid bytes for Vector256");for(var e=[],t=0;t<this.bytes.byteLength;t+=32)e.push(this.bytes.slice(t,t+32).toString("hex").toUpperCase());return e},t}(o.SerializedType);t.Vector256=u},9691:(e,t,r)=>{"use strict";var n=r(9742),i=r(645),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=u,t.SlowBuffer=function(e){return+e!=e&&(e=0),u.alloc(+e)},t.INSPECT_MAX_BYTES=50;var s=2147483647;function a(e){if(e>s)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,u.prototype),t}function u(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return h(e)}return c(e,t,r)}function c(e,t,r){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!u.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var r=0|m(e,t),n=a(r),i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}(e,t);if(ArrayBuffer.isView(e))return l(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(z(e,ArrayBuffer)||e&&z(e.buffer,ArrayBuffer))return d(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(z(e,SharedArrayBuffer)||e&&z(e.buffer,SharedArrayBuffer)))return d(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return u.from(n,t,r);var i=function(e){if(u.isBuffer(e)){var t=0|p(e.length),r=a(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||V(e.length)?a(0):l(e):"Buffer"===e.type&&Array.isArray(e.data)?l(e.data):void 0}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return u.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function f(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function h(e){return f(e),a(e<0?0:0|p(e))}function l(e){for(var t=e.length<0?0:0|p(e.length),r=a(t),n=0;n<t;n+=1)r[n]=255&e[n];return r}function d(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');var n;return n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),Object.setPrototypeOf(n,u.prototype),n}function p(e){if(e>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|e}function m(e,t){if(u.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||z(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return F(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return q(e).length;default:if(i)return n?-1:F(e).length;t=(""+t).toLowerCase(),i=!0}}function g(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return k(this,t,r);case"utf8":case"utf-8":return x(this,t,r);case"ascii":return P(this,t,r);case"latin1":case"binary":return j(this,t,r);case"base64":return O(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function y(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function b(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),V(r=+r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=u.from(t,n)),u.isBuffer(t))return 0===t.length?-1:v(e,t,r,n,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):v(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function v(e,t,r,n,i){var o,s=1,a=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;s=2,a/=2,u/=2,r/=2}function c(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){var f=-1;for(o=r;o<a;o++)if(c(e,o)===c(t,-1===f?0:o-f)){if(-1===f&&(f=o),o-f+1===u)return f*s}else-1!==f&&(o-=o-f),f=-1}else for(r+u>a&&(r=a-u),o=r;o>=0;o--){for(var h=!0,l=0;l<u;l++)if(c(e,o+l)!==c(t,l)){h=!1;break}if(h)return o}return-1}function w(e,t,r,n){r=Number(r)||0;var i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;var o=t.length;n>o/2&&(n=o/2);for(var s=0;s<n;++s){var a=parseInt(t.substr(2*s,2),16);if(V(a))return s;e[r+s]=a}return s}function _(e,t,r,n){return U(F(t,e.length-r),e,r,n)}function S(e,t,r,n){return U(function(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function M(e,t,r,n){return S(e,t,r,n)}function A(e,t,r,n){return U(q(t),e,r,n)}function E(e,t,r,n){return U(function(e,t){for(var r,n,i,o=[],s=0;s<e.length&&!((t-=2)<0);++s)n=(r=e.charCodeAt(s))>>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function O(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function x(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i<r;){var o,s,a,u,c=e[i],f=null,h=c>239?4:c>223?3:c>191?2:1;if(i+h<=r)switch(h){case 1:c<128&&(f=c);break;case 2:128==(192&(o=e[i+1]))&&(u=(31&c)<<6|63&o)>127&&(f=u);break;case 3:o=e[i+1],s=e[i+2],128==(192&o)&&128==(192&s)&&(u=(15&c)<<12|(63&o)<<6|63&s)>2047&&(u<55296||u>57343)&&(f=u);break;case 4:o=e[i+1],s=e[i+2],a=e[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(u=(15&c)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(f=u)}null===f?(f=65533,h=1):f>65535&&(f-=65536,n.push(f>>>10&1023|55296),f=56320|1023&f),n.push(f),i+=h}return function(e){var t=e.length;if(t<=T)return String.fromCharCode.apply(String,e);for(var r="",n=0;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=T));return r}(n)}t.kMaxLength=s,u.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),u.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||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."),Object.defineProperty(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}}),u.poolSize=8192,u.from=function(e,t,r){return c(e,t,r)},Object.setPrototypeOf(u.prototype,Uint8Array.prototype),Object.setPrototypeOf(u,Uint8Array),u.alloc=function(e,t,r){return function(e,t,r){return f(e),e<=0?a(e):void 0!==t?"string"==typeof r?a(e).fill(t,r):a(e).fill(t):a(e)}(e,t,r)},u.allocUnsafe=function(e){return h(e)},u.allocUnsafeSlow=function(e){return h(e)},u.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==u.prototype},u.compare=function(e,t){if(z(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),z(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),!u.isBuffer(e)||!u.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var r=e.length,n=t.length,i=0,o=Math.min(r,n);i<o;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0},u.isEncoding=function(e){switch(String(e).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!0;default:return!1}},u.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return u.alloc(0);var r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var n=u.allocUnsafe(t),i=0;for(r=0;r<e.length;++r){var o=e[r];if(z(o,Uint8Array)&&(o=u.from(o)),!u.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(n,i),i+=o.length}return n},u.byteLength=m,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)y(this,t,t+1);return this},u.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)y(this,t,t+3),y(this,t+1,t+2);return this},u.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)y(this,t,t+7),y(this,t+1,t+6),y(this,t+2,t+5),y(this,t+3,t+4);return this},u.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?x(this,0,e):g.apply(this,arguments)},u.prototype.toLocaleString=u.prototype.toString,u.prototype.equals=function(e){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===u.compare(this,e)},u.prototype.inspect=function(){var e="",r=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},o&&(u.prototype[o]=u.prototype.inspect),u.prototype.compare=function(e,t,r,n,i){if(z(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),!u.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(t>>>=0),a=Math.min(o,s),c=this.slice(n,i),f=e.slice(t,r),h=0;h<a;++h)if(c[h]!==f[h]){o=c[h],s=f[h];break}return o<s?-1:s<o?1:0},u.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},u.prototype.indexOf=function(e,t,r){return b(this,e,t,r,!0)},u.prototype.lastIndexOf=function(e,t,r){return b(this,e,t,r,!1)},u.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return w(this,e,t,r);case"utf8":case"utf-8":return _(this,e,t,r);case"ascii":return S(this,e,t,r);case"latin1":case"binary":return M(this,e,t,r);case"base64":return A(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var T=4096;function P(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}function j(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}function k(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=t;o<r;++o)i+=$[e[o]];return i}function I(e,t,r){for(var n=e.slice(t,r),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function R(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function C(e,t,r,n,i,o){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function B(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function N(e,t,r,n,o){return t=+t,r>>>=0,o||B(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function L(e,t,r,n,o){return t=+t,r>>>=0,o||B(e,0,r,8),i.write(e,t,r,n,52,8),r+8}u.prototype.slice=function(e,t){var r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);var n=this.subarray(e,t);return Object.setPrototypeOf(n,u.prototype),n},u.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||R(e,t,this.length);for(var n=this[e],i=1,o=0;++o<t&&(i*=256);)n+=this[e+o]*i;return n},u.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||R(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},u.prototype.readUInt8=function(e,t){return e>>>=0,t||R(e,1,this.length),this[e]},u.prototype.readUInt16LE=function(e,t){return e>>>=0,t||R(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUInt16BE=function(e,t){return e>>>=0,t||R(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUInt32LE=function(e,t){return e>>>=0,t||R(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUInt32BE=function(e,t){return e>>>=0,t||R(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||R(e,t,this.length);for(var n=this[e],i=1,o=0;++o<t&&(i*=256);)n+=this[e+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*t)),n},u.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||R(e,t,this.length);for(var n=t,i=1,o=this[e+--n];n>0&&(i*=256);)o+=this[e+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},u.prototype.readInt8=function(e,t){return e>>>=0,t||R(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){e>>>=0,t||R(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(e,t){e>>>=0,t||R(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(e,t){return e>>>=0,t||R(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return e>>>=0,t||R(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readFloatLE=function(e,t){return e>>>=0,t||R(e,4,this.length),i.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return e>>>=0,t||R(e,4,this.length),i.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return e>>>=0,t||R(e,8,this.length),i.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return e>>>=0,t||R(e,8,this.length),i.read(this,e,!1,52,8)},u.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||C(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[t]=255&e;++o<r&&(i*=256);)this[t+o]=e/i&255;return t+r},u.prototype.writeUIntBE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||C(this,e,t,r,Math.pow(2,8*r)-1,0);var i=r-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r},u.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||C(this,e,t,1,255,0),this[t]=255&e,t+1},u.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||C(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||C(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||C(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},u.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||C(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);C(this,e,t,r,i-1,-i)}var o=0,s=1,a=0;for(this[t]=255&e;++o<r&&(s*=256);)e<0&&0===a&&0!==this[t+o-1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+r},u.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);C(this,e,t,r,i-1,-i)}var o=r-1,s=1,a=0;for(this[t+o]=255&e;--o>=0&&(s*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+r},u.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||C(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||C(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||C(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||C(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},u.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||C(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeFloatLE=function(e,t,r){return N(this,e,t,!0,r)},u.prototype.writeFloatBE=function(e,t,r){return N(this,e,t,!1,r)},u.prototype.writeDoubleLE=function(e,t,r){return L(this,e,t,!0,r)},u.prototype.writeDoubleBE=function(e,t,r){return L(this,e,t,!1,r)},u.prototype.copy=function(e,t,r,n){if(!u.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);var i=n-r;if(this===e&&"function"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(t,r,n);else if(this===e&&r<t&&t<n)for(var o=i-1;o>=0;--o)e[o+t]=this[o+r];else Uint8Array.prototype.set.call(e,this.subarray(r,n),t);return i},u.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!u.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){var i=e.charCodeAt(0);("utf8"===n&&i<128||"latin1"===n)&&(e=i)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;var o;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(o=t;o<r;++o)this[o]=e;else{var s=u.isBuffer(e)?e:u.from(e,n),a=s.length;if(0===a)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(o=0;o<r-t;++o)this[o+t]=s[o%a]}return this};var D=/[^+/0-9A-Za-z-_]/g;function F(e,t){var r;t=t||1/0;for(var n=e.length,i=null,o=[],s=0;s<n;++s){if((r=e.charCodeAt(s))>55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function q(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(D,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function U(e,t,r,n){for(var i=0;i<n&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function z(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function V(e){return e!=e}var $=function(){for(var e="0123456789abcdef",t=new Array(256),r=0;r<16;++r)for(var n=16*r,i=0;i<16;++i)t[n+i]=e[r]+e[i];return t}()},9140:(e,t,r)=>{"use strict";var n=r(8764).Buffer;const i=r(9282),o=r(9931),s=r(3715),a=r(6266),u=r(8914),c=r(3342),f=r(864),h=a.eddsa("ed25519"),l=a.ec("secp256k1"),{hexToBytes:d}=f,{bytesToHex:p}=f;function m(e){return s.sha512().update(e).digest().slice(0,32)}const g={deriveKeypair(e,t){const r="00"+c.derivePrivateKey(e,t).toString(16,64).toUpperCase(),n=p(l.keyFromPrivate(r.slice(2)).getPublic().encodeCompressed());return{privateKey:r,publicKey:n}},sign:(e,t)=>p(l.sign(m(e),d(t),{canonical:!0}).toDER()),verify:(e,t,r)=>l.verify(m(e),t,d(r))},y={deriveKeypair(e){const t=m(e);return{privateKey:"ED"+p(t),publicKey:"ED"+p(h.keyFromSecret(t).pubBytes())}},sign:(e,t)=>(i(Array.isArray(e),"message must be array of octets"),p(h.sign(e,d(t).slice(1)).toBytes())),verify:(e,t,r)=>h.verify(e,d(t),d(r).slice(1))};function b(e){return{"ecdsa-secp256k1":g,ed25519:y}[e]}function v(e){const t=d(e);return 33===t.length&&237===t[0]?"ed25519":"ecdsa-secp256k1"}function w(e){return u.encodeAccountID(f.computePublicKeyHash(e))}const{decodeSeed:_}=u;e.exports={generateSeed:function(e={}){i(!e.entropy||e.entropy.length>=16,"entropy too short");const t=e.entropy?e.entropy.slice(0,16):o(16),r="ed25519"===e.algorithm?"ed25519":"secp256k1";return u.encodeSeed(t,r)},deriveKeypair:function(e,t){const r=u.decodeSeed(e),n=b("ed25519"===r.type?"ed25519":"ecdsa-secp256k1"),i=n.deriveKeypair(r.bytes,t),o=m("This test message should verify."),s=n.sign(o,i.privateKey);if(!0!==n.verify(o,s,i.publicKey))throw new Error("derived keypair did not generate verifiable signature");return i},sign:function(e,t){return b(v(t)).sign(d(e),t)},verify:function(e,t,r){return b(v(r)).verify(d(e),t,r)},deriveAddress:function(e){return w(n.from(d(e)))},deriveNodeAddress:function(e){const t=u.decodeNodePublic(e);return w(c.accountPublicFromPublicGenerator(t))},decodeSeed:_}},3342:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.accountPublicFromPublicGenerator=t.derivePrivateKey=void 0;const n=r(6266),i=r(7268),o=n.ec("secp256k1");function s(e,t){const r=o.curve.n;for(let n=0;n<=4294967295;n++){const o=(new i.default).add(e);void 0!==t&&o.addU32(t),o.addU32(n);const s=o.first256BN();if(s.cmpn(0)>0&&s.cmp(r)<0)return s}throw new Error("impossible unicorn ;)")}t.derivePrivateKey=function(e,t={}){const r=t.validator,n=o.curve.n,i=s(e);if(r)return i;const a=o.g.mul(i),u=t.accountIndex||0;return s(a.encodeCompressed(),u).add(i).mod(n)},t.accountPublicFromPublicGenerator=function(e){const t=o.curve.decodePoint(e),r=s(e,0),n=o.g.mul(r);return t.add(n).encodeCompressed()}},7268:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(3715),i=r(6331);t.default=class{constructor(){this.hash=n.sha512()}add(e){return this.hash.update(e),this}addU32(e){return this.add([e>>>24&255,e>>>16&255,e>>>8&255,255&e])}finish(){return this.hash.digest()}first256(){return this.finish().slice(0,32)}first256BN(){return new i(this.first256())}}},864:(e,t,r)=>{"use strict";var n=r(8764).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.computePublicKeyHash=t.hexToBytes=t.bytesToHex=void 0;const i=r(9282),o=r(3715),s=r(6331);t.bytesToHex=function(e){return e.map((e=>{const t=e.toString(16).toUpperCase();return t.length>1?t:`0${t}`})).join("")},t.hexToBytes=function(e){return i(e.length%2==0),new s(e,16).toArray(null,e.length/2)},t.computePublicKeyHash=function(e){const t=o.sha256().update(e).digest(),r=o.ripemd160().update(t).digest();return n.from(r)}},6331:function(e,t,r){!function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function o(e,t,r){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var s;"object"==typeof e?e.exports=o:t.BN=o,o.BN=o,o.wordSize=26;try{s="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(6421).Buffer}catch(e){}function a(e,t){var r=e.charCodeAt(t);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void n(!1,"Invalid character in "+e)}function u(e,t,r){var n=a(e,r);return r-1>=t&&(n|=a(e,r-1)<<4),n}function c(e,t,r,i){for(var o=0,s=0,a=Math.min(e.length,r),u=t;u<a;u++){var c=e.charCodeAt(u)-48;o*=i,s=c>=49?c-49+10:c>=17?c-17+10:c,n(c>=0&&s<i,"Invalid character"),o+=s}return o}function f(e,t){e.words=t.words,e.length=t.length,e.negative=t.negative,e.red=t.red}if(o.isBN=function(e){return e instanceof o||null!==e&&"object"==typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<e.length&&(16===t?this._parseHex(e,i,r):(this._parseBase(e,t,i),"le"===r&&this._initArray(this.toArray(),t,r)))},o.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},o.prototype._initArray=function(e,t,r){if(n("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var o,s,a=0;if("be"===r)for(i=e.length-1,o=0;i>=0;i-=3)s=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===r)for(i=0,o=0;i<e.length;i+=3)s=e[i]|e[i+1]<<8|e[i+2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this._strip()},o.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var i,o=0,s=0;if("be"===r)for(n=e.length-1;n>=t;n-=2)i=u(e,t,n)<<o,this.words[s]|=67108863&i,o>=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;else for(n=(e.length-t)%2==0?t+1:t;n<e.length;n+=2)i=u(e,t,n)<<o,this.words[s]|=67108863&i,o>=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;this._strip()},o.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var o=e.length-r,s=o%n,a=Math.min(o,o-s)+r,u=0,f=r;f<a;f+=n)u=c(e,f,f+n,t),this.imuln(i),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==s){var h=1;for(u=c(e,f,e.length,t),f=0;f<s;f++)h*=t;this.imuln(h),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this._strip()},o.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},o.prototype._move=function(e){f(e,this)},o.prototype.clone=function(){var e=new o(null);return this.copy(e),e},o.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},o.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=h}catch(e){o.prototype.inspect=h}else o.prototype.inspect=h;function h(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var l=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],d=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],p=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function m(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],o=0|t.words[0],s=i*o,a=67108863&s,u=s/67108864|0;r.words[0]=a;for(var c=1;c<n;c++){for(var f=u>>>26,h=67108863&u,l=Math.min(c,t.length-1),d=Math.max(0,c-e.length+1);d<=l;d++){var p=c-d|0;f+=(s=(i=0|e.words[p])*(o=0|t.words[d])+h)/67108864|0,h=67108863&s}r.words[c]=0|h,u=0|f}return 0!==u?r.words[c]=0|u:r.length--,r._strip()}o.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,o=0,s=0;s<this.length;s++){var a=this.words[s],u=(16777215&(a<<i|o)).toString(16);r=0!=(o=a>>>24-i&16777215)||s!==this.length-1?l[6-u.length]+u+r:u+r,(i+=2)>=26&&(i-=26,s--)}for(0!==o&&(r=o.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var c=d[e],f=p[e];r="";var h=this.clone();for(h.negative=0;!h.isZero();){var m=h.modrn(f).toString(e);r=(h=h.idivn(f)).isZero()?m+r:l[c-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16,2)},s&&(o.prototype.toBuffer=function(e,t){return this.toArrayLike(s,e,t)}),o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},o.prototype.toArrayLike=function(e,t,r){this._strip();var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0");var s=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,o);return this["_toArrayLike"+("le"===t?"LE":"BE")](s,i),s},o.prototype._toArrayLikeLE=function(e,t){for(var r=0,n=0,i=0,o=0;i<this.length;i++){var s=this.words[i]<<o|n;e[r++]=255&s,r<e.length&&(e[r++]=s>>8&255),r<e.length&&(e[r++]=s>>16&255),6===o?(r<e.length&&(e[r++]=s>>24&255),n=0,o=0):(n=s>>>24,o+=2)}if(r<e.length)for(e[r++]=n;r<e.length;)e[r++]=0},o.prototype._toArrayLikeBE=function(e,t){for(var r=e.length-1,n=0,i=0,o=0;i<this.length;i++){var s=this.words[i]<<o|n;e[r--]=255&s,r>=0&&(e[r--]=s>>8&255),r>=0&&(e[r--]=s>>16&255),6===o?(r>=0&&(e[r--]=s>>24&255),n=0,o=0):(n=s>>>24,o+=2)}if(r>=0)for(e[r--]=n;r>=0;)e[r--]=0},Math.clz32?o.prototype._countBits=function(e){return 32-Math.clz32(e)}:o.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0==(8191&t)&&(r+=13,t>>>=13),0==(127&t)&&(r+=7,t>>>=7),0==(15&t)&&(r+=4,t>>>=4),0==(3&t)&&(r+=2,t>>>=2),0==(1&t)&&r++,r},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var r=this._zeroBits(this.words[t]);if(e+=r,26!==r)break}return e},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},o.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this._strip()},o.prototype.ior=function(e){return n(0==(this.negative|e.negative)),this.iuor(e)},o.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;r<t.length;r++)this.words[r]=this.words[r]&e.words[r];return this.length=t.length,this._strip()},o.prototype.iand=function(e){return n(0==(this.negative|e.negative)),this.iuand(e)},o.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;n<r.length;n++)this.words[n]=t.words[n]^r.words[n];if(this!==t)for(;n<t.length;n++)this.words[n]=t.words[n];return this.length=t.length,this._strip()},o.prototype.ixor=function(e){return n(0==(this.negative|e.negative)),this.iuxor(e)},o.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this._strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<<i:this.words[r]&~(1<<i),this._strip()},o.prototype.iadd=function(e){var t,r,n;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(r=this,n=e):(r=e,n=this);for(var i=0,o=0;o<n.length;o++)t=(0|r.words[o])+(0|n.words[o])+i,this.words[o]=67108863&t,i=t>>>26;for(;0!==i&&o<r.length;o++)t=(0|r.words[o])+i,this.words[o]=67108863&t,i=t>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},o.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var o=0,s=0;s<n.length;s++)o=(t=(0|r.words[s])-(0|n.words[s])+o)>>26,this.words[s]=67108863&t;for(;0!==o&&s<r.length;s++)o=(t=(0|r.words[s])+o)>>26,this.words[s]=67108863&t;if(0===o&&s<r.length&&r!==this)for(;s<r.length;s++)this.words[s]=r.words[s];return this.length=Math.max(this.length,s),r!==this&&(this.negative=1),this._strip()},o.prototype.sub=function(e){return this.clone().isub(e)};var g=function(e,t,r){var n,i,o,s=e.words,a=t.words,u=r.words,c=0,f=0|s[0],h=8191&f,l=f>>>13,d=0|s[1],p=8191&d,m=d>>>13,g=0|s[2],y=8191&g,b=g>>>13,v=0|s[3],w=8191&v,_=v>>>13,S=0|s[4],M=8191&S,A=S>>>13,E=0|s[5],O=8191&E,x=E>>>13,T=0|s[6],P=8191&T,j=T>>>13,k=0|s[7],I=8191&k,R=k>>>13,C=0|s[8],B=8191&C,N=C>>>13,L=0|s[9],D=8191&L,F=L>>>13,q=0|a[0],U=8191&q,z=q>>>13,V=0|a[1],$=8191&V,H=V>>>13,X=0|a[2],K=8191&X,J=X>>>13,Z=0|a[3],G=8191&Z,W=Z>>>13,Y=0|a[4],Q=8191&Y,ee=Y>>>13,te=0|a[5],re=8191&te,ne=te>>>13,ie=0|a[6],oe=8191&ie,se=ie>>>13,ae=0|a[7],ue=8191&ae,ce=ae>>>13,fe=0|a[8],he=8191&fe,le=fe>>>13,de=0|a[9],pe=8191&de,me=de>>>13;r.negative=e.negative^t.negative,r.length=19;var ge=(c+(n=Math.imul(h,U))|0)+((8191&(i=(i=Math.imul(h,z))+Math.imul(l,U)|0))<<13)|0;c=((o=Math.imul(l,z))+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(p,U),i=(i=Math.imul(p,z))+Math.imul(m,U)|0,o=Math.imul(m,z);var ye=(c+(n=n+Math.imul(h,$)|0)|0)+((8191&(i=(i=i+Math.imul(h,H)|0)+Math.imul(l,$)|0))<<13)|0;c=((o=o+Math.imul(l,H)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(y,U),i=(i=Math.imul(y,z))+Math.imul(b,U)|0,o=Math.imul(b,z),n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,H)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,H)|0;var be=(c+(n=n+Math.imul(h,K)|0)|0)+((8191&(i=(i=i+Math.imul(h,J)|0)+Math.imul(l,K)|0))<<13)|0;c=((o=o+Math.imul(l,J)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(w,U),i=(i=Math.imul(w,z))+Math.imul(_,U)|0,o=Math.imul(_,z),n=n+Math.imul(y,$)|0,i=(i=i+Math.imul(y,H)|0)+Math.imul(b,$)|0,o=o+Math.imul(b,H)|0,n=n+Math.imul(p,K)|0,i=(i=i+Math.imul(p,J)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,J)|0;var ve=(c+(n=n+Math.imul(h,G)|0)|0)+((8191&(i=(i=i+Math.imul(h,W)|0)+Math.imul(l,G)|0))<<13)|0;c=((o=o+Math.imul(l,W)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(M,U),i=(i=Math.imul(M,z))+Math.imul(A,U)|0,o=Math.imul(A,z),n=n+Math.imul(w,$)|0,i=(i=i+Math.imul(w,H)|0)+Math.imul(_,$)|0,o=o+Math.imul(_,H)|0,n=n+Math.imul(y,K)|0,i=(i=i+Math.imul(y,J)|0)+Math.imul(b,K)|0,o=o+Math.imul(b,J)|0,n=n+Math.imul(p,G)|0,i=(i=i+Math.imul(p,W)|0)+Math.imul(m,G)|0,o=o+Math.imul(m,W)|0;var we=(c+(n=n+Math.imul(h,Q)|0)|0)+((8191&(i=(i=i+Math.imul(h,ee)|0)+Math.imul(l,Q)|0))<<13)|0;c=((o=o+Math.imul(l,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(O,U),i=(i=Math.imul(O,z))+Math.imul(x,U)|0,o=Math.imul(x,z),n=n+Math.imul(M,$)|0,i=(i=i+Math.imul(M,H)|0)+Math.imul(A,$)|0,o=o+Math.imul(A,H)|0,n=n+Math.imul(w,K)|0,i=(i=i+Math.imul(w,J)|0)+Math.imul(_,K)|0,o=o+Math.imul(_,J)|0,n=n+Math.imul(y,G)|0,i=(i=i+Math.imul(y,W)|0)+Math.imul(b,G)|0,o=o+Math.imul(b,W)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,ee)|0;var _e=(c+(n=n+Math.imul(h,re)|0)|0)+((8191&(i=(i=i+Math.imul(h,ne)|0)+Math.imul(l,re)|0))<<13)|0;c=((o=o+Math.imul(l,ne)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(P,U),i=(i=Math.imul(P,z))+Math.imul(j,U)|0,o=Math.imul(j,z),n=n+Math.imul(O,$)|0,i=(i=i+Math.imul(O,H)|0)+Math.imul(x,$)|0,o=o+Math.imul(x,H)|0,n=n+Math.imul(M,K)|0,i=(i=i+Math.imul(M,J)|0)+Math.imul(A,K)|0,o=o+Math.imul(A,J)|0,n=n+Math.imul(w,G)|0,i=(i=i+Math.imul(w,W)|0)+Math.imul(_,G)|0,o=o+Math.imul(_,W)|0,n=n+Math.imul(y,Q)|0,i=(i=i+Math.imul(y,ee)|0)+Math.imul(b,Q)|0,o=o+Math.imul(b,ee)|0,n=n+Math.imul(p,re)|0,i=(i=i+Math.imul(p,ne)|0)+Math.imul(m,re)|0,o=o+Math.imul(m,ne)|0;var Se=(c+(n=n+Math.imul(h,oe)|0)|0)+((8191&(i=(i=i+Math.imul(h,se)|0)+Math.imul(l,oe)|0))<<13)|0;c=((o=o+Math.imul(l,se)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(I,U),i=(i=Math.imul(I,z))+Math.imul(R,U)|0,o=Math.imul(R,z),n=n+Math.imul(P,$)|0,i=(i=i+Math.imul(P,H)|0)+Math.imul(j,$)|0,o=o+Math.imul(j,H)|0,n=n+Math.imul(O,K)|0,i=(i=i+Math.imul(O,J)|0)+Math.imul(x,K)|0,o=o+Math.imul(x,J)|0,n=n+Math.imul(M,G)|0,i=(i=i+Math.imul(M,W)|0)+Math.imul(A,G)|0,o=o+Math.imul(A,W)|0,n=n+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,ee)|0,n=n+Math.imul(y,re)|0,i=(i=i+Math.imul(y,ne)|0)+Math.imul(b,re)|0,o=o+Math.imul(b,ne)|0,n=n+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,se)|0)+Math.imul(m,oe)|0,o=o+Math.imul(m,se)|0;var Me=(c+(n=n+Math.imul(h,ue)|0)|0)+((8191&(i=(i=i+Math.imul(h,ce)|0)+Math.imul(l,ue)|0))<<13)|0;c=((o=o+Math.imul(l,ce)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(B,U),i=(i=Math.imul(B,z))+Math.imul(N,U)|0,o=Math.imul(N,z),n=n+Math.imul(I,$)|0,i=(i=i+Math.imul(I,H)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,H)|0,n=n+Math.imul(P,K)|0,i=(i=i+Math.imul(P,J)|0)+Math.imul(j,K)|0,o=o+Math.imul(j,J)|0,n=n+Math.imul(O,G)|0,i=(i=i+Math.imul(O,W)|0)+Math.imul(x,G)|0,o=o+Math.imul(x,W)|0,n=n+Math.imul(M,Q)|0,i=(i=i+Math.imul(M,ee)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,ee)|0,n=n+Math.imul(w,re)|0,i=(i=i+Math.imul(w,ne)|0)+Math.imul(_,re)|0,o=o+Math.imul(_,ne)|0,n=n+Math.imul(y,oe)|0,i=(i=i+Math.imul(y,se)|0)+Math.imul(b,oe)|0,o=o+Math.imul(b,se)|0,n=n+Math.imul(p,ue)|0,i=(i=i+Math.imul(p,ce)|0)+Math.imul(m,ue)|0,o=o+Math.imul(m,ce)|0;var Ae=(c+(n=n+Math.imul(h,he)|0)|0)+((8191&(i=(i=i+Math.imul(h,le)|0)+Math.imul(l,he)|0))<<13)|0;c=((o=o+Math.imul(l,le)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(D,U),i=(i=Math.imul(D,z))+Math.imul(F,U)|0,o=Math.imul(F,z),n=n+Math.imul(B,$)|0,i=(i=i+Math.imul(B,H)|0)+Math.imul(N,$)|0,o=o+Math.imul(N,H)|0,n=n+Math.imul(I,K)|0,i=(i=i+Math.imul(I,J)|0)+Math.imul(R,K)|0,o=o+Math.imul(R,J)|0,n=n+Math.imul(P,G)|0,i=(i=i+Math.imul(P,W)|0)+Math.imul(j,G)|0,o=o+Math.imul(j,W)|0,n=n+Math.imul(O,Q)|0,i=(i=i+Math.imul(O,ee)|0)+Math.imul(x,Q)|0,o=o+Math.imul(x,ee)|0,n=n+Math.imul(M,re)|0,i=(i=i+Math.imul(M,ne)|0)+Math.imul(A,re)|0,o=o+Math.imul(A,ne)|0,n=n+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,se)|0)+Math.imul(_,oe)|0,o=o+Math.imul(_,se)|0,n=n+Math.imul(y,ue)|0,i=(i=i+Math.imul(y,ce)|0)+Math.imul(b,ue)|0,o=o+Math.imul(b,ce)|0,n=n+Math.imul(p,he)|0,i=(i=i+Math.imul(p,le)|0)+Math.imul(m,he)|0,o=o+Math.imul(m,le)|0;var Ee=(c+(n=n+Math.imul(h,pe)|0)|0)+((8191&(i=(i=i+Math.imul(h,me)|0)+Math.imul(l,pe)|0))<<13)|0;c=((o=o+Math.imul(l,me)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(D,$),i=(i=Math.imul(D,H))+Math.imul(F,$)|0,o=Math.imul(F,H),n=n+Math.imul(B,K)|0,i=(i=i+Math.imul(B,J)|0)+Math.imul(N,K)|0,o=o+Math.imul(N,J)|0,n=n+Math.imul(I,G)|0,i=(i=i+Math.imul(I,W)|0)+Math.imul(R,G)|0,o=o+Math.imul(R,W)|0,n=n+Math.imul(P,Q)|0,i=(i=i+Math.imul(P,ee)|0)+Math.imul(j,Q)|0,o=o+Math.imul(j,ee)|0,n=n+Math.imul(O,re)|0,i=(i=i+Math.imul(O,ne)|0)+Math.imul(x,re)|0,o=o+Math.imul(x,ne)|0,n=n+Math.imul(M,oe)|0,i=(i=i+Math.imul(M,se)|0)+Math.imul(A,oe)|0,o=o+Math.imul(A,se)|0,n=n+Math.imul(w,ue)|0,i=(i=i+Math.imul(w,ce)|0)+Math.imul(_,ue)|0,o=o+Math.imul(_,ce)|0,n=n+Math.imul(y,he)|0,i=(i=i+Math.imul(y,le)|0)+Math.imul(b,he)|0,o=o+Math.imul(b,le)|0;var Oe=(c+(n=n+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,me)|0)+Math.imul(m,pe)|0))<<13)|0;c=((o=o+Math.imul(m,me)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(D,K),i=(i=Math.imul(D,J))+Math.imul(F,K)|0,o=Math.imul(F,J),n=n+Math.imul(B,G)|0,i=(i=i+Math.imul(B,W)|0)+Math.imul(N,G)|0,o=o+Math.imul(N,W)|0,n=n+Math.imul(I,Q)|0,i=(i=i+Math.imul(I,ee)|0)+Math.imul(R,Q)|0,o=o+Math.imul(R,ee)|0,n=n+Math.imul(P,re)|0,i=(i=i+Math.imul(P,ne)|0)+Math.imul(j,re)|0,o=o+Math.imul(j,ne)|0,n=n+Math.imul(O,oe)|0,i=(i=i+Math.imul(O,se)|0)+Math.imul(x,oe)|0,o=o+Math.imul(x,se)|0,n=n+Math.imul(M,ue)|0,i=(i=i+Math.imul(M,ce)|0)+Math.imul(A,ue)|0,o=o+Math.imul(A,ce)|0,n=n+Math.imul(w,he)|0,i=(i=i+Math.imul(w,le)|0)+Math.imul(_,he)|0,o=o+Math.imul(_,le)|0;var xe=(c+(n=n+Math.imul(y,pe)|0)|0)+((8191&(i=(i=i+Math.imul(y,me)|0)+Math.imul(b,pe)|0))<<13)|0;c=((o=o+Math.imul(b,me)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(D,G),i=(i=Math.imul(D,W))+Math.imul(F,G)|0,o=Math.imul(F,W),n=n+Math.imul(B,Q)|0,i=(i=i+Math.imul(B,ee)|0)+Math.imul(N,Q)|0,o=o+Math.imul(N,ee)|0,n=n+Math.imul(I,re)|0,i=(i=i+Math.imul(I,ne)|0)+Math.imul(R,re)|0,o=o+Math.imul(R,ne)|0,n=n+Math.imul(P,oe)|0,i=(i=i+Math.imul(P,se)|0)+Math.imul(j,oe)|0,o=o+Math.imul(j,se)|0,n=n+Math.imul(O,ue)|0,i=(i=i+Math.imul(O,ce)|0)+Math.imul(x,ue)|0,o=o+Math.imul(x,ce)|0,n=n+Math.imul(M,he)|0,i=(i=i+Math.imul(M,le)|0)+Math.imul(A,he)|0,o=o+Math.imul(A,le)|0;var Te=(c+(n=n+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,me)|0)+Math.imul(_,pe)|0))<<13)|0;c=((o=o+Math.imul(_,me)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(D,Q),i=(i=Math.imul(D,ee))+Math.imul(F,Q)|0,o=Math.imul(F,ee),n=n+Math.imul(B,re)|0,i=(i=i+Math.imul(B,ne)|0)+Math.imul(N,re)|0,o=o+Math.imul(N,ne)|0,n=n+Math.imul(I,oe)|0,i=(i=i+Math.imul(I,se)|0)+Math.imul(R,oe)|0,o=o+Math.imul(R,se)|0,n=n+Math.imul(P,ue)|0,i=(i=i+Math.imul(P,ce)|0)+Math.imul(j,ue)|0,o=o+Math.imul(j,ce)|0,n=n+Math.imul(O,he)|0,i=(i=i+Math.imul(O,le)|0)+Math.imul(x,he)|0,o=o+Math.imul(x,le)|0;var Pe=(c+(n=n+Math.imul(M,pe)|0)|0)+((8191&(i=(i=i+Math.imul(M,me)|0)+Math.imul(A,pe)|0))<<13)|0;c=((o=o+Math.imul(A,me)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(D,re),i=(i=Math.imul(D,ne))+Math.imul(F,re)|0,o=Math.imul(F,ne),n=n+Math.imul(B,oe)|0,i=(i=i+Math.imul(B,se)|0)+Math.imul(N,oe)|0,o=o+Math.imul(N,se)|0,n=n+Math.imul(I,ue)|0,i=(i=i+Math.imul(I,ce)|0)+Math.imul(R,ue)|0,o=o+Math.imul(R,ce)|0,n=n+Math.imul(P,he)|0,i=(i=i+Math.imul(P,le)|0)+Math.imul(j,he)|0,o=o+Math.imul(j,le)|0;var je=(c+(n=n+Math.imul(O,pe)|0)|0)+((8191&(i=(i=i+Math.imul(O,me)|0)+Math.imul(x,pe)|0))<<13)|0;c=((o=o+Math.imul(x,me)|0)+(i>>>13)|0)+(je>>>26)|0,je&=67108863,n=Math.imul(D,oe),i=(i=Math.imul(D,se))+Math.imul(F,oe)|0,o=Math.imul(F,se),n=n+Math.imul(B,ue)|0,i=(i=i+Math.imul(B,ce)|0)+Math.imul(N,ue)|0,o=o+Math.imul(N,ce)|0,n=n+Math.imul(I,he)|0,i=(i=i+Math.imul(I,le)|0)+Math.imul(R,he)|0,o=o+Math.imul(R,le)|0;var ke=(c+(n=n+Math.imul(P,pe)|0)|0)+((8191&(i=(i=i+Math.imul(P,me)|0)+Math.imul(j,pe)|0))<<13)|0;c=((o=o+Math.imul(j,me)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(D,ue),i=(i=Math.imul(D,ce))+Math.imul(F,ue)|0,o=Math.imul(F,ce),n=n+Math.imul(B,he)|0,i=(i=i+Math.imul(B,le)|0)+Math.imul(N,he)|0,o=o+Math.imul(N,le)|0;var Ie=(c+(n=n+Math.imul(I,pe)|0)|0)+((8191&(i=(i=i+Math.imul(I,me)|0)+Math.imul(R,pe)|0))<<13)|0;c=((o=o+Math.imul(R,me)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(D,he),i=(i=Math.imul(D,le))+Math.imul(F,he)|0,o=Math.imul(F,le);var Re=(c+(n=n+Math.imul(B,pe)|0)|0)+((8191&(i=(i=i+Math.imul(B,me)|0)+Math.imul(N,pe)|0))<<13)|0;c=((o=o+Math.imul(N,me)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863;var Ce=(c+(n=Math.imul(D,pe))|0)+((8191&(i=(i=Math.imul(D,me))+Math.imul(F,pe)|0))<<13)|0;return c=((o=Math.imul(F,me))+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,u[0]=ge,u[1]=ye,u[2]=be,u[3]=ve,u[4]=we,u[5]=_e,u[6]=Se,u[7]=Me,u[8]=Ae,u[9]=Ee,u[10]=Oe,u[11]=xe,u[12]=Te,u[13]=Pe,u[14]=je,u[15]=ke,u[16]=Ie,u[17]=Re,u[18]=Ce,0!==c&&(u[19]=c,r.length++),r};function y(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,o=0;o<r.length-1;o++){var s=i;i=0;for(var a=67108863&n,u=Math.min(o,t.length-1),c=Math.max(0,o-e.length+1);c<=u;c++){var f=o-c,h=(0|e.words[f])*(0|t.words[c]),l=67108863&h;a=67108863&(l=l+a|0),i+=(s=(s=s+(h/67108864|0)|0)+(l>>>26)|0)>>>26,s&=67108863}r.words[o]=a,n=s,s=i}return 0!==n?r.words[o]=n:r.length--,r._strip()}function b(e,t,r){return y(e,t,r)}function v(e,t){this.x=e,this.y=t}Math.imul||(g=m),o.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?g(this,e,t):r<63?m(this,e,t):r<1024?y(this,e,t):b(this,e,t)},v.prototype.makeRBT=function(e){for(var t=new Array(e),r=o.prototype._countBits(e)-1,n=0;n<e;n++)t[n]=this.revBin(n,r,e);return t},v.prototype.revBin=function(e,t,r){if(0===e||e===r-1)return e;for(var n=0,i=0;i<t;i++)n|=(1&e)<<t-i-1,e>>=1;return n},v.prototype.permute=function(e,t,r,n,i,o){for(var s=0;s<o;s++)n[s]=t[e[s]],i[s]=r[e[s]]},v.prototype.transform=function(e,t,r,n,i,o){this.permute(o,e,t,r,n,i);for(var s=1;s<i;s<<=1)for(var a=s<<1,u=Math.cos(2*Math.PI/a),c=Math.sin(2*Math.PI/a),f=0;f<i;f+=a)for(var h=u,l=c,d=0;d<s;d++){var p=r[f+d],m=n[f+d],g=r[f+d+s],y=n[f+d+s],b=h*g-l*y;y=h*y+l*g,g=b,r[f+d]=p+g,n[f+d]=m+y,r[f+d+s]=p-g,n[f+d+s]=m-y,d!==a&&(b=u*h-c*l,l=u*l+c*h,h=b)}},v.prototype.guessLen13b=function(e,t){var r=1|Math.max(t,e),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},v.prototype.conjugate=function(e,t,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=e[n];e[n]=e[r-n-1],e[r-n-1]=i,i=t[n],t[n]=-t[r-n-1],t[r-n-1]=-i}},v.prototype.normalize13b=function(e,t){for(var r=0,n=0;n<t/2;n++){var i=8192*Math.round(e[2*n+1]/t)+Math.round(e[2*n]/t)+r;e[n]=67108863&i,r=i<67108864?0:i/67108864|0}return e},v.prototype.convert13b=function(e,t,r,i){for(var o=0,s=0;s<t;s++)o+=0|e[s],r[2*s]=8191&o,o>>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*t;s<i;++s)r[s]=0;n(0===o),n(0==(-8192&o))},v.prototype.stub=function(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=0;return t},v.prototype.mulp=function(e,t,r){var n=2*this.guessLen13b(e.length,t.length),i=this.makeRBT(n),o=this.stub(n),s=new Array(n),a=new Array(n),u=new Array(n),c=new Array(n),f=new Array(n),h=new Array(n),l=r.words;l.length=n,this.convert13b(e.words,e.length,s,n),this.convert13b(t.words,t.length,c,n),this.transform(s,o,a,u,n,i),this.transform(c,o,f,h,n,i);for(var d=0;d<n;d++){var p=a[d]*f[d]-u[d]*h[d];u[d]=a[d]*h[d]+u[d]*f[d],a[d]=p}return this.conjugate(a,u,n),this.transform(a,u,l,o,n,i),this.conjugate(l,o,n),this.normalize13b(l,n),r.negative=e.negative^t.negative,r.length=e.length+t.length,r._strip()},o.prototype.mul=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},o.prototype.mulf=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),b(this,e,t)},o.prototype.imul=function(e){return this.clone().mulTo(e,this)},o.prototype.imuln=function(e){var t=e<0;t&&(e=-e),n("number"==typeof e),n(e<67108864);for(var r=0,i=0;i<this.length;i++){var o=(0|this.words[i])*e,s=(67108863&o)+(67108863&r);r>>=26,r+=o/67108864|0,r+=s>>>26,this.words[i]=67108863&s}return 0!==r&&(this.words[i]=r,this.length++),t?this.ineg():this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r<t.length;r++){var n=r/26|0,i=r%26;t[r]=e.words[n]>>>i&1}return t}(e);if(0===t.length)return new o(1);for(var r=this,n=0;n<t.length&&0===t[n];n++,r=r.sqr());if(++n<t.length)for(var i=r.sqr();n<t.length;n++,i=i.sqr())0!==t[n]&&(r=r.mul(i));return r},o.prototype.iushln=function(e){n("number"==typeof e&&e>=0);var t,r=e%26,i=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(t=0;t<this.length;t++){var a=this.words[t]&o,u=(0|this.words[t])-a<<r;this.words[t]=u|s,s=a>>>26-r}s&&(this.words[t]=s,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this._strip()},o.prototype.ishln=function(e){return n(0===this.negative),this.iushln(e)},o.prototype.iushrn=function(e,t,r){var i;n("number"==typeof e&&e>=0),i=t?(t-t%26)/26:0;var o=e%26,s=Math.min((e-o)/26,this.length),a=67108863^67108863>>>o<<o,u=r;if(i-=s,i=Math.max(0,i),u){for(var c=0;c<s;c++)u.words[c]=this.words[c];u.length=s}if(0===s);else if(this.length>s)for(this.length-=s,c=0;c<this.length;c++)this.words[c]=this.words[c+s];else this.words[0]=0,this.length=1;var f=0;for(c=this.length-1;c>=0&&(0!==f||c>=i);c--){var h=0|this.words[c];this.words[c]=f<<26-o|h>>>o,f=h&a}return u&&0!==f&&(u.words[u.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<<t;return!(this.length<=r||!(this.words[r]&i))},o.prototype.imaskn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this._strip()},o.prototype.maskn=function(e){return this.clone().imaskn(e)},o.prototype.iaddn=function(e){return n("number"==typeof e),n(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<=e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},o.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this._strip()},o.prototype.addn=function(e){return this.clone().iaddn(e)},o.prototype.subn=function(e){return this.clone().isubn(e)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(e,t,r){var i,o,s=e.length+r;this._expand(s);var a=0;for(i=0;i<e.length;i++){o=(0|this.words[i+r])+a;var u=(0|e.words[i])*t;a=((o-=67108863&u)>>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i<this.length-r;i++)a=(o=(0|this.words[i+r])+a)>>26,this.words[i+r]=67108863&o;if(0===a)return this._strip();for(n(-1===a),a=0,i=0;i<this.length;i++)a=(o=-(0|this.words[i])+a)>>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),i=e,s=0|i.words[i.length-1];0!=(r=26-this._countBits(s))&&(i=i.ushln(r),n.iushln(r),s=0|i.words[i.length-1]);var a,u=n.length-i.length;if("mod"!==t){(a=new o(null)).length=u+1,a.words=new Array(a.length);for(var c=0;c<a.length;c++)a.words[c]=0}var f=n.clone()._ishlnsubmul(i,1,u);0===f.negative&&(n=f,a&&(a.words[u]=1));for(var h=u-1;h>=0;h--){var l=67108864*(0|n.words[i.length+h])+(0|n.words[i.length+h-1]);for(l=Math.min(l/s|0,67108863),n._ishlnsubmul(i,l,h);0!==n.negative;)l--,n.negative=0,n._ishlnsubmul(i,1,h),n.isZero()||(n.negative^=1);a&&(a.words[h]=l)}return a&&a._strip(),n._strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:a||null,mod:n}},o.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(i=a.div.neg()),"div"!==t&&(s=a.mod.neg(),r&&0!==s.negative&&s.iadd(e)),{div:i,mod:s}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(i=a.div.neg()),{div:i,mod:a.mod}):0!=(this.negative&e.negative)?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(s=a.mod.neg(),r&&0!==s.negative&&s.isub(e)),{div:a.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modrn(e.words[0]))}:this._wordDiv(e,t);var i,s,a},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modrn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=(1<<26)%e,i=0,o=this.length-1;o>=0;o--)i=(r*i+(0|this.words[o]))%e;return t?-i:i},o.prototype.modn=function(e){return this.modrn(e)},o.prototype.idivn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*r;this.words[i]=o/e|0,r=o%e}return this._strip(),t?this.ineg():this},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),s=new o(0),a=new o(0),u=new o(1),c=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++c;for(var f=r.clone(),h=t.clone();!t.isZero();){for(var l=0,d=1;0==(t.words[0]&d)&&l<26;++l,d<<=1);if(l>0)for(t.iushrn(l);l-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(f),s.isub(h)),i.iushrn(1),s.iushrn(1);for(var p=0,m=1;0==(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(a.isOdd()||u.isOdd())&&(a.iadd(f),u.isub(h)),a.iushrn(1),u.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(a),s.isub(u)):(r.isub(t),a.isub(i),u.isub(s))}return{a,b:u,gcd:r.iushln(c)}},o.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,s=new o(1),a=new o(0),u=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,f=1;0==(t.words[0]&f)&&c<26;++c,f<<=1);if(c>0)for(t.iushrn(c);c-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var h=0,l=1;0==(r.words[0]&l)&&h<26;++h,l<<=1);if(h>0)for(r.iushrn(h);h-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);t.cmp(r)>=0?(t.isub(r),s.isub(a)):(r.isub(t),a.isub(s))}return(i=0===t.cmpn(1)?s:a).cmpn(0)<0&&i.iadd(e),i},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var o=t;t=r,r=o}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<<t;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var o=i,s=r;0!==o&&s<this.length;s++){var a=0|this.words[s];o=(a+=o)>>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},o.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},o.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){n<i?t=-1:n>i&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new O(e)},o.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var w={k256:null,p224:null,p192:null,p25519:null};function _(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function S(){_.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function M(){_.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function A(){_.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function E(){_.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function O(e){if("string"==typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function x(e){O.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}_.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},_.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},_.prototype.split=function(e,t){e.iushrn(this.n,0,t)},_.prototype.imulK=function(e){return e.imul(this.k)},i(S,_),S.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),i=0;i<n;i++)t.words[i]=e.words[i];if(t.length=n,e.length<=9)return e.words[0]=0,void(e.length=1);var o=e.words[9];for(t.words[t.length++]=o&r,i=10;i<e.length;i++){var s=0|e.words[i];e.words[i-10]=(s&r)<<4|o>>>22,o=s}o>>>=22,e.words[i-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},S.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r<e.length;r++){var n=0|e.words[r];t+=977*n,e.words[r]=67108863&t,t=64*n+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},i(M,_),i(A,_),i(E,_),E.prototype.imulK=function(e){for(var t=0,r=0;r<e.length;r++){var n=19*(0|e.words[r])+t,i=67108863&n;n>>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(w[e])return w[e];var t;if("k256"===e)t=new S;else if("p224"===e)t=new M;else if("p192"===e)t=new A;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new E}return w[e]=t,t},O.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},O.prototype._verify2=function(e,t){n(0==(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},O.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(f(e,e.umod(this.m)._forceRed(this)),e)},O.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},O.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},O.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},O.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},O.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},O.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},O.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},O.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},O.prototype.isqr=function(e){return this.imul(e,e.clone())},O.prototype.sqr=function(e){return this.mul(e,e)},O.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new o(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);n(!i.isZero());var a=new o(1).toRed(this),u=a.redNeg(),c=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new o(2*f*f).toRed(this);0!==this.pow(f,c).cmp(u);)f.redIAdd(u);for(var h=this.pow(f,i),l=this.pow(e,i.addn(1).iushrn(1)),d=this.pow(e,i),p=s;0!==d.cmp(a);){for(var m=d,g=0;0!==m.cmp(a);g++)m=m.redSqr();n(g<p);var y=this.pow(h,new o(1).iushln(p-g-1));l=l.redMul(y),h=y.redSqr(),d=d.redMul(h),p=g}return l},O.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},O.prototype.pow=function(e,t){if(t.isZero())return new o(1).toRed(this);if(0===t.cmpn(1))return e.clone();var r=new Array(16);r[0]=new o(1).toRed(this),r[1]=e;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],e);var i=r[0],s=0,a=0,u=t.bitLength()%26;for(0===u&&(u=26),n=t.length-1;n>=0;n--){for(var c=t.words[n],f=u-1;f>=0;f--){var h=c>>f&1;i!==r[0]&&(i=this.sqr(i)),0!==h||0!==s?(s<<=1,s|=h,(4==++a||0===n&&0===f)&&(i=this.mul(i,r[s]),a=0,s=0)):a=0}u=26}return i},O.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},O.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new x(e)},i(x,O),x.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},x.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},x.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},x.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},x.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=r.nmd(e),this)},7865:(e,t,r)=>{"use strict";var n=r(6486),i=r(4431),o=r(306).normalizeNodes,s=r(306).dropsToXRP;function a(e){return new i(e.value||e)}function u(e){var t=null;return e.newFields.Balance?t=a(e.newFields.Balance):e.previousFields.Balance&&e.finalFields.Balance&&(t=a(e.finalFields.Balance).minus(a(e.previousFields.Balance))),null===t||t.isZero()?null:t}function c(e){return e.newFields.Balance?a(e.newFields.Balance):e.finalFields.Balance?a(e.finalFields.Balance):null}function f(e,t){var r=t(e);return null===r?null:{address:e.finalFields.Account||e.newFields.Account,balance:{counterparty:"",currency:"XRP",value:s(r).toString()}}}function h(e,t){var r,s,a=o(e).map((function(e){return"AccountRoot"===e.entryType?[f(e,t)]:"RippleState"===e.entryType?function(e,t){var r=t(e);if(null===r)return null;var o,s,a=n.isEmpty(e.newFields)?e.finalFields:e.newFields,u={address:a.LowLimit.issuer,balance:{counterparty:a.HighLimit.issuer,currency:a.Balance.currency,value:r.toString()}};return[u,(o=u,s=new i(o.balance.value).negated(),{address:o.balance.counterparty,balance:{counterparty:o.address,currency:o.balance.currency,value:s.toString()}})]}(e,t):[]}));return r=n.compact(n.flatten(a)),s=n.groupBy(r,(function(e){return e.address})),n.mapValues(s,(function(e){return n.map(e,(function(e){return e.balance}))}))}e.exports.parseBalanceChanges=function(e){return h(e,u)},e.exports.parseFinalBalances=function(e){return h(e,c)}},4634:(e,t,r)=>{"use strict";const n=r(306).normalizeNodes,i=r(4431);function o(e){return"CreatedNode"===e.diffType?"created":"ModifiedNode"===e.diffType?"modified":"DeletedNode"===e.diffType?"deleted":void 0}e.exports.parseChannelChanges=function(e){const t=n(e).filter((e=>"PayChannel"===e.entryType));return 1===t.length?function(e){const t="CreatedNode"===e.diffType?e.newFields:e.finalFields,r=e.previousFields||{},n={status:o(e),channelId:e.ledgerIndex,source:t.Account,destination:t.Destination,channelAmountDrops:new i(t.Amount||0).toString(10),channelBalanceDrops:new i(t.Balance||0).toString(10)};return r.Amount&&(n.channelAmountChangeDrops=new i(t.Amount).minus(new i(r.Amount||0)).toString(10)),r.Balance&&(n.channelBalanceChangeDrops=new i(t.Balance).minus(new i(r.Balance||0)).toString(10)),e.PreviousTxnID&&(n.previousTxnId=e.PreviousTxnID),n}(t[0]):void 0}},654:(e,t,r)=>{"use strict";e.exports.parseBalanceChanges=r(7865).parseBalanceChanges,e.exports.parseFinalBalances=r(7865).parseFinalBalances,e.exports.parseOrderbookChanges=r(4211).parseOrderbookChanges,e.exports.getAffectedAccounts=r(306).getAffectedAccounts,e.exports.parseChannelChanges=r(4634).parseChannelChanges},4211:(e,t,r)=>{"use strict";var n=r(6486),i=r(306),o=r(4431).clone({DECIMAL_PLACES:40}),s=r(4482);function a(e){var t,r=e.finalFields.Expiration||e.newFields.Expiration;if(void 0!==r)return new Date((t=r,1e3*(t+946684800))).toISOString()}function u(e){var t=e.finalFields.TakerGets||e.newFields.TakerGets,r=e.finalFields.TakerPays||e.newFields.TakerPays,n=t.currency||"XRP",i=r.currency||"XRP",o=e.finalFields.BookDirectory||e.newFields.BookDirectory,a=o.substring(o.length-16);return s(a,n,i)}function c(e){return"CreatedNode"===e.diffType?"created":"ModifiedNode"===e.diffType?"partially-filled":"DeletedNode"===e.diffType?e.previousFields.hasOwnProperty("TakerPays")?"filled":"cancelled":void 0}function f(e,t){var r=c(e);if("cancelled"===r)return i.parseCurrencyAmount(e.finalFields[t]);if("created"===r)return i.parseCurrencyAmount(e.newFields[t]);var s=i.parseCurrencyAmount(e.finalFields[t]),a=function(e,t){if(t){var r=new o(e.value),n=new o(t.value);return r.minus(n).abs().toString()}return"0"}(s,i.parseCurrencyAmount(e.previousFields[t]));return n.assign({},s,{value:a})}function h(e){var t,r,i,o,s,h=(t={taker_pays:f(e,"TakerPays"),taker_gets:f(e,"TakerGets"),sell:0!=(131072&e.finalFields.Flags),sequence:e.finalFields.Sequence||e.newFields.Sequence,status:c(e),quality:u(e),expiration:a(e)},i=t.taker_gets,o=t.taker_pays,s=t.sell?"sell":"buy",r={direction:s,quantity:"buy"===s?o:i,totalPrice:"buy"===s?i:o,sequence:t.sequence,status:t.status,makerExchangeRate:t.quality,expirationTime:t.expiration},n.omitBy(r,n.isUndefined));return Object.defineProperty(h,"account",{value:e.finalFields.Account||e.newFields.Account}),h}t.parseOrderbookChanges=function(e){var t,r=i.normalizeNodes(e);return t=n.map(n.filter(r,(function(e){return"Offer"===e.entryType})),h),n.groupBy(t,(function(e){return e.account}))}},4482:(e,t,r)=>{"use strict";var n=r(9282),i=r(4431);e.exports=function(e,t,r){n(16===e.length);var o=new i(e.substring(2),16),s=parseInt(e.substring(0,2),16)-100;return function(e,t,r){var n=("XRP"===r?-6:0)-("XRP"===t?-6:0);return 0===n?new i(e).toString():new i(e).shiftedBy(n).toString()}(o.toString()+"e"+s.toString(),t,r)}},306:(e,t,r)=>{"use strict";var n=r(6486),i=r(4431);function o(e){return e.dividedBy(1e6)}function s(e){var t=Object.keys(e)[0],r=e[t];return Object.assign({},r,{diffType:t,entryType:r.LedgerEntryType,ledgerIndex:r.LedgerIndex,newFields:r.NewFields||{},finalFields:r.FinalFields||{},previousFields:r.PreviousFields||{}})}function a(e){return e.AffectedNodes?e.AffectedNodes.map(s):[]}e.exports={dropsToXRP:o,normalizeNodes:a,parseCurrencyAmount:function(e){if(void 0!==e)return"string"==typeof e?{currency:"XRP",value:o(new i(e)).toString()}:{currency:e.currency,counterparty:e.issuer,value:e.value}},getAffectedAccounts:function(e){var t=[];return n.forEach(a(e),(function(e){var r="CreatedNode"===e.diffType?e.newFields:e.finalFields;n.forEach(r,(function(e,r){!function(e){return n.includes(["Account","Owner","Destination","Issuer","Target"],e)}(r)?function(e){return n.includes(["LowLimit","HighLimit","TakerPays","TakerGets"],e)}(r)&&e.issuer&&t.push(e.issuer):t.push(e)}))})),n.uniq(t)}}},9509:(e,t,r)=>{var n=r(8764),i=n.Buffer;function o(e,t){for(var r in e)t[r]=e[r]}function s(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(o(n,t),t.Buffer=s),s.prototype=Object.create(i.prototype),o(i,s),s.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},s.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},2399:(e,t,r)=>{"use strict";var n,i=r(4155),o=r(8764),s=o.Buffer,a={};for(n in o)o.hasOwnProperty(n)&&"SlowBuffer"!==n&&"Buffer"!==n&&(a[n]=o[n]);var u=a.Buffer={};for(n in s)s.hasOwnProperty(n)&&"allocUnsafe"!==n&&"allocUnsafeSlow"!==n&&(u[n]=s[n]);if(a.Buffer.prototype=s.prototype,u.from&&u.from!==Uint8Array.from||(u.from=function(e,t,r){if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type '+typeof e);if(e&&void 0===e.length)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);return s(e,t,r)}),u.alloc||(u.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError('The "size" argument must be of type number. Received type '+typeof e);if(e<0||e>=2*(1<<30))throw new RangeError('The value "'+e+'" is invalid for option "size"');var n=s(e);return t&&0!==t.length?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n}),!a.kStringMaxLength)try{a.kStringMaxLength=i.binding("buffer").kStringMaxLength}catch(e){}a.constants||(a.constants={MAX_LENGTH:a.kMaxLength},a.kStringMaxLength&&(a.constants.MAX_STRING_LENGTH=a.kStringMaxLength)),e.exports=a},4189:(e,t,r)=>{var n=r(9509).Buffer;function i(e,t){this._block=n.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}i.prototype.update=function(e,t){"string"==typeof e&&(t=t||"utf8",e=n.from(e,t));for(var r=this._block,i=this._blockSize,o=e.length,s=this._len,a=0;a<o;){for(var u=s%i,c=Math.min(o-a,i-u),f=0;f<c;f++)r[u+f]=e[a+f];a+=c,(s+=c)%i==0&&this._update(r)}return this._len+=o,this},i.prototype.digest=function(e){var t=this._len%this._blockSize;this._block[t]=128,this._block.fill(0,t+1),t>=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=8*this._len;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var n=(4294967295&r)>>>0,i=(r-n)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var o=this._hash();return e?o.toString(e):o},i.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e.exports=i},9072:(e,t,r)=>{var n=e.exports=function(e){e=e.toLowerCase();var t=n[e];if(!t)throw new Error(e+" is not supported (we accept pull requests)");return new t};n.sha=r(4448),n.sha1=r(8336),n.sha224=r(8432),n.sha256=r(7499),n.sha384=r(1686),n.sha512=r(7816)},4448:(e,t,r)=>{var n=r(5717),i=r(4189),o=r(9509).Buffer,s=[1518500249,1859775393,-1894007588,-899497514],a=new Array(80);function u(){this.init(),this._w=a,i.call(this,64,56)}function c(e){return e<<30|e>>>2}function f(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}n(u,i),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,a=0|this._d,u=0|this._e,h=0;h<16;++h)r[h]=e.readInt32BE(4*h);for(;h<80;++h)r[h]=r[h-3]^r[h-8]^r[h-14]^r[h-16];for(var l=0;l<80;++l){var d=~~(l/20),p=0|((t=n)<<5|t>>>27)+f(d,i,o,a)+u+r[l]+s[d];u=a,a=o,o=c(i),i=n,n=p}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=u+this._e|0},u.prototype._hash=function(){var e=o.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=u},8336:(e,t,r)=>{var n=r(5717),i=r(4189),o=r(9509).Buffer,s=[1518500249,1859775393,-1894007588,-899497514],a=new Array(80);function u(){this.init(),this._w=a,i.call(this,64,56)}function c(e){return e<<5|e>>>27}function f(e){return e<<30|e>>>2}function h(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}n(u,i),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,a=0|this._d,u=0|this._e,l=0;l<16;++l)r[l]=e.readInt32BE(4*l);for(;l<80;++l)r[l]=(t=r[l-3]^r[l-8]^r[l-14]^r[l-16])<<1|t>>>31;for(var d=0;d<80;++d){var p=~~(d/20),m=c(n)+h(p,i,o,a)+u+r[d]+s[p]|0;u=a,a=o,o=f(i),i=n,n=m}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=u+this._e|0},u.prototype._hash=function(){var e=o.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=u},8432:(e,t,r)=>{var n=r(5717),i=r(7499),o=r(4189),s=r(9509).Buffer,a=new Array(64);function u(){this.init(),this._w=a,o.call(this,64,56)}n(u,i),u.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},u.prototype._hash=function(){var e=s.allocUnsafe(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e},e.exports=u},7499:(e,t,r)=>{var n=r(5717),i=r(4189),o=r(9509).Buffer,s=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],a=new Array(64);function u(){this.init(),this._w=a,i.call(this,64,56)}function c(e,t,r){return r^e&(t^r)}function f(e,t,r){return e&t|r&(e|t)}function h(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function l(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function d(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}n(u,i),u.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},u.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,a=0|this._d,u=0|this._e,p=0|this._f,m=0|this._g,g=0|this._h,y=0;y<16;++y)r[y]=e.readInt32BE(4*y);for(;y<64;++y)r[y]=0|(((t=r[y-2])>>>17|t<<15)^(t>>>19|t<<13)^t>>>10)+r[y-7]+d(r[y-15])+r[y-16];for(var b=0;b<64;++b){var v=g+l(u)+c(u,p,m)+s[b]+r[b]|0,w=h(n)+f(n,i,o)|0;g=m,m=p,p=u,u=a+v|0,a=o,o=i,i=n,n=v+w|0}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=u+this._e|0,this._f=p+this._f|0,this._g=m+this._g|0,this._h=g+this._h|0},u.prototype._hash=function(){var e=o.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},e.exports=u},1686:(e,t,r)=>{var n=r(5717),i=r(7816),o=r(4189),s=r(9509).Buffer,a=new Array(160);function u(){this.init(),this._w=a,o.call(this,128,112)}n(u,i),u.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},u.prototype._hash=function(){var e=s.allocUnsafe(48);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),e},e.exports=u},7816:(e,t,r)=>{var n=r(5717),i=r(4189),o=r(9509).Buffer,s=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],a=new Array(160);function u(){this.init(),this._w=a,i.call(this,128,112)}function c(e,t,r){return r^e&(t^r)}function f(e,t,r){return e&t|r&(e|t)}function h(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function l(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function d(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function p(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function m(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function g(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function y(e,t){return e>>>0<t>>>0?1:0}n(u,i),u.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},u.prototype._update=function(e){for(var t=this._w,r=0|this._ah,n=0|this._bh,i=0|this._ch,o=0|this._dh,a=0|this._eh,u=0|this._fh,b=0|this._gh,v=0|this._hh,w=0|this._al,_=0|this._bl,S=0|this._cl,M=0|this._dl,A=0|this._el,E=0|this._fl,O=0|this._gl,x=0|this._hl,T=0;T<32;T+=2)t[T]=e.readInt32BE(4*T),t[T+1]=e.readInt32BE(4*T+4);for(;T<160;T+=2){var P=t[T-30],j=t[T-30+1],k=d(P,j),I=p(j,P),R=m(P=t[T-4],j=t[T-4+1]),C=g(j,P),B=t[T-14],N=t[T-14+1],L=t[T-32],D=t[T-32+1],F=I+N|0,q=k+B+y(F,I)|0;q=(q=q+R+y(F=F+C|0,C)|0)+L+y(F=F+D|0,D)|0,t[T]=q,t[T+1]=F}for(var U=0;U<160;U+=2){q=t[U],F=t[U+1];var z=f(r,n,i),V=f(w,_,S),$=h(r,w),H=h(w,r),X=l(a,A),K=l(A,a),J=s[U],Z=s[U+1],G=c(a,u,b),W=c(A,E,O),Y=x+K|0,Q=v+X+y(Y,x)|0;Q=(Q=(Q=Q+G+y(Y=Y+W|0,W)|0)+J+y(Y=Y+Z|0,Z)|0)+q+y(Y=Y+F|0,F)|0;var ee=H+V|0,te=$+z+y(ee,H)|0;v=b,x=O,b=u,O=E,u=a,E=A,a=o+Q+y(A=M+Y|0,M)|0,o=i,M=S,i=n,S=_,n=r,_=w,r=Q+te+y(w=Y+ee|0,Y)|0}this._al=this._al+w|0,this._bl=this._bl+_|0,this._cl=this._cl+S|0,this._dl=this._dl+M|0,this._el=this._el+A|0,this._fl=this._fl+E|0,this._gl=this._gl+O|0,this._hl=this._hl+x|0,this._ah=this._ah+r+y(this._al,w)|0,this._bh=this._bh+n+y(this._bl,_)|0,this._ch=this._ch+i+y(this._cl,S)|0,this._dh=this._dh+o+y(this._dl,M)|0,this._eh=this._eh+a+y(this._el,A)|0,this._fh=this._fh+u+y(this._fl,E)|0,this._gh=this._gh+b+y(this._gl,O)|0,this._hh=this._hh+v+y(this._hl,x)|0},u.prototype._hash=function(){var e=o.allocUnsafe(64);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),t(this._gh,this._gl,48),t(this._hh,this._hl,56),e},e.exports=u},2830:(e,t,r)=>{e.exports=i;var n=r(7187).EventEmitter;function i(){n.call(this)}r(5717)(i,n),i.Readable=r(9481),i.Writable=r(4229),i.Duplex=r(6753),i.Transform=r(4605),i.PassThrough=r(2725),i.finished=r(8610),i.pipeline=r(9946),i.Stream=i,i.prototype.pipe=function(e,t){var r=this;function i(t){e.writable&&!1===e.write(t)&&r.pause&&r.pause()}function o(){r.readable&&r.resume&&r.resume()}r.on("data",i),e.on("drain",o),e._isStdio||t&&!1===t.end||(r.on("end",a),r.on("close",u));var s=!1;function a(){s||(s=!0,e.end())}function u(){s||(s=!0,"function"==typeof e.destroy&&e.destroy())}function c(e){if(f(),0===n.listenerCount(this,"error"))throw e}function f(){r.removeListener("data",i),e.removeListener("drain",o),r.removeListener("end",a),r.removeListener("close",u),r.removeListener("error",c),e.removeListener("error",c),r.removeListener("end",f),r.removeListener("close",f),e.removeListener("close",f)}return r.on("error",c),e.on("error",c),r.on("end",f),r.on("close",f),e.on("close",f),e.emit("pipe",r),e}},8501:(e,t,r)=>{var n=r(1989),i=r(5676),o=r(7529),s=r(584),a=r(8575),u=t;u.request=function(e,t){e="string"==typeof e?a.parse(e):o(e);var i=-1===r.g.location.protocol.search(/^https?:$/)?"http:":"",s=e.protocol||i,u=e.hostname||e.host,c=e.port,f=e.path||"/";u&&-1!==u.indexOf(":")&&(u="["+u+"]"),e.url=(u?s+"//"+u:"")+(c?":"+c:"")+f,e.method=(e.method||"GET").toUpperCase(),e.headers=e.headers||{};var h=new n(e);return t&&h.on("response",t),h},u.get=function(e,t){var r=u.request(e,t);return r.end(),r},u.ClientRequest=n,u.IncomingMessage=i.IncomingMessage,u.Agent=function(){},u.Agent.defaultMaxSockets=4,u.globalAgent=new u.Agent,u.STATUS_CODES=s,u.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]},8725:(e,t,r)=>{var n;function i(){if(void 0!==n)return n;if(r.g.XMLHttpRequest){n=new r.g.XMLHttpRequest;try{n.open("GET",r.g.XDomainRequest?"/":"https://example.com")}catch(e){n=null}}else n=null;return n}function o(e){var t=i();if(!t)return!1;try{return t.responseType=e,t.responseType===e}catch(e){}return!1}function s(e){return"function"==typeof e}t.fetch=s(r.g.fetch)&&s(r.g.ReadableStream),t.writableStream=s(r.g.WritableStream),t.abortController=s(r.g.AbortController),t.arraybuffer=t.fetch||o("arraybuffer"),t.msstream=!t.fetch&&o("ms-stream"),t.mozchunkedarraybuffer=!t.fetch&&o("moz-chunked-arraybuffer"),t.overrideMimeType=t.fetch||!!i()&&s(i().overrideMimeType),n=null},1989:(e,t,r)=>{var n=r(8764).Buffer,i=r(4155),o=r(8725),s=r(5717),a=r(5676),u=r(8473),c=a.IncomingMessage,f=a.readyStates,h=e.exports=function(e){var t,r=this;u.Writable.call(r),r._opts=e,r._body=[],r._headers={},e.auth&&r.setHeader("Authorization","Basic "+n.from(e.auth).toString("base64")),Object.keys(e.headers).forEach((function(t){r.setHeader(t,e.headers[t])}));var i=!0;if("disable-fetch"===e.mode||"requestTimeout"in e&&!o.abortController)i=!1,t=!0;else if("prefer-streaming"===e.mode)t=!1;else if("allow-wrong-content-type"===e.mode)t=!o.overrideMimeType;else{if(e.mode&&"default"!==e.mode&&"prefer-fast"!==e.mode)throw new Error("Invalid value for opts.mode");t=!0}r._mode=function(e,t){return o.fetch&&t?"fetch":o.mozchunkedarraybuffer?"moz-chunked-arraybuffer":o.msstream?"ms-stream":o.arraybuffer&&e?"arraybuffer":"text"}(t,i),r._fetchTimer=null,r._socketTimeout=null,r._socketTimer=null,r.on("finish",(function(){r._onFinish()}))};s(h,u.Writable),h.prototype.setHeader=function(e,t){var r=e.toLowerCase();-1===l.indexOf(r)&&(this._headers[r]={name:e,value:t})},h.prototype.getHeader=function(e){var t=this._headers[e.toLowerCase()];return t?t.value:null},h.prototype.removeHeader=function(e){delete this._headers[e.toLowerCase()]},h.prototype._onFinish=function(){var e=this;if(!e._destroyed){var t=e._opts;"timeout"in t&&0!==t.timeout&&e.setTimeout(t.timeout);var n=e._headers,s=null;"GET"!==t.method&&"HEAD"!==t.method&&(s=new Blob(e._body,{type:(n["content-type"]||{}).value||""}));var a=[];if(Object.keys(n).forEach((function(e){var t=n[e].name,r=n[e].value;Array.isArray(r)?r.forEach((function(e){a.push([t,e])})):a.push([t,r])})),"fetch"===e._mode){var u=null;if(o.abortController){var c=new AbortController;u=c.signal,e._fetchAbortController=c,"requestTimeout"in t&&0!==t.requestTimeout&&(e._fetchTimer=r.g.setTimeout((function(){e.emit("requestTimeout"),e._fetchAbortController&&e._fetchAbortController.abort()}),t.requestTimeout))}r.g.fetch(e._opts.url,{method:e._opts.method,headers:a,body:s||void 0,mode:"cors",credentials:t.withCredentials?"include":"same-origin",signal:u}).then((function(t){e._fetchResponse=t,e._resetTimers(!1),e._connect()}),(function(t){e._resetTimers(!0),e._destroyed||e.emit("error",t)}))}else{var h=e._xhr=new r.g.XMLHttpRequest;try{h.open(e._opts.method,e._opts.url,!0)}catch(t){return void i.nextTick((function(){e.emit("error",t)}))}"responseType"in h&&(h.responseType=e._mode),"withCredentials"in h&&(h.withCredentials=!!t.withCredentials),"text"===e._mode&&"overrideMimeType"in h&&h.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in t&&(h.timeout=t.requestTimeout,h.ontimeout=function(){e.emit("requestTimeout")}),a.forEach((function(e){h.setRequestHeader(e[0],e[1])})),e._response=null,h.onreadystatechange=function(){switch(h.readyState){case f.LOADING:case f.DONE:e._onXHRProgress()}},"moz-chunked-arraybuffer"===e._mode&&(h.onprogress=function(){e._onXHRProgress()}),h.onerror=function(){e._destroyed||(e._resetTimers(!0),e.emit("error",new Error("XHR error")))};try{h.send(s)}catch(t){return void i.nextTick((function(){e.emit("error",t)}))}}}},h.prototype._onXHRProgress=function(){var e=this;e._resetTimers(!1),function(e){try{var t=e.status;return null!==t&&0!==t}catch(e){return!1}}(e._xhr)&&!e._destroyed&&(e._response||e._connect(),e._response._onXHRProgress(e._resetTimers.bind(e)))},h.prototype._connect=function(){var e=this;e._destroyed||(e._response=new c(e._xhr,e._fetchResponse,e._mode,e._resetTimers.bind(e)),e._response.on("error",(function(t){e.emit("error",t)})),e.emit("response",e._response))},h.prototype._write=function(e,t,r){this._body.push(e),r()},h.prototype._resetTimers=function(e){var t=this;r.g.clearTimeout(t._socketTimer),t._socketTimer=null,e?(r.g.clearTimeout(t._fetchTimer),t._fetchTimer=null):t._socketTimeout&&(t._socketTimer=r.g.setTimeout((function(){t.emit("timeout")}),t._socketTimeout))},h.prototype.abort=h.prototype.destroy=function(e){var t=this;t._destroyed=!0,t._resetTimers(!0),t._response&&(t._response._destroyed=!0),t._xhr?t._xhr.abort():t._fetchAbortController&&t._fetchAbortController.abort(),e&&t.emit("error",e)},h.prototype.end=function(e,t,r){"function"==typeof e&&(r=e,e=void 0),u.Writable.prototype.end.call(this,e,t,r)},h.prototype.setTimeout=function(e,t){var r=this;t&&r.once("timeout",t),r._socketTimeout=e,r._resetTimers(!1)},h.prototype.flushHeaders=function(){},h.prototype.setNoDelay=function(){},h.prototype.setSocketKeepAlive=function(){};var l=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"]},5676:(e,t,r)=>{var n=r(4155),i=r(8764).Buffer,o=r(8725),s=r(5717),a=r(8473),u=t.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},c=t.IncomingMessage=function(e,t,r,s){var u=this;if(a.Readable.call(u),u._mode=r,u.headers={},u.rawHeaders=[],u.trailers={},u.rawTrailers=[],u.on("end",(function(){n.nextTick((function(){u.emit("close")}))})),"fetch"===r){if(u._fetchResponse=t,u.url=t.url,u.statusCode=t.status,u.statusMessage=t.statusText,t.headers.forEach((function(e,t){u.headers[t.toLowerCase()]=e,u.rawHeaders.push(t,e)})),o.writableStream){var c=new WritableStream({write:function(e){return s(!1),new Promise((function(t,r){u._destroyed?r():u.push(i.from(e))?t():u._resumeFetch=t}))},close:function(){s(!0),u._destroyed||u.push(null)},abort:function(e){s(!0),u._destroyed||u.emit("error",e)}});try{return void t.body.pipeTo(c).catch((function(e){s(!0),u._destroyed||u.emit("error",e)}))}catch(e){}}var f=t.body.getReader();!function e(){f.read().then((function(t){u._destroyed||(s(t.done),t.done?u.push(null):(u.push(i.from(t.value)),e()))})).catch((function(e){s(!0),u._destroyed||u.emit("error",e)}))}()}else if(u._xhr=e,u._pos=0,u.url=e.responseURL,u.statusCode=e.status,u.statusMessage=e.statusText,e.getAllResponseHeaders().split(/\r?\n/).forEach((function(e){var t=e.match(/^([^:]+):\s*(.*)/);if(t){var r=t[1].toLowerCase();"set-cookie"===r?(void 0===u.headers[r]&&(u.headers[r]=[]),u.headers[r].push(t[2])):void 0!==u.headers[r]?u.headers[r]+=", "+t[2]:u.headers[r]=t[2],u.rawHeaders.push(t[1],t[2])}})),u._charset="x-user-defined",!o.overrideMimeType){var h=u.rawHeaders["mime-type"];if(h){var l=h.match(/;\s*charset=([^;])(;|$)/);l&&(u._charset=l[1].toLowerCase())}u._charset||(u._charset="utf-8")}};s(c,a.Readable),c.prototype._read=function(){var e=this._resumeFetch;e&&(this._resumeFetch=null,e())},c.prototype._onXHRProgress=function(e){var t=this,n=t._xhr,o=null;switch(t._mode){case"text":if((o=n.responseText).length>t._pos){var s=o.substr(t._pos);if("x-user-defined"===t._charset){for(var a=i.alloc(s.length),c=0;c<s.length;c++)a[c]=255&s.charCodeAt(c);t.push(a)}else t.push(s,t._charset);t._pos=o.length}break;case"arraybuffer":if(n.readyState!==u.DONE||!n.response)break;o=n.response,t.push(i.from(new Uint8Array(o)));break;case"moz-chunked-arraybuffer":if(o=n.response,n.readyState!==u.LOADING||!o)break;t.push(i.from(new Uint8Array(o)));break;case"ms-stream":if(o=n.response,n.readyState!==u.LOADING)break;var f=new r.g.MSStreamReader;f.onprogress=function(){f.result.byteLength>t._pos&&(t.push(i.from(new Uint8Array(f.result.slice(t._pos)))),t._pos=f.result.byteLength)},f.onload=function(){e(!0),t.push(null)},f.readAsArrayBuffer(o)}t._xhr.readyState===u.DONE&&"ms-stream"!==t._mode&&(e(!0),t.push(null))}},2553:(e,t,r)=>{"use strict";var n=r(9509).Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=u,this.end=c,t=4;break;case"utf8":this.fillLast=a,t=4;break;case"base64":this.text=f,this.end=h,t=3;break;default:return this.write=l,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function s(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function a(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function u(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function c(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function f(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function h(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function l(e){return e.toString(this.encoding)}function d(e){return e&&e.length?this.write(e):""}t.s=o,o.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},o.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},o.prototype.text=function(e,t){var r=function(e,t,r){var n=t.length-1;if(n<r)return 0;var i=s(t[n]);return i>=0?(i>0&&(e.lastNeed=i-1),i):--n<r||-2===i?0:(i=s(t[n]))>=0?(i>0&&(e.lastNeed=i-2),i):--n<r||-2===i?0:(i=s(t[n]))>=0?(i>0&&(2===i?i=0:e.lastNeed=i-3),i):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},o.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},8575:(e,t,r)=>{"use strict";var n=r(4971),i=r(2502);function o(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}t.parse=v,t.resolve=function(e,t){return v(e,!1,!0).resolve(t)},t.resolveObject=function(e,t){return e?v(e,!1,!0).resolveObject(t):t},t.format=function(e){return i.isString(e)&&(e=v(e)),e instanceof o?e.format():o.prototype.format.call(e)},t.Url=o;var s=/^([a-z0-9.+-]+:)/i,a=/:[0-9]*$/,u=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,c=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),f=["'"].concat(c),h=["%","/","?",";","#"].concat(f),l=["/","?","#"],d=/^[+a-z0-9A-Z_-]{0,63}$/,p=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,m={javascript:!0,"javascript:":!0},g={javascript:!0,"javascript:":!0},y={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},b=r(7673);function v(e,t,r){if(e&&i.isObject(e)&&e instanceof o)return e;var n=new o;return n.parse(e,t,r),n}o.prototype.parse=function(e,t,r){if(!i.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var o=e.indexOf("?"),a=-1!==o&&o<e.indexOf("#")?"?":"#",c=e.split(a);c[0]=c[0].replace(/\\/g,"/");var v=e=c.join(a);if(v=v.trim(),!r&&1===e.split("#").length){var w=u.exec(v);if(w)return this.path=v,this.href=v,this.pathname=w[1],w[2]?(this.search=w[2],this.query=t?b.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var _=s.exec(v);if(_){var S=(_=_[0]).toLowerCase();this.protocol=S,v=v.substr(_.length)}if(r||_||v.match(/^\/\/[^@\/]+@[^@\/]+/)){var M="//"===v.substr(0,2);!M||_&&g[_]||(v=v.substr(2),this.slashes=!0)}if(!g[_]&&(M||_&&!y[_])){for(var A,E,O=-1,x=0;x<l.length;x++)-1!==(T=v.indexOf(l[x]))&&(-1===O||T<O)&&(O=T);for(-1!==(E=-1===O?v.lastIndexOf("@"):v.lastIndexOf("@",O))&&(A=v.slice(0,E),v=v.slice(E+1),this.auth=decodeURIComponent(A)),O=-1,x=0;x<h.length;x++){var T;-1!==(T=v.indexOf(h[x]))&&(-1===O||T<O)&&(O=T)}-1===O&&(O=v.length),this.host=v.slice(0,O),v=v.slice(O),this.parseHost(),this.hostname=this.hostname||"";var P="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!P)for(var j=this.hostname.split(/\./),k=(x=0,j.length);x<k;x++){var I=j[x];if(I&&!I.match(d)){for(var R="",C=0,B=I.length;C<B;C++)I.charCodeAt(C)>127?R+="x":R+=I[C];if(!R.match(d)){var N=j.slice(0,x),L=j.slice(x+1),D=I.match(p);D&&(N.push(D[1]),L.unshift(D[2])),L.length&&(v="/"+L.join(".")+v),this.hostname=N.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),P||(this.hostname=n.toASCII(this.hostname));var F=this.port?":"+this.port:"",q=this.hostname||"";this.host=q+F,this.href+=this.host,P&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==v[0]&&(v="/"+v))}if(!m[S])for(x=0,k=f.length;x<k;x++){var U=f[x];if(-1!==v.indexOf(U)){var z=encodeURIComponent(U);z===U&&(z=escape(U)),v=v.split(U).join(z)}}var V=v.indexOf("#");-1!==V&&(this.hash=v.substr(V),v=v.slice(0,V));var $=v.indexOf("?");if(-1!==$?(this.search=v.substr($),this.query=v.substr($+1),t&&(this.query=b.parse(this.query)),v=v.slice(0,$)):t&&(this.search="",this.query={}),v&&(this.pathname=v),y[S]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){F=this.pathname||"";var H=this.search||"";this.path=F+H}return this.href=this.format(),this},o.prototype.format=function(){var e=this.auth||"";e&&(e=(e=encodeURIComponent(e)).replace(/%3A/i,":"),e+="@");var t=this.protocol||"",r=this.pathname||"",n=this.hash||"",o=!1,s="";this.host?o=e+this.host:this.hostname&&(o=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(o+=":"+this.port)),this.query&&i.isObject(this.query)&&Object.keys(this.query).length&&(s=b.stringify(this.query));var a=this.search||s&&"?"+s||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||y[t])&&!1!==o?(o="//"+(o||""),r&&"/"!==r.charAt(0)&&(r="/"+r)):o||(o=""),n&&"#"!==n.charAt(0)&&(n="#"+n),a&&"?"!==a.charAt(0)&&(a="?"+a),t+o+(r=r.replace(/[?#]/g,(function(e){return encodeURIComponent(e)})))+(a=a.replace("#","%23"))+n},o.prototype.resolve=function(e){return this.resolveObject(v(e,!1,!0)).format()},o.prototype.resolveObject=function(e){if(i.isString(e)){var t=new o;t.parse(e,!1,!0),e=t}for(var r=new o,n=Object.keys(this),s=0;s<n.length;s++){var a=n[s];r[a]=this[a]}if(r.hash=e.hash,""===e.href)return r.href=r.format(),r;if(e.slashes&&!e.protocol){for(var u=Object.keys(e),c=0;c<u.length;c++){var f=u[c];"protocol"!==f&&(r[f]=e[f])}return y[r.protocol]&&r.hostname&&!r.pathname&&(r.path=r.pathname="/"),r.href=r.format(),r}if(e.protocol&&e.protocol!==r.protocol){if(!y[e.protocol]){for(var h=Object.keys(e),l=0;l<h.length;l++){var d=h[l];r[d]=e[d]}return r.href=r.format(),r}if(r.protocol=e.protocol,e.host||g[e.protocol])r.pathname=e.pathname;else{for(var p=(e.pathname||"").split("/");p.length&&!(e.host=p.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==p[0]&&p.unshift(""),p.length<2&&p.unshift(""),r.pathname=p.join("/")}if(r.search=e.search,r.query=e.query,r.host=e.host||"",r.auth=e.auth,r.hostname=e.hostname||e.host,r.port=e.port,r.pathname||r.search){var m=r.pathname||"",b=r.search||"";r.path=m+b}return r.slashes=r.slashes||e.slashes,r.href=r.format(),r}var v=r.pathname&&"/"===r.pathname.charAt(0),w=e.host||e.pathname&&"/"===e.pathname.charAt(0),_=w||v||r.host&&e.pathname,S=_,M=r.pathname&&r.pathname.split("/")||[],A=(p=e.pathname&&e.pathname.split("/")||[],r.protocol&&!y[r.protocol]);if(A&&(r.hostname="",r.port=null,r.host&&(""===M[0]?M[0]=r.host:M.unshift(r.host)),r.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===p[0]?p[0]=e.host:p.unshift(e.host)),e.host=null),_=_&&(""===p[0]||""===M[0])),w)r.host=e.host||""===e.host?e.host:r.host,r.hostname=e.hostname||""===e.hostname?e.hostname:r.hostname,r.search=e.search,r.query=e.query,M=p;else if(p.length)M||(M=[]),M.pop(),M=M.concat(p),r.search=e.search,r.query=e.query;else if(!i.isNullOrUndefined(e.search))return A&&(r.hostname=r.host=M.shift(),(P=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=P.shift(),r.host=r.hostname=P.shift())),r.search=e.search,r.query=e.query,i.isNull(r.pathname)&&i.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r;if(!M.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var E=M.slice(-1)[0],O=(r.host||e.host||M.length>1)&&("."===E||".."===E)||""===E,x=0,T=M.length;T>=0;T--)"."===(E=M[T])?M.splice(T,1):".."===E?(M.splice(T,1),x++):x&&(M.splice(T,1),x--);if(!_&&!S)for(;x--;x)M.unshift("..");!_||""===M[0]||M[0]&&"/"===M[0].charAt(0)||M.unshift(""),O&&"/"!==M.join("/").substr(-1)&&M.push("");var P,j=""===M[0]||M[0]&&"/"===M[0].charAt(0);return A&&(r.hostname=r.host=j?"":M.length?M.shift():"",(P=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=P.shift(),r.host=r.hostname=P.shift())),(_=_||r.host&&M.length)&&!j&&M.unshift(""),M.length?r.pathname=M.join("/"):(r.pathname=null,r.path=null),i.isNull(r.pathname)&&i.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r},o.prototype.parseHost=function(){var e=this.host,t=a.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},2502:e=>{"use strict";e.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},4927:(e,t,r)=>{function n(e){try{if(!r.g.localStorage)return!1}catch(e){return!1}var t=r.g.localStorage[e];return null!=t&&"true"===String(t).toLowerCase()}e.exports=function(e,t){if(n("noDeprecation"))return e;var r=!1;return function(){if(!r){if(n("throwDeprecation"))throw new Error(t);n("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}}},384:e=>{e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},5955:(e,t,r)=>{"use strict";var n=r(2584),i=r(8662),o=r(6430),s=r(5692);function a(e){return e.call.bind(e)}var u="undefined"!=typeof BigInt,c="undefined"!=typeof Symbol,f=a(Object.prototype.toString),h=a(Number.prototype.valueOf),l=a(String.prototype.valueOf),d=a(Boolean.prototype.valueOf);if(u)var p=a(BigInt.prototype.valueOf);if(c)var m=a(Symbol.prototype.valueOf);function g(e,t){if("object"!=typeof e)return!1;try{return t(e),!0}catch(e){return!1}}function y(e){return"[object Map]"===f(e)}function b(e){return"[object Set]"===f(e)}function v(e){return"[object WeakMap]"===f(e)}function w(e){return"[object WeakSet]"===f(e)}function _(e){return"[object ArrayBuffer]"===f(e)}function S(e){return"undefined"!=typeof ArrayBuffer&&(_.working?_(e):e instanceof ArrayBuffer)}function M(e){return"[object DataView]"===f(e)}function A(e){return"undefined"!=typeof DataView&&(M.working?M(e):e instanceof DataView)}t.isArgumentsObject=n,t.isGeneratorFunction=i,t.isTypedArray=s,t.isPromise=function(e){return"undefined"!=typeof Promise&&e instanceof Promise||null!==e&&"object"==typeof e&&"function"==typeof e.then&&"function"==typeof e.catch},t.isArrayBufferView=function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):s(e)||A(e)},t.isUint8Array=function(e){return"Uint8Array"===o(e)},t.isUint8ClampedArray=function(e){return"Uint8ClampedArray"===o(e)},t.isUint16Array=function(e){return"Uint16Array"===o(e)},t.isUint32Array=function(e){return"Uint32Array"===o(e)},t.isInt8Array=function(e){return"Int8Array"===o(e)},t.isInt16Array=function(e){return"Int16Array"===o(e)},t.isInt32Array=function(e){return"Int32Array"===o(e)},t.isFloat32Array=function(e){return"Float32Array"===o(e)},t.isFloat64Array=function(e){return"Float64Array"===o(e)},t.isBigInt64Array=function(e){return"BigInt64Array"===o(e)},t.isBigUint64Array=function(e){return"BigUint64Array"===o(e)},y.working="undefined"!=typeof Map&&y(new Map),t.isMap=function(e){return"undefined"!=typeof Map&&(y.working?y(e):e instanceof Map)},b.working="undefined"!=typeof Set&&b(new Set),t.isSet=function(e){return"undefined"!=typeof Set&&(b.working?b(e):e instanceof Set)},v.working="undefined"!=typeof WeakMap&&v(new WeakMap),t.isWeakMap=function(e){return"undefined"!=typeof WeakMap&&(v.working?v(e):e instanceof WeakMap)},w.working="undefined"!=typeof WeakSet&&w(new WeakSet),t.isWeakSet=function(e){return w(e)},_.working="undefined"!=typeof ArrayBuffer&&_(new ArrayBuffer),t.isArrayBuffer=S,M.working="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView&&M(new DataView(new ArrayBuffer(1),0,1)),t.isDataView=A;var E="undefined"!=typeof SharedArrayBuffer?SharedArrayBuffer:void 0;function O(e){return"[object SharedArrayBuffer]"===f(e)}function x(e){return void 0!==E&&(void 0===O.working&&(O.working=O(new E)),O.working?O(e):e instanceof E)}function T(e){return g(e,h)}function P(e){return g(e,l)}function j(e){return g(e,d)}function k(e){return u&&g(e,p)}function I(e){return c&&g(e,m)}t.isSharedArrayBuffer=x,t.isAsyncFunction=function(e){return"[object AsyncFunction]"===f(e)},t.isMapIterator=function(e){return"[object Map Iterator]"===f(e)},t.isSetIterator=function(e){return"[object Set Iterator]"===f(e)},t.isGeneratorObject=function(e){return"[object Generator]"===f(e)},t.isWebAssemblyCompiledModule=function(e){return"[object WebAssembly.Module]"===f(e)},t.isNumberObject=T,t.isStringObject=P,t.isBooleanObject=j,t.isBigIntObject=k,t.isSymbolObject=I,t.isBoxedPrimitive=function(e){return T(e)||P(e)||j(e)||k(e)||I(e)},t.isAnyArrayBuffer=function(e){return"undefined"!=typeof Uint8Array&&(S(e)||x(e))},["isProxy","isExternal","isModuleNamespaceObject"].forEach((function(e){Object.defineProperty(t,e,{enumerable:!1,value:function(){throw new Error(e+" is not supported in userland")}})}))},9539:(e,t,r)=>{var n=r(4155),i=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),r={},n=0;n<t.length;n++)r[t[n]]=Object.getOwnPropertyDescriptor(e,t[n]);return r},o=/%[sdj%]/g;t.format=function(e){if(!v(e)){for(var t=[],r=0;r<arguments.length;r++)t.push(c(arguments[r]));return t.join(" ")}r=1;for(var n=arguments,i=n.length,s=String(e).replace(o,(function(e){if("%%"===e)return"%";if(r>=i)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}})),a=n[r];r<i;a=n[++r])y(a)||!S(a)?s+=" "+a:s+=" "+c(a);return s},t.deprecate=function(e,r){if(void 0!==n&&!0===n.noDeprecation)return e;if(void 0===n)return function(){return t.deprecate(e,r).apply(this,arguments)};var i=!1;return function(){if(!i){if(n.throwDeprecation)throw new Error(r);n.traceDeprecation?console.trace(r):console.error(r),i=!0}return e.apply(this,arguments)}};var s={},a=/^$/;if(n.env.NODE_DEBUG){var u=n.env.NODE_DEBUG;u=u.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),a=new RegExp("^"+u+"$","i")}function c(e,r){var n={seen:[],stylize:h};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),g(r)?n.showHidden=r:r&&t._extend(n,r),w(n.showHidden)&&(n.showHidden=!1),w(n.depth)&&(n.depth=2),w(n.colors)&&(n.colors=!1),w(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=f),l(n,e,n.depth)}function f(e,t){var r=c.styles[t];return r?"["+c.colors[r][0]+"m"+e+"["+c.colors[r][1]+"m":e}function h(e,t){return e}function l(e,r,n){if(e.customInspect&&r&&E(r.inspect)&&r.inspect!==t.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,e);return v(i)||(i=l(e,i,n)),i}var o=function(e,t){if(w(t))return e.stylize("undefined","undefined");if(v(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}return b(t)?e.stylize(""+t,"number"):g(t)?e.stylize(""+t,"boolean"):y(t)?e.stylize("null","null"):void 0}(e,r);if(o)return o;var s=Object.keys(r),a=function(e){var t={};return e.forEach((function(e,r){t[e]=!0})),t}(s);if(e.showHidden&&(s=Object.getOwnPropertyNames(r)),A(r)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return d(r);if(0===s.length){if(E(r)){var u=r.name?": "+r.name:"";return e.stylize("[Function"+u+"]","special")}if(_(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(M(r))return e.stylize(Date.prototype.toString.call(r),"date");if(A(r))return d(r)}var c,f="",h=!1,S=["{","}"];return m(r)&&(h=!0,S=["[","]"]),E(r)&&(f=" [Function"+(r.name?": "+r.name:"")+"]"),_(r)&&(f=" "+RegExp.prototype.toString.call(r)),M(r)&&(f=" "+Date.prototype.toUTCString.call(r)),A(r)&&(f=" "+d(r)),0!==s.length||h&&0!=r.length?n<0?_(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special"):(e.seen.push(r),c=h?function(e,t,r,n,i){for(var o=[],s=0,a=t.length;s<a;++s)j(t,String(s))?o.push(p(e,t,r,n,String(s),!0)):o.push("");return i.forEach((function(i){i.match(/^\d+$/)||o.push(p(e,t,r,n,i,!0))})),o}(e,r,n,a,s):s.map((function(t){return p(e,r,n,a,t,h)})),e.seen.pop(),function(e,t,r){return e.reduce((function(e,t){return t.indexOf("\n"),e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60?r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}(c,f,S)):S[0]+f+S[1]}function d(e){return"["+Error.prototype.toString.call(e)+"]"}function p(e,t,r,n,i,o){var s,a,u;if((u=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?a=u.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):u.set&&(a=e.stylize("[Setter]","special")),j(n,i)||(s="["+i+"]"),a||(e.seen.indexOf(u.value)<0?(a=y(r)?l(e,u.value,null):l(e,u.value,r-1)).indexOf("\n")>-1&&(a=o?a.split("\n").map((function(e){return" "+e})).join("\n").substr(2):"\n"+a.split("\n").map((function(e){return" "+e})).join("\n")):a=e.stylize("[Circular]","special")),w(s)){if(o&&i.match(/^\d+$/))return a;(s=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=e.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=e.stylize(s,"string"))}return s+": "+a}function m(e){return Array.isArray(e)}function g(e){return"boolean"==typeof e}function y(e){return null===e}function b(e){return"number"==typeof e}function v(e){return"string"==typeof e}function w(e){return void 0===e}function _(e){return S(e)&&"[object RegExp]"===O(e)}function S(e){return"object"==typeof e&&null!==e}function M(e){return S(e)&&"[object Date]"===O(e)}function A(e){return S(e)&&("[object Error]"===O(e)||e instanceof Error)}function E(e){return"function"==typeof e}function O(e){return Object.prototype.toString.call(e)}function x(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(e){if(e=e.toUpperCase(),!s[e])if(a.test(e)){var r=n.pid;s[e]=function(){var n=t.format.apply(t,arguments);console.error("%s %d: %s",e,r,n)}}else s[e]=function(){};return s[e]},t.inspect=c,c.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]},c.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.types=r(5955),t.isArray=m,t.isBoolean=g,t.isNull=y,t.isNullOrUndefined=function(e){return null==e},t.isNumber=b,t.isString=v,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=w,t.isRegExp=_,t.types.isRegExp=_,t.isObject=S,t.isDate=M,t.types.isDate=M,t.isError=A,t.types.isNativeError=A,t.isFunction=E,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=r(384);var T=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function P(){var e=new Date,t=[x(e.getHours()),x(e.getMinutes()),x(e.getSeconds())].join(":");return[e.getDate(),T[e.getMonth()],t].join(" ")}function j(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){console.log("%s - %s",P(),t.format.apply(t,arguments))},t.inherits=r(5717),t._extend=function(e,t){if(!t||!S(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e};var k="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function I(e,t){if(!e){var r=new Error("Promise was rejected with a falsy value");r.reason=e,e=r}return t(e)}t.promisify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');if(k&&e[k]){var t;if("function"!=typeof(t=e[k]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,k,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var t,r,n=new Promise((function(e,n){t=e,r=n})),i=[],o=0;o<arguments.length;o++)i.push(arguments[o]);i.push((function(e,n){e?r(e):t(n)}));try{e.apply(this,i)}catch(e){r(e)}return n}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),k&&Object.defineProperty(t,k,{value:t,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(t,i(e))},t.promisify.custom=k,t.callbackify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');function t(){for(var t=[],r=0;r<arguments.length;r++)t.push(arguments[r]);var i=t.pop();if("function"!=typeof i)throw new TypeError("The last argument must be of type Function");var o=this,s=function(){return i.apply(o,arguments)};e.apply(this,t).then((function(e){n.nextTick(s.bind(null,null,e))}),(function(e){n.nextTick(I.bind(null,e,s))}))}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),Object.defineProperties(t,i(e)),t}},6430:(e,t,r)=>{"use strict";var n=r(9804),i=r(3083),o=r(1924),s=o("Object.prototype.toString"),a=r(1405)()&&"symbol"==typeof Symbol.toStringTag,u=i(),c=o("String.prototype.slice"),f={},h=r(882),l=Object.getPrototypeOf;a&&h&&l&&n(u,(function(e){if("function"==typeof r.g[e]){var t=new r.g[e];if(!(Symbol.toStringTag in t))throw new EvalError("this engine has support for Symbol.toStringTag, but "+e+" does not have the property! Please report this.");var n=l(t),i=h(n,Symbol.toStringTag);if(!i){var o=l(n);i=h(o,Symbol.toStringTag)}f[e]=i.get}}));var d=r(5692);e.exports=function(e){return!!d(e)&&(a?function(e){var t=!1;return n(f,(function(r,n){if(!t)try{var i=r.call(e);i===n&&(t=i)}catch(e){}})),t}(e):c(s(e),8,-1))}},7529:e=>{e.exports=function(){for(var e={},r=0;r<arguments.length;r++){var n=arguments[r];for(var i in n)t.call(n,i)&&(e[i]=n[i])}return e};var t=Object.prototype.hasOwnProperty},7158:()=>{},6601:()=>{},9214:()=>{},1922:()=>{},2363:()=>{},6854:()=>{},4616:()=>{},6421:()=>{},3083:(e,t,r)=>{"use strict";var n=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"];e.exports=function(){for(var e=[],t=0;t<n.length;t++)"function"==typeof r.g[n[t]]&&(e[e.length]=n[t]);return e}},882:(e,t,r)=>{"use strict";var n=r(210)("%Object.getOwnPropertyDescriptor%");if(n)try{n([],"length")}catch(e){n=null}e.exports=n},4526:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"api-options","type":"object","properties":{"trace":{"type":"boolean","description":"If true, log rippled requests and responses to stdout."},"feeCushion":{"type":"number","minimum":1,"description":"Factor to multiply estimated fee by to provide a cushion in case the required fee rises during submission of a transaction. Defaults to `1.2`."},"maxFeeXRP":{"type":"string","description":"Maximum fee to use with transactions, in XRP. Must be a string-encoded number. Defaults to `\'2\'`."},"server":{"type":"string","description":"URI for rippled websocket port to connect to. Must start with `wss://`, `ws://`, `wss+unix://`, or `ws+unix://`.","format":"uri","pattern":"^(wss?|wss?\\\\+unix)://"},"proxy":{"format":"uri","description":"URI for HTTP/HTTPS proxy to use to connect to the rippled server."},"timeout":{"type":"integer","description":"Request timeout in milliseconds before considering a request to have failed. See also: connectionTimeout.","minimum":1},"connectionTimeout":{"type":"integer","description":"Connection timeout, in milliseconds, before considering connect() to have failed.","minimum":1},"proxyAuthorization":{"type":"string","description":"Username and password for HTTP basic authentication to the proxy in the format **username:password**."},"authorization":{"type":"string","description":"Username and password for HTTP basic authentication to the rippled server in the format **username:password**."},"trustedCertificates":{"type":"array","description":"Array of PEM-formatted SSL certificates to trust when connecting to a proxy. This is useful if you want to use a self-signed certificate on the proxy server. Note: Each element must contain a single certificate; concatenated certificates are not valid.","items":{"type":"string","description":"A PEM-formatted SSL certificate to trust when connecting to a proxy."}},"key":{"type":"string","description":"A string containing the private key of the client in PEM format. (Can be an array of keys)."},"passphrase":{"type":"string","description":"The passphrase for the private key of the client."},"certificate":{"type":"string","description":"A string containing the certificate key of the client in PEM format. (Can be an array of certificates)."}},"additionalProperties":false}')},9845:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"combineParameters","type":"object","properties":{"signedTransactions":{"type":"array","description":"An array of signed transactions (from the output of [sign](#sign)) to combine.","items":{"type":"string","pattern":"^[A-F0-9]+$","description":"A single-signed transaction represented as an uppercase hexadecimal string (from the output of [sign](#sign))"},"minLength":1}},"additionalProperties":false,"required":["signedTransactions"]}')},4882:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"computeLedgerHashParameters","type":"object","properties":{"ledger":{"$ref":"getLedger","description":"The ledger header to hash."}},"additionalProperties":false,"required":["ledger"]}')},4203:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"generateAddressParameters","type":"object","properties":{"options":{"type":"object","description":"Options to control how the address and secret are generated.","properties":{"entropy":{"type":"array","items":{"type":"integer","minimum":0,"maximum":255},"description":"The entropy to use to generate the seed. Must be an array of length 16 with values from 0-255 (16 bytes of entropy)"},"algorithm":{"type":"string","enum":["ecdsa-secp256k1","ed25519"],"description":"The digital signature algorithm to generate an address for. Can be `ecdsa-secp256k1` (default) or `ed25519`."},"test":{"type":"boolean","description":"Specifies whether the address is intended for use on a test network such as Testnet or Devnet. If `true`, the address should only be used for testing, and starts with `T`. If `false`, the address should only be used on Mainnet, and starts with `X`."},"includeClassicAddress":{"type":"boolean","description":"If `true`, also return the classic address."}},"additionalProperties":false}},"additionalProperties":false}')},5698:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"getAccountInfoParameters","description":"Parameters for getAccountInfo","type":"object","properties":{"address":{"$ref":"address","description":"The address of the account to get the account info of."},"options":{"description":"Options that affect what to return.","properties":{"ledgerVersion":{"$ref":"ledgerVersion","description":"Get the account info as of this historical ledger version."}},"additionalProperties":false}},"required":["address"],"additionalProperties":false}')},7817:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"getAccountObjectsOptions","description":"Request options for getAccountObjects","type":"object","properties":{"address":{"$ref":"address","description":"The address of the account to get the account objects of."},"options":{"description":"Options that affect what to return.","properties":{"type":{"type":"string","enum":["check","escrow","offer","payment_channel","signer_list","state"],"description":"(Optional) Filter results to include only this type of ledger object. The valid types are: `check`, `escrow`, `offer`, `payment_channel`, `signer_list`, and `state` (trust line)."},"ledgerHash":{"type":"string","description":"(Optional) A 20-byte hex string for the ledger version to use."},"ledgerIndex":{"oneOf":[{"$ref":"ledgerVersion"},{"type":"string"}],"description":"(Optional) The sequence number of the ledger to use, or a shortcut string to choose a ledger automatically."},"limit":{"type":"integer","minimum":1,"description":"(Optional) The maximum number of objects to include in the results."}},"additionalProperties":false}},"required":["address"],"additionalProperties":false}')},298:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"getBalanceSheetParameters","description":"Parameters for getBalanceSheet","type":"object","properties":{"address":{"$ref":"address","description":"The XRP Ledger address of the account to get the balance sheet of."},"options":{"properties":{"excludeAddresses":{"type":"array","items":{"$ref":"address"},"uniqueItems":true,"description":"Addresses to exclude from the balance totals."},"ledgerVersion":{"$ref":"ledgerVersion","description":"Get the balance sheet as of this historical ledger version."}},"description":"Options to determine how the balances are calculated.","additionalProperties":false}},"additionalProperties":false,"required":["address"]}')},6584:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"getBalancesParameters","description":"Parameters for getBalances","type":"object","properties":{"address":{"$ref":"address","description":"The address of the account to get balances for."},"options":{"description":"Options to filter and determine which balances to return.","properties":{"counterparty":{"$ref":"address","description":"Only return balances with this counterparty."},"currency":{"$ref":"currency","description":"Only return balances for this currency."},"limit":{"type":"integer","minimum":1,"description":"Return at most this many balances."},"ledgerVersion":{"$ref":"ledgerVersion","description":"Return balances as they were in this historical ledger version."}},"additionalProperties":false}},"additionalProperties":false,"required":["address"]}')},5751:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"getLedgerParameters","description":"Parameters for getLedger","type":"object","properties":{"options":{"description":"Options affecting what ledger and how much data to return.","properties":{"ledgerHash":{"type":"string","description":"Get ledger data for this historical ledger hash."},"ledgerVersion":{"$ref":"ledgerVersion","description":"Get ledger data for this historical ledger version."},"includeAllData":{"type":"boolean","description":"Include the details of the transactions or state information if `includeTransactions` or `includeState` is set."},"includeTransactions":{"type":"boolean","description":"Return an array of transactions in this ledger. By default, provides the identifying hashes for each transaction. If `includeAllData` is true, include the entire transaction JSON for each transaction instead."},"includeState":{"type":"boolean","description":"Return an array of state data in this ledger. By default, provides the identifying hashes of state data. If `includeAllData` is true, return the state data in JSON form instead. **Admin required:** This is a very large amount of data."}},"additionalProperties":false}},"additionalProperties":false}')},8201:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"getOrderbookParameters","description":"Parameters for getOrderbook","type":"object","properties":{"address":{"$ref":"address","description":"Address of an account to use as point-of-view. (This affects which unfunded offers are returned.)"},"orderbook":{"$ref":"orderbook","description":"The order book to get."},"options":{"description":"Options to determine what to return.","properties":{"limit":{"type":"integer","minimum":1,"description":"Return at most this many orders from the order book."},"ledgerVersion":{"$ref":"ledgerVersion","description":"Return the order book as of this historical ledger version."}},"additionalProperties":false}},"required":["address","orderbook"],"additionalProperties":false}')},7482:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"getOrdersParameters","description":"Parameters for getOrders","type":"object","properties":{"address":{"$ref":"address","description":"The XRP Ledger address of the account to get open orders for."},"options":{"description":"Options that determine what orders to return.","properties":{"limit":{"type":"integer","minimum":1,"description":"Return at most this many orders."},"ledgerVersion":{"$ref":"ledgerVersion","description":"Return orders as of this historical ledger version."}},"additionalProperties":false}},"required":["address"],"additionalProperties":false}')},5870:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"getPathsParameters","type":"object","properties":{"pathfind":{"description":"Specification of a pathfind request.","properties":{"source":{"description":"Properties of the source of funds.","type":"object","properties":{"address":{"$ref":"address","description":"The XRP Ledger address of the planned sender."},"amount":{"$ref":"laxAmount","description":"The amount of funds to send."},"currencies":{"description":"An array of currencies (with optional counterparty) that may be used in the payment paths.","type":"array","items":{"description":"A currency with optional counterparty.","type":"object","properties":{"currency":{"$ref":"currency"},"counterparty":{"$ref":"address","description":"The counterparty for the currency; if omitted any counterparty may be used."}},"required":["currency"],"additionalProperties":false},"uniqueItems":true}},"not":{"required":["amount","currencies"]},"additionalProperties":false,"required":["address"]},"destination":{"description":"Properties of the destination of funds.","type":"object","properties":{"address":{"$ref":"address","description":"An address representing the destination of the transaction."},"amount":{"$ref":"laxLaxAmount","description":"The amount to be received by the receiver (`value` may be ommitted if a source amount is specified)."}},"required":["address","amount"],"additionalProperties":false}},"required":["source","destination"],"additionalProperties":false}},"additionalProperties":false,"required":["pathfind"]}')},5054:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"getPaymentChannelParameters","description":"Parameters for getPaymentChannel","type":"object","properties":{"id":{"$ref":"hash256","description":"256-bit hexadecimal channel identifier."}},"additionalProperties":false,"required":["id"]}')},5846:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"getSettingsParameters","description":"Parameters for getSettings","type":"object","properties":{"address":{"$ref":"address","description":"The address of the account to get the settings of."},"options":{"description":"Options that affect what to return.","properties":{"ledgerVersion":{"$ref":"ledgerVersion","description":"Get the settings as of this historical ledger version."}},"additionalProperties":false}},"required":["address"],"additionalProperties":false}')},9848:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"getTransactionParameters","description":"Parameters for getTransaction","type":"object","properties":{"id":{"$ref":"transactionHash"},"options":{"description":"Options to limit the ledger versions to search or include raw transaction data.","properties":{"minLedgerVersion":{"$ref":"ledgerVersion","description":"The lowest ledger version to search. This must be an integer greater than 0, or one of the following strings: \'validated\', \'closed\', \'current\'."},"maxLedgerVersion":{"$ref":"ledgerVersion","description":"The highest ledger version to search. This must be an integer greater than 0, or one of the following strings: \'validated\', \'closed\', \'current\'."},"includeRawTransaction":{"description":"Include raw transaction data. For advanced users; exercise caution when interpreting this data."}},"additionalProperties":false}},"additionalProperties":false,"required":["id"]}')},4802:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"getTransactionsParameters","description":"Parameters for getTransactions","type":"object","properties":{"address":{"$ref":"address","description":"The address of the account to get transactions for."},"options":{"description":"Options to filter the resulting transactions.","properties":{"start":{"$ref":"hash256","description":"If specified, start the results from this transaction. You cannot use `start` with `minLedgerVersion` or `maxLedgerVersion`. When `start` is specified, these ledger versions are determined internally."},"limit":{"type":"integer","minimum":1,"description":"If specified, return at most this many transactions."},"minLedgerVersion":{"$ref":"ledgerVersion","description":"Return only transactions in this ledger version or higher."},"maxLedgerVersion":{"$ref":"ledgerVersion","description":"Return only transactions in this ledger version or lower."},"earliestFirst":{"type":"boolean","description":"If true, sort transactions so that the earliest ones come first. By default, the newest transactions come first."},"excludeFailures":{"type":"boolean","description":"If true, the result omits transactions that did not succeed."},"initiated":{"type":"boolean","description":"If true, return only transactions initiated by the account specified by `address`. If false, return only transactions not initiated by the account specified by `address`."},"counterparty":{"$ref":"address","description":"If provided, only return transactions with this account as a counterparty to the transaction."},"types":{"type":"array","items":{"$ref":"transactionType"},"description":"Only return transactions of the specified [Transaction Types](#transaction-types)."},"includeRawTransactions":{"description":"Include raw transaction data. For advanced users; exercise caution when interpreting this data. "},"binary":{"type":"boolean","description":"If true, return transactions in binary format rather than JSON."}},"additionalProperties":false,"not":{"anyOf":[{"required":["start","minLedgerVersion"]},{"required":["start","maxLedgerVersion"]}]}}},"additionalProperties":false,"required":["address"]}')},9013:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"getTrustlinesParameters","description":"Parameters for getTrustlines","type":"object","properties":{"address":{"$ref":"address","description":"The address of the account to get trustlines for."},"options":{"description":"Options to filter and determine which trustlines to return.","properties":{"counterparty":{"$ref":"address","description":"Only return trustlines with this counterparty."},"currency":{"$ref":"currency","description":"Only return trustlines for this currency."},"limit":{"type":"integer","minimum":1,"description":"Return at most this many trustlines."},"ledgerVersion":{"$ref":"ledgerVersion","description":"Return trustlines as they were in this historical ledger version."}},"additionalProperties":false}},"additionalProperties":false,"required":["address"]}')},3971:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"prepareCheckCancelParameters","type":"object","properties":{"address":{"$ref":"address","description":"The address of the account that is creating the transaction."},"checkCancel":{"$ref":"checkCancel","description":"The specification of the Check cancellation to prepare."},"instructions":{"$ref":"instructions"}},"additionalProperties":false,"required":["address","checkCancel"]}')},6859:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"prepareCheckCashParameters","type":"object","properties":{"address":{"$ref":"address","description":"The address of the account that is creating the transaction."},"checkCash":{"$ref":"checkCash","description":"The specification of the Check cash to prepare."},"instructions":{"$ref":"instructions"}},"additionalProperties":false,"required":["address","checkCash"]}')},782:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"prepareCheckCreateParameters","type":"object","properties":{"address":{"$ref":"address","description":"The address of the account that is creating the transaction."},"checkCreate":{"$ref":"checkCreate","description":"The specification of the Check create creation to prepare."},"instructions":{"$ref":"instructions"}},"additionalProperties":false,"required":["address","checkCreate"]}')},8428:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"prepareEscrowCancellationParameters","type":"object","properties":{"address":{"$ref":"address","description":"The address of the account that is creating the transaction."},"escrowCancellation":{"$ref":"escrowCancellation","description":"The specification of the escrow cancellation to prepare."},"instructions":{"$ref":"instructions"}},"additionalProperties":false,"required":["address","escrowCancellation"]}')},8046:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"prepareEscrowCreationParameters","type":"object","properties":{"address":{"$ref":"address","description":"The address of the account that is creating the transaction."},"escrowCreation":{"$ref":"escrowCreation","description":"The specification of the escrow creation to prepare."},"instructions":{"$ref":"instructions"}},"additionalProperties":false,"required":["address","escrowCreation"]}')},4561:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"prepareEscrowExecutionParameters","type":"object","properties":{"address":{"$ref":"address","description":"The address of the account that is creating the transaction."},"escrowExecution":{"$ref":"escrowExecution","description":"The specification of the escrow execution to prepare."},"instructions":{"$ref":"instructions"}},"additionalProperties":false,"required":["address","escrowExecution"]}')},4681:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"prepareOrderCancellationParameters","type":"object","properties":{"address":{"$ref":"address","description":"The address of the account that is creating the transaction."},"orderCancellation":{"$ref":"orderCancellation","description":"The specification of the order cancellation to prepare."},"instructions":{"$ref":"instructions"}},"additionalProperties":false,"required":["address","orderCancellation"]}')},5168:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"prepareOrderParameters","type":"object","properties":{"address":{"$ref":"address","description":"The address of the account that is creating the transaction."},"order":{"$ref":"order","description":"The specification of the order to prepare."},"instructions":{"$ref":"instructions"}},"additionalProperties":false,"required":["address","order"]}')},1767:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"preparePaymentChannelClaimParameters","type":"object","properties":{"address":{"$ref":"address","description":"The address of the account that is creating the transaction."},"paymentChannelClaim":{"$ref":"paymentChannelClaim","description":"Details of the channel and claim."},"instructions":{"$ref":"instructions"}},"additionalProperties":false,"required":["address","paymentChannelClaim"]}')},4299:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"preparePaymentChannelCreateParameters","type":"object","properties":{"address":{"$ref":"address","description":"The address of the account that is creating the transaction."},"paymentChannelCreate":{"$ref":"paymentChannelCreate","description":"The specification of the payment channel to create."},"instructions":{"$ref":"instructions"}},"additionalProperties":false,"required":["address","paymentChannelCreate"]}')},7370:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"preparePaymentChannelFundParameters","type":"object","properties":{"address":{"$ref":"address","description":"The address of the account that is creating the transaction."},"paymentChannelFund":{"$ref":"paymentChannelFund","description":"The channel to fund, and the details of how to fund it."},"instructions":{"$ref":"instructions"}},"additionalProperties":false,"required":["address","paymentChannelFund"]}')},4172:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"preparePaymentParameters","type":"object","properties":{"address":{"$ref":"address","description":"The address of the account that is creating the transaction."},"payment":{"$ref":"payment","description":"The specification of the payment to prepare."},"instructions":{"$ref":"instructions"}},"additionalProperties":false,"required":["address","payment"]}')},4867:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"prepareSettingsParameters","type":"object","properties":{"address":{"$ref":"address","description":"The address of the account that is creating the transaction."},"settings":{"$ref":"settings","description":"The specification of the settings to prepare."},"instructions":{"$ref":"instructions"}},"additionalProperties":false,"required":["address","settings"]}')},7339:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"prepareTicketParameters","type":"object","properties":{"address":{"$ref":"address","description":"The address of the account that is creating the transaction."},"ticketCount":{"type":"number","description":"The number of tickets to be created."},"instructions":{"$ref":"instructions"}},"additionalProperties":false,"required":["address","ticketCount"]}')},350:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"prepareTrustlineParameters","type":"object","properties":{"address":{"$ref":"address","description":"The address of the account that is creating the transaction."},"trustline":{"$ref":"trustline","description":"The specification of the trustline to prepare."},"instructions":{"$ref":"instructions"}},"additionalProperties":false,"required":["address","trustline"]}')},6462:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"signPaymentChannelClaimParameters","type":"object","properties":{"channel":{"$ref":"hash256","description":"256-bit hexadecimal channel identifier."},"amount":{"$ref":"value","description":"Amount of XRP authorized by the claim."},"privateKey":{"$ref":"publicKey","description":"The private key to sign the payment channel claim."}},"additionalProperties":false,"required":["channel","amount","privateKey"]}')},1409:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"signParameters","type":"object","properties":{"txJSON":{"type":"string","description":"Transaction represented as a JSON string in rippled format."},"secret":{"type":"string","format":"secret","description":"The secret of the account that is initiating the transaction. (This field cannot be used with keypair)."},"keypair":{"type":"object","properties":{"privateKey":{"type":"privateKey","description":"The uppercase hexadecimal representation of the secp256k1 or Ed25519 private key. Ed25519 keys are prefixed with 0xED. You can read about how keys are derived [here](https://xrpl.org/cryptographic-keys.html)."},"publicKey":{"type":"publicKey","description":"The uppercase hexadecimal representation of the secp256k1 or Ed25519 public key. Ed25519 keys are prefixed with 0xED. You can read about how keys are derived [here](https://xrpl.org/cryptographic-keys.html)."}},"description":"The private and public key of the account that is initiating the transaction. (This field cannot be used with secret).","required":["privateKey","publicKey"],"additionalProperties":false},"options":{"type":"object","description":"Options that control the type of signature to create.","properties":{"signAs":{"$ref":"address","description":"The account that the signature should count for in multisigning."}},"additionalProperties":false}},"additionalProperties":false,"required":["txJSON"],"oneOf":[{"required":["secret"],"not":{"required":["keypair"]}},{"required":["keypair"],"not":{"required":["secret"]}}]}')},4103:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"submitParameters","type":"object","properties":{"signedTransaction":{"$ref":"blob","description":"A signed transaction as returned by [sign](#sign)."},"failHard":{"type":"boolean","description":"If `true`, and the transaction fails locally, do not retry or relay the transaction to other servers. Defaults to `false`."}},"additionalProperties":false,"required":["signedTransaction"]}')},8462:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"verifyPaymentChannelClaimParameters","type":"object","properties":{"channel":{"$ref":"hash256","description":"256-bit hexadecimal channel identifier."},"amount":{"$ref":"value","description":"Amount of XRP authorized by the claim."},"signature":{"$ref":"signature","description":"Signature of this claim."},"publicKey":{"$ref":"publicKey","description":"Public key of the channel\'s sender"}},"additionalProperties":false,"required":["channel","amount","signature","publicKey"]}')},417:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"address","description":"An account address on the XRP Ledger","type":"string","format":"address","link":"address","oneOf":[{"$ref":"xAddress"},{"$ref":"classicAddress"}]}')},7173:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"adjustment","type":"object","properties":{"address":{"$ref":"address"},"amount":{"$ref":"amount"},"tag":{"$ref":"tag"}},"required":["address","amount"],"additionalProperties":false}')},6448:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"amount","link":"amount","description":"An Amount on the XRP Ledger","allOf":[{"$ref":"amountbase"},{"required":["value"]}]}')},3089:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"amountbase","description":"Base class for amount and issue","type":"object","properties":{"value":{"description":"The quantity of the currency, denoted as a string so that it does not lose precision","$ref":"value"},"currency":{"description":"The three-character code or hexadecimal string used to denote currencies, or \\"drops\\" for the smallest unit of XRP.","$ref":"currency"},"counterparty":{"description":"The XRP Ledger address of the account that owes or is owed the funds (omitted if `currency` is \\"XRP\\" or \\"drops\\")","$ref":"address"}},"additionalProperties":false,"required":["currency"],"oneOf":[{"properties":{"currency":{"not":{"enum":["XRP","drops"]}}},"required":["counterparty"]},{"properties":{"currency":{"enum":["XRP","drops"]}},"not":{"required":["counterparty"]}}]}')},932:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"balance","description":"Balance amount","link":"amount","type":"object","properties":{"value":{"description":"The balance on the trustline","$ref":"signedValue"},"currency":{"description":"The three-character code or hexadecimal string used to denote currencies","$ref":"currency"},"counterparty":{"description":"The XRP Ledger address of the account that owes or is owed the funds.","$ref":"address"}},"additionalProperties":false,"required":["currency","value"],"oneOf":[{"properties":{"currency":{"not":{"enum":["XRP"]}}},"required":["counterparty"]},{"properties":{"currency":{"enum":["XRP"]}},"not":{"required":["counterparty"]}}]}')},535:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"blob","description":"An uppercase hexadecimal string representation of a transaction","type":"string","minLength":1,"pattern":"^[0-9A-F]*$"}')},5525:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"classicAddress","description":"A classic address (Account ID) for the XRP Ledger","type":"string","format":"classicAddress","link":"classic-address","pattern":"^r[1-9A-HJ-NP-Za-km-z]{24,34}$"}')},4391:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"currency","description":"The three-character code or hexadecimal string used to denote currencies","type":"string","link":"currency","pattern":"^([a-zA-Z0-9<>(){}[\\\\]|?!@#$%^&*]{3}|[A-F0-9]{40}|drops)$"}')},5245:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"destinationAddressTag","description":"A destination address and optional tag, with no amount included. When parsing an incoming transaction, the original specification\'s amount is hidden to prevent misinterpretation. For the amount that the transaction delivered, see `outcome.deliveredAmount`.","type":"object","properties":{"address":{"$ref":"address","description":"An address representing the destination of the transaction."},"tag":{"$ref":"tag"}},"required":["address"],"additionalProperties":false}')},7263:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"destinationAdjustment","type":"object","oneOf":[{"$ref":"destinationExactAdjustment"},{"$ref":"minAdjustment"}]}')},6509:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"destinationExactAdjustment","type":"object","properties":{"address":{"$ref":"address","description":"An address representing the destination of the transaction."},"amount":{"$ref":"laxAmount","description":"An exact amount to deliver to the recipient. If the counterparty is not specified, amounts with any counterparty may be used. (This field cannot be used with `destination.minAmount`.)"},"tag":{"$ref":"tag"}},"required":["address","amount"],"additionalProperties":false}')},1779:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"hash128","description":"The hexadecimal representation of a 128-bit hash","type":"string","pattern":"^[A-F0-9]{32}$"}')},7579:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"hash256","description":"The hexadecimal representation of a 256-bit hash","type":"string","pattern":"^[A-F0-9]{64}$"}')},6371:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"instructions","link":"transaction-instructions","description":"Instructions for executing the transaction","type":"object","properties":{"sequence":{"description":"The initiating account\'s sequence number for this transaction. `sequence` and `ticketSequence` are mutually exclusive, only one of them can be set.","$ref":"sequence"},"ticketSequence":{"description":"The ticket sequence to be used for this transaction. `sequence` and `ticketSequence` are mutually exclusive, only one of them can be set.","$ref":"ticket-sequence"},"fee":{"description":"An exact fee to pay for the transaction, before multiplying for multi-signed transactions. See [Transaction Fees](#transaction-fees) for more information.","$ref":"value"},"maxFee":{"description":"Deprecated: Use `maxFeeXRP` in the RippleAPI constructor instead. The maximum fee to pay for this transaction. If this exceeds `maxFeeXRP`, use `maxFeeXRP` instead. See [Transaction Fees](#transaction-fees) for more information.","$ref":"value"},"maxLedgerVersion":{"description":"The highest ledger version that the transaction can be included in. If this option and `maxLedgerVersionOffset` are both omitted, the default is 3 greater than the current validated ledger version (equivalent to `maxLedgerVersionOffset=3`). Use `null` to not set a maximum ledger version. If not null, this must be an integer greater than 0, or one of the following strings: \'validated\', \'closed\', \'current\'.","oneOf":[{"$ref":"ledgerVersion"},{"type":"null"}]},"maxLedgerVersionOffset":{"description":"Offset from current validated ledger version to highest ledger version that the transaction can be included in.","type":"integer","minimum":0},"signersCount":{"description":"Number of signers that can multi-sign this transaction.","type":"integer","minimum":1}},"additionalProperties":false,"not":{"anyOf":[{"description":"fee and maxFee are mutually exclusive","required":["fee","maxFee"]},{"description":"maxLedgerVersion and maxLedgerVersionOffset are mutually exclusive","required":["maxLedgerVersion","maxLedgerVersionOffset"]},{"description":"sequence and ticketSequence are mutually exclusive","required":["sequence","ticketSequence"]}]}}')},2521:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"issue","description":"The currency code, and the counterparty if it\'s not XRP.","allOf":[{"$ref":"amountbase"},{"not":{"required":["value"]}}]}')},9949:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"laxAmount","description":"Amount where counterparty is optional","link":"amount","type":"object","properties":{"currency":{"$ref":"currency"},"counterparty":{"$ref":"address"},"value":{"$ref":"value"}},"required":["currency","value"],"additionalProperties":false}')},8470:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"laxLaxAmount","description":"Amount where counterparty and value are optional","link":"amount","type":"object","properties":{"currency":{"$ref":"currency"},"counterparty":{"$ref":"address"},"value":{"$ref":"value"}},"required":["currency"],"additionalProperties":false}')},3920:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"ledgerVersion","description":"A ledger version number","oneOf":[{"type":"integer","minimum":1},{"type":"string","enum":["validated","closed","current"]}]}')},2324:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"maxAdjustment","type":"object","properties":{"address":{"$ref":"address","description":"The address to send from."},"maxAmount":{"$ref":"laxAmount","description":"The maximum amount to send. (This field cannot be used with source.amount)"},"tag":{"$ref":"tag"}},"required":["address","maxAmount"],"additionalProperties":false}')},6352:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"memo","description":"Memo objects represent arbitrary data that can be included in a transaction","type":"object","properties":{"type":{"pattern":"^[A-Za-z0-9\\\\-._~:/?#[\\\\]@!$&\'()*+,;=%]*$","description":"Conventionally, a unique relation (according to [RFC 5988](http://tools.ietf.org/html/rfc5988#section-4)) that defines the format of this memo. Only characters allowed in URLs are permitted."},"format":{"pattern":"^[A-Za-z0-9\\\\-._~:/?#[\\\\]@!$&\'()*+,;=%]*$","description":"Conventionally containing information on how the memo is encoded, for example as a [MIME type](http://www.iana.org/assignments/media-types/media-types.xhtml). Only characters allowed in URLs are permitted."},"data":{"type":"string","description":"Arbitrary string, conventionally containing the content of the memo."}},"additionalProperties":false,"anyOf":[{"required":["data"]},{"required":["type"]}]}')},2620:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"memos","link":"transaction-memos","description":"Array of memos to attach to the transaction.","type":"array","items":{"$ref":"memo"}}')},4727:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"minAdjustment","type":"object","properties":{"address":{"$ref":"address","description":"An address representing the destination of the transaction."},"minAmount":{"$ref":"laxAmount","description":"The minimum amount to be delivered. (This field cannot be used with destination.amount)"},"tag":{"$ref":"tag"}},"required":["address","minAmount"],"additionalProperties":false}')},6835:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"orderbook","type":"object","properties":{"base":{"$ref":"issue"},"counter":{"$ref":"issue"}},"required":["base","counter"],"additionalProperties":false}')},2699:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"privateKey","description":"The hexadecimal representation of a secp256k1 or Ed25519 private key.","type":"string","pattern":"^[A-F0-9]+$"}')},7225:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"publicKey","description":"The hexadecimal representation of a secp256k1 or Ed25519 public key.","type":"string","pattern":"^[A-F0-9]+$"}')},5330:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"quality","description":"Ratio for incoming/outgoing transit fees.","type":"number","minimum":1e-9,"maximum":4.294967295}')},6094:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"sequence","link":"account-sequence-number","description":"An account transaction sequence number","type":"integer","minimum":0}')},994:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"settingsPlusMemos","type":"object","properties":{"defaultRipple":{"type":"boolean","description":"Enable [rippling](https://xrpl.org/rippling.html) on this account’s trust lines by default. Currency issuers should enable this setting; most others should not."},"depositAuth":{"type":"boolean","description":"Enable [Deposit Authorization](https://xrpl.org/depositauth.html) on this account. If set, transactions cannot send value of any kind to this account unless the sender of those transactions is the account itself. (Requires the [DepositAuth amendment](https://xrpl.org/known-amendments.html#depositauth))"},"disableMasterKey":{"type":"boolean","description":"Disallows use of the master key to sign transactions for this account. To disable the master key, you must authorize the transaction by signing it with the master key pair. You cannot use a regular key pair or a multi-signature. You can re-enable the master key pair using a regular key pair or multi-signature. See [AccountSet](https://xrpl.org/accountset.html)."},"disallowIncomingXRP":{"type":"boolean","description":"Indicates that client applications should not send XRP to this account. Not enforced by rippled."},"domain":{"type":"string","description":"The domain that owns this account, as a hexadecimal string representing the ASCII for the domain in lowercase."},"emailHash":{"description":"Hash of an email address to be used for generating an avatar image. Conventionally, clients use Gravatar to display this image. Use `null` to clear.","oneOf":[{"type":"null"},{"$ref":"hash128"}]},"walletLocator":{"description":"Transaction hash or any other 64 character hexadecimal string, that may or may not represent the result of a hash operation. Use `null` to clear.","oneOf":[{"type":"null"},{"$ref":"hash256"}]},"enableTransactionIDTracking":{"type":"boolean","description":"Track the ID of this account’s most recent transaction."},"globalFreeze":{"type":"boolean","description":"Freeze all assets issued by this account."},"memos":{"$ref":"memos"},"messageKey":{"type":"string","description":"Public key for sending encrypted messages to this account. Conventionally, it should be a secp256k1 key, the same encryption that is used by the rest of Ripple."},"noFreeze":{"type":"boolean","description":"Permanently give up the ability to freeze individual trust lines. This flag can never be disabled after being enabled."},"passwordSpent":{"type":"boolean","description":"Indicates that the account has used its free SetRegularKey transaction."},"regularKey":{"oneOf":[{"$ref":"address"},{"type":"null"}],"description":"The public key of a new keypair, to use as the regular key to this account, as a base-58-encoded string in the same format as an account address. Use `null` to remove the regular key."},"requireAuthorization":{"type":"boolean","description":"If set, this account must individually give other users permission to hold this account’s issued tokens."},"requireDestinationTag":{"type":"boolean","description":"Requires incoming payments to specify a destination tag."},"signers":{"type":"object","description":"Settings that determine what sets of accounts can be used to sign a transaction on behalf of this account using multisigning.","properties":{"threshold":{"$ref":"uint32","description":"A target number for the signer weights. A multi-signature from this list is valid only if the sum weights of the signatures provided is equal or greater than this value. To delete the signers setting, use the value `0`."},"weights":{"type":"array","description":"Weights of signatures for each signer.","items":{"type":"object","description":"An association of an address and a weight.","properties":{"address":{"$ref":"address"},"weight":{"$ref":"uint32","description":"The weight that the signature of this account counts as towards the threshold."}},"required":["address","weight"],"additionalProperties":false},"minItems":1,"maxItems":8}},"required":["threshold"],"additionalProperties":false},"transferRate":{"description":"The fee to charge when users transfer this account’s issuances, as the decimal amount that must be sent to deliver 1 unit. Has precision up to 9 digits beyond the decimal point. Use `null` to set no fee.","oneOf":[{"type":"null"},{"type":"number","minimum":1,"maximum":4.294967295}]},"tickSize":{"description":"Tick size to use for offers involving a currency issued by this address. The exchange rates of those offers is rounded to this many significant digits. Valid values are 3 to 15 inclusive, or 0 to disable.","enum":[0,3,4,5,6,7,8,9,10,11,12,13,14,15]}},"additionalProperties":false}')},3913:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"signature","description":"The hexadecimal representation of a signature.","type":"string","pattern":"^[A-F0-9]+$"}')},6387:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"signedValue","description":"A string representation of a floating point number","type":"string","link":"value","pattern":"^[-]?[0-9]*[.]?[0-9]+([eE][-+]?[0-9]+)?$"}')},7807:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"sourceAdjustment","type":"object","oneOf":[{"$ref":"sourceExactAdjustment"},{"$ref":"maxAdjustment"}]}')},8303:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"sourceExactAdjustment","type":"object","properties":{"address":{"$ref":"address","description":"The address to send from."},"amount":{"$ref":"laxAmount","description":"An exact amount to send. If the counterparty is not specified, amounts with any counterparty may be used. (This field cannot be used with source.maxAmount)"},"tag":{"$ref":"tag"}},"required":["address","amount"],"additionalProperties":false}')},1062:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"tag","description":"An arbitrary 32-bit unsigned integer. It typically maps to an off-ledger account; for example, a hosted wallet or exchange account.","type":"integer","$ref":"uint32"}')},6433:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"ticket-sequence","link":"account-sequence-number","description":"An account transaction tickt sequence number","type":"integer","minimum":1}')},3383:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"transactionHash","link":"transaction-id","description":"A hash of a transaction used to identify the transaction, represented in hexadecimal.","type":"string","pattern":"^[A-F0-9]{64}$"}')},5592:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"transactionType","link":"transaction-types","description":"The type of the transaction.","type":"string","enum":["payment","order","orderCancellation","trustline","settings","escrowCreation","escrowCancellation","escrowExecution","paymentChannelCreate","paymentChannelFund","paymentChannelClaim","checkCreate","checkCancel","checkCash","depositPreauth","accountDelete"]}')},4092:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"tx-json","link":"https://xrpl.org/transaction-formats.html","description":"An object in rippled txJSON format","type":"object","properties":{"Account":{"$ref":"address"},"TransactionType":{"type":"string"}},"required":["Account","TransactionType"]}')},7789:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"uint32","description":"A 32-bit unsigned integer","type":"integer","minimum":0,"maximum":4294967295}')},6693:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"value","link":"value","description":"A string representation of a non-negative floating point number","type":"string","pattern":"^[0-9]*[.]?[0-9]+([eE][-+]?[0-9]+)?$"}')},2144:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"xAddress","description":"An XRP Ledger address in X-address format","type":"string","format":"xAddress","link":"x-address","pattern":"^[XT][1-9A-HJ-NP-Za-km-z]{46}$"}')},6220:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"getAccountInfo","type":"object","properties":{"sequence":{"$ref":"sequence","description":"The next (smallest unused) sequence number for this account."},"xrpBalance":{"$ref":"value","description":"The XRP balance owned by the account."},"ownerCount":{"type":"integer","minimum":0,"description":"Number of other ledger entries (specifically, trust lines and offers) attributed to this account. This is used to calculate the total reserve required to use the account."},"previousInitiatedTransactionID":{"$ref":"hash256","description":"Hash value representing the most recent transaction that was initiated by this account."},"previousAffectingTransactionID":{"$ref":"hash256","description":"Hash value representing the most recent transaction that affected this account node directly. **Note:** This does not include changes to the account’s trust lines and offers."},"previousAffectingTransactionLedgerVersion":{"$ref":"ledgerVersion","description":"The ledger version that the transaction identified by the `previousAffectingTransactionID` was validated in."}},"required":["sequence","xrpBalance","ownerCount","previousAffectingTransactionID","previousAffectingTransactionLedgerVersion"],"additionalProperties":false}')},985:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"AccountObjectsResponse","description":"Response format for account_objects","type":"object","properties":{"account":{"$ref":"address","description":"Unique address of the account this request corresponds to."},"account_objects":{"type":"array","items":{"type":"object"},"description":"Array of objects owned by this account. Each object is in its raw ledger format."},"ledger_hash":{"type":"string","description":"(May be omitted) The identifying hash of the ledger that was used to generate this response."},"ledger_index":{"$ref":"ledgerVersion","description":"(May be omitted) The sequence number of the ledger that was used to generate this response."},"ledger_current_index":{"$ref":"ledgerVersion","description":"(May be omitted) The sequence number of the ledger that was used to generate this response."},"limit":{"type":"integer","description":"(May be omitted) The limit that was used in this request, if any."},"validated":{"type":"boolean","description":"If included and set to true, the information in this request comes from a validated ledger version. Otherwise, the information is subject to change."}},"required":["account","account_objects"],"additionalProperties":false}')},7193:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"getBalanceSheet","description":"getBalanceSheet response","type":"object","properties":{"balances":{"type":"array","items":{"$ref":"amount"},"description":"Amounts issued to the \\"hotwallet\\" accounts from the request. The keys are the accounts\' addresses, and the values are arrays of currency amounts they hold. The issuer (omitted from the currency amounts) is the account from the request."},"assets":{"type":"array","items":{"$ref":"amount"},"description":"Total amounts held that are issued by others. For the recommended gateway configuration, there should be none."},"obligations":{"type":"array","items":{"type":"object","required":["currency","value"],"additionalProperties":false,"properties":{"currency":{"$ref":"currency"},"value":{"$ref":"value"}},"description":"An amount that is owed."},"description":"Total amounts issued to accounts that are not hot wallets, as a map of currencies to the total value issued."}},"additionalProperties":false}')},2030:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"getBalances","type":"array","items":{"$ref":"balance"}}')},203:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"getLedger","type":"object","properties":{"stateHash":{"$ref":"hash256","description":"Hash of all state information in this ledger."},"closeTime":{"type":"string","format":"date-time","description":"The approximate time when this ledger was closed. This number is rounded based on the `closeTimeResolution`. If it would have been rounded to the same time as a previous ledger, the close time is recorded as 1 second later instead."},"closeTimeResolution":{"type":"integer","minimum":1,"description":"A number of seconds, indicating how much the `closeTime` could be rounded. Ledger close times are approximate so that small differences in servers clocks don\'t hinder consensus."},"closeFlags":{"type":"integer","minimum":0,"description":"A bit-map of flags relating to the closing of this ledger. Currently, the ledger has only one flag defined for `closeFlags`: **sLCF_NoConsensusTime** (value 1). If this flag is enabled, it means that validators disagreed on the correct close time for the ledger, but built otherwise the same ledger, so they declared consensus while \\"agreeing to disagree\\" on the close time. In this case, the consensus ledger contains a `closeTime` value that is 1 second after that of the previous ledger. (In this case, there is no official close time, but the actual real-world close time is probably 3-6 seconds later than the specified `closeTime`.)"},"ledgerHash":{"$ref":"hash256","description":"Unique identifying hash of the entire ledger."},"ledgerVersion":{"$ref":"ledgerVersion","description":"The ledger version of this ledger."},"parentLedgerHash":{"$ref":"hash256","description":"Unique identifying hash of the ledger that came immediately before this one."},"parentCloseTime":{"type":"string","format":"date-time","description":"The previous ledger\'s recorded close time."},"totalDrops":{"$ref":"value","description":"Total number of drops (1/1,000,000th of an XRP) in the network, as a quoted integer. (This decreases as transaction fees cause XRP to be destroyed.)"},"transactionHash":{"$ref":"hash256","description":"Hash of the transaction information included in this ledger."},"transactions":{"description":"Array of all transactions that were validated in this ledger. Transactions are represented in the same format as the return value of [getTransaction](#gettransaction).","type":"array","items":{"$ref":"getTransaction","description":"A transaction in the same format as the return value of [getTransaction](#gettransaction)."}},"transactionHashes":{"description":"An array of hashes of all transactions that were validated in this ledger.","type":"array","items":{"$ref":"transactionHash"}},"rawState":{"type":"string","description":"A JSON string containing all state data for this ledger in rippled JSON format."},"stateHashes":{"description":"An array of hashes of all state data in this ledger.","type":"array","items":{"$ref":"hash256"}}},"required":["stateHash","closeTime","closeTimeResolution","closeFlags","ledgerHash","ledgerVersion","parentLedgerHash","parentCloseTime","totalDrops","transactionHash"],"additionalProperties":false}')},5342:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"getOrderbook","type":"object","properties":{"bids":{"$ref":"orderbookOrders","description":"The buy orders in the order book."},"asks":{"$ref":"orderbookOrders","description":"The sell orders in the order book."}},"required":["bids","asks"],"additionalProperties":false}')},7571:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"getOrders","type":"array","items":{"type":"object","properties":{"specification":{"$ref":"order","description":"An order specification that would create an order equivalent to the current state of this order."},"properties":{"description":"Properties of the order not in the specification.","type":"object","properties":{"maker":{"$ref":"address","description":"The address of the account that submitted the order."},"sequence":{"$ref":"sequence","description":"The account sequence number of the transaction that created this order."},"makerExchangeRate":{"$ref":"value","description":"The exchange rate from the point of view of the account that submitted the order (also known as \\"quality\\")."}},"required":["maker","sequence","makerExchangeRate"],"addtionalProperties":false}},"required":["specification","properties"],"additionalProperties":false}}')},7707:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"getPaths","type":"array","items":{"type":"object","properties":{"source":{"$ref":"sourceAdjustment","description":"Properties of the source of the payment."},"destination":{"$ref":"destinationAdjustment","description":"Properties of the destination of the payment."},"paths":{"type":"string","description":"The paths of trustlines and orders to use in executing the payment."}},"required":["source","destination","paths"],"additionalProperties":false}}')},395:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"getPaymentChannel","type":"object","properties":{"account":{"$ref":"address","description":"Address that created the payment channel."},"destination":{"$ref":"address","description":"Address to receive XRP claims against this channel."},"amount":{"$ref":"value","description":"The total amount of XRP funded in this channel."},"balance":{"$ref":"value","description":"The total amount of XRP delivered by this channel."},"settleDelay":{"type":"number","description":"Amount of seconds the source address must wait before closing the channel if it has unclaimed XRP."},"expiration":{"type":"string","format":"date-time","description":"Time when this channel expires."},"publicKey":{"$ref":"publicKey","description":"Public key of the key pair the source uses to sign claims against this channel."},"cancelAfter":{"type":"string","format":"date-time","description":"Time when this channel expires as specified at creation."},"sourceTag":{"$ref":"tag","description":"Source tag."},"destinationTag":{"$ref":"tag","description":"Destination tag."},"previousAffectingTransactionID":{"$ref":"hash256","description":"Hash value representing the most recent transaction that affected this payment channel."},"previousAffectingTransactionLedgerVersion":{"$ref":"ledgerVersion","description":"The ledger version that the transaction identified by the `previousAffectingTransactionID` was validated in."}},"required":["account","destination","amount","balance","settleDelay","previousAffectingTransactionID","previousAffectingTransactionLedgerVersion"],"additionalProperties":false}')},9807:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"getServerInfo","type":"object","properties":{"buildVersion":{"type":"string","description":"The version number of the running rippled version."},"completeLedgers":{"type":"string","pattern":"[0-9,-]+","description":"Range expression indicating the sequence numbers of the ledger versions the local rippled has in its database. It is possible to be a disjoint sequence, e.g. “2500-5000,32570-7695432”."},"hostID":{"type":"string","description":"On an admin request, returns the hostname of the server running the rippled instance; otherwise, returns a unique four letter word."},"ioLatencyMs":{"type":"number","description":"Amount of time spent waiting for I/O operations, in milliseconds. If this number is not very, very low, then the rippled server is probably having serious load issues."},"load":{"type":"object","description":"*(Admin only)* Detailed information about the current load state of the server.","properties":{"jobTypes":{"type":"array","description":"*(Admin only)* Information about the rate of different types of jobs the server is doing and how much time it spends on each.","items":{"type":"object"}},"threads":{"type":"number","description":"*(Admin only)* The number of threads in the server’s main job pool, performing various operations."}},"required":["jobTypes","threads"]},"lastClose":{"type":"object","description":"Information about the last time the server closed a ledger.","properties":{"convergeTimeS":{"type":"number","description":"The time it took to reach a consensus for the last ledger closing, in seconds."},"proposers":{"type":"integer","minimum":0,"description":"Number of trusted validators participating in the ledger closing."}},"required":["convergeTimeS","proposers"]},"loadFactor":{"type":"number","description":"The load factor the server is currently enforcing, as a multiplier on the base transaction fee. The load factor is determined by the highest of the individual server’s load factor, cluster’s load factor, and the overall network’s load factor."},"peers":{"type":"integer","minimum":0,"description":"How many other rippled servers the node is currently connected to."},"pubkeyNode":{"type":"string","description":"Public key used to verify this node for internal communications; this key is automatically generated by the server the first time it starts up."},"pubkeyValidator":{"type":"string","description":"*(Admin only)* Public key used by this node to sign ledger validations."},"serverState":{"type":"string","description":"A string indicating to what extent the server is participating in the network. See [Possible Server States](https://xrpl.org/rippled-server-states.html) for more details.","enum":["disconnected","connected","syncing","tracking","full","validating","proposing"]},"validatedLedger":{"type":"object","description":"Information about the fully-validated ledger with the highest sequence number (the most recent).","properties":{"age":{"type":"integer","minimum":0,"description":"The time since the ledger was closed, in seconds."},"baseFeeXRP":{"$ref":"value","description":"Base fee, in XRP. This may be represented in scientific notation such as 1e-05 for 0.00005."},"hash":{"$ref":"hash256","description":"Unique hash for the ledger, as an uppercase hexadecimal string."},"reserveBaseXRP":{"$ref":"value","description":"Minimum amount of XRP necessary for every account to keep in reserve."},"reserveIncrementXRP":{"$ref":"value","description":"Amount of XRP added to the account reserve for each object an account owns in the ledger."},"ledgerVersion":{"type":"integer","minimum":0,"description":"Identifying ledger index of this ledger version."}},"additionalProperties":false,"required":["age","baseFeeXRP","hash","reserveBaseXRP","reserveIncrementXRP","ledgerVersion"]},"validationQuorum":{"type":"number","description":"Minimum number of trusted validations required to validate a ledger version. Some circumstances may cause the server to require more validations."}},"required":["buildVersion","completeLedgers","hostID","ioLatencyMs","lastClose","loadFactor","peers","pubkeyNode","serverState","validatedLedger","validationQuorum"],"additionalProperties":false}')},6116:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"getSettings","$ref":"settingsPlusMemos","not":{"required":["memos"]}}')},4924:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"getTransaction","description":"getTransaction response","link":"gettransaction","properties":{"type":{"$ref":"transactionType"},"specification":{"description":"A specification that would produce the same outcome as this transaction. *Exception:* For payment transactions, this omits the `destination.amount` field, to prevent misunderstanding. The structure of the specification depends on the value of the `type` field (see [Transaction Types](#transaction-types) for details). *Note:* This is **not** necessarily the same as the original specification."},"outcome":{"$ref":"outcome","description":"The outcome of the transaction (what effects it had)."},"id":{"$ref":"transactionHash","description":"A hash of the transaction that can be used to identify it."},"address":{"$ref":"address","description":"The address of the account that initiated the transaction."},"sequence":{"$ref":"sequence","description":"The account sequence number of the transaction for the account that initiated it."},"rawTransaction":{"description":"The raw transaction data as a JSON string. For advanced users only; exercise caution when interpreting this data.","type":"string"}},"required":["id","address","sequence","type","specification","outcome"],"additionalProperties":false,"oneOf":[{"properties":{"type":{"enum":["payment"]},"specification":{"$ref":"getPayment"}}},{"properties":{"type":{"enum":["order"]},"specification":{"$ref":"order"}}},{"properties":{"type":{"enum":["orderCancellation"]},"specification":{"$ref":"orderCancellation"}}},{"properties":{"type":{"enum":["trustline"]},"specification":{"$ref":"trustline"}}},{"properties":{"type":{"enum":["settings"]},"specification":{"$ref":"getSettings"}}},{"properties":{"type":{"enum":["checkCreate"]},"specification":{"$ref":"checkCreate"}}},{"properties":{"type":{"enum":["checkCancel"]},"specification":{"$ref":"checkCancel"}}},{"properties":{"type":{"enum":["checkCash"]},"specification":{"$ref":"checkCash"}}},{"properties":{"type":{"enum":["escrowCreation"]},"specification":{"$ref":"escrowCreation"}}},{"properties":{"type":{"enum":["escrowCancellation"]},"specification":{"$ref":"escrowCancellation"}}},{"properties":{"type":{"enum":["escrowExecution"]},"specification":{"$ref":"escrowExecution"}}},{"properties":{"type":{"enum":["paymentChannelCreate"]},"specification":{"$ref":"paymentChannelCreate"}}},{"properties":{"type":{"enum":["paymentChannelFund"]},"specification":{"$ref":"paymentChannelFund"}}},{"properties":{"type":{"enum":["paymentChannelClaim"]},"specification":{"$ref":"paymentChannelClaim"}}},{"properties":{"type":{"enum":["depositPreauth"]},"specification":{"$ref":"depositPreauth"}}},{"properties":{"type":{"enum":["accountDelete"]},"specification":{"$ref":"accountDelete"}}}]}')},3008:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"getTransactions","type":"array","items":{"$ref":"getTransaction"}}')},1730:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"getTrustlines","type":"array","items":{"properties":{"specification":{"$ref":"trustline","description":"A trust line specification that would produce this trust line in its current state."},"counterparty":{"properties":{"limit":{"$ref":"value","description":"The maximum amount that the counterparty can be owed through the trust line."},"ripplingDisabled":{"type":"boolean","description":"If true, payments cannot ripple through this trustline."},"frozen":{"type":"boolean","description":"If true, the trust line is frozen, which means that funds can only be sent directly to the counterparty."},"authorized":{"type":"boolean","description":"If true, the counterparty authorizes this party to hold issuances from the counterparty."}},"description":"Properties of the trustline from the perspective of the counterparty.","required":["limit"],"additionalProperties":false},"state":{"properties":{"balance":{"$ref":"signedValue","description":"The balance on the trust line, representing which party owes the other and by how much."}},"description":"Non-settings details of the trust line\'s state.","required":["balance"],"additionalProperties":false}},"required":["specification","counterparty","state"],"additionalProperties":false}}')},7695:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"ledgerEvent","description":"A ledger event message","type":"object","properties":{"baseFeeXRP":{"$ref":"value","description":"Base fee, in XRP."},"ledgerHash":{"$ref":"hash256","description":"Unique hash of the ledger that was closed, as hex."},"ledgerVersion":{"$ref":"ledgerVersion","description":"Ledger version of the ledger that closed."},"ledgerTimestamp":{"type":"string","format":"date-time","description":"The time at which this ledger closed."},"reserveBaseXRP":{"$ref":"value","description":"The minimum reserve, in XRP, that is required for an account."},"reserveIncrementXRP":{"$ref":"value","description":"The increase in account reserve that is added for each item the account owns, such as offers or trust lines."},"transactionCount":{"type":"integer","minimum":0,"description":"Number of new transactions included in this ledger."},"validatedLedgerVersions":{"type":"string","description":"Range of ledgers that the server has available. This may be discontiguous."}},"addtionalProperties":false,"required":["baseFeeXRP","ledgerHash","ledgerTimestamp","reserveBaseXRP","reserveIncrementXRP","transactionCount","ledgerVersion","validatedLedgerVersions"]}')},8819:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"orderChange","type":"object","description":"A change to an order.","properties":{"direction":{"type":"string","enum":["buy","sell"],"description":"Equal to \\"buy\\" for buy orders and \\"sell\\" for sell orders."},"quantity":{"$ref":"amount","description":"The amount to be bought or sold by the maker."},"totalPrice":{"$ref":"amount","description":"The total amount to be paid or received by the taker."},"makerExchangeRate":{"$ref":"value","description":"The exchange rate between the `quantity` currency and the `totalPrice` currency from the point of view of the maker."},"sequence":{"$ref":"sequence","description":"The order sequence number, used to identify the order for cancellation"},"status":{"enum":["created","filled","partially-filled","cancelled"],"description":"The status of the order. One of \\"created\\", \\"filled\\", \\"partially-filled\\", \\"cancelled\\"."},"expirationTime":{"type":"string","format":"date-time","description":"The time after which the order expires, if any."}},"required":["direction","quantity","totalPrice","sequence","status"],"additionalProperties":false}')},3345:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"orderbookOrders","type":"array","items":{"description":"An order in the order book.","type":"object","properties":{"specification":{"$ref":"order","description":"An order specification that would create an order equivalent to the current state of this order."},"properties":{"description":"Properties of the order not in the specification.","type":"object","properties":{"maker":{"$ref":"address","description":"The address of the account that submitted the order."},"sequence":{"$ref":"sequence","description":"The account sequence number of the transaction that created this order."},"makerExchangeRate":{"$ref":"value","description":"The exchange rate from the point of view of the account that submitted the order (also known as \\"quality\\")."}},"required":["maker","sequence","makerExchangeRate"],"addtionalProperties":false},"state":{"description":"The state of the order.","type":"object","properties":{"fundedAmount":{"$ref":"amount","description":"How much of the amount the maker would have to pay that the maker currently holds."},"priceOfFundedAmount":{"$ref":"amount","description":"How much the `fundedAmount` would convert to through the exchange rate of this order."}},"required":["fundedAmount","priceOfFundedAmount"],"additionalProperties":false},"data":{"description":"The raw order data. This may include `owner_funds`, `Flags`, and other fields.","type":"object","additionalProperties":true}},"required":["specification","properties","data"],"additionalProperties":false}}')},9810:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"outcome","type":"object","description":"The outcome of the transaction (what effects it had).","properties":{"result":{"type":"string","description":"Result code returned by rippled. See [Transaction Results](https://xrpl.org/transaction-results.html) for a complete list."},"timestamp":{"type":"string","format":"date-time","description":"The timestamp when the transaction was validated. (May be missing when requesting transactions in binary mode.)"},"fee":{"$ref":"value","description":"The XRP fee that was charged for the transaction."},"deliveredAmount":{"$ref":"amount","description":"For payment transactions, it is impossible to reliably compute the actual delivered amount from the balanceChanges due to fixed precision. If the payment is not a partial payment and the transaction succeeded, the deliveredAmount should always be considered to be the amount specified in the transaction."},"balanceChanges":{"type":"object","additionalProperties":{"type":"array","description":"Key is the XRP Ledger address; value is an array of signed amounts representing changes of balances for that address.","items":{"$ref":"balance"}}},"orderbookChanges":{"type":"object","additionalProperties":{"type":"array","description":"Key is the maker\'s XRP Ledger address; value is an array of changes","items":{"$ref":"orderChange"}}},"channelChanges":{"type":"object","description":"Properties reflecting the details of the payment channel."},"ledgerVersion":{"$ref":"ledgerVersion","description":"The ledger version that the transaction was validated in."},"indexInLedger":{"type":"integer","minimum":0,"description":"The ordering index of the transaction in the ledger."}},"required":["result","fee","balanceChanges","orderbookChanges","ledgerVersion","indexInLedger"],"additionalProperties":false}')},4079:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"prepare","description":"Result of prepare function","type":"object","properties":{"txJSON":{"type":"string","description":"The prepared transaction in rippled JSON format."},"instructions":{"description":"The instructions for how to execute the transaction after adding automatic defaults.","type":"object","properties":{"fee":{"$ref":"value","description":"The fee to pay for the transaction. See [Transaction Fees](#transaction-fees) for more information. For multi-signed transactions, this fee is multiplied by (N+1), where N is the number of signatures you plan to provide."},"sequence":{"$ref":"sequence","description":"The initiating account\'s sequence number for this transaction. `sequence` and `ticketSequence` are mutually exclusive, only one of them can be set."},"ticketSequence":{"$ref":"ticket-sequence","description":"The initiating account\'s ticket sequence number for this transaction. `sequence` and `ticketSequence` are mutually exclusive, only one of them can be set."},"maxLedgerVersion":{"oneOf":[{"$ref":"ledgerVersion"},{"type":"null"}],"description":"The highest ledger version that the transaction can be included in. Set to `null` if there is no maximum. If not null, this must be an integer greater than 0, or one of the following strings: \'validated\', \'closed\', \'current\'."}},"additionalProperties":false,"required":["fee","maxLedgerVersion"],"anyOf":[{"required":["sequence"]},{"required":["ticketSequence"]}]}},"additionalProperties":false,"required":["txJSON","instructions"]}')},3529:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"signPaymentChannelClaim","type":"string","$ref":"signature","additionalProperties":false}')},4105:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"sign","type":"object","properties":{"signedTransaction":{"type":"string","pattern":"^[A-F0-9]+$","description":"The signed transaction represented as an uppercase hexadecimal string."},"id":{"$ref":"transactionHash","description":"The [Transaction ID](#transaction-id) of the signed transaction."}},"required":["signedTransaction","id"],"additionalProperties":false}')},7006:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"submit","type":"object","properties":{"resultCode":{"type":"string","description":"Deprecated: Use `engine_result` instead."},"resultMessage":{"type":"string","description":"Deprecated: Use `engine_result_message` instead."},"engine_result":{"type":"string","description":"Code indicating the preliminary result of the transaction, for example `tesSUCCESS`. [List of transaction responses](https://xrpl.org/transaction-results.html)"},"engine_result_code":{"type":"integer","description":"Numeric code indicating the preliminary result of the transaction, directly correlated to `engine_result`"},"engine_result_message":{"type":"string","description":"Human-readable explanation of the transaction\'s preliminary result."},"tx_blob":{"type":"string","description":"The complete transaction in hex string format."},"tx_json":{"$ref":"tx-json","description":"The complete transaction in JSON format."}},"required":["resultCode","resultMessage","engine_result","engine_result_code","engine_result_message","tx_blob","tx_json"],"additionalProperties":false}')},8941:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"verifyPaymentChannelClaim","type":"boolean","additionalProperties":false}')},9809:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"accountDelete","link":"account-delete","type":"object","properties":{"destination":{"$ref":"address","description":"Address of an account to receive any leftover XRP after deleting the sending account. Must be a funded account in the ledger, and must not be the sending account."},"destinationTag":{"$ref":"tag","description":"(Optional) Arbitrary destination tag that identifies a hosted recipient or other information for the recipient of the deleted account\'s leftover XRP."},"destinationXAddress":{"$ref":"address","description":"X-address of an account to receive any leftover XRP after deleting the sending account. Must be a funded account in the ledger, and must not be the sending account."},"memos":{"$ref":"memos"}},"anyOf":[{"required":["destination"]},{"required":["destinationXAddress"]}],"additionalProperties":false}')},8571:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"checkCancel","link":"check-cancel","type":"object","properties":{"checkID":{"$ref":"hash256","description":"The ID of the Check ledger object to cancel, as a 64-character hexadecimal string."},"memos":{"$ref":"memos"}},"required":["checkID"],"additionalProperties":false}')},9151:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"checkCash","link":"check-cash","type":"object","properties":{"checkID":{"$ref":"hash256","description":"The ID of the Check ledger object to cash, as a 64-character hexadecimal string."},"amount":{"$ref":"laxAmount","description":"Redeem the Check for exactly this amount, if possible. The currency must match that of the sendMax of the corresponding CheckCreate transaction. You must provide either this field or deliverMin."},"deliverMin":{"$ref":"laxAmount","description":"Redeem the Check for at least this amount and for as much as possible. The currency must match that of the sendMax of the corresponding CheckCreate transaction. You must provide either this field or amount."},"memos":{"$ref":"memos"}},"required":["checkID"],"oneOf":[{"required":["amount"]},{"required":["deliverMin"]}],"additionalProperties":false}')},1343:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"checkCreate","link":"check-create","type":"object","properties":{"destination":{"$ref":"address","description":"Address of the account that can cash the check."},"sendMax":{"$ref":"laxAmount","description":"Amount of source currency the check is allowed to debit the sender, including transfer fees on non-XRP currencies."},"destinationTag":{"$ref":"tag","description":"Destination tag that identifies the reason for the check, or a hosted recipient to pay."},"expiration":{"type":"string","format":"date-time","description":"Time after which the check is no longer valid."},"invoiceID":{"$ref":"hash256","description":"256-bit hash, as a 64-character hexadecimal string, representing a specific reason or identifier for this check."},"memos":{"$ref":"memos"}},"required":["destination","sendMax"],"additionalProperties":false}')},7655:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"depositPreauth","link":"deposit-preauth","type":"object","properties":{"authorize":{"$ref":"address","description":"Address of the account that can cash the check."},"unauthorize":{"$ref":"address","description":"Address of the account that can cash the check."},"memos":{"$ref":"memos"}},"oneOf":[{"required":["authorize"]},{"required":["unauthorize"]}],"additionalProperties":false}')},759:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"escrowCancellation","link":"escrow-cancellation","type":"object","properties":{"memos":{"$ref":"memos"},"owner":{"$ref":"address","description":"The address of the owner of the escrow to cancel."},"escrowSequence":{"$ref":"sequence","description":"The [account sequence number](#account-sequence-number) of the [Escrow Creation](#escrow-creation) transaction for the escrow to cancel."}},"required":["owner","escrowSequence"],"additionalProperties":false}')},1125:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"escrowCreation","link":"escrow-creation","type":"object","properties":{"amount":{"$ref":"value","description":"Amount of XRP for sender to escrow."},"destination":{"$ref":"address","description":"Address to receive escrowed XRP."},"memos":{"$ref":"memos"},"condition":{"type":"string","description":"A hex value representing a [PREIMAGE-SHA-256 crypto-condition](https://tools.ietf.org/html/draft-thomas-crypto-conditions-02#section-8.1). If present, `fulfillment` is required upon execution.","pattern":"^[A-F0-9]{0,256}$"},"allowCancelAfter":{"type":"string","format":"date-time","description":"If present, the escrow may be cancelled after this time."},"allowExecuteAfter":{"type":"string","format":"date-time","description":"If present, the escrow can not be executed before this time."},"sourceTag":{"$ref":"tag","description":"Source tag."},"destinationTag":{"$ref":"tag","description":"Destination tag."}},"required":["amount","destination"],"additionalProperties":false}')},9696:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"escrowExecution","link":"escrow-execution","type":"object","properties":{"memos":{"$ref":"memos"},"owner":{"$ref":"address","description":"The address of the owner of the escrow to execute."},"escrowSequence":{"$ref":"sequence","description":"The [account sequence number](#account-sequence-number) of the [Escrow Creation](#escrow-creation) transaction for the escrow to execute."},"condition":{"type":"string","description":"A hex value representing a [PREIMAGE-SHA-256 crypto-condition](https://tools.ietf.org/html/draft-thomas-crypto-conditions-02#section-8.1). This must match the original `condition` from the escrow creation transaction.","pattern":"^[A-F0-9]{0,256}$"},"fulfillment":{"type":"string","description":"A hex value representing the [PREIMAGE-SHA-256 crypto-condition](https://tools.ietf.org/html/draft-thomas-crypto-conditions-02#section-8.1) fulfillment for `condition`.","pattern":"^[A-F0-9]+$"}},"required":["owner","escrowSequence"],"additionalProperties":false}')},393:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"getPayment","description":"A specification of a payment in a response for getTransaction or getTransactions.","type":"object","properties":{"source":{"$ref":"sourceAdjustment","description":"The source of the funds to be sent."},"destination":{"$ref":"destinationAddressTag","description":"The destination of the funds to be sent. Since this is a payment response, the amount is not shown here. For the amount that the transaction delivered, see `outcome.deliveredAmount`."},"paths":{"type":"string","description":"The paths of trustlines and orders to use in executing the payment."},"memos":{"$ref":"memos"},"invoiceID":{"description":"A 256-bit hash that can be used to identify a particular payment.","$ref":"hash256"},"allowPartialPayment":{"description":"If true, this payment can deliver less than the full amount.","type":"boolean"},"noDirectRipple":{"description":"If true and paths are specified, the sender would like the XRP Ledger to disregard any direct paths from the source account to the destination account. This may be used to take advantage of an arbitrage opportunity or by gateways wishing to issue balances from a hot wallet to a user who has mistakenly set a trustline directly to the hot wallet.","type":"boolean"},"limitQuality":{"description":"Only take paths where all the conversions have an input:output ratio that is equal or better than the ratio of destination.amount:source.maxAmount.","type":"boolean"}},"required":["source","destination"],"additionalProperties":false}')},8909:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"orderCancellation","link":"order-cancellation","type":"object","properties":{"orderSequence":{"$ref":"sequence","description":"The [account sequence number](#account-sequence-number) of the order to cancel."},"memos":{"$ref":"memos"}},"required":["orderSequence"],"additionalProperties":false}')},9572:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"order","link":"order","type":"object","properties":{"direction":{"type":"string","enum":["buy","sell"],"description":"Equal to \\"buy\\" for buy orders and \\"sell\\" for sell orders."},"quantity":{"$ref":"amount","description":"The amount of currency to buy or sell."},"totalPrice":{"$ref":"amount","description":"The total price to be paid for the `quantity` to be bought or sold."},"immediateOrCancel":{"type":"boolean","description":"Treat the offer as an [Immediate or Cancel order](http://en.wikipedia.org/wiki/Immediate_or_cancel). If enabled, do not create an object in the ledger that can be matched later: instead, only execute as much as can be fulfilled immediately. This cannot be used with `fillOrKill`."},"fillOrKill":{"type":"boolean","description":"Treat the offer as a [Fill or Kill order](http://en.wikipedia.org/wiki/Fill_or_kill). Only attempt to match existing offers in the ledger, and only do so if the entire quantity can be exchanged. This cannot be used with `immediateOrCancel`."},"passive":{"description":"If enabled, the offer does not consume offers that exactly match it, and instead becomes an Offer node in the ledger. It still consumes offers that cross it.","type":"boolean"},"expirationTime":{"type":"string","format":"date-time","description":"Time after which the offer is no longer active, as an [ISO 8601 date-time](https://en.wikipedia.org/wiki/ISO_8601)."},"orderToReplace":{"$ref":"sequence","description":"The [account sequence number](#account-sequence-number) of an order to cancel before the new order is created, effectively replacing the old order."},"memos":{"$ref":"memos"}},"required":["direction","quantity","totalPrice"],"additionalProperties":false,"not":{"description":"immediateOrCancel and fillOrKill are mutually exclusive","required":["immediateOrCancel","fillOrKill"]}}')},1219:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"paymentChannelClaim","link":"payment-channel-claim","type":"object","properties":{"channel":{"$ref":"hash256","description":"256-bit hexadecimal channel identifier."},"amount":{"$ref":"value","description":"Amount of XRP authorized by this signature."},"balance":{"$ref":"value","description":"Total XRP balance delivered by this channel after claim is processed."},"signature":{"$ref":"signature","description":"Signed claim authorizing withdrawal of XRP from the channel. (Required except from the channel\'s source address.)"},"publicKey":{"$ref":"publicKey","description":"Public key of the channel. (For verifying the signature.)"},"renew":{"type":"boolean","description":"Clear the channel\'s expiration time."},"close":{"type":"boolean","description":"Request to close the channel. If the channel has no XRP remaining or the destination address requests it, closes the channel immediately (returning unclaimed XRP to the source address). Otherwise, sets the channel to expire after settleDelay seconds have passed."},"memos":{"$ref":"memos"}},"required":["channel"],"additionalProperties":false}')},7597:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"paymentChannelCreate","link":"payment-channel-create","type":"object","properties":{"amount":{"$ref":"value","description":"Amount of XRP for sender to set aside in this channel."},"destination":{"$ref":"address","description":"Address to receive XRP claims against this channel."},"settleDelay":{"type":"number","description":"Amount of seconds the source address must wait before closing the channel if it has unclaimed XRP."},"publicKey":{"$ref":"publicKey","description":"Public key of the key pair the source may use to sign claims against this channel."},"cancelAfter":{"type":"string","format":"date-time","description":"Time when this channel expires. This expiration cannot be changed after creating the channel."},"sourceTag":{"$ref":"tag","description":"Source tag."},"destinationTag":{"$ref":"tag","description":"Destination tag."},"memos":{"$ref":"memos"}},"required":["amount","destination","settleDelay","publicKey"],"additionalProperties":false}')},5398:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"paymentChannelFund","link":"payment-channel-fund","type":"object","properties":{"amount":{"$ref":"value","description":"Amount of XRP to fund the channel with."},"channel":{"$ref":"hash256","description":"256-bit hexadecimal channel identifier."},"expiration":{"type":"string","format":"date-time","description":"New expiration for this channel. (This does not change the cancelAfter expiration, if the channel has one.) Cannot move the expiration sooner than settleDelay seconds from time of the request."},"memos":{"$ref":"memos"}},"required":["amount","channel"],"additionalProperties":false}')},5711:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"payment","link":"payment","type":"object","properties":{"source":{"$ref":"sourceAdjustment","description":"The source of the funds to be sent."},"destination":{"$ref":"destinationAdjustment","description":"The destination of the funds to be sent."},"paths":{"type":"string","description":"The paths of trustlines and orders to use in executing the payment."},"memos":{"$ref":"memos"},"invoiceID":{"description":"A 256-bit hash that can be used to identify a particular payment.","$ref":"hash256"},"allowPartialPayment":{"description":"If true, this payment can deliver less than the full amount.","type":"boolean"},"noDirectRipple":{"description":"If true and paths are specified, the sender would like the XRP Ledger to disregard any direct paths from the source account to the destination account. This may be used to take advantage of an arbitrage opportunity or by gateways wishing to issue balances from a hot wallet to a user who has mistakenly set a trustline directly to the hot wallet.","type":"boolean"},"limitQuality":{"description":"Only take paths where all the conversions have an input:output ratio that is equal or better than the ratio of destination.amount:source.maxAmount.","type":"boolean"}},"required":["source","destination"],"additionalProperties":false}')},9109:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"settings","link":"settings","$ref":"settingsPlusMemos","oneOf":[{"required":["memos"],"minProperties":2,"maxProperties":2},{"not":{"required":["memos"]},"minProperties":1,"maxProperties":1}]}')},8476:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-04/schema#","title":"trustline","link":"trustline","type":"object","properties":{"currency":{"$ref":"currency","description":"The currency this trustline applies to."},"counterparty":{"$ref":"address","description":"The address of the account this trustline extends trust to."},"limit":{"$ref":"value","description":"The maximum amount that the owner of the trustline can be owed through the trustline."},"qualityIn":{"$ref":"quality","description":"Incoming balances on this trustline are valued at this ratio."},"qualityOut":{"$ref":"quality","description":"Outgoing balances on this trustline are valued at this ratio."},"ripplingDisabled":{"type":"boolean","description":"If true, payments cannot ripple through this trustline."},"authorized":{"type":"boolean","description":"If true, authorize the counterparty to hold issuances from this account."},"frozen":{"type":"boolean","description":"If true, the trustline is frozen, which means that funds can only be sent to the owner."},"memos":{"$ref":"memos"}},"required":["currency","counterparty","limit"],"additionalProperties":false}')},4946:e=>{"use strict";e.exports=JSON.parse('{"aes-128-ecb":{"cipher":"AES","key":128,"iv":0,"mode":"ECB","type":"block"},"aes-192-ecb":{"cipher":"AES","key":192,"iv":0,"mode":"ECB","type":"block"},"aes-256-ecb":{"cipher":"AES","key":256,"iv":0,"mode":"ECB","type":"block"},"aes-128-cbc":{"cipher":"AES","key":128,"iv":16,"mode":"CBC","type":"block"},"aes-192-cbc":{"cipher":"AES","key":192,"iv":16,"mode":"CBC","type":"block"},"aes-256-cbc":{"cipher":"AES","key":256,"iv":16,"mode":"CBC","type":"block"},"aes128":{"cipher":"AES","key":128,"iv":16,"mode":"CBC","type":"block"},"aes192":{"cipher":"AES","key":192,"iv":16,"mode":"CBC","type":"block"},"aes256":{"cipher":"AES","key":256,"iv":16,"mode":"CBC","type":"block"},"aes-128-cfb":{"cipher":"AES","key":128,"iv":16,"mode":"CFB","type":"stream"},"aes-192-cfb":{"cipher":"AES","key":192,"iv":16,"mode":"CFB","type":"stream"},"aes-256-cfb":{"cipher":"AES","key":256,"iv":16,"mode":"CFB","type":"stream"},"aes-128-cfb8":{"cipher":"AES","key":128,"iv":16,"mode":"CFB8","type":"stream"},"aes-192-cfb8":{"cipher":"AES","key":192,"iv":16,"mode":"CFB8","type":"stream"},"aes-256-cfb8":{"cipher":"AES","key":256,"iv":16,"mode":"CFB8","type":"stream"},"aes-128-cfb1":{"cipher":"AES","key":128,"iv":16,"mode":"CFB1","type":"stream"},"aes-192-cfb1":{"cipher":"AES","key":192,"iv":16,"mode":"CFB1","type":"stream"},"aes-256-cfb1":{"cipher":"AES","key":256,"iv":16,"mode":"CFB1","type":"stream"},"aes-128-ofb":{"cipher":"AES","key":128,"iv":16,"mode":"OFB","type":"stream"},"aes-192-ofb":{"cipher":"AES","key":192,"iv":16,"mode":"OFB","type":"stream"},"aes-256-ofb":{"cipher":"AES","key":256,"iv":16,"mode":"OFB","type":"stream"},"aes-128-ctr":{"cipher":"AES","key":128,"iv":16,"mode":"CTR","type":"stream"},"aes-192-ctr":{"cipher":"AES","key":192,"iv":16,"mode":"CTR","type":"stream"},"aes-256-ctr":{"cipher":"AES","key":256,"iv":16,"mode":"CTR","type":"stream"},"aes-128-gcm":{"cipher":"AES","key":128,"iv":12,"mode":"GCM","type":"auth"},"aes-192-gcm":{"cipher":"AES","key":192,"iv":12,"mode":"GCM","type":"auth"},"aes-256-gcm":{"cipher":"AES","key":256,"iv":12,"mode":"GCM","type":"auth"}}')},5207:e=>{"use strict";e.exports=JSON.parse('{"sha224WithRSAEncryption":{"sign":"rsa","hash":"sha224","id":"302d300d06096086480165030402040500041c"},"RSA-SHA224":{"sign":"ecdsa/rsa","hash":"sha224","id":"302d300d06096086480165030402040500041c"},"sha256WithRSAEncryption":{"sign":"rsa","hash":"sha256","id":"3031300d060960864801650304020105000420"},"RSA-SHA256":{"sign":"ecdsa/rsa","hash":"sha256","id":"3031300d060960864801650304020105000420"},"sha384WithRSAEncryption":{"sign":"rsa","hash":"sha384","id":"3041300d060960864801650304020205000430"},"RSA-SHA384":{"sign":"ecdsa/rsa","hash":"sha384","id":"3041300d060960864801650304020205000430"},"sha512WithRSAEncryption":{"sign":"rsa","hash":"sha512","id":"3051300d060960864801650304020305000440"},"RSA-SHA512":{"sign":"ecdsa/rsa","hash":"sha512","id":"3051300d060960864801650304020305000440"},"RSA-SHA1":{"sign":"rsa","hash":"sha1","id":"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{"sign":"ecdsa","hash":"sha1","id":""},"sha256":{"sign":"ecdsa","hash":"sha256","id":""},"sha224":{"sign":"ecdsa","hash":"sha224","id":""},"sha384":{"sign":"ecdsa","hash":"sha384","id":""},"sha512":{"sign":"ecdsa","hash":"sha512","id":""},"DSA-SHA":{"sign":"dsa","hash":"sha1","id":""},"DSA-SHA1":{"sign":"dsa","hash":"sha1","id":""},"DSA":{"sign":"dsa","hash":"sha1","id":""},"DSA-WITH-SHA224":{"sign":"dsa","hash":"sha224","id":""},"DSA-SHA224":{"sign":"dsa","hash":"sha224","id":""},"DSA-WITH-SHA256":{"sign":"dsa","hash":"sha256","id":""},"DSA-SHA256":{"sign":"dsa","hash":"sha256","id":""},"DSA-WITH-SHA384":{"sign":"dsa","hash":"sha384","id":""},"DSA-SHA384":{"sign":"dsa","hash":"sha384","id":""},"DSA-WITH-SHA512":{"sign":"dsa","hash":"sha512","id":""},"DSA-SHA512":{"sign":"dsa","hash":"sha512","id":""},"DSA-RIPEMD160":{"sign":"dsa","hash":"rmd160","id":""},"ripemd160WithRSA":{"sign":"rsa","hash":"rmd160","id":"3021300906052b2403020105000414"},"RSA-RIPEMD160":{"sign":"rsa","hash":"rmd160","id":"3021300906052b2403020105000414"},"md5WithRSAEncryption":{"sign":"rsa","hash":"md5","id":"3020300c06082a864886f70d020505000410"},"RSA-MD5":{"sign":"rsa","hash":"md5","id":"3020300c06082a864886f70d020505000410"}}')},1308:e=>{"use strict";e.exports=JSON.parse('{"1.3.132.0.10":"secp256k1","1.3.132.0.33":"p224","1.2.840.10045.3.1.1":"p192","1.2.840.10045.3.1.7":"p256","1.3.132.0.34":"p384","1.3.132.0.35":"p521"}')},9799:e=>{"use strict";e.exports=JSON.parse('{"modp1":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},"modp2":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},"modp5":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},"modp14":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},"modp15":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},"modp16":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},"modp17":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},"modp18":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}')},8597:e=>{"use strict";e.exports={i8:"6.5.4"}},2562:e=>{"use strict";e.exports=JSON.parse('{"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"}')},8652:e=>{"use strict";e.exports=JSON.parse('{"TYPES":{"Validation":10003,"Done":-1,"Hash128":4,"Blob":7,"AccountID":8,"Amount":6,"Hash256":5,"UInt8":16,"Vector256":19,"STObject":14,"Unknown":-2,"Transaction":10001,"Hash160":17,"PathSet":18,"LedgerEntry":10002,"UInt16":1,"NotPresent":0,"UInt64":3,"UInt32":2,"STArray":15},"LEDGER_ENTRY_TYPES":{"Any":-3,"Child":-2,"Invalid":-1,"AccountRoot":97,"DirectoryNode":100,"RippleState":114,"Ticket":84,"SignerList":83,"Offer":111,"LedgerHashes":104,"Amendments":102,"FeeSettings":115,"Escrow":117,"PayChannel":120,"DepositPreauth":112,"Check":67,"Nickname":110,"Contract":99,"GeneratorMap":103,"NegativeUNL":78},"FIELDS":[["Generic",{"nth":0,"isVLEncoded":false,"isSerialized":false,"isSigningField":false,"type":"Unknown"}],["Invalid",{"nth":-1,"isVLEncoded":false,"isSerialized":false,"isSigningField":false,"type":"Unknown"}],["LedgerEntryType",{"nth":1,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt16"}],["TransactionType",{"nth":2,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt16"}],["SignerWeight",{"nth":3,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt16"}],["Flags",{"nth":2,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["SourceTag",{"nth":3,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["Sequence",{"nth":4,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["PreviousTxnLgrSeq",{"nth":5,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["LedgerSequence",{"nth":6,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["CloseTime",{"nth":7,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["ParentCloseTime",{"nth":8,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["SigningTime",{"nth":9,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["Expiration",{"nth":10,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["TransferRate",{"nth":11,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["WalletSize",{"nth":12,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["OwnerCount",{"nth":13,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["DestinationTag",{"nth":14,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["HighQualityIn",{"nth":16,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["HighQualityOut",{"nth":17,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["LowQualityIn",{"nth":18,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["LowQualityOut",{"nth":19,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["QualityIn",{"nth":20,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["QualityOut",{"nth":21,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["StampEscrow",{"nth":22,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["BondAmount",{"nth":23,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["LoadFee",{"nth":24,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["OfferSequence",{"nth":25,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["FirstLedgerSequence",{"nth":26,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["LastLedgerSequence",{"nth":27,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["TransactionIndex",{"nth":28,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["OperationLimit",{"nth":29,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["ReferenceFeeUnits",{"nth":30,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["ReserveBase",{"nth":31,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["ReserveIncrement",{"nth":32,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["SetFlag",{"nth":33,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["ClearFlag",{"nth":34,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["SignerQuorum",{"nth":35,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["CancelAfter",{"nth":36,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["FinishAfter",{"nth":37,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["IndexNext",{"nth":1,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["IndexPrevious",{"nth":2,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["BookNode",{"nth":3,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["OwnerNode",{"nth":4,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["BaseFee",{"nth":5,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["ExchangeRate",{"nth":6,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["LowNode",{"nth":7,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["HighNode",{"nth":8,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["EmailHash",{"nth":1,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash128"}],["LedgerHash",{"nth":1,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["ParentHash",{"nth":2,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["TransactionHash",{"nth":3,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["AccountHash",{"nth":4,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["PreviousTxnID",{"nth":5,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["LedgerIndex",{"nth":6,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["WalletLocator",{"nth":7,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["RootIndex",{"nth":8,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["AccountTxnID",{"nth":9,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["BookDirectory",{"nth":16,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["InvoiceID",{"nth":17,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["Nickname",{"nth":18,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["Amendment",{"nth":19,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["TicketID",{"nth":20,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["Digest",{"nth":21,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["hash",{"nth":257,"isVLEncoded":false,"isSerialized":false,"isSigningField":false,"type":"Hash256"}],["index",{"nth":258,"isVLEncoded":false,"isSerialized":false,"isSigningField":false,"type":"Hash256"}],["Amount",{"nth":1,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["Balance",{"nth":2,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["LimitAmount",{"nth":3,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["TakerPays",{"nth":4,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["TakerGets",{"nth":5,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["LowLimit",{"nth":6,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["HighLimit",{"nth":7,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["Fee",{"nth":8,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["SendMax",{"nth":9,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["DeliverMin",{"nth":10,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["MinimumOffer",{"nth":16,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["RippleEscrow",{"nth":17,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["DeliveredAmount",{"nth":18,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["taker_gets_funded",{"nth":258,"isVLEncoded":false,"isSerialized":false,"isSigningField":false,"type":"Amount"}],["taker_pays_funded",{"nth":259,"isVLEncoded":false,"isSerialized":false,"isSigningField":false,"type":"Amount"}],["PublicKey",{"nth":1,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["MessageKey",{"nth":2,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["SigningPubKey",{"nth":3,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["TxnSignature",{"nth":4,"isVLEncoded":true,"isSerialized":true,"isSigningField":false,"type":"Blob"}],["Generator",{"nth":5,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["Signature",{"nth":6,"isVLEncoded":true,"isSerialized":true,"isSigningField":false,"type":"Blob"}],["Domain",{"nth":7,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["FundCode",{"nth":8,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["RemoveCode",{"nth":9,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["ExpireCode",{"nth":10,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["CreateCode",{"nth":11,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["MemoType",{"nth":12,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["MemoData",{"nth":13,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["MemoFormat",{"nth":14,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["Fulfillment",{"nth":16,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["Condition",{"nth":17,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["MasterSignature",{"nth":18,"isVLEncoded":true,"isSerialized":true,"isSigningField":false,"type":"Blob"}],["UNLModifyValidator",{"nth":19,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["ValidatorToDisable",{"nth":20,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["ValidatorToReEnable",{"nth":21,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["Account",{"nth":1,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"AccountID"}],["Owner",{"nth":2,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"AccountID"}],["Destination",{"nth":3,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"AccountID"}],["Issuer",{"nth":4,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"AccountID"}],["Authorize",{"nth":5,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"AccountID"}],["Unauthorize",{"nth":6,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"AccountID"}],["Target",{"nth":7,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"AccountID"}],["RegularKey",{"nth":8,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"AccountID"}],["ObjectEndMarker",{"nth":1,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["TransactionMetaData",{"nth":2,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["CreatedNode",{"nth":3,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["DeletedNode",{"nth":4,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["ModifiedNode",{"nth":5,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["PreviousFields",{"nth":6,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["FinalFields",{"nth":7,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["NewFields",{"nth":8,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["TemplateEntry",{"nth":9,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["Memo",{"nth":10,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["SignerEntry",{"nth":11,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["Signer",{"nth":16,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["Majority",{"nth":18,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["DisabledValidator",{"nth":19,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["ArrayEndMarker",{"nth":1,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STArray"}],["Signers",{"nth":3,"isVLEncoded":false,"isSerialized":true,"isSigningField":false,"type":"STArray"}],["SignerEntries",{"nth":4,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STArray"}],["Template",{"nth":5,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STArray"}],["Necessary",{"nth":6,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STArray"}],["Sufficient",{"nth":7,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STArray"}],["AffectedNodes",{"nth":8,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STArray"}],["Memos",{"nth":9,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STArray"}],["Majorities",{"nth":16,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STArray"}],["DisabledValidators",{"nth":17,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STArray"}],["CloseResolution",{"nth":1,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt8"}],["Method",{"nth":2,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt8"}],["TransactionResult",{"nth":3,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt8"}],["TakerPaysCurrency",{"nth":1,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash160"}],["TakerPaysIssuer",{"nth":2,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash160"}],["TakerGetsCurrency",{"nth":3,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash160"}],["TakerGetsIssuer",{"nth":4,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash160"}],["Paths",{"nth":1,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"PathSet"}],["Indexes",{"nth":1,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Vector256"}],["Hashes",{"nth":2,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Vector256"}],["Amendments",{"nth":3,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Vector256"}],["Transaction",{"nth":1,"isVLEncoded":false,"isSerialized":false,"isSigningField":false,"type":"Transaction"}],["LedgerEntry",{"nth":1,"isVLEncoded":false,"isSerialized":false,"isSigningField":false,"type":"LedgerEntry"}],["Validation",{"nth":1,"isVLEncoded":false,"isSerialized":false,"isSigningField":false,"type":"Validation"}],["SignerListID",{"nth":38,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["SettleDelay",{"nth":39,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["TicketCount",{"nth":40,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["TicketSequence",{"nth":41,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["Channel",{"nth":22,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["ConsensusHash",{"nth":23,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["CheckID",{"nth":24,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["TickSize",{"nth":16,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt8"}],["UNLModifyDisabling",{"nth":17,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt8"}],["DestinationNode",{"nth":9,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}]],"TRANSACTION_RESULTS":{"telLOCAL_ERROR":-399,"telBAD_DOMAIN":-398,"telBAD_PATH_COUNT":-397,"telBAD_PUBLIC_KEY":-396,"telFAILED_PROCESSING":-395,"telINSUF_FEE_P":-394,"telNO_DST_PARTIAL":-393,"telCAN_NOT_QUEUE":-392,"telCAN_NOT_QUEUE_BALANCE":-391,"telCAN_NOT_QUEUE_BLOCKS":-390,"telCAN_NOT_QUEUE_BLOCKED":-389,"telCAN_NOT_QUEUE_FEE":-388,"telCAN_NOT_QUEUE_FULL":-387,"temMALFORMED":-299,"temBAD_AMOUNT":-298,"temBAD_CURRENCY":-297,"temBAD_EXPIRATION":-296,"temBAD_FEE":-295,"temBAD_ISSUER":-294,"temBAD_LIMIT":-293,"temBAD_OFFER":-292,"temBAD_PATH":-291,"temBAD_PATH_LOOP":-290,"temBAD_REGKEY":-289,"temBAD_SEND_XRP_LIMIT":-288,"temBAD_SEND_XRP_MAX":-287,"temBAD_SEND_XRP_NO_DIRECT":-286,"temBAD_SEND_XRP_PARTIAL":-285,"temBAD_SEND_XRP_PATHS":-284,"temBAD_SEQUENCE":-283,"temBAD_SIGNATURE":-282,"temBAD_SRC_ACCOUNT":-281,"temBAD_TRANSFER_RATE":-280,"temDST_IS_SRC":-279,"temDST_NEEDED":-278,"temINVALID":-277,"temINVALID_FLAG":-276,"temREDUNDANT":-275,"temRIPPLE_EMPTY":-274,"temDISABLED":-273,"temBAD_SIGNER":-272,"temBAD_QUORUM":-271,"temBAD_WEIGHT":-270,"temBAD_TICK_SIZE":-269,"temINVALID_ACCOUNT_ID":-268,"temCANNOT_PREAUTH_SELF":-267,"temUNCERTAIN":-266,"temUNKNOWN":-265,"tefFAILURE":-199,"tefALREADY":-198,"tefBAD_ADD_AUTH":-197,"tefBAD_AUTH":-196,"tefBAD_LEDGER":-195,"tefCREATED":-194,"tefEXCEPTION":-193,"tefINTERNAL":-192,"tefNO_AUTH_REQUIRED":-191,"tefPAST_SEQ":-190,"tefWRONG_PRIOR":-189,"tefMASTER_DISABLED":-188,"tefMAX_LEDGER":-187,"tefBAD_SIGNATURE":-186,"tefBAD_QUORUM":-185,"tefNOT_MULTI_SIGNING":-184,"tefBAD_AUTH_MASTER":-183,"tefINVARIANT_FAILED":-182,"tefTOO_BIG":-181,"terRETRY":-99,"terFUNDS_SPENT":-98,"terINSUF_FEE_B":-97,"terNO_ACCOUNT":-96,"terNO_AUTH":-95,"terNO_LINE":-94,"terOWNERS":-93,"terPRE_SEQ":-92,"terLAST":-91,"terNO_RIPPLE":-90,"terQUEUED":-89,"tesSUCCESS":0,"tecCLAIM":100,"tecPATH_PARTIAL":101,"tecUNFUNDED_ADD":102,"tecUNFUNDED_OFFER":103,"tecUNFUNDED_PAYMENT":104,"tecFAILED_PROCESSING":105,"tecDIR_FULL":121,"tecINSUF_RESERVE_LINE":122,"tecINSUF_RESERVE_OFFER":123,"tecNO_DST":124,"tecNO_DST_INSUF_XRP":125,"tecNO_LINE_INSUF_RESERVE":126,"tecNO_LINE_REDUNDANT":127,"tecPATH_DRY":128,"tecUNFUNDED":129,"tecNO_ALTERNATIVE_KEY":130,"tecNO_REGULAR_KEY":131,"tecOWNERS":132,"tecNO_ISSUER":133,"tecNO_AUTH":134,"tecNO_LINE":135,"tecINSUFF_FEE":136,"tecFROZEN":137,"tecNO_TARGET":138,"tecNO_PERMISSION":139,"tecNO_ENTRY":140,"tecINSUFFICIENT_RESERVE":141,"tecNEED_MASTER_KEY":142,"tecDST_TAG_NEEDED":143,"tecINTERNAL":144,"tecOVERSIZE":145,"tecCRYPTOCONDITION_ERROR":146,"tecINVARIANT_FAILED":147,"tecEXPIRED":148,"tecDUPLICATE":149,"tecKILLED":150,"tecHAS_OBLIGATIONS":151,"tecTOO_SOON":152},"TRANSACTION_TYPES":{"Invalid":-1,"Payment":0,"EscrowCreate":1,"EscrowFinish":2,"AccountSet":3,"EscrowCancel":4,"SetRegularKey":5,"NickNameSet":6,"OfferCreate":7,"OfferCancel":8,"Contract":9,"TicketCreate":10,"TicketCancel":11,"SignerListSet":12,"PaymentChannelCreate":13,"PaymentChannelFund":14,"PaymentChannelClaim":15,"CheckCreate":16,"CheckCash":17,"CheckCancel":18,"DepositPreauth":19,"TrustSet":20,"AccountDelete":21,"EnableAmendment":100,"SetFee":101,"UNLModify":102}}')}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={id:n,loaded:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var n=r(3081);ripple=n})();